|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.intel.research.rain.Service
|
+--uwcse.location.LocationService
|
+--uwcse.location.FusionClientService
|
+--uwcse.location.objects.SensorDriver
|
+--uwcse.location.objects.nmea.NMEADriver
Driver for a device speaking the National Marine Electronics Association (NMEA) protocol including most Global Positioning System devices. Note that this driver is currently just for testing purposes in that it decodes NMEA sentences but does not interact with the location stack infrastructure.
MapMeasurement| Nested Class Summary |
| Nested classes inherited from class uwcse.location.LocationService |
LocationService.RediscoverServices |
| Field Summary | |
protected javax.comm.SerialPort |
m_serialPort
|
protected BufferedReader |
m_serialPortReader
|
protected BufferedWriter |
m_serialPortWriter
|
| Fields inherited from class uwcse.location.objects.SensorDriver |
m_measurementSinkServiceIDSet, SINK_DISCOVERY_QUERY |
| Fields inherited from class uwcse.location.FusionClientService |
FUSION_DISCOVERY_QUERY, m_fusionServiceIDSet |
| Fields inherited from class uwcse.location.LocationService |
CONFIG_FILENAME, MESSAGE_ELEMENT, MESSAGE_EXTENSION, RPC_ELEMENT, RPC_EXCEPTION_ELEMENT, RPC_EXTENSION, RPC_RESULT_ELEMENT |
| Constructor Summary | |
NMEADriver()
Create an NMEA device driver. |
|
| Method Summary | |
void |
closeSerialPort()
Close serial port and remove the event listener. |
static byte |
computeChecksum(byte[] bytes)
Comput an NMEA checksum for the given array of bytes. |
void |
finalize()
Overridden to make sure the serial port is closed before the object is garbage collected. |
protected void |
handleInputLine(String sentence)
Parse and dispatch NMEA sentences. |
protected void |
handleNMEASentence(String name,
String[] args)
Handle an NMEA sentence of the given name with the given arguments. |
protected void |
handleNMEASentence(String@@"GPGGA" name,
String[] args)
Handle an NMEA sentence describing position, latitude, longitude, and time. |
protected void |
handleNMEASentence(String@@"GPGLL" name,
String[] args)
Handle an NMEA sentence containing position, latitude, longitude, and time. |
protected void |
handleNMEASentence(String@@"GPGSA" name,
String[] args)
Handle an NMEA sentence describing the type of GPS fix. |
protected void |
handleNMEASentence(String@@"GPRMC" name,
String[] args)
Handle an NMEA sentence containing the recommended minimum specific GPS/transit data. |
protected void |
handleNMEASentence(String@@"GPVTG" name,
String[] args)
Handle an NMEA sentence describing velocity made good. |
protected void |
handleNMEASentence(String@@"HCHDG" name,
String[] args)
Handle an NMEA sentence containing a digital compass reading. |
static void |
main(String[] argv)
|
void |
openSerialPort(String portName,
int baudRate)
Open the specified serial port at the given baud rate. |
protected static void |
printUsageAndExit()
Show the program argument usage and then exit. |
void |
serialEvent(javax.comm.SerialPortEvent event)
Handle a serial port events. |
| Methods inherited from class uwcse.location.objects.SensorDriver |
sendMeasurement, withdraw |
| Methods inherited from class uwcse.location.FusionClientService |
callFusionServiceRpc, getFusionServiceIDSet |
| 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 com.intel.research.rain.Service |
getDaemon, getDispatcher, getServiceID, process, receive, setDaemon |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected javax.comm.SerialPort m_serialPort
protected BufferedReader m_serialPortReader
protected BufferedWriter m_serialPortWriter
| Constructor Detail |
public NMEADriver()
throws RainException,
LocationException
RainException
LocationException| Method Detail |
public void openSerialPort(String portName,
int baudRate)
throws javax.comm.NoSuchPortException,
javax.comm.PortInUseException,
IOException,
javax.comm.UnsupportedCommOperationException,
TooManyListenersException
javax.comm.NoSuchPortException
javax.comm.PortInUseException
IOException
javax.comm.UnsupportedCommOperationException
TooManyListenersExceptionpublic void closeSerialPort()
public void serialEvent(javax.comm.SerialPortEvent event)
serialEvent in interface javax.comm.SerialPortEventListenerpublic void finalize()
finalize in class Objectprotected void handleInputLine(String sentence)
protected void handleNMEASentence(String name,
String[] args)
protected void handleNMEASentence(String@@"GPRMC" name,
String[] args)
protected void handleNMEASentence(String@@"GPGSA" name,
String[] args)
protected void handleNMEASentence(String@@"GPGGA" name,
String[] args)
protected void handleNMEASentence(String@@"GPVTG" name,
String[] args)
protected void handleNMEASentence(String@@"GPGLL" name,
String[] args)
protected void handleNMEASentence(String@@"HCHDG" name,
String[] args)
public static byte computeChecksum(byte[] bytes)
protected static void printUsageAndExit()
public static void main(String[] argv)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||