Messaging

getAvailability([, propertyNames])

Declaration

hmkit.commands.Messaging.getAvailability()

Parameters

propertyNames

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

Example

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

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

messageReceived({ text, handle })

Parameters

text

(String) The text

handle

(String) The optional handle of message

Example

hmkit.telematics.sendCommand(
  hmkit.commands.Messaging.messageReceived({
    "text": "Hey mom!",
    "handle": "Epp"
  }),
  accessCertificate
);