public class SerialGpsConnector extends AbstractGpsConnector implements jssc.SerialPortEventListener
Note: For backwards compatibility, we are treating the FLAGS_LOCAL bit inversely (if clear, is a local GPS; if set, is a remote GPS).
PortConnector.PortStatsTypeConnector.ConnectorType, Connector.PortStats| Modifier and Type | Field and Description |
|---|---|
static java.util.Set<PortConfig.Fields> |
BLANK_FIELDS
Set of PortConfig field identifiers for fields that should not be copied from another system and should therefore be
blanked out when copying configuration files.
|
static java.lang.String |
CONFIG_GUI
The fully-qualified platform-wildcarded class name for the configuration editor for SerialGpsConnector.
|
static java.util.Map<PortConfig.Fields,PortConfig.RequireHints> |
REQ_FIELDS
List of PortConfig field identifiers that are mandated for this port type to work, and the ResourceBundle key to
prompt for a value if missing.
|
static java.lang.String |
TYPE_NAME
The configuration type name for Serial_GPS ports.
|
dispatchThread, gpsDistributor, QUEUE_READER, queuedButNotConsumed, rtQueuecurrentCfg, 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| Constructor and Description |
|---|
SerialGpsConnector() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Shut down this port connection.
|
void |
configure(PortConfig portConfig)
Update the configuration of the connector to match the updated
setup.
|
static void |
fillinConfigDefaults(PortConfig.Cfg cfg)
Set the correct defaults for a port in process of being created.
|
int |
getBitRate()
Get the bit transmission rate on this port.
|
int |
getCapabilities()
Specify what capabilities a port of this type has.
|
boolean |
isOpen()
Reports whether this PortConnector has an open connection to its port.
|
void |
serialEvent(jssc.SerialPortEvent event)
Process incoming serial port event.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
void |
write(java.lang.String line)
Transmit a line of text containing a waypoint sentence to the GPS device.
|
aprsMessageReceived, parsedAX25MessageReceived, startQueueReader, stopQueueReader, uncaughtExceptionaddPortEventListener, createPort, fillinConfigDefaultsForType, fireFailed, fireReceiving, fireTransmitting, getCollectedStatsTypes, getPortConfig, getPortConnectorClass, getPortConnectorInactivityTimer, getStats, portConnectorClasses, portTypeNames, registerPortConnectorType, removePortEventListener, setPortConfigaddFrameListener, finalize, fireConsumeFrame, fireConsumeFrame, getCallsign, getStats, getType, hasCapability, removeFrameListenerpublic static final java.lang.String TYPE_NAME
public static final java.lang.String CONFIG_GUI
public static final java.util.Set<PortConfig.Fields> BLANK_FIELDS
public static final java.util.Map<PortConfig.Fields,PortConfig.RequireHints> REQ_FIELDS
public static void fillinConfigDefaults(PortConfig.Cfg cfg)
cfg - PortConfig.Cfg whose defaults should be adjustedpublic void configure(PortConfig portConfig) throws java.io.IOException, java.lang.IllegalArgumentException
configure in class PortConnectorportConfig - PortConfig defining new port settingsjava.io.IOException - if interface changes could not be appliedjava.lang.IllegalArgumentException - if type information is invalid for
changing the settings of this PortConnectorpublic boolean isOpen()
public int getBitRate()
getBitRate in class PortConnectorpublic int getCapabilities()
getCapabilities in class AbstractGpsConnectorConnector.CAP_GPS_DATA,
Connector.CAP_WAYPOINT_SENDERpublic void serialEvent(jssc.SerialPortEvent event)
serialEvent in interface jssc.SerialPortEventListenerevent - SerialPortEvent describing the handling neededpublic void write(java.lang.String line)
write in class AbstractGpsConnectorline - String text to transmitpublic java.lang.String toString()
toString in class java.lang.Object