|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ka2ddo.ax25.Connector
org.ka2ddo.yaac.io.PortConnector
org.ka2ddo.yaac.io.TransmittingPortConnector
org.ka2ddo.yaac.io.TNCConnector
org.ka2ddo.yaac.io.SerialTNCConnector
public class SerialTNCConnector
This class implements a port to a TNC connected by a serial port using KISS over asynchronous serial data via RS-232C or USB. Note this can only handle one TNC per serial port; it does not support the multiplexing with port numbers in the high nibble of the KISS command byte, but only expects port#0.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.ka2ddo.ax25.Connector |
---|
Connector.PortStats |
Field Summary | |
---|---|
static java.lang.String |
CONFIG_GUI
Specify the fully-qualified platform-wildcarded class name for the editor for SerialTNCConnector. |
static java.lang.String |
TYPE_NAME
Specify the PortConnector type name for SerialTNCConnector. |
Fields inherited from class org.ka2ddo.yaac.io.PortConnector |
---|
currentCfg, portConfig |
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 |
Constructor Summary | |
---|---|
SerialTNCConnector()
Create an uninitialized SerialTNCConnector instance, to be configured with a later call to configure(). |
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 |
sendFrame(AX25Frame frame)
Transmit an AX.25 frame through this port. |
void |
serialEvent(gnu.io.SerialPortEvent event)
Process incoming serial port event. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class org.ka2ddo.yaac.io.TNCConnector |
---|
convertTNC2FormatToAX25Frame, getBitRate, getCallsign, getPortAddress, setPortAddress |
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 org.ka2ddo.ax25.Connector |
---|
finalize, getStats, hasCapability |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TYPE_NAME
public static final java.lang.String CONFIG_GUI
Constructor Detail |
---|
public SerialTNCConnector()
configure(PortConfig)
Method Detail |
---|
public void configure(PortConfig portConfig) throws java.io.IOException, java.lang.IllegalArgumentException
configure
in class PortConnector
portConfig
- PortConfig defining new port settings
java.io.IOException
- if interface changes could not be applied
java.lang.IllegalArgumentException
- if type information is invalid for
changing the settings of this PortConnectorpublic boolean isOpen()
isOpen
in class Connector
public void sendFrame(AX25Frame frame) throws java.io.IOException
sendFrame
in class TransmittingPortConnector
frame
- AX25Frame object to transmit
java.io.IOException
- if transmit failed for any reason other than a receive-only portpublic void serialEvent(gnu.io.SerialPortEvent event)
serialEvent
in interface gnu.io.SerialPortEventListener
event
- SerialPortEvent describing the handling neededpublic void close()
close
in class Connector
public java.lang.String toString()
toString
in class java.lang.Object
public int getCapabilities()
getCapabilities
in class Connector
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |