Class XIDGroup

java.lang.Object
org.ka2ddo.ax25.XIDGroup

public class XIDGroup extends Object
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

    Fields
    Modifier and Type
    Field
    Description
    byte
    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.
    List of XIDParameters contained in this XIDGroup frame.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create an empty XIDGroup with the AX.25 default FI/GI.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    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 the XIDGroup to a byte stream.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • formatIdentifier

      public byte formatIdentifier
      Format Identifier (FI) of the XID frame; must always be 0x82 (general-purpose information) for the AX.25 protocol.
    • groupIdentifier

      public byte groupIdentifier
      Group Identifier (GI) of the XID frame; must always be 0x80 (parameter negotiation) for the AX.25 protocol.
    • paramList

      public final ArrayList<XIDParameter> paramList
      List of XIDParameters contained in this XIDGroup frame.
  • Constructor Details

    • XIDGroup

      public XIDGroup()
      Create an empty XIDGroup with the AX.25 default FI/GI.
  • Method Details

    • write

      public void write(DataOutput dos) throws IOException
      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

      public static XIDGroup read(DataInput dis) throws IOException
      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