ocpp/v2_1/datatype/variable_attribute

OCPP 2.1 VariableAttribute data type (schema VariableAttributeType).

to_json/decoder map to/from its OCPP-J JSON object; new (when present) builds a value from the required fields only.

Types

Attribute data of a variable.

FieldTypeReqDescription
constantBoolIf true, value that will never be changed by the Charging Station at runtime. Default when omitted is false.
custom_dataCustomData
mutabilityMutability
persistentBoolIf true, value will be persistent across system reboots or power down. Default when omitted is false.
type_Attribute
valueStringValue of the attribute. May only be omitted when mutability is set to ‘WriteOnly’. The Configuration Variable ReportingValueSize can be used to limit GetVariableResult.attributeValue, VariableAttribute.value and EventData.actualValue. The max size of these values will always remain equal. (max 2500 chars)

Schema: VariableAttributeType

pub type VariableAttribute {
  VariableAttribute(
    constant: option.Option(Bool),
    custom_data: option.Option(custom_data.CustomData),
    mutability: option.Option(mutability.Mutability),
    persistent: option.Option(Bool),
    type_: option.Option(attribute.Attribute),
    value: option.Option(String),
  )
}

Constructors

Values

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

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

pub fn new() -> VariableAttribute

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

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

Encode a VariableAttribute to its OCPP-J JSON object.

Search Document