Class SetLongNetworkKeyMessage


public final class SetLongNetworkKeyMessage extends SetNetworkKeyMessage
Configures which network is used by a network slot, specified with a 128 bit (16 byte) key.
Since:
4.3
  • Field Details

    • LENGTH_NETWORK_KEY_BYTES

      public static final int LENGTH_NETWORK_KEY_BYTES
      The valid length in bytes of the network key for this message
      Since:
      4.3
      See Also:
  • Constructor Details

    • SetLongNetworkKeyMessage

      public SetLongNetworkKeyMessage(byte[] networkKey)
      Constructs the message to contain the provided network key.
      Parameters:
      networkKey - The network key that is to be assigned to a network number.
      Throws:
      IllegalArgumentException - Occurs when received an invalid network key byte array (null or invalid length)
      Since:
      4.3
  • Method Details

    • getMessageType

      public MessageFromHostType getMessageType()
      Description copied from class: AntMessageFromHost
      The unique type of this message based on its message id, contents, and intended channel type.

      It is recommended to use this rather than the raw message ID.

      Specified by:
      getMessageType in class AntMessageFromHost
      Returns:
      The type of message returned by the host.
    • getNetworkKeyLengthBytes

      protected int getNetworkKeyLengthBytes()
      Description copied from class: SetNetworkKeyMessage
      Gets the network key length supported by this message.
      Specified by:
      getNetworkKeyLengthBytes in class SetNetworkKeyMessage
      Returns:
      The length in bytes for the network key.