Vehicle Time

getVehicleTime([, propertyNames])

Declaration

hmkit.commands.VehicleTime.getVehicleTime()

Parameters

propertyNames

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

Returns

VehicleTimeResponse

Example

hmkit.telematics.sendCommand(
  hmkit.commands.VehicleTime.getVehicleTime(),
  accessCertificate
);

VehicleTimeResponse

Parameters

vehicleTime(Object)
data.value

(Object) Vehicle time in a 24h format

timestamp

(Date)

Example

{
  "vehicleTime": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "hour": {
        "value": 19
      },
      "minute": {
        "value": 55
      }
    }
  }
}

getAvailability([, propertyNames])

Declaration

hmkit.commands.VehicleTime.getAvailability()

Parameters

propertyNames

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

Example

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

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