Struct GCDatapointValueQuality
#[repr(transparent)]pub struct GCDatapointValueQuality(GCDatapointValueQuality);Expand description
The quality of a datapoint value Represents a u16 bit field similar to the IEC 61850 protocol with the following structure:
| bits | Attribute name | Attribute value |
|---|---|---|
| 0-1 | Validity | Good(00) / Invalid(01) / Reserved(10) / Questionable(11) |
| 2 | Overflow | TRUE(1) / FALSE(0) |
| 3 | OutOfRange | TRUE(1) / FALSE(0) |
| 4 | BadReference | TRUE(1) / FALSE(0) |
| 5 | Oscillatory | TRUE(1) / FALSE(0) |
| 6 | Failure | TRUE(1) / FALSE(0) |
| 7 | OldData | TRUE(1) / FALSE(0) |
| 8 | Inconsistent | TRUE(1) / FALSE(0) |
| 9 | Inaccurate | TRUE(1) / FALSE(0) |
| 10 | Source | Process(0) / Substituted(1) |
| 11 | Test | TRUE(1) / FALSE(0) |
| 12 | OperatorBlocked | TRUE(1) / FALSE(0) |
| 13-15 | Reserved |
Each attribute has it’s own setter and query method.
Tuple Fields§
§0: GCDatapointValueQualityImplementations§
§impl GCDatapointValueQuality
impl GCDatapointValueQuality
pub fn new_good() -> Self
pub fn set_good(&mut self) -> &mut Self
pub fn set_invalid(&mut self) -> &mut Self
pub fn set_questionable(&mut self) -> &mut Self
pub fn set_overflow(&mut self) -> &mut Self
pub fn set_out_of_range(&mut self) -> &mut Self
pub fn set_bad_reference(&mut self) -> &mut Self
pub fn set_oscillatory(&mut self) -> &mut Self
pub fn set_failure(&mut self) -> &mut Self
pub fn set_old_data(&mut self) -> &mut Self
pub fn set_inconsistent(&mut self) -> &mut Self
pub fn set_inaccurate(&mut self) -> &mut Self
pub fn set_source_processing(&mut self) -> &mut Self
pub fn set_test(&mut self) -> &mut Self
pub fn set_operator_blocked(&mut self) -> &mut Self
pub fn is_good(&self) -> bool
pub fn is_invalid(&self) -> bool
pub fn is_questionable(&self) -> bool
pub fn is_overflow(&self) -> bool
pub fn is_out_of_range(&self) -> bool
pub fn is_bad_reference(&self) -> bool
pub fn is_oscillatory(&self) -> bool
pub fn is_failure(&self) -> bool
pub fn is_old_data(&self) -> bool
pub fn is_inconsistent(&self) -> bool
pub fn is_inaccurate(&self) -> bool
pub fn is_source_processing(&self) -> bool
pub fn is_test(&self) -> bool
pub fn is_operator_blocked(&self) -> bool
Trait Implementations§
§impl Clone for GCDatapointValueQuality
impl Clone for GCDatapointValueQuality
§fn clone(&self) -> GCDatapointValueQuality
fn clone(&self) -> GCDatapointValueQuality
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for GCDatapointValueQuality
impl Debug for GCDatapointValueQuality
§impl<'de> Deserialize<'de> for GCDatapointValueQuality
impl<'de> Deserialize<'de> for GCDatapointValueQuality
§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 From<GCDatapointValueQuality> for u16
impl From<GCDatapointValueQuality> for u16
§fn from(quality: GCDatapointValueQuality) -> Self
fn from(quality: GCDatapointValueQuality) -> Self
Converts to this type from the input type.
§impl From<u16> for GCDatapointValueQuality
impl From<u16> for GCDatapointValueQuality
§impl GCAbiConversion for GCDatapointValueQuality
impl GCAbiConversion for GCDatapointValueQuality
type CType = u16
§fn from_c_ref(c_type: &Self::CType) -> &Self
fn from_c_ref(c_type: &Self::CType) -> &Self
Get a reference to the converted type
§unsafe fn from_c_ptr(ptr: *const Self::CType) -> &'static Self
unsafe fn from_c_ptr(ptr: *const Self::CType) -> &'static Self
Get a mutable reference to the C type Read more
§unsafe fn as_mut_ptr(&mut self) -> *mut Self::CType
unsafe fn as_mut_ptr(&mut self) -> *mut Self::CType
Get a mutable reference to the C type Read more
§impl PartialEq for GCDatapointValueQuality
impl PartialEq for GCDatapointValueQuality
§impl Serialize for GCDatapointValueQuality
impl Serialize for GCDatapointValueQuality
impl StructuralPartialEq for GCDatapointValueQuality
Auto Trait Implementations§
impl Freeze for GCDatapointValueQuality
impl RefUnwindSafe for GCDatapointValueQuality
impl Send for GCDatapointValueQuality
impl Sync for GCDatapointValueQuality
impl Unpin for GCDatapointValueQuality
impl UnsafeUnpin for GCDatapointValueQuality
impl UnwindSafe for GCDatapointValueQuality
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