Enum Class TimestampSource

java.lang.Object
java.lang.Enum<TimestampSource>
edu.wpi.first.util.TimestampSource
All Implemented Interfaces:
Serializable, Comparable<TimestampSource>, Constable

public enum TimestampSource extends Enum<TimestampSource>
Options for where the timestamp an RawFrame was captured at can be measured relative to.
  • Enum Constant Details

    • kUnknown

      public static final TimestampSource kUnknown
      unknown.
    • kFrameDequeue

      public static final TimestampSource kFrameDequeue
      wpi::Now when the new frame was dequeued by CSCore. Does not account for camera exposure time or V4L latency.
    • kV4LEOF

      public static final TimestampSource kV4LEOF
      End of Frame. Same as V4L2_BUF_FLAG_TSTAMP_SRC_EOF, translated into wpi::Now's timebase.
    • kV4LSOE

      public static final TimestampSource kV4LSOE
      Start of Exposure. Same as V4L2_BUF_FLAG_TSTAMP_SRC_SOE, translated into wpi::Now's timebase.
  • Method Details

    • values

      public static TimestampSource[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TimestampSource valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      Gets the integer value of the pixel format.
      Returns:
      Integer value
    • getFromInt

      public static TimestampSource getFromInt(int timestampSource)
      Gets a TimestampSource enum value from its integer value.
      Parameters:
      timestampSource - integer value
      Returns:
      Enum value