fi.hut.tml.xsmiles.mlfc.gps
Class GPSDataConnection

java.lang.Object
  extended byfi.hut.tml.xsmiles.mlfc.gps.GPSDataConnection
All Implemented Interfaces:
java.util.EventListener, javax.comm.SerialPortEventListener

public class GPSDataConnection
extends java.lang.Object
implements javax.comm.SerialPortEventListener

A Simple class for communicating with GPS receiver. Needs java Comm API implmentation, which is available from e.g. http://www.interstice.com/kevinh/linuxcomm.html, which is a GNU serial communications implementation called RXTX. Both win32, and linux.

Author:
Unknown, Modification by Juha

Constructor Summary
GPSDataConnection(java.lang.String port)
           
 
Method Summary
 void addGPSListener(GPSListener gl)
          Set GPS data listener...
 void closeUp()
          Close serial connections.
static void main(java.lang.String[] args)
          A simple main for debugging.
 void parseLine(java.lang.String line)
          Parse the $GPRMC sentence from standard NMEA protocol.
 void serialEvent(javax.comm.SerialPortEvent event)
          Serial event listener.
 void setMaxRate(int rate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GPSDataConnection

public GPSDataConnection(java.lang.String port)
Method Detail

main

public static void main(java.lang.String[] args)
A simple main for debugging.


closeUp

public void closeUp()
Close serial connections. FIXME, check how to close up


addGPSListener

public void addGPSListener(GPSListener gl)
Set GPS data listener... There can only be one ;)


setMaxRate

public void setMaxRate(int rate)

serialEvent

public void serialEvent(javax.comm.SerialPortEvent event)
Serial event listener. We are only listening data available

Specified by:
serialEvent in interface javax.comm.SerialPortEventListener

parseLine

public void parseLine(java.lang.String line)
Parse the $GPRMC sentence from standard NMEA protocol.



X-Smiles 1.2