ocpp/v2_0_1/datatype/variable_characteristics
OCPP 2.0.1 VariableCharacteristics data type (schema VariableCharacteristicsType).
to_json/decoder map to/from its OCPP-J JSON object; new (when
present) builds a value from the required fields only.
Types
Fixed read-only parameters of a variable.
| Field | Type | Req | Description |
|---|---|---|---|
custom_data | CustomData | — | |
data_type | Data | ✓ | |
max_limit | Float | — | Maximum possible value of this variable. When the datatype of this Variable is String, OptionList, SequenceList or MemberList, this field defines the maximum length of the (CSV) string. |
min_limit | Float | — | Minimum possible value of this variable. |
supports_monitoring | Bool | ✓ | Flag indicating if this variable supports monitoring. |
unit | String | — | Unit of the variable. When the transmitted value has a unit, this field SHALL be included. (max 16 chars) |
values_list | String | — | Allowed values when variable is Option/Member/SequenceList. * OptionList: The (Actual) Variable value must be a single value from the reported (CSV) enumeration list. * MemberList: The (Actual) Variable value may be an (unordered) (sub-)set of the reported (CSV) valid values list. * SequenceList: The (Actual) Variable value may be an ordered (priority, etc) (sub-)set of the reported (CSV) valid values. This is a comma separated list. The Configuration Variable ConfigurationValueSize can be used to limit SetVariableData.attributeValue and VariableCharacteristics.valueList. The max size of these values will always remain equal. (max 1000 chars) |
Schema: VariableCharacteristicsType
pub type VariableCharacteristics {
VariableCharacteristics(
custom_data: option.Option(custom_data.CustomData),
data_type: data.Data,
max_limit: option.Option(Float),
min_limit: option.Option(Float),
supports_monitoring: Bool,
unit: option.Option(String),
values_list: option.Option(String),
)
}
Constructors
-
VariableCharacteristics( custom_data: option.Option(custom_data.CustomData), data_type: data.Data, max_limit: option.Option(Float), min_limit: option.Option(Float), supports_monitoring: Bool, unit: option.Option(String), values_list: option.Option(String), )
Values
pub fn decoder() -> decode.Decoder(VariableCharacteristics)
Decode a VariableCharacteristics from its OCPP-J JSON object, enforcing schema constraints.
pub fn new(
data_type data_type: data.Data,
supports_monitoring supports_monitoring: Bool,
) -> VariableCharacteristics
Construct a VariableCharacteristics from its required fields, with every optional field set to None.
pub fn to_json(value: VariableCharacteristics) -> json.Json
Encode a VariableCharacteristics to its OCPP-J JSON object.