ocpp/v2_1/datatype/stream_data_element
OCPP 2.1 StreamDataElement data type (schema StreamDataElementType).
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 |
|---|---|---|---|
custom_data | CustomData | — | |
t | Float | ✓ | Offset relative to basetime of this message. basetime + t is timestamp of recorded value. |
v | String | ✓ | (max 2500 chars) |
Schema: StreamDataElementType
pub type StreamDataElement {
StreamDataElement(
custom_data: option.Option(custom_data.CustomData),
t: Float,
v: String,
)
}
Constructors
-
StreamDataElement( custom_data: option.Option(custom_data.CustomData), t: Float, v: String, )
Values
pub fn decoder() -> decode.Decoder(StreamDataElement)
Decode a StreamDataElement from its OCPP-J JSON object, enforcing schema constraints.
pub fn new(t t: Float, v v: String) -> StreamDataElement
Construct a StreamDataElement from its required fields, with every optional field set to None.
pub fn to_json(value: StreamDataElement) -> json.Json
Encode a StreamDataElement to its OCPP-J JSON object.