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.
| Field | Type | Req | Description |
|---|---|---|---|
custom_data | CustomData | — | |
instance | String | — | Name of instance in case the variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. (max 50 chars) |
name | String | ✓ | Name 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
-
Variable( custom_data: option.Option(custom_data.CustomData), instance: option.Option(String), name: String, )
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.