Class AddChannelIdToListMessage


public final class AddChannelIdToListMessage extends AntMessageFromHost
Message to add a channel ID to an exclusion/inclusion list.
Since:
4.0
  • Field Details

    • OFFSET_CHANNEL_ID

      public static final int OFFSET_CHANNEL_ID
      The message content offset to the channel ID
      Since:
      4.0
      See Also:
    • OFFSET_LIST_INDEX

      public static final int OFFSET_LIST_INDEX
      The message content offset to the type of list being added to
      Since:
      4.0
      See Also:
    • SIZE_LIST_INDEX

      public static final int SIZE_LIST_INDEX
      The number of bytes used for the list index
      Since:
      4.0
      See Also:
    • MIN_LIST_INDEX

      public static final int MIN_LIST_INDEX
      The minimum index allowed for the list
      Since:
      4.0
      See Also:
    • MAX_LIST_INDEX

      public static final int MAX_LIST_INDEX
      The maximum index allowed for the list
      Since:
      4.0
      See Also:
  • Constructor Details

    • AddChannelIdToListMessage

      public AddChannelIdToListMessage(ChannelId channelId, int listIndex)
      Constructs the message given the channel ID and list index.
      Parameters:
      channelId - The channel ID to be inserted to the list.
      listIndex - The position the channel ID will be placed.
      Since:
      4.0
    • AddChannelIdToListMessage

      protected AddChannelIdToListMessage(byte[] messageContent)
      Constructs the message from the given message bytes.
      Parameters:
      messageContent - The bytes of the message.
  • Method Details

    • getChannelId

      public ChannelId getChannelId()
      Gets the channel ID being added to a list.
      Returns:
      The ChannelId.
      Since:
      4.0
    • getListIndex

      public int getListIndex()
      Gets the index the channel ID is being placed in.
      Returns:
      The index.
      Since:
      4.0
    • getMessageContent

      public byte[] getMessageContent(int channelNumber, int networkNumber)
      Description copied from class: AntMessageFromHost
      The content of the message with specified channel number and network number set if required.
      Specified by:
      getMessageContent in class AntMessageFromHost
      Parameters:
      channelNumber - Written to the channel number byte if required
      networkNumber - Written to the network number byte if required
      Returns:
      Message content raw byte array.
      Since:
      4.0
    • 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.
      Since:
      4.0
    • toString

      public String toString()
      Overrides:
      toString in class AntMessageFromHost