uwcse.location.objects.mote
Class MoteSerialReadWrite
java.lang.Object
|
+--java.lang.Thread
|
+--uwcse.location.objects.mote.MoteSerialReadWrite
- All Implemented Interfaces:
- EventListener, Runnable, javax.comm.SerialPortEventListener
- public class MoteSerialReadWrite
- extends Thread
- implements javax.comm.SerialPortEventListener
A thread to read and write location system packets form a serial port
connected to a Berkeley mote.
- Version:
- $Revision: 1.2 $
- Author:
- Eugene Shih Date: $Date: 2004/02/09 23:47:06 $
- See Also:
MoteDriver
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
BASE_ID
public static int BASE_ID
MoteSerialReadWrite
public MoteSerialReadWrite(String portName,
String programName,
MoteDriver.SynchronizedQueue inQ)
finalize
public void finalize()
- Overrides:
finalize in class Object
run
public void run()
- Specified by:
run in interface Runnable- Overrides:
run in class Thread
printAllPorts
public void printAllPorts()
send_data
public void send_data(MoteSerialReadWrite.topo_packet tp)
calcrc
public int calcrc(byte[] packet,
int count)
open
public void open(String portName)
throws javax.comm.NoSuchPortException,
javax.comm.PortInUseException,
IOException,
javax.comm.UnsupportedCommOperationException,
TooManyListenersException
- Open specified serial port
- Throws:
javax.comm.NoSuchPortException
javax.comm.PortInUseException
IOException
javax.comm.UnsupportedCommOperationException
TooManyListenersException
closePort
public void closePort()
- Close serial port
serialEvent
public void serialEvent(javax.comm.SerialPortEvent event)
- Specified by:
serialEvent in interface javax.comm.SerialPortEventListener
This documentation is for the Location Stack v0.8. The latest distribution, the documentation, and the list of contributors to the Location Stack can always be found at http://portolano.cs.washington.edu/projects/location/
© Copyright 2004 University of Washington CSE