uwcse.location.objects.cricket
Class CricketDriver
java.lang.Object
|
+--com.intel.research.rain.Service
|
+--uwcse.location.LocationService
|
+--uwcse.location.FusionClientService
|
+--uwcse.location.objects.SensorDriver
|
+--uwcse.location.objects.cricket.CricketDriver
- All Implemented Interfaces:
- MessageHandler
- public class CricketDriver
- extends SensorDriver
A CricketDriver interacts with receiver hardware of the Cricket indoor
location system from MIT and generates LinearDistanceMeasurements.
- Version:
- $Revision: 1.2 $
- Author:
- Jeffrey Hightower
- See Also:
LinearDistanceMeasurement
|
Method Summary |
static double |
bodhisToMeters(double bodhis)
This method converts "bodhis", the internal distance measurement units of
the crickets to meters. |
protected void |
closeSerialPort()
Close serial port and remove the event listener. |
static void |
main(String[] argv)
Run the CricketDriver. |
protected void |
openSerialPort(String portName)
Open the specified serial port at the given baud rate. |
protected static void |
printUsageAndExit()
Show the program argument usage and then exit. |
protected void |
withdraw()
Overridden to close the serial port if necessary before withdrawing from
Rain. |
| Methods inherited from class uwcse.location.LocationService |
addObject, callLocationRpc, correctedTimeMillis, getObject, getSysclockError, handleTerminalCommand, multicastLocationMsg, multicastLocationMsgs, processLocationMsg, processLocationRpc, runTerminalCommandLoop, sendLocationMsg, sendLocationMsgs, setDescription |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLOCK_FREQ_HZ
public static final int CLOCK_FREQ_HZ
BEACON_OFFSET_BODHI
public static final int BEACON_OFFSET_BODHI
SPEED_OF_SOUND
public static final double SPEED_OF_SOUND
m_serialPortThread
protected CricketSerialPortThread m_serialPortThread
m_serialPort
protected javax.comm.SerialPort m_serialPort
m_cricketName
protected String m_cricketName
m_packetThread
protected CricketDriver.CricketPacketThread m_packetThread
m_packetQueue
protected ProducerConsumerQueue m_packetQueue
CricketDriver
public CricketDriver(String portName,
String cricketName)
throws RainException,
LocationException,
IOException
- Throws:
RainException
LocationException
IOException
openSerialPort
protected void openSerialPort(String portName)
throws javax.comm.NoSuchPortException,
javax.comm.PortInUseException,
IOException,
javax.comm.UnsupportedCommOperationException,
TooManyListenersException
- Open the specified serial port at the given baud rate.
- Throws:
javax.comm.NoSuchPortException
javax.comm.PortInUseException
IOException
javax.comm.UnsupportedCommOperationException
TooManyListenersException
closeSerialPort
protected void closeSerialPort()
- Close serial port and remove the event listener.
bodhisToMeters
public static double bodhisToMeters(double bodhis)
- This method converts "bodhis", the internal distance measurement units of
the crickets to meters. Bodhis are nonstandard units derived from
processor the clock speed of the crickets and the speed of sound.
withdraw
protected void withdraw()
- Overridden to close the serial port if necessary before withdrawing from
Rain.
- Overrides:
withdraw in class SensorDriver
printUsageAndExit
protected static void printUsageAndExit()
- Show the program argument usage and then exit.
main
public static void main(String[] argv)
- Run the CricketDriver.
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