[−][src]Struct opcua_server::prelude::DataChangeFilter
Fields
trigger: DataChangeTriggerdeadband_type: u32deadband_value: f64Implementations
impl DataChangeFilter[src]
pub fn compare(
&self,
v1: &DataValue,
v2: &DataValue,
eu_range: Option<(f64, f64)>
) -> bool[src]
&self,
v1: &DataValue,
v2: &DataValue,
eu_range: Option<(f64, f64)>
) -> bool
Compares one data value to another and returns true if they differ, according to their trigger type of status, status/value or status/value/timestamp
pub fn compare_value_option(
&self,
v1: &Option<Variant>,
v2: &Option<Variant>,
eu_range: Option<(f64, f64)>
) -> bool[src]
&self,
v1: &Option<Variant>,
v2: &Option<Variant>,
eu_range: Option<(f64, f64)>
) -> bool
Compares two variant values to each other. Returns true if they are considered the "same".
pub fn compare_value(
&self,
v1: &Variant,
v2: &Variant,
eu_range: Option<(f64, f64)>
) -> Result<bool, StatusCode>[src]
&self,
v1: &Variant,
v2: &Variant,
eu_range: Option<(f64, f64)>
) -> Result<bool, StatusCode>
Compares two values, either a straight value compare or a numeric comparison against the deadband settings. If deadband is asked for and the values are not convertible into a numeric value, the result is false. The value is true if the values are the same within the limits set.
The eu_range is the engineering unit range and represents the range that the value should typically operate between. It's used for percentage change operations and ignored otherwise.
Errors
BadDeadbandFilterInvalid indicates the deadband settings were invalid, e.g. an invalid type, or the args were invalid. A (low, high) range must be supplied for a percentage deadband compare.
pub fn abs_compare(v1: f64, v2: f64, threshold_diff: f64) -> bool[src]
Compares the difference between v1 and v2 to the threshold. The two values are considered equal if their difference is less than or equal to the threshold.
pub fn pct_compare(
v1: f64,
v2: f64,
low: f64,
high: f64,
threshold_pct_change: f64
) -> bool[src]
v1: f64,
v2: f64,
low: f64,
high: f64,
threshold_pct_change: f64
) -> bool
Compares the percentage difference between v1 and v2 using the low-high range as the comparison. The two values are considered equal if their perentage difference is less than or equal to the threshold.
Trait Implementations
impl BinaryEncoder<DataChangeFilter> for DataChangeFilter[src]
fn byte_len(&self) -> usize[src]
fn encode<S>(&self, stream: &mut S) -> Result<usize, StatusCode> where
S: Write, [src]
S: Write,
fn decode<S>(
stream: &mut S,
decoding_limits: &DecodingLimits
) -> Result<DataChangeFilter, StatusCode> where
S: Read, [src]
stream: &mut S,
decoding_limits: &DecodingLimits
) -> Result<DataChangeFilter, StatusCode> where
S: Read,
fn encode_to_vec(&self) -> Vec<u8>[src]
impl Clone for DataChangeFilter[src]
fn clone(&self) -> DataChangeFilter[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for DataChangeFilter[src]
impl PartialEq<DataChangeFilter> for DataChangeFilter[src]
fn eq(&self, other: &DataChangeFilter) -> bool[src]
fn ne(&self, other: &DataChangeFilter) -> bool[src]
impl Serialize for DataChangeFilter[src]
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer, [src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl StructuralPartialEq for DataChangeFilter[src]
Auto Trait Implementations
impl RefUnwindSafe for DataChangeFilter
impl Send for DataChangeFilter
impl Sync for DataChangeFilter
impl Unpin for DataChangeFilter
impl UnwindSafe for DataChangeFilter
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,