pub struct IecLocalPortSetup {
version: u8,
logical_name: ObisCode,
default_mode: u8,
default_baud: u8,
prop_baud: u8,
response_time: u8,
device_addr: Vec<u8>,
pass_p1: Vec<u8>,
pass_p2: Vec<u8>,
pass_w5: Vec<u8>,
}Expand description
IEC local port setup interface class (class_id = 19) per IEC 62056-6-2
§4.7.1. Configures the local (optical) port. Versions 0 and 1 share the same
nine attributes. This class defines no specific methods.
Fields§
§version: u8§logical_name: ObisCode§default_mode: u8§default_baud: u8§prop_baud: u8§response_time: u8§device_addr: Vec<u8>§pass_p1: Vec<u8>§pass_p2: Vec<u8>§pass_w5: Vec<u8>Implementations§
Source§impl IecLocalPortSetup
impl IecLocalPortSetup
Sourcepub fn new(config: IecLocalPortSetupConfig) -> Self
pub fn new(config: IecLocalPortSetupConfig) -> Self
Builds a new IecLocalPortSetup from its configuration.
Trait Implementations§
Source§impl Clone for IecLocalPortSetup
impl Clone for IecLocalPortSetup
Source§fn clone(&self) -> IecLocalPortSetup
fn clone(&self) -> IecLocalPortSetup
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 IecLocalPortSetup
impl Debug for IecLocalPortSetup
Source§impl<'de> Deserialize<'de> for IecLocalPortSetup
impl<'de> Deserialize<'de> for IecLocalPortSetup
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 IecLocalPortSetup
impl InterfaceClass for IecLocalPortSetup
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 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
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
Auto Trait Implementations§
impl Freeze for IecLocalPortSetup
impl RefUnwindSafe for IecLocalPortSetup
impl Send for IecLocalPortSetup
impl Sync for IecLocalPortSetup
impl Unpin for IecLocalPortSetup
impl UnsafeUnpin for IecLocalPortSetup
impl UnwindSafe for IecLocalPortSetup
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