Cruise Control

getState([, propertyNames])

Declaration

hmkit.commands.CruiseControl.getState()

Parameters

propertyNames

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

Returns

CruiseControlResponse

Example

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

CruiseControlResponse

Parameters

accTargetSpeed(Object)
data.value

(Number) (speed) The target speed of the Adaptive Cruise Control

timestamp

(Date)

adaptiveCruiseControl(Object)
data.value

(String) (enum)

timestamp

(Date)

cruiseControl(Object)
data.value

(String) (enum)

timestamp

(Date)

limiter(Object)
data.value

(String) (enum)

timestamp

(Date)

targetSpeed(Object)
data.value

(Number) (speed) The target speed

timestamp

(Date)

Example

{
  "accTargetSpeed": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 67,
      "unit": "kilometers_per_hour"
    }
  },
  "adaptiveCruiseControl": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "inactive"
    }
  },
  "cruiseControl": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "active"
    }
  },
  "limiter": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "higher_speed_requested"
    }
  },
  "targetSpeed": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 61,
      "unit": "kilometers_per_hour"
    }
  }
}

getAvailability([, propertyNames])

Declaration

hmkit.commands.CruiseControl.getAvailability()

Parameters

propertyNames

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

Example

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

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

activateDeactivateCruiseControl({ cruiseControl, targetSpeed })

Parameters

cruiseControl

(String) (enum)

targetSpeed

(Number) (speed) The target speed

Example

hmkit.telematics.sendCommand(
  hmkit.commands.CruiseControl.activateDeactivateCruiseControl({
    "cruiseControl": "active",
    "targetSpeed": {
      "kilometers_per_hour": 61
    }
  }),
  accessCertificate
);