Offroad

getState([, propertyNames])

Declaration

hmkit.commands.Offroad.getState()

Parameters

propertyNames

(optional) Array of names of the properties you want returned.

Returns

OffroadResponse

Example

hmkit.telematics.sendCommand(
  hmkit.commands.Offroad.getState(),
  accessCertificate
);

OffroadResponse

Parameters

routeIncline(Object)
data.value

(Number) (angle) The route elevation incline

timestamp

(Date)

wheelSuspension(Object)
data.value

(Number) (double) The wheel suspension level percentage, whereas 0.0 is no suspension and 1.0 maximum suspension

timestamp

(Date)

Example

{
  "routeIncline": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 10.1,
      "unit": "degrees"
    }
  },
  "wheelSuspension": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 0.5
    }
  }
}

getAvailability([, propertyNames])

Declaration

hmkit.commands.Offroad.getAvailability()

Parameters

propertyNames

(optional) Array of names of the properties you want returned.

Example

// Get availability for all properties
hmkit.telematics.sendCommand(
  hmkit.commands.Offroad.getAvailability(),
  accessCertificate
);
// Get availability for specific properties
hmkit.telematics.sendCommand(
  hmkit.commands.Offroad.getAvailability(['route_incline']),
  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

{
  "route_incline": {
    "availability": {
      "updateRate": {
        "value": "trip_high"
      },
      "rateLimit": {
        "value": 64,
        "unit": "hertz"
      },
      "appliesPer": {
        "value": "vehicle"
      }
    }
  }
}