ocpp/v2_0_1/datatype/component_variable

OCPP 2.0.1 ComponentVariable data type (schema ComponentVariableType).

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

Schema: ComponentVariableType

pub type ComponentVariable {
  ComponentVariable(
    component: component.Component,
    custom_data: option.Option(custom_data.CustomData),
    variable: option.Option(variable.Variable),
  )
}

Constructors

Values

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

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

pub fn new(
  component component: component.Component,
) -> ComponentVariable

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

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

Encode a ComponentVariable to its OCPP-J JSON object.

Search Document