Class Timestamp

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

public class Timestamp extends Object
The container for the timestamp information.
Since:
4.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The message content offset to the timestamp value
    static final int
    The number of bytes used for timestamp value
    static final byte
    The number of bytes used for timestamp information
  • Constructor Summary

    Constructors
    Constructor
    Description
    Timestamp(byte[] messageContent, int startOffset)
    Constructs TimeStamp from the message content
    Timestamp(int rxTimestamp)
    Constructs Timestamp from the given value
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
    Gets the timestamp for when this message was received.
    int
     
     

    Methods inherited from class java.lang.Object

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

    • OFFSET_RX_TIMESTAMP

      public static final int OFFSET_RX_TIMESTAMP
      The message content offset to the timestamp value
      Since:
      4.0
      See Also:
    • SIZE_RX_TIMESTAMP

      public static final int SIZE_RX_TIMESTAMP
      The number of bytes used for timestamp value
      Since:
      4.0
      See Also:
    • SIZE_TIMESTAMP

      public static final byte SIZE_TIMESTAMP
      The number of bytes used for timestamp information
      Since:
      4.0
      See Also:
  • Constructor Details

    • Timestamp

      public Timestamp(byte[] messageContent, int startOffset)
      Constructs TimeStamp from the message content
      Parameters:
      messageContent - The byte array of the message content.
      startOffset - The offset to timestamp data
      Since:
      4.0
    • Timestamp

      public Timestamp(int rxTimestamp)
      Constructs Timestamp from the given value
      Parameters:
      rxTimestamp - The value for the timestamp.
      Since:
      4.0
  • Method Details

    • getRxTimestamp

      public int getRxTimestamp()
      Gets the timestamp for when this message was received.
      Returns:
      The timestamp for the received message.
      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