Package org.ka2ddo.yaac.io
Class YaesuConnector
java.lang.Object
org.ka2ddo.ax25.Connector
org.ka2ddo.yaac.io.PortConnector
org.ka2ddo.yaac.io.TNCConnector
org.ka2ddo.yaac.io.YaesuConnector
- All Implemented Interfaces:
jssc.SerialPortEventListener
This class implements a receive-only port for listening to the non-standard command-mode
style APRS packet output of the Yaesu FTM-400DR and related radios, and to Kantronics
TNCs in command mode.
The expected packet format is in two lines. Line 1 contains the AX.25 frame header information in the format:
src>dest,digi [MM/dd/yy HH:mm:ss] <UI>:
where the ",digi" part is optional (if the packet wasn't specified for digipeating). The Kantronics variation is the format:
src>dest,digi: <UI>:
where no date is provided, and an extra colon character is immediately after the last digipeater (much like the APRS-IS/TNC2 format, if there wasn't an encoding of the frame type and a line break stuck in between the header and the body).
The second line is the body of the packet in plain text (should be ASCII, but this class supports UTF-8 just in case). For APRS packets, this should just be a printable packet.
- Author:
- Andrew Pavlin, KA2DDO
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ka2ddo.yaac.io.PortConnector
PortConnector.PortStatsType
Nested classes/interfaces inherited from class org.ka2ddo.ax25.Connector
Connector.ConnectorType, Connector.PortStats
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Set<PortConfig.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 final String
The fully-qualified platform-wildcarded class name for the configuration editor for YaesuConnector.static final Map<PortConfig.Fields,
PortConfig.RequireHints> 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 final String
The PortConnector type name for YaesuConnector.Fields inherited from class org.ka2ddo.yaac.io.TNCConnector
RF_SEND_TIME_PER_BYTE_1200, RF_SEND_TIME_PER_BYTE_300, RF_SEND_TIME_PER_BYTE_9600, timeslotTimer
Fields inherited from class org.ka2ddo.yaac.io.PortConnector
currentCfg, portConfig
Fields inherited from class org.ka2ddo.ax25.Connector
CAP_ADSB, CAP_FAST_RF_9600, CAP_FULL_DUPLEX, CAP_GPS_DATA, CAP_HF, CAP_IGATE, CAP_KENWOOD_CMD, CAP_OPENTRAC, CAP_RAW_AX25, CAP_RCV_PACKET_DATA, CAP_RF, CAP_SUBCLIENT, CAP_WAYPOINT_SENDER, CAP_WEATHER, CAP_XMT_PACKET_DATA, stats
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Shut down this port connection.void
configure
(PortConfig portConfig) Update the configuration of the connector to match the updated setup.static void
Set the correct defaults for a port in process of being created.int
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.toString()
Returns a string representation of the object.Methods inherited from class org.ka2ddo.yaac.io.TNCConnector
convertTNC2FormatToAX25Frame, getAcceptableProtocolsMask, getBitRate, getCallsign, getPortAddress, getRFSendTimePerByte, setPortAddress
Methods inherited from class org.ka2ddo.yaac.io.PortConnector
addPortEventListener, createPort, fillinConfigDefaultsForType, fireFailed, fireReceiving, fireTransmitting, getCollectedStatsTypes, getPortConfig, getPortConnectorClass, getPortConnectorInactivityTimer, getStats, portConnectorClasses, portTypeNames, registerPortConnectorType, removePortEventListener, setPortConfig
Methods inherited from class org.ka2ddo.ax25.Connector
addFrameListener, finalize, fireConsumeFrame, fireConsumeFrame, getStats, getType, hasCapability, removeFrameListener
-
Field Details
-
TYPE_NAME
The PortConnector type name for YaesuConnector.- See Also:
-
CONFIG_GUI
The fully-qualified platform-wildcarded class name for the configuration editor for YaesuConnector.- See Also:
-
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. -
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.
-
-
Constructor Details
-
YaesuConnector
public YaesuConnector()
-
-
Method Details
-
fillinConfigDefaults
Set the correct defaults for a port in process of being created.- Parameters:
cfg
- PortConfig.Cfg whose defaults should be adjusted
-
configure
Update the configuration of the connector to match the updated setup.- Specified by:
configure
in classPortConnector
- Parameters:
portConfig
- PortConfig defining new port settings- Throws:
IOException
- if interface changes could not be appliedIllegalArgumentException
- if type information is invalid for changing the settings of this PortConnector
-
isOpen
public boolean isOpen()Reports whether this PortConnector has an open connection to its port. -
close
public void close()Shut down this port connection. Expected to be overridden by sub-classes. -
getCapabilities
public int getCapabilities()Specify what capabilities a port of this type has.- Overrides:
getCapabilities
in classConnector
- Returns:
- bitmask of capability flags
- See Also:
-
serialEvent
public void serialEvent(jssc.SerialPortEvent event) Process incoming serial port event.- Specified by:
serialEvent
in interfacejssc.SerialPortEventListener
- Parameters:
event
- SerialPortEvent describing the handling needed
-
toString
Returns a string representation of the object.
-