Package org.ka2ddo.yaac.io
Class AGWPEConnector
java.lang.Object
org.ka2ddo.ax25.Connector
org.ka2ddo.yaac.io.PortConnector
org.ka2ddo.yaac.io.TNCConnector
org.ka2ddo.yaac.io.AGWPEConnector
- All Implemented Interfaces:
TransmittingConnector
This class defines a driver for using the Windows AGWPE software TNC/multiplexer
with YAAC, or emulations thereof such as software TNCs like UZ7HO,
Sivan Toledo's
soundmodem, or the DireWolf software.
- 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 AGWPEConnector.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 AGWPEConnector.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
ConstructorDescriptionCreate a new instance of AGWPEConnector for an as-yet-unspecified software TNC within an as-yet-unspecified instance of an AGWPE server. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Shut down this port connection.void
configure
(PortConfig config) 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
Get the bit transmission rate for the radio on this port.int
Specify what capabilities a port of this type has.static String[]
getRadioPortNames
(String ipAddress, int socketPort, String oldAgwpePortName) Get the list of ports discovered on this AGWPE server.static boolean
hasLocalAGWPE
(int port) Test if the host computer is potentially running AGWPE with TCP/IP support.boolean
isOpen()
Test if the connection to the associated AGWPE server is open and working.void
Transmit an AX.25 frame through this port.toString()
Returns a string representation of the object.Methods inherited from class org.ka2ddo.yaac.io.TNCConnector
convertTNC2FormatToAX25Frame, getAcceptableProtocolsMask, 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
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.ka2ddo.ax25.TransmittingConnector
getAcceptableProtocolsMask, getCallsign, getStats, hasCapability
-
Field Details
-
TYPE_NAME
The PortConnector type name for AGWPEConnector.- See Also:
-
CONFIG_GUI
The fully-qualified platform-wildcarded class name for the configuration editor for AGWPEConnector.- 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
-
AGWPEConnector
public AGWPEConnector()Create a new instance of AGWPEConnector for an as-yet-unspecified software TNC within an as-yet-unspecified instance of an AGWPE server.- See Also:
-
-
Method Details
-
fillinConfigDefaults
Set the correct defaults for a port in process of being created.- Parameters:
cfg
- PortConfig whose defaults should be adjusted
-
configure
Update the configuration of the connector to match the updated setup.- Specified by:
configure
in classPortConnector
- Parameters:
config
- 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
-
sendFrame
Transmit an AX.25 frame through this port. May fail silently if port is not configured for transmission (receive-only).- Specified by:
sendFrame
in interfaceTransmittingConnector
- Parameters:
frame
- AX25Frame object to transmit- Throws:
IOException
- if transmit failed for any reason other than a receive-only port
-
toString
Returns a string representation of the object. -
getCapabilities
public int getCapabilities()Specify what capabilities a port of this type has.- Specified by:
getCapabilities
in interfaceTransmittingConnector
- Overrides:
getCapabilities
in classConnector
- Returns:
- bitmask of capability flags
- See Also:
-
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
-
hasLocalAGWPE
public static boolean hasLocalAGWPE(int port) Test if the host computer is potentially running AGWPE with TCP/IP support.- Parameters:
port
- int TCP port number to test for server existence (usually 8000)- Returns:
- boolean true if the AGWPE service appears to be running
-
isOpen
public boolean isOpen()Test if the connection to the associated AGWPE server is open and working.- Specified by:
isOpen
in interfaceTransmittingConnector
- Specified by:
isOpen
in classConnector
- Returns:
- boolean true if AGWPE connection is open
-
getRadioPortNames
public static String[] getRadioPortNames(String ipAddress, int socketPort, String oldAgwpePortName) throws IOException Get the list of ports discovered on this AGWPE server.- Parameters:
ipAddress
- String of IP address to AGWPE serversocketPort
- TCP port number for AGWPE serveroldAgwpePortName
- String of port number currently in use on AGWPEConnector (or null if not initialized yet)- Returns:
- array of String port names
- Throws:
IOException
- if expected socket error communicating with AGWPE server
-
close
public void close()Shut down this port connection. -
getBitRate
public int getBitRate()Get the bit transmission rate for the radio on this port.- Overrides:
getBitRate
in classTNCConnector
- Returns:
- bit rate in bits per second
-