Multi Command

getAvailability([, propertyNames])

Declaration

hmkit.commands.MultiCommand.getAvailability()

Parameters

propertyNames

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

Example

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

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

multiCommand({ multiCommands })

Parameters

multiCommands

(Array<Array>) (bytes) The outgoing commands

Example

hmkit.telematics.sendCommand(
  hmkit.commands.MultiCommand.multiCommand({
    "multiCommands": {
      "browser": {
        "loadUrl": {
          "url": "https://about.high-mobility.com"
        }
      },
      "charging": {
        "startStopCharging": {
          "status": "charging"
        },
        "setChargeLimit": {
          "chargeLimit": 0.9
        }
      }
    }
  }),
  accessCertificate
);