ocpp/v2_1/datatype/fixed_var

OCPP 2.1 FixedVar data type (schema FixedVarType).

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

Types

FieldTypeReqDescription
custom_dataCustomData
durationFloatDuration in seconds that this setting is active.
priorityIntPriority of setting (0=highest) (≥ 0)
setpointFloatThe value specifies a target var output interpreted as a signed percentage (-100 to 100). A negative value refers to charging, whereas a positive one refers to discharging. The value type is determined by the unit field.
start_timeDateTimeTime when this setting becomes active.
unitDerUnit

Schema: FixedVarType

pub type FixedVar {
  FixedVar(
    custom_data: option.Option(custom_data.CustomData),
    duration: option.Option(Float),
    priority: Int,
    setpoint: Float,
    start_time: option.Option(timestamp.Timestamp),
    unit: der_unit.DerUnit,
  )
}

Constructors

Values

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

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

pub fn new(
  priority priority: Int,
  setpoint setpoint: Float,
  unit unit: der_unit.DerUnit,
) -> FixedVar

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

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

Encode a FixedVar to its OCPP-J JSON object.

Search Document