public abstract class AbstractGpsConnector extends PortConnector implements AprsMessageListener, ParsedAX25MessageListener, java.lang.Thread.UncaughtExceptionHandler
PortConnector.PortStatsTypeConnector.ConnectorType, Connector.PortStats| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Thread |
dispatchThread
Pointer to consumer thread for
rtQueue. |
protected GPSDistributor |
gpsDistributor
Instance specific pointer to GPS parser.
|
protected java.lang.Runnable |
QUEUE_READER
Runnable to extract, parse, and process incoming NMEA-0183 sentences.
|
protected boolean |
queuedButNotConsumed
Flag indicating when traffic has been queued to the dispatch thread and not yet consumed.
|
protected FastBlockingQueue<java.lang.String> |
rtQueue
Queue for passing NMEA-0183 GPS sentences from interface-specific subclasses to the common
parsing code in the AbstractGpsConnector superclass.
|
currentCfg, portConfigCAP_ADSB, CAP_APRS, CAP_FAST_RF_9600, CAP_FULL_DUPLEX, CAP_GPS_DATA, CAP_HF, CAP_IGATE, CAP_KENWOOD_CMD, CAP_OPENTRAC, CAP_OTHER_TRANSPORT, CAP_RAW_AX25, CAP_RCV_PACKET_DATA, CAP_RF, CAP_SUBCLIENT, CAP_WAYPOINT_SENDER, CAP_WEATHER, CAP_XMT_PACKET_DATA, stats| Modifier | Constructor and Description |
|---|---|
protected |
AbstractGpsConnector()
Initialize attributes of this abstract superclass.
|
| Modifier and Type | Method and Description |
|---|---|
void |
aprsMessageReceived(Message msg)
Delivers the next message received by YAAC that is an APRS message.
|
int |
getCapabilities()
Specify what capabilities a port of this type has.
|
void |
parsedAX25MessageReceived(byte pid,
AX25Message msg)
Delivers the next message received by YAAC that is some sort of parsed AX.25 higher-level message.
|
protected void |
startQueueReader()
Start the thread that drains the queue
|
protected void |
stopQueueReader()
Cause the queue draining thread to shut down.
|
void |
uncaughtException(java.lang.Thread t,
java.lang.Throwable e)
Method invoked when the given thread terminates due to the
given uncaught exception.
|
abstract void |
write(java.lang.String line)
Transmit a line of text containing a waypoint sentence to the GPS device.
|
addPortEventListener, configure, createPort, fillinConfigDefaultsForType, fireFailed, fireReceiving, fireTransmitting, getBitRate, getCollectedStatsTypes, getPortConfig, getPortConnectorClass, getPortConnectorInactivityTimer, getStats, portConnectorClasses, portTypeNames, registerPortConnectorType, removePortEventListener, setPortConfigaddFrameListener, close, finalize, fireConsumeFrame, fireConsumeFrame, getCallsign, getStats, getType, hasCapability, isOpen, removeFrameListenerprotected final FastBlockingQueue<java.lang.String> rtQueue
protected transient java.lang.Thread dispatchThread
rtQueue.protected transient boolean queuedButNotConsumed
protected final GPSDistributor gpsDistributor
protected final java.lang.Runnable QUEUE_READER
protected AbstractGpsConnector()
protected void startQueueReader()
protected void stopQueueReader()
public int getCapabilities()
getCapabilities in class ConnectorConnector.CAP_GPS_DATA,
Connector.CAP_WAYPOINT_SENDERpublic void aprsMessageReceived(Message msg)
aprsMessageReceived in interface AprsMessageListenermsg - some subclass of Message containing the message contents; the message should have
an AX25Frame connected to itAX25Frame,
AX25Message.ax25Frame,
AX25Message.getAx25Frame()public abstract void write(java.lang.String line)
line - String text to transmitpublic void parsedAX25MessageReceived(byte pid,
AX25Message msg)
parsedAX25MessageReceived in interface ParsedAX25MessageListenerpid - AX.25 protocol IDmsg - some subclass of AX25Message containing the message contents; the message should have
an AX25Frame connected to itAX25Framepublic final void uncaughtException(java.lang.Thread t,
java.lang.Throwable e)
Any exception thrown by this method will be ignored by the Java Virtual Machine.
uncaughtException in interface java.lang.Thread.UncaughtExceptionHandlert - the threade - the exception