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
| Field | Type | Req | Description |
|---|---|---|---|
custom_data | CustomData | — | |
duration | Float | — | Duration in seconds that this setting is active. |
priority | Int | ✓ | Priority of setting (0=highest) (≥ 0) |
setpoint | Float | ✓ | The 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_time | DateTime | — | Time when this setting becomes active. |
unit | DerUnit | ✓ |
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
-
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, )
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.