ocpp/v2_1/datatype/get_variable_result

OCPP 2.1 GetVariableResult data type (schema GetVariableResultType).

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

Types

Class to hold results of GetVariables request.

FieldTypeReqDescription
attribute_statusGetVariableStatus
attribute_status_infoStatusInfo
attribute_typeAttribute
attribute_valueStringValue of requested attribute type of component-variable. This field can only be empty when the given status is NOT accepted. 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)
componentComponent
custom_dataCustomData
variableVariable

Schema: GetVariableResultType

pub type GetVariableResult {
  GetVariableResult(
    attribute_status: get_variable_status.GetVariableStatus,
    attribute_status_info: option.Option(status_info.StatusInfo),
    attribute_type: option.Option(attribute.Attribute),
    attribute_value: option.Option(String),
    component: component.Component,
    custom_data: option.Option(custom_data.CustomData),
    variable: variable.Variable,
  )
}

Constructors

Values

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

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

pub fn new(
  attribute_status attribute_status: get_variable_status.GetVariableStatus,
  component component: component.Component,
  variable variable: variable.Variable,
) -> GetVariableResult

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

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

Encode a GetVariableResult to its OCPP-J JSON object.

Search Document