ocpp/v2_0_1/datatype/variable

OCPP 2.0.1 Variable data type (schema VariableType).

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

Types

Reference key to a component-variable.

FieldTypeReqDescription
custom_dataCustomData
instanceStringName of instance in case the variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. (max 50 chars)
nameStringName of the variable. Name should be taken from the list of standardized variable names whenever possible. Case Insensitive. strongly advised to use Camel Case. (max 50 chars)

Schema: VariableType

pub type Variable {
  Variable(
    custom_data: option.Option(custom_data.CustomData),
    instance: option.Option(String),
    name: String,
  )
}

Constructors

Values

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

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

pub fn new(name name: String) -> Variable

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

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

Encode a Variable to its OCPP-J JSON object.

Search Document