Enum Class TimestampSource

java.lang.Object
java.lang.Enum<TimestampSource>
org.wpilib.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

    • UNKNOWN

      public static final TimestampSource UNKNOWN
      unknown.
    • FRAME_DEQUEUE

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

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

      public static final TimestampSource V4L_SOE
      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