Hood

getState([, propertyNames])

Declaration

hmkit.commands.Hood.getState()

Parameters

propertyNames

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

Returns

HoodResponse

Example

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

HoodResponse

Parameters

position(Object)
data.value

(String) (enum)

timestamp

(Date)

lock(Object)
data.value

(String) (enum) Includes the lock state of the hood.

timestamp

(Date)

lockSafety(Object)
data.value

(String) (enum) Indicates the safe-state of the hood.

timestamp

(Date)

Example

{
  "position": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "open"
    }
  },
  "lock": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "locked"
    }
  },
  "lockSafety": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "safe"
    }
  }
}

getAvailability([, propertyNames])

Declaration

hmkit.commands.Hood.getAvailability()

Parameters

propertyNames

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

Example

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

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