ocpp/v2_1/datatype/component_variable
OCPP 2.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.
| Field | Type | Req | Description |
|---|---|---|---|
component | Component | ✓ | |
custom_data | CustomData | — | |
variable | Variable | — |
Schema: ComponentVariableType
pub type ComponentVariable {
ComponentVariable(
component: component.Component,
custom_data: option.Option(custom_data.CustomData),
variable: option.Option(variable.Variable),
)
}
Constructors
-
ComponentVariable( component: component.Component, custom_data: option.Option(custom_data.CustomData), variable: option.Option(variable.Variable), )
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.