ocpp/v2_0_1/datatype/meter_value

OCPP 2.0.1 MeterValue data type (schema MeterValueType).

to_json/decoder map to/from its OCPP-J JSON object; new (when present) builds a value from the required fields only.

Types

Collection of one or more sampled values in MeterValuesRequest and TransactionEvent. All sampled values in a MeterValue are sampled at the same point in time.

FieldTypeReqDescription
custom_dataCustomData
sampled_valueList(SampledValue)
timestampDateTimeTimestamp for measured value(s).

Schema: MeterValueType · Meter_Value · urn:x-oca:ocpp:uid:2:233265

pub type MeterValue {
  MeterValue(
    custom_data: option.Option(custom_data.CustomData),
    sampled_value: List(sampled_value.SampledValue),
    timestamp: timestamp.Timestamp,
  )
}

Constructors

Values

pub fn decoder() -> decode.Decoder(MeterValue)

Decode a MeterValue from its OCPP-J JSON object, enforcing schema constraints.

pub fn new(
  sampled_value sampled_value: List(sampled_value.SampledValue),
  timestamp timestamp: timestamp.Timestamp,
) -> MeterValue

Construct a MeterValue from its required fields, with every optional field set to None.

pub fn to_json(value: MeterValue) -> json.Json

Encode a MeterValue to its OCPP-J JSON object.

Search Document