Tachograph
getState([, propertyNames])
Declaration
hmkit.commands.Tachograph.getState()
Parameters
propertyNames | (optional) Array of names of the properties you want returned. |
Returns
TachographResponse
Example
hmkit.telematics.sendCommand(
hmkit.commands.Tachograph.getState(),
accessCertificate
);
TachographResponse
Parameters
driversCardsPresent | (Object) |
data.value | (Array |
timestamp | (Date) |
driversTimeStates | (Object) |
data.value | (Array |
timestamp | (Date) |
driversWorkingStates | (Object) |
data.value | (Array |
timestamp | (Date) |
vehicleDirection | (Object) |
data.value | (String) (enum) |
timestamp | (Date) |
vehicleMotion | (Object) |
data.value | (String) (enum) |
timestamp | (Date) |
vehicleOverspeed | (Object) |
data.value | (String) (enum) |
timestamp | (Date) |
vehicleSpeed | (Object) |
data.value | (Number) (speed) The tachograph vehicle speed |
timestamp | (Date) |
Example
{
"driversCardsPresent": [
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"driverNumber": {
"value": 6
},
"cardPresent": {
"value": "present"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"driverNumber": {
"value": 7
},
"cardPresent": {
"value": "not_present"
}
}
}
],
"driversTimeStates": [
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"driverNumber": {
"value": 3
},
"timeState": {
"value": "four_reached"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"driverNumber": {
"value": 4
},
"timeState": {
"value": "fifteen_min_before_sixteen"
}
}
}
],
"driversWorkingStates": [
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"driverNumber": {
"value": 1
},
"workingState": {
"value": "working"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"driverNumber": {
"value": 2
},
"workingState": {
"value": "resting"
}
}
}
],
"vehicleDirection": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "forward"
}
},
"vehicleMotion": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "detected"
}
},
"vehicleOverspeed": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "no_overspeed"
}
},
"vehicleSpeed": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 80,
"unit": "kilometers_per_hour"
}
}
}
getAvailability([, propertyNames])
Declaration
hmkit.commands.Tachograph.getAvailability()
Parameters
propertyNames | (optional) Array of names of the properties you want returned. |
Example
// Get availability for all properties
hmkit.telematics.sendCommand(
hmkit.commands.Tachograph.getAvailability(),
accessCertificate
);
// Get availability for specific properties
hmkit.telematics.sendCommand(
hmkit.commands.Tachograph.getAvailability(['driversWorkingStates']),
accessCertificate
);
Response
Parameters
availability | (Object) |
updateRate.value | (String) enum |
rateLimit.value | (Number) |
rateLimit.unit | (String) |
appliesPer.value | (String) |
Discussion
The response contains an availability object for each property, as shown in the example
Example
{
"driversWorkingStates": {
"availability": {
"updateRate": {
"value": "trip_high"
},
"rateLimit": {
"value": 64,
"unit": "hertz"
},
"appliesPer": {
"value": "vehicle"
}
}
}
}