ocpp/v2_0_1/datatype/report_data

OCPP 2.0.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.

FieldTypeReqDescription
componentComponent
custom_dataCustomData
variableVariable
variable_attributeList(VariableAttribute)
variable_characteristicsVariableCharacteristics

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

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.

Search Document