ocpp/v2_1/datatype/set_variable_data
OCPP 2.1 SetVariableData data type (schema SetVariableDataType).
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 |
|---|---|---|---|
attribute_type | Attribute | — | |
attribute_value | String | ✓ | Value to be assigned to attribute of variable. This value is allowed to be an empty string (“”). The Configuration Variable ConfigurationValueSize can be used to limit SetVariableData.attributeValue and VariableCharacteristics.valuesList. The max size of these values will always remain equal. (max 2500 chars) |
component | Component | ✓ | |
custom_data | CustomData | — | |
variable | Variable | ✓ |
Schema: SetVariableDataType
pub type SetVariableData {
SetVariableData(
attribute_type: option.Option(attribute.Attribute),
attribute_value: String,
component: component.Component,
custom_data: option.Option(custom_data.CustomData),
variable: variable.Variable,
)
}
Constructors
-
SetVariableData( attribute_type: option.Option(attribute.Attribute), attribute_value: String, component: component.Component, custom_data: option.Option(custom_data.CustomData), variable: variable.Variable, )
Values
pub fn decoder() -> decode.Decoder(SetVariableData)
Decode a SetVariableData from its OCPP-J JSON object, enforcing schema constraints.
pub fn new(
attribute_value attribute_value: String,
component component: component.Component,
variable variable: variable.Variable,
) -> SetVariableData
Construct a SetVariableData from its required fields, with every optional field set to None.
pub fn to_json(value: SetVariableData) -> json.Json
Encode a SetVariableData to its OCPP-J JSON object.