Struct rust_ocpp::v1_6::types::SampledValue
source · 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: String
Required. 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§
source§impl Clone for SampledValue
impl Clone for SampledValue
source§fn clone(&self) -> SampledValue
fn clone(&self) -> SampledValue
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SampledValue
impl Debug for SampledValue
source§impl Default for SampledValue
impl Default for SampledValue
source§fn default() -> SampledValue
fn default() -> SampledValue
source§impl<'de> Deserialize<'de> for SampledValue
impl<'de> Deserialize<'de> for SampledValue
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>,
source§impl PartialEq for SampledValue
impl PartialEq for SampledValue
source§fn eq(&self, other: &SampledValue) -> bool
fn eq(&self, other: &SampledValue) -> bool
self
and other
values to be equal, and is used
by ==
.