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
| Field | Type | Req | Description |
|---|---|---|---|
custom_data | CustomData | — | |
displacement | Float | ✓ | Power factor, cos(phi), as value between 0..1. |
duration | Float | — | Duration in seconds that this setting is active. |
excitation | Bool | ✓ | True when absorbing reactive power (under-excited), false when injecting reactive power (over-excited). |
priority | Int | ✓ | Priority of setting (0=highest) (≥ 0) |
start_time | DateTime | — | Time 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
-
FixedPf( custom_data: option.Option(custom_data.CustomData), displacement: Float, duration: option.Option(Float), excitation: Bool, priority: Int, start_time: option.Option(timestamp.Timestamp), )
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.