pub struct RegisterTable {
logical_name: ObisCode,
table_cell_values: Vec<CosemDataType>,
table_cell_definition: CosemDataType,
scaler_unit: ScalerUnit,
}Expand description
Register table interface class (class_id = 61, version = 0) per
IEC 62056-6-2 §4.3.7. Holds a table of identically-scaled register values
selected by the table cell definition.
Fields§
§logical_name: ObisCode§table_cell_values: Vec<CosemDataType>§table_cell_definition: CosemDataType§scaler_unit: ScalerUnitImplementations§
Source§impl RegisterTable
impl RegisterTable
Sourcepub fn new(config: RegisterTableConfig) -> Self
pub fn new(config: RegisterTableConfig) -> Self
Builds a new RegisterTable from its configuration.
Sourcefn reset(&mut self) -> CosemDataType
fn reset(&mut self) -> CosemDataType
Method 1: reset — clears the table cell values.
Sourcepub fn table_cell_values(&self) -> &[CosemDataType]
pub fn table_cell_values(&self) -> &[CosemDataType]
Returns the table cell values (attribute 2).
Trait Implementations§
Source§impl Clone for RegisterTable
impl Clone for RegisterTable
Source§fn clone(&self) -> RegisterTable
fn clone(&self) -> RegisterTable
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 RegisterTable
impl Debug for RegisterTable
Source§impl<'de> Deserialize<'de> for RegisterTable
impl<'de> Deserialize<'de> for RegisterTable
Source§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
Source§impl InterfaceClass for RegisterTable
impl InterfaceClass for RegisterTable
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 RegisterTable
impl RefUnwindSafe for RegisterTable
impl Send for RegisterTable
impl Sync for RegisterTable
impl Unpin for RegisterTable
impl UnsafeUnpin for RegisterTable
impl UnwindSafe for RegisterTable
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