ocss.nmea.api
Class NMEAReader

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--ocss.nmea.api.NMEAReader
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
CustomReader

public abstract class NMEAReader
extends java.lang.Thread

A Model. This is an abstract class to extend to implement your own data-source. Examples are given for a file containing the data - that can be used as a simulator, and for a Serial Port, that can be used for the real world.


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
NMEAReader(java.util.ArrayList al)
           
 
Method Summary
 void addNMEAListener(NMEAListener l)
           
 boolean canRead()
           
 void enableReading()
           
protected  void fireDataRead(NMEAEvent e)
          The one that tells the Controller to start working
abstract  void read()
          Customize, overwrite this class to get plugged on the right datasource like a Serial Port for example.
 void removeNMEAListener(NMEAListener l)
           
 void run()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NMEAReader

public NMEAReader(java.util.ArrayList al)
Method Detail

fireDataRead

protected void fireDataRead(NMEAEvent e)
The one that tells the Controller to start working

See Also:
NMEAParser

addNMEAListener

public void addNMEAListener(NMEAListener l)

removeNMEAListener

public void removeNMEAListener(NMEAListener l)

canRead

public boolean canRead()

enableReading

public void enableReading()

read

public abstract void read()
Customize, overwrite this class to get plugged on the right datasource like a Serial Port for example.


run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread