ocpp/v2_1/datatype/report_data
OCPP 2.1 ReportData data type (schema ReportDataType).
to_json/decoder map to/from its OCPP-J JSON object; new (when
present) builds a value from the required fields only.
Types
Class to report components, variables and variable attributes and characteristics.
| Field | Type | Req | Description |
|---|---|---|---|
component | Component | ✓ | |
custom_data | CustomData | — | |
variable | Variable | ✓ | |
variable_attribute | List(VariableAttribute) | ✓ | |
variable_characteristics | VariableCharacteristics | — |
Schema: ReportDataType
pub type ReportData {
ReportData(
component: component.Component,
custom_data: option.Option(custom_data.CustomData),
variable: variable.Variable,
variable_attribute: List(variable_attribute.VariableAttribute),
variable_characteristics: option.Option(
variable_characteristics.VariableCharacteristics,
),
)
}
Constructors
-
ReportData( component: component.Component, custom_data: option.Option(custom_data.CustomData), variable: variable.Variable, variable_attribute: List(variable_attribute.VariableAttribute), variable_characteristics: option.Option( variable_characteristics.VariableCharacteristics, ), )
Values
pub fn decoder() -> decode.Decoder(ReportData)
Decode a ReportData from its OCPP-J JSON object, enforcing schema constraints.
pub fn new(
component component: component.Component,
variable variable: variable.Variable,
variable_attribute variable_attribute: List(
variable_attribute.VariableAttribute,
),
) -> ReportData
Construct a ReportData from its required fields, with every optional field set to None.
pub fn to_json(value: ReportData) -> json.Json
Encode a ReportData to its OCPP-J JSON object.