Skip to main content

GCDatapointValueQuality

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:

bitsAttribute nameAttribute value
0-1ValidityGood(00) / Invalid(01) / Reserved(10) / Questionable(11)
2OverflowTRUE(1) / FALSE(0)
3OutOfRangeTRUE(1) / FALSE(0)
4BadReferenceTRUE(1) / FALSE(0)
5OscillatoryTRUE(1) / FALSE(0)
6FailureTRUE(1) / FALSE(0)
7OldDataTRUE(1) / FALSE(0)
8InconsistentTRUE(1) / FALSE(0)
9InaccurateTRUE(1) / FALSE(0)
10SourceProcess(0) / Substituted(1)
11TestTRUE(1) / FALSE(0)
12OperatorBlockedTRUE(1) / FALSE(0)
13-15Reserved

Each attribute has it’s own setter and query method.

Tuple Fields§

§0: GCDatapointValueQuality

Implementations§

§

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

§

fn clone(&self) -> GCDatapointValueQuality

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for GCDatapointValueQuality

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for GCDatapointValueQuality

§

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

§

fn from(quality: GCDatapointValueQuality) -> Self

Converts to this type from the input type.
§

impl From<u16> for GCDatapointValueQuality

§

fn from(quality: u16) -> Self

Converts to this type from the input type.
§

impl GCAbiConversion for GCDatapointValueQuality

§

type CType = u16

§

fn from_c(c_type: Self::CType) -> Self

Convert from the C type to the Rust type
§

fn into_c(self) -> Self::CType

Convert from the Rust type to the C type
§

fn ref_c(&self) -> &Self::CType

Get a reference to the C type
§

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

Get a mutable reference to the C type Read more
§

unsafe fn as_ptr(&self) -> *const Self::CType

Get a immutable reference to the C type Read more
§

unsafe fn as_mut_ptr(&mut self) -> *mut Self::CType

Get a mutable reference to the C type Read more
§

impl PartialEq for GCDatapointValueQuality

§

fn eq(&self, other: &GCDatapointValueQuality) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Serialize for GCDatapointValueQuality

§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl StructuralPartialEq for GCDatapointValueQuality

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,