public class KissOverTcpConnector extends TNCConnector implements java.lang.Runnable, java.lang.Thread.UncaughtExceptionHandler, PortFailureReportListener, TransmittingConnector
Modifier and Type | Class and Description |
---|---|
static interface |
KissOverTcpConnector.FldigiModemChangeListener
Specify listener callback so YAAC can be informed of modem changes made at the
fldigi UI.
|
PortConnector.PortStatsType
Connector.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
Class name for the port configuration editing widget for the KISS-over-TCP port type, with a
wildcard to insert the GUI implementation name.
|
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
Port type identifying name for the KISS-over-TCP port type.
|
RF_SEND_TIME_PER_BYTE_1200, RF_SEND_TIME_PER_BYTE_300, RF_SEND_TIME_PER_BYTE_9600, timeslotTimer
currentCfg, portConfig
CAP_ADSB, 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 |
---|
KissOverTcpConnector() |
Modifier and Type | Method and Description |
---|---|
void |
addFldigiModemChangeListener(KissOverTcpConnector.FldigiModemChangeListener l)
Register a listener to be informed when fldigi changes its modem selection.
|
void |
close()
Shut down this PortConnector.
|
void |
configure(PortConfig config)
Update the configuration of the connector to match the updated
setup.
|
void |
failureGuiCreated(PortFailureReporterIfc failureGui)
Specify the lazily-created failure reporting GUI object for the reported failure.
|
void |
failureGuiDismissed()
The GUI object has been dismissed by the user and should not be used any more by
the requesting I/O code.
|
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.
|
java.lang.String |
getFldigiVersion()
Get the version of Fldigi on the other end of the link.
|
java.lang.String |
getModem()
Get the last reported selected Fldigi modem from the remote TNC.
|
java.lang.String[] |
getModemList()
Get the list of Fldigi modems capable of supporting AX.25 packet frames.
|
static boolean |
hasLocalKissOverTcp(int portNum)
Test if the host computer is potentially running a Kiss-over-TCP server.
|
boolean |
isOpen()
Reports whether this Connector has an open connection to its port.
|
void |
removeFldigiModemChangeListener(KissOverTcpConnector.FldigiModemChangeListener l)
Unregister a listener to no longer be informed when fldigi changes its modem selection.
|
void |
run()
Do not call.
|
void |
sendFrame(AX25Frame frame)
Transmit an AX.25 frame through this port.
|
void |
setModem(java.lang.String modem)
Send a modem changing command to the remote TNC (assumed to be an instance of Fldigi).
|
java.lang.String |
toString()
Produce a String describing this Connector.
|
void |
uncaughtException(java.lang.Thread t,
java.lang.Throwable e)
Method invoked when the given thread terminates due to the
given uncaught exception.
|
convertTNC2FormatToAX25Frame, getAcceptableProtocolsMask, getCallsign, getPortAddress, getRFSendTimePerByte, setPortAddress
addPortEventListener, createPort, fillinConfigDefaultsForType, fireFailed, fireReceiving, fireTransmitting, getCollectedStatsTypes, getPortConfig, getPortConnectorClass, getPortConnectorInactivityTimer, getStats, portConnectorClasses, portTypeNames, registerPortConnectorType, removePortEventListener, setPortConfig
addFrameListener, finalize, fireConsumeFrame, fireConsumeFrame, getStats, getType, hasCapability, removeFrameListener
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAcceptableProtocolsMask, getCallsign, getStats, hasCapability
public 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 config) throws java.io.IOException, java.lang.IllegalArgumentException
configure
in class PortConnector
config
- 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 static boolean hasLocalKissOverTcp(int portNum)
portNum
- int TCP port number to test for a listening socketpublic java.lang.String toString()
toString
in class java.lang.Object
public int getCapabilities()
getCapabilities
in interface TransmittingConnector
getCapabilities
in class Connector
Connector.CAP_RCV_PACKET_DATA
,
Connector.CAP_XMT_PACKET_DATA
,
Connector.CAP_FAST_RF_9600
,
Connector.CAP_FULL_DUPLEX
,
Connector.CAP_GPS_DATA
,
Connector.CAP_HF
,
Connector.CAP_IGATE
,
Connector.CAP_KENWOOD_CMD
,
Connector.CAP_OPENTRAC
,
Connector.CAP_ADSB
,
Connector.CAP_RAW_AX25
,
Connector.CAP_RF
,
Connector.CAP_WAYPOINT_SENDER
,
Connector.CAP_WEATHER
,
Connector.CAP_SUBCLIENT
,
Connector.CAP_OTHER_TRANSPORT
public boolean isOpen()
isOpen
in interface TransmittingConnector
isOpen
in class Connector
public void sendFrame(AX25Frame frame) throws java.io.IOException
sendFrame
in interface TransmittingConnector
frame
- AX25Frame object to transmitjava.io.IOException
- if transmit failed for any reason other than a receive-only portpublic void failureGuiCreated(PortFailureReporterIfc failureGui)
failureGuiCreated
in interface PortFailureReportListener
failureGui
- PortFailureReporterIfc object for the GUIGuiIfc.showIOFailureDialog(org.ka2ddo.yaac.io.PortConfig, String, org.ka2ddo.yaac.io.PortFailureReportListener)
public void failureGuiDismissed()
failureGuiDismissed
in interface PortFailureReportListener
public void run()
run
in interface java.lang.Runnable
public 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.UncaughtExceptionHandler
t
- the threade
- the exceptionpublic int getBitRate()
getBitRate
in class TNCConnector
public java.lang.String getFldigiVersion()
public java.lang.String getModem()
public void addFldigiModemChangeListener(KissOverTcpConnector.FldigiModemChangeListener l)
l
- FldigiModemChangeListener instance to registerpublic void removeFldigiModemChangeListener(KissOverTcpConnector.FldigiModemChangeListener l)
l
- FldigiModemChangeListener instance to unregisterpublic java.lang.String[] getModemList()
public void setModem(java.lang.String modem)
modem
- name of modem (as reported by getModemList()) to usegetModemList()