Package org.ka2ddo.ax25
Interface TransmittingConnector
- All Known Implementing Classes:
AGWPEConnector
,AprsIsConnector
,FileTNCConnector
,KissOverTcpConnector
,SerialTNCConnector
,SslAprsIsConnector
,UdpSubmitConnector
public interface TransmittingConnector
This class extends the basic capabilities of being a port connector by
specifying the methods usable to transmit AX.25 frames through this
port.
- Author:
- Andrew Pavlin, KA2DDO
-
Method Summary
Modifier and TypeMethodDescriptionint
Get the bitmask of AX.25 protocols supported by this port.For ports that have an AX.25 address (callsign), report the callsign associated with the port (used for transmissions initiated through this port instead of digipeated).int
Specify what capabilities a port of this type has.getStats()
Get the current statistics for this PortConnector instance.boolean
hasCapability
(int capMask) Test if this Connector has the specified capability or capabilities.boolean
isOpen()
Reports whether this Connector has an open connection to its port.void
Transmit an AX.25 frame through this port.
-
Method Details
-
isOpen
boolean isOpen()Reports whether this Connector has an open connection to its port.- Returns:
- boolean true if Connector is open
-
getStats
Connector.PortStats getStats()Get the current statistics for this PortConnector instance.- Returns:
- PortStats for this port.
-
sendFrame
Transmit an AX.25 frame through this port. May fail silently if port is not configured for transmission (receive-only). May also queue for later transmission if timeslotting is used. Should be thread-safe so that multiple simultaneous calls do not interleave bytes of different frames.- Parameters:
frame
- AX25Frame object to transmit- Throws:
IOException
- if transmit failed for any reason other than a receive-only port
-
getCallsign
String getCallsign()For ports that have an AX.25 address (callsign), report the callsign associated with the port (used for transmissions initiated through this port instead of digipeated). By default, returns empty string. Subclasses are expected to override this.- Returns:
- callsign String, or null if no associated callsign
-
getCapabilities
int getCapabilities()Specify what capabilities a port of this type has.- Returns:
- bitmask of capability flags
- See Also:
-
Connector.CAP_ADSB
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_RAW_AX25
Connector.CAP_RF
Connector.CAP_WAYPOINT_SENDER
Connector.CAP_WEATHER
Connector.CAP_SUBCLIENT
-
hasCapability
boolean hasCapability(int capMask) Test if this Connector has the specified capability or capabilities.- Parameters:
capMask
- bitmask of capabilities to be tested for- Returns:
- boolean true if this port has all the specified capabilities in its capability set
- See Also:
-
Connector.CAP_ADSB
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_RAW_AX25
Connector.CAP_RF
Connector.CAP_WAYPOINT_SENDER
Connector.CAP_WEATHER
Connector.CAP_SUBCLIENT
-
getAcceptableProtocolsMask
int getAcceptableProtocolsMask()Get the bitmask of AX.25 protocols supported by this port. Bit positions correspond to theEnum.ordinal()
value of theProtocolFamily
enum.- Returns:
- protocol bitmask, or 0 for no AX.25 protocols supported
-