org.ka2ddo.yaac.io
Class FileTNCConnector
java.lang.Object
org.ka2ddo.ax25.Connector
org.ka2ddo.yaac.io.PortConnector
org.ka2ddo.yaac.io.TransmittingPortConnector
org.ka2ddo.yaac.io.TNCConnector
org.ka2ddo.yaac.io.FileTNCConnector
- All Implemented Interfaces:
- java.lang.Runnable
public class FileTNCConnector
- extends TNCConnector
- implements java.lang.Runnable
This class implements a port to a TNC connected by an arbitrary file using KISS
over asynchronous serial data.
Fields inherited from class org.ka2ddo.ax25.Connector |
CAP_FULL_DUPLEX, CAP_GPS_DATA, CAP_HF, CAP_IGATE, CAP_OPENTRAC, CAP_RCV_PACKET_DATA, CAP_RF, CAP_WAYPOINT_SENDER, CAP_WEATHER, CAP_XMT_PACKET_DATA, stats |
Method Summary |
void |
close()
Shut down this port connection. |
void |
configure(PortConfig portConfig)
Update the configuration of the connector to match the updated
setup. |
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 |
run()
|
void |
sendFrame(AX25Frame frame)
Transmit an AX.25 frame through this port. |
java.lang.String |
toString()
|
Methods inherited from class org.ka2ddo.yaac.io.PortConnector |
addFrameListener, addPortEventListener, createPort, fireConsumeFrame, fireConsumeFrame, fireFailed, fireReceiving, fireTransmitting, getPortConnectorClass, portConnectorClasses, portTypeNames, registerPortConnectorType, removeFrameListener, removePortEventListener, setPortConfig |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TYPE_NAME
public static final java.lang.String TYPE_NAME
- See Also:
- Constant Field Values
CONFIG_GUI
public static final java.lang.String CONFIG_GUI
- See Also:
- Constant Field Values
FileTNCConnector
public FileTNCConnector()
configure
public void configure(PortConfig portConfig)
throws java.io.IOException,
java.lang.IllegalArgumentException
- Update the configuration of the connector to match the updated
setup.
- Specified by:
configure
in class PortConnector
- Parameters:
portConfig
- PortConfig defining new port settings
- Throws:
java.io.IOException
- if interface changes could not be applied
java.lang.IllegalArgumentException
- 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.
- Specified by:
isOpen
in class Connector
- Returns:
- boolean true if PortConnector is open
sendFrame
public void sendFrame(AX25Frame frame)
throws java.io.IOException
- Transmit an AX.25 frame through this port. May fail silently if port is not
configured for transmission (receive-only).
- Specified by:
sendFrame
in class TransmittingPortConnector
- Parameters:
frame
- AX25Frame object to transmit
- Throws:
java.io.IOException
- if transmit failed for any reason other than a receive-only port
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
close
public void close()
- Shut down this port connection.
- Overrides:
close
in class Connector
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getCapabilities
public int getCapabilities()
- Specify what capabilities a port of this type has.
- Overrides:
getCapabilities
in class Connector
- Returns:
- bitmask of capability flags
- See Also:
Connector.CAP_RCV_PACKET_DATA
,
Connector.CAP_XMT_PACKET_DATA
,
Connector.CAP_FULL_DUPLEX
,
Connector.CAP_GPS_DATA
,
Connector.CAP_IGATE
,
Connector.CAP_OPENTRAC
,
Connector.CAP_RF
,
Connector.CAP_WAYPOINT_SENDER
,
Connector.CAP_WEATHER