SensorValue<S extends Sensor, X, Y> class

Represent a value provided by a SensorData.

Considering the following fake accelerometer data:

              Timestamp,Acc X,Acc Y,Acc Z,AngA X,AngA Y,AngA Z
2021-12-10 22:06:10.200, 0.13, 0.20, 9.81,  0.00,  0.00, 89.75
...

an object of this class can be built programmatically by

final SensorValue<Accelerometer, Duration, double> value = SensorValue(
  Point3(
    Duration.parse("2021-12-10 22:06:10.200"),
    x: {Metric.acceleration: 0.13, Metric.accelerometerAngle: 0.00},
    y: {Metric.acceleration: 0.20, Metric.accelerometerAngle: 0.00},
    z: {Metric.acceleration: 9.81, Metric.accelerometerAngle: 89.75},
  ),
  metrics: {Metric.acceleration, Metric.accelerometerAngle},
);

This class has the following contracts, meaning that building an object disrespecting any of these contracts will not throw any errors, but the caller may face unexpected behaviour:

  • the metric values passed as keys to the inner Point3 object should be compatible with the metrics attribute of this object. This means that each metric used as keys in the Point3.x, Point3.y and Point.z attributes of point should be exactly equal to metrics.

Constructors

SensorValue(Point3<X, Map<Metric<S>, Y>> values, {required Set<Metric<S>> metrics})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
key → X
no setter
metrics Set<Metric<S>>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values Point3<X, Map<Metric<S>, Y>>
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
transpose() TransposedSensorValue<S, X, Y>

Operators

operator ==(Object other) bool
The equality operator.
inherited