Crash
getState([, propertyNames])
Declaration
hmkit.commands.Crash.getState()
Parameters
propertyNames | (optional) Array of names of the properties you want returned. |
Returns
CrashResponse
Example
hmkit.telematics.sendCommand(
hmkit.commands.Crash.getState(),
accessCertificate
);
CrashResponse
Parameters
automaticECall | (Object) |
data.value | (String) (enum) Automatic emergency call enabled state |
timestamp | (Date) |
impactZone | (Object) |
data.value | (Array |
timestamp | (Date) |
incidents | (Object) |
data.value | (Array |
timestamp | (Date) |
severity | (Object) |
data.value | (Number) (uinteger) Severity of the crash (from 0 to 7 - very high severity) |
timestamp | (Date) |
status | (Object) |
data.value | (String) (enum) The system effect an inpact had on the vehicle. |
timestamp | (Date) |
tippedState | (Object) |
data.value | (String) (enum) |
timestamp | (Date) |
type | (Object) |
data.value | (String) (enum) |
timestamp | (Date) |
Example
{
"automaticECall": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "enabled"
}
},
"impactZone": [
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "rear_driver_side"
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "side_driver_side"
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "front_driver_side"
}
}
],
"incidents": [
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "front"
},
"severity": {
"value": "high"
},
"repairs": {
"value": "needed"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "lateral"
},
"severity": {
"value": "medium"
},
"repairs": {
"value": "needed"
}
}
},
{
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"location": {
"value": "rear"
},
"severity": {
"value": "low"
},
"repairs": {
"value": "not_needed"
}
}
}
],
"severity": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": 2
}
},
"status": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "normal"
}
},
"tippedState": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "not_tipped"
}
},
"type": {
"timestamp": "2021-06-01T15:48:04.887Z",
"data": {
"value": "non_pedestrian"
}
}
}
getAvailability([, propertyNames])
Declaration
hmkit.commands.Crash.getAvailability()
Parameters
propertyNames | (optional) Array of names of the properties you want returned. |
Example
// Get availability for all properties
hmkit.telematics.sendCommand(
hmkit.commands.Crash.getAvailability(),
accessCertificate
);
// Get availability for specific properties
hmkit.telematics.sendCommand(
hmkit.commands.Crash.getAvailability(['incidents']),
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
{
"incidents": {
"availability": {
"updateRate": {
"value": "trip_high"
},
"rateLimit": {
"value": 64,
"unit": "hertz"
},
"appliesPer": {
"value": "vehicle"
}
}
}
}