ocpp/v2_1/datatype/fixed_pf

OCPP 2.1 FixedPf data type (schema FixedPFType).

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
displacementFloatPower factor, cos(phi), as value between 0..1.
durationFloatDuration in seconds that this setting is active.
excitationBoolTrue when absorbing reactive power (under-excited), false when injecting reactive power (over-excited).
priorityIntPriority of setting (0=highest) (≥ 0)
start_timeDateTimeTime when this setting becomes active

Schema: FixedPFType

pub type FixedPf {
  FixedPf(
    custom_data: option.Option(custom_data.CustomData),
    displacement: Float,
    duration: option.Option(Float),
    excitation: Bool,
    priority: Int,
    start_time: option.Option(timestamp.Timestamp),
  )
}

Constructors

Values

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

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

pub fn new(
  displacement displacement: Float,
  excitation excitation: Bool,
  priority priority: Int,
) -> FixedPf

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

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

Encode a FixedPf to its OCPP-J JSON object.

Search Document