Class ExtendedData

java.lang.Object
com.dsi.ant.message.ExtendedData

public class ExtendedData extends Object
ExtendedData contains data members parsed from extended messages. Stores default values unless an extended data is received to set.
Since:
4.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    final class 
    The flags in the raw flag byte, which indicate what data is held within the extended message.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The index at which the flag byte is within AntMessage contents for flagged extended messages.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs the Extended Data object from a received data message.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Gets the channel ID in the extended data.
    Gets the RSSI data in the extended data.
    Gets the timestamp in the extended data
    boolean
    Checks if channel ID is included in the extended data.
    static boolean
    Checks if the received message from ANT contains extended data.
    int
     
    boolean
    Checks if RSSI data is included in the extended data.
    boolean
    Checks if timestamp is included in the extended data.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • OFFSET_FLAG_BYTE

      public static final int OFFSET_FLAG_BYTE
      The index at which the flag byte is within AntMessage contents for flagged extended messages.
      Since:
      4.0
      See Also:
  • Constructor Details

    • ExtendedData

      public ExtendedData(DataMessage dataMessage)
      Constructs the Extended Data object from a received data message.
      Parameters:
      dataMessage - A data message received from ANT.
      Since:
      4.0
  • Method Details

    • hasExtendedData

      public static boolean hasExtendedData(AntMessageFromAnt antMessage)
      Checks if the received message from ANT contains extended data.
      Parameters:
      antMessage - The message received from ANT.
      Returns:
      True, if the message contains extended data. False, otherwise.
      Since:
      4.0
    • hasChannelId

      public boolean hasChannelId()
      Checks if channel ID is included in the extended data.
      Returns:
      True, if extended data has channel ID. False, otherwise.
      Since:
      4.0
    • hasRssi

      public boolean hasRssi()
      Checks if RSSI data is included in the extended data.
      Returns:
      True, if extended data has RSSI information. False, otherwise.
      Since:
      4.0
    • hasTimestamp

      public boolean hasTimestamp()
      Checks if timestamp is included in the extended data.
      Returns:
      True, if extended data has timestamp. False, otherwise.
      Since:
      4.0
    • getChannelId

      public ChannelId getChannelId()
      Gets the channel ID in the extended data.
      Returns:
      null if the extended data does not contain Channel ID information
      Since:
      4.0
    • getRssi

      public Rssi getRssi()
      Gets the RSSI data in the extended data.
      Returns:
      null if the extended data does not contain RSSI information
      Since:
      4.0
    • getTimestamp

      public Timestamp getTimestamp()
      Gets the timestamp in the extended data
      Returns:
      null if the extended data does not contain Timestamp information
      Since:
      4.0
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Since:
      4.1
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
      Since:
      4.1
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Since:
      4.1