Fueling

getGasFlapState([, propertyNames])

Declaration

hmkit.commands.Fueling.getGasFlapState()

Parameters

propertyNames

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

Returns

FuelingResponse

Example

hmkit.telematics.sendCommand(
  hmkit.commands.Fueling.getGasFlapState(),
  accessCertificate
);

FuelingResponse

Parameters

gasFlapLock(Object)
data.value

(String) (enum)

timestamp

(Date)

gasFlapPosition(Object)
data.value

(String) (enum)

timestamp

(Date)

Example

{
  "gasFlapLock": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "locked"
      }
    }
  },
  "gasFlapPosition": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "closed"
      }
    }
  }
}

getAvailability([, propertyNames])

Declaration

hmkit.commands.Fueling.getAvailability()

Parameters

propertyNames

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

Example

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

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

controlGasFlap({ gasFlapLock, gasFlapPosition })

Parameters

gasFlapLock

(String) (enum)

gasFlapPosition

(String) (enum)

Example

hmkit.telematics.sendCommand(
  hmkit.commands.Fueling.controlGasFlap({
    "gasFlapLock": "locked",
    "gasFlapPosition": "closed"
  }),
  accessCertificate
);