ESenseSensor
An eSense motion sensor event with accelerometer and gyroscope readings.
Collected by the ESenseSensorProbe for the ESenseSamplingPackage.ESENSE_SENSOR measure. This data is a 1:1 mapping of the esense_flutter SensorEvent.
- Inheritance
-
- Object
- Serializable
- Data
- ESenseData
- ESenseSensor
- Annotations
-
- @JsonSerializable(fieldRename: FieldRename.snake, includeIfNull: false)
Constructors
ESenseSensor.fromJson
ESenseSensor.fromSensorEvent
- required String deviceName,
- required SensorEvent event,
Creates an ESenseSensor from an esense_flutter SensorEvent.
ESenseSensor
Properties
accel
3-element array with the X, Y and Z axis of the accelerometer, as raw sensor values.
fromJsonFunction
The function which can convert a JSON string to an object of this type.
gyro
3-element array with the X, Y and Z axis of the gyroscope, as raw sensor values.
jsonType
Return the __type to be used for JSON serialization of this class. Default is runtimeType. Only specify this if you need another type.
packetIndex
Sequential number of sensor packets. The eSense device does not have a clock, so this index reflects the order of reading.
Methods
toJson
Return a JSON encoding of this object.
toString
A string representation of this object.
Some classes have a default textual representation, often paired with a static parse function (like int.parse). These classes will provide the textual representation as their string representation.
Other classes have no meaningful textual representation that a program will care about. Such classes will typically override toString to provide useful information when inspecting the object, mainly for debugging or logging.