pub struct ProfileDataFilter {
logical_name: ObisCode,
columns: Vec<ObisCode>,
rows: Vec<CosemDataType>,
}Expand description
Profile-data-filter object (class 8201, 0.0.94.7.201.255) over a working
profile’s rows.
Fields§
§logical_name: ObisCode§columns: Vec<ObisCode>Column OBIS codes of the working profile, in order.
rows: Vec<CosemDataType>The working profile rows (structures).
Implementations§
Source§impl ProfileDataFilter
impl ProfileDataFilter
Sourcepub fn new(logical_name: ObisCode, columns: Vec<ObisCode>) -> Self
pub fn new(logical_name: ObisCode, columns: Vec<ObisCode>) -> Self
Creates a filter at logical_name over a profile with the given column
OBIS codes.
Sourcepub fn set_rows(&mut self, rows: Vec<CosemDataType>)
pub fn set_rows(&mut self, rows: Vec<CosemDataType>)
Replaces the working profile rows.
Sourcepub fn rows(&self) -> &[CosemDataType]
pub fn rows(&self) -> &[CosemDataType]
The working rows.
Sourcefn column_index(&self, capture_object: &CosemDataType) -> Option<usize>
fn column_index(&self, capture_object: &CosemDataType) -> Option<usize>
Resolves a capture_object_definition (field 1 = logical_name) to a
column index.
Sourcefn passes(&self, row: &[CosemDataType], filters: &[CosemDataType]) -> bool
fn passes(&self, row: &[CosemDataType], filters: &[CosemDataType]) -> bool
Whether a row passes all filters.
fn passes_one(&self, row: &[CosemDataType], filter: &CosemDataType) -> bool
Sourcefn project(
&self,
row: &[CosemDataType],
selected: &[CosemDataType],
) -> CosemDataType
fn project( &self, row: &[CosemDataType], selected: &[CosemDataType], ) -> CosemDataType
Projects a row to the columns named by selected_values (all columns if
the selection is empty).
Sourcefn filtered(
&self,
selected: &[CosemDataType],
filters: &[CosemDataType],
) -> Vec<CosemDataType>
fn filtered( &self, selected: &[CosemDataType], filters: &[CosemDataType], ) -> Vec<CosemDataType>
Applies a filter request, returning the projected matching rows.
Sourcefn parse(
params: Option<CosemDataType>,
) -> (Vec<CosemDataType>, Vec<CosemDataType>)
fn parse( params: Option<CosemDataType>, ) -> (Vec<CosemDataType>, Vec<CosemDataType>)
Parses {object_obis, selected_values, filter_list} into its two arrays.
Trait Implementations§
Source§impl Clone for ProfileDataFilter
impl Clone for ProfileDataFilter
Source§fn clone(&self) -> ProfileDataFilter
fn clone(&self) -> ProfileDataFilter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProfileDataFilter
impl Debug for ProfileDataFilter
Source§impl InterfaceClass for ProfileDataFilter
impl InterfaceClass for ProfileDataFilter
Source§fn logical_name(&self) -> &ObisCode
fn logical_name(&self) -> &ObisCode
Returns the object’s logical name (OBIS code).
Source§fn attributes(&self) -> Vec<(u8, CosemDataType)>
fn attributes(&self) -> Vec<(u8, CosemDataType)>
Returns the class attributes as
(attribute_id, value) pairs.Source§fn serialize_ber(&self, buf: &mut Vec<u8>) -> Result<(), BerError>
fn serialize_ber(&self, buf: &mut Vec<u8>) -> Result<(), BerError>
Serializes the object into BER. Read more
Source§fn deserialize_ber(&mut self, _data: &[u8]) -> Result<(), BerError>
fn deserialize_ber(&mut self, _data: &[u8]) -> Result<(), BerError>
Deserializes the object from BER data. Read more
Source§fn invoke_method(
&mut self,
method_id: u8,
params: Option<CosemDataType>,
) -> Result<CosemDataType, String>
fn invoke_method( &mut self, method_id: u8, params: Option<CosemDataType>, ) -> Result<CosemDataType, String>
Invokes the object method with the given id. Read more
Source§fn set_attribute(
&mut self,
attribute_id: u8,
value: CosemDataType,
) -> Result<(), String>
fn set_attribute( &mut self, attribute_id: u8, value: CosemDataType, ) -> Result<(), String>
Writes the value of a writable attribute. The default implementation
rejects the write; classes with writable attributes override it. Read more
Auto Trait Implementations§
impl Freeze for ProfileDataFilter
impl RefUnwindSafe for ProfileDataFilter
impl Send for ProfileDataFilter
impl Sync for ProfileDataFilter
impl Unpin for ProfileDataFilter
impl UnsafeUnpin for ProfileDataFilter
impl UnwindSafe for ProfileDataFilter
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