Package org.ka2ddo.ax25
Class XIDGroup
java.lang.Object
org.ka2ddo.ax25.XIDGroup
This class encapsulates and encodes one X.25 XID group. This is used to handle
responding to the XID frame in the AX.25 protocol.
- Author:
- Andrew Pavlin, KA2DDO
-
Field Summary
Modifier and TypeFieldDescriptionbyte
Format Identifier (FI) of the XID frame; must always be 0x82 (general-purpose information) for the AX.25 protocol.byte
Group Identifier (GI) of the XID frame; must always be 0x80 (parameter negotiation) for the AX.25 protocol.final ArrayList<XIDParameter>
List ofXIDParameter
s contained in this XIDGroup frame. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Get the number of bytes needed to encode the list of XIDParameters in this XIDGroup.static XIDGroup
Read an XIDGroup from an input byte stream.void
write
(DataOutput dos) Write the XIDGroup to a byte stream.
-
Field Details
-
formatIdentifier
public byte formatIdentifierFormat Identifier (FI) of the XID frame; must always be 0x82 (general-purpose information) for the AX.25 protocol. -
groupIdentifier
public byte groupIdentifierGroup Identifier (GI) of the XID frame; must always be 0x80 (parameter negotiation) for the AX.25 protocol. -
paramList
List ofXIDParameter
s contained in this XIDGroup frame.
-
-
Constructor Details
-
XIDGroup
public XIDGroup()Create an empty XIDGroup with the AX.25 default FI/GI.
-
-
Method Details
-
write
Write the XIDGroup to a byte stream.- Parameters:
dos
- DataOutput to write the XIDGroup to- Throws:
IOException
- if write fails for any reason
-
getGroupLength
public int getGroupLength()Get the number of bytes needed to encode the list of XIDParameters in this XIDGroup.- Returns:
- byte count
-
read
Read an XIDGroup from an input byte stream.- Parameters:
dis
- DataInput to read the XIDGroup from- Returns:
- decoded XIDGroup
- Throws:
IOException
- if read fails for any reason
-