Struct rust_ocpp::v1_6::types::SampledValue [−][src]
pub struct SampledValue {
pub value: String,
pub context: Option<ReadingContext>,
pub format: Option<ValueFormat>,
pub measurand: Option<Measurand>,
pub phase: Option<Phase>,
pub location: Option<Location>,
pub unit: Option<UnitOfMeasure>,
}Expand description
Single sampled value in MeterValues. Each value can be accompanied by optional fields.
Fields
value: StringRequired. Value as a “Raw” (decimal) number or “SignedData”. Field Type is “string” to allow for digitally signed data readings. Decimal numeric values are also acceptable to allow fractional values for measurands such as Temperature and Current.
context: Option<ReadingContext>Optional. Type of detail value: start, end or sample. Default = “Sample.Periodic”
format: Option<ValueFormat>Optional. Raw or signed data. Default = “Raw”
measurand: Option<Measurand>Optional. Type of measurement. Default = “Energy.Active.Import.Register”
phase: Option<Phase>Optional. indicates how the measured value is to be interpreted. For instance between L1 and neutral (L1-N) Please note that not all values of phase are applicable to all Measurands. When phase is absent, the measured value is interpreted as an overall value.
location: Option<Location>Optional. Location of measurement. Default=”Outlet”
unit: Option<UnitOfMeasure>Optional. Unit of the value. Default = “Wh” if the (default) measurand is an “Energy” type.
Trait Implementations
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
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for SampledValue
impl Send for SampledValue
impl Sync for SampledValue
impl Unpin for SampledValue
impl UnwindSafe for SampledValue
Blanket Implementations
Mutably borrows from an owned value. Read more