Struct opcua_server::prelude::DataChangeFilter [−][src]
pub struct DataChangeFilter {
pub trigger: DataChangeTrigger,
pub deadband_type: u32,
pub deadband_value: f64,
}Fields
trigger: DataChangeTriggerdeadband_type: u32deadband_value: f64Implementations
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
Compares two variant values to each other. Returns true if they are considered the “same”.
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.
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.
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
Returns the exact byte length of the structure as it would be if encode were called.
This may be called prior to writing to ensure the correct amount of space is available. Read more
Encodes the instance to the write stream.
pub fn decode<S>(
stream: &mut S,
decoding_limits: &DecodingLimits
) -> Result<DataChangeFilter, StatusCode> where
S: Read,
pub fn decode<S>(
stream: &mut S,
decoding_limits: &DecodingLimits
) -> Result<DataChangeFilter, StatusCode> where
S: Read,
Decodes an instance from the read stream. The decoding limits are restrictions set by the server / client
on the length of strings, arrays etc. If these limits are exceeded the implementation should
return with a BadDecodingError as soon as possible. Read more
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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
Mutably borrows from an owned value. Read more