pub struct FixedPF {
pub priority: i32,
pub displacement: Decimal,
pub excitation: bool,
pub start_time: Option<DateTime>,
pub duration: Option<Decimal>,
pub custom_data: Option<CustomData>,
}Expand description
The OCPP 2.1 FixedPF data type.
Fields§
§priority: i32Priority of setting (0=highest)
displacement: DecimalPower factor, cos(phi), as value between 0..1.
excitation: boolTrue when absorbing reactive power (under-excited), false when injecting reactive power (over-excited).
start_time: Option<DateTime>Time when this setting becomes active
duration: Option<Decimal>Duration in seconds that this setting is active.
custom_data: Option<CustomData>The customData member.
Implementations§
Source§impl FixedPF
impl FixedPF
Sourcepub fn new(
priority: i32,
displacement: impl Into<Decimal>,
excitation: bool,
) -> Self
pub fn new( priority: i32, displacement: impl Into<Decimal>, excitation: bool, ) -> Self
Creates a FixedPF from its required fields.
Sourcepub fn with_start_time(self, value: impl Into<DateTime>) -> Self
pub fn with_start_time(self, value: impl Into<DateTime>) -> Self
Sets the optional startTime field.
Sourcepub fn with_duration(self, value: impl Into<Decimal>) -> Self
pub fn with_duration(self, value: impl Into<Decimal>) -> Self
Sets the optional duration field.
Sourcepub fn with_custom_data(self, value: CustomData) -> Self
pub fn with_custom_data(self, value: CustomData) -> Self
Sets the optional customData field.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FixedPF
impl<'de> Deserialize<'de> for FixedPF
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for FixedPF
Source§impl Validate for FixedPF
impl Validate for FixedPF
Source§fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)
fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)
Appends this value’s violations to
out, relative to path.Auto Trait Implementations§
impl Forget for FixedPF
impl Freeze for FixedPF
impl Move for FixedPF
impl RefUnwindSafe for FixedPF
impl Send for FixedPF
impl Sync for FixedPF
impl Unpin for FixedPF
impl UnsafeUnpin for FixedPF
impl UnwindSafe for FixedPF
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more