Package trclib.sensor

Class TrcSensor.SensorData<T>

java.lang.Object
trclib.sensor.TrcSensor.SensorData<T>
Type Parameters:
T - specifies the sensor value type. It could be integer, double, enum or any complex type.
Enclosing class:
TrcSensor<D>

public static class TrcSensor.SensorData<T> extends Object
This class implements the SensorData object that consists of the sensor value as well as a timestamp when the data sample is taken.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    double
     
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    SensorData(double timestamp, T value)
    Constructor: Creates an instance of the object with the given timestamp and data value.
  • Method Summary

    Modifier and Type
    Method
    Description
    This method returns the sensor data in string format.

    Methods inherited from class java.lang.Object

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

    • timestamp

      public double timestamp
    • value

      public T value
  • Constructor Details

    • SensorData

      public SensorData(double timestamp, T value)
      Constructor: Creates an instance of the object with the given timestamp and data value.
      Parameters:
      timestamp - specifies the timestamp.
      value - specifies the data value.
  • Method Details

    • toString

      public String toString()
      This method returns the sensor data in string format.
      Overrides:
      toString in class Object
      Returns:
      sensor data in string format.