ant-plus-next / SpeedSensorState
Represents the state of a Speed sensor. This class holds the data fields associated with the state of a Speed sensor, including speed, distance, event times, and various sensor-specific details.
new SpeedSensorState(
deviceId):SpeedSensorState
Creates an instance of the SpeedSensorState.
number
The unique identifier of the sensor device.
const sensorState = new SpeedSensorState(12345);
sensors/speed/speedSensorState.ts:14
optionalBatteryStatus:"New"|"Good"|"Ok"|"Low"|"Critical"|"Invalid"
The battery status of the sensor. Can be “New”, “Good”, “Ok”, “Low”, “Critical”, or “Invalid”.
sensors/speed/speedSensorState.ts:95
optionalBatteryStatusBit:number
The battery status bit of the sensor.
sensors/speed/speedSensorState.ts:100
optionalBatteryVoltage:number
The battery voltage of the sensor.
sensors/speed/speedSensorState.ts:88
CalculatedDistance:
undefined|number
The calculated distance traveled in meters.
sensors/speed/speedSensorState.ts:40
CalculatedSpeed:
undefined|number
The calculated speed in meters per second (m/s).
sensors/speed/speedSensorState.ts:46
CumulativeSpeedRevolutionCount:
undefined|number
The cumulative count of speed revolutions since the sensor started.
sensors/speed/speedSensorState.ts:34
DeviceId:
number
The unique identifier of the sensor device.
sensors/speed/speedSensorState.ts:22
optionalHwVersion:number
The hardware version of the sensor.
sensors/speed/speedSensorState.ts:70
optionalManId:number
The manufacturer ID of the sensor.
sensors/speed/speedSensorState.ts:58
optionalModelNum:number
The model number of the sensor.
sensors/speed/speedSensorState.ts:82
optionalMotion:boolean
Indicates whether the sensor detects motion.
sensors/speed/speedSensorState.ts:106
optionalOperatingTime:number
The cumulative operating time of the sensor in seconds.
sensors/speed/speedSensorState.ts:52
optionalSerialNumber:number
The serial number of the sensor.
sensors/speed/speedSensorState.ts:64
SpeedEventTime:
undefined|number
The time of the last speed event in seconds, measured as a fractional part.
sensors/speed/speedSensorState.ts:28
optionalSwVersion:number
The software version of the sensor.