Package org.ka2ddo.ax25
Class FrameWrapper
java.lang.Object
org.ka2ddo.ax25.FrameWrapper
- All Implemented Interfaces:
AX25FrameSource
This class provides an association between a frame and a PortConnector for transmission.
- Author:
- Andrew Pavlin, KA2DDO
-
Field Summary
Fields inherited from interface org.ka2ddo.ax25.AX25FrameSource
NO_FRAMES
-
Constructor Summary
ConstructorDescriptionFrameWrapper
(AX25Frame frame, FrameState state, Connector port) Wrap an AX25Frame with information to direct it to a single Coonector port. -
Method Summary
Modifier and TypeMethodDescriptionSpecify the Connector this message should be transmitted through.getFrames
(boolean incrementXmtCount, ProtocolFamily protocolId, String senderCallsign) Get one or more AX25Frames of the data to transmit.int
Get number of times frame will be retransmitted before inter-packet delay is increased.toString()
Generate a String representation of this FrameWrapper.
-
Constructor Details
-
FrameWrapper
Wrap an AX25Frame with information to direct it to a single Coonector port.- Parameters:
frame
- AX25Frame to transmitstate
- FrameState object to be updated when the frame is transmitted, or null if statistics not desiredport
- Connector to send the frame through
-
-
Method Details
-
getFrames
public AX25Frame[] getFrames(boolean incrementXmtCount, ProtocolFamily protocolId, String senderCallsign) Get one or more AX25Frames of the data to transmit.- Specified by:
getFrames
in interfaceAX25FrameSource
- Parameters:
incrementXmtCount
- indicate whether the transmit counter (used to cycle through proportional pathing) should be incrementedprotocolId
- indicate the protocol to generate this frame for (not relevant for digipeated frames)senderCallsign
- String of local callsign sending this message (may be ignored if digipeating a message from another station)- Returns:
- array of AX25Frame objects to transmit (may be zero-length)
-
getNumTransmitsBeforeDecay
public int getNumTransmitsBeforeDecay()Get number of times frame will be retransmitted before inter-packet delay is increased.- Specified by:
getNumTransmitsBeforeDecay
in interfaceAX25FrameSource
- Returns:
- transmission count before interval increase
-
getConnector
Specify the Connector this message should be transmitted through.- Specified by:
getConnector
in interfaceAX25FrameSource
- Returns:
- a specific Connector instance to transmit through, or null for all applicable ports (Connector.CAP_XMT_PACKET_DATA and not rejecting this specific packet [such as IGateConnectors shouldn't re-transmit something received from the IGate])
- See Also:
-
toString
Generate a String representation of this FrameWrapper.
-