ocpp/v1_6/datatype/meter_value
OCPP 1.6 MeterValue data type.
to_json/decoder map to/from its OCPP-J JSON object; new (when
present) builds a value from the required fields only.
Types
| Field | Type | Req | Description |
|---|---|---|---|
sampled_value | List(SampledValue) | ✓ | |
timestamp | DateTime | ✓ |
Schema: MeterValue
pub type MeterValue {
MeterValue(
sampled_value: List(sampled_value.SampledValue),
timestamp: timestamp.Timestamp,
)
}
Constructors
-
MeterValue( sampled_value: List(sampled_value.SampledValue), timestamp: timestamp.Timestamp, )
Values
pub fn decoder() -> decode.Decoder(MeterValue)
Decode a MeterValue from its OCPP-J JSON object, enforcing schema constraints.
pub fn to_json(value: MeterValue) -> json.Json
Encode a MeterValue to its OCPP-J JSON object.