pub struct IecHdlcSetup {
version: u8,
logical_name: ObisCode,
comm_speed: u8,
window_size_transmit: u8,
window_size_receive: u8,
max_info_field_length_transmit: u16,
max_info_field_length_receive: u16,
inter_octet_time_out: u16,
inactivity_time_out: u16,
device_address: u16,
}Expand description
IEC HDLC setup interface class (class_id = 23) per IEC 62056-6-2 §4.7.2.
Configures the HDLC data link layer.
Both versions are supported: they share the same nine attributes, differing
only in the type of the two maximum-info-field-length attributes
(unsigned in version 0, long-unsigned in version 1). This class defines
no specific methods.
Fields§
§version: u8§logical_name: ObisCode§comm_speed: u8§window_size_transmit: u8§window_size_receive: u8§max_info_field_length_transmit: u16§max_info_field_length_receive: u16§inter_octet_time_out: u16§inactivity_time_out: u16§device_address: u16Implementations§
Source§impl IecHdlcSetup
impl IecHdlcSetup
Sourcepub fn new(config: IecHdlcSetupConfig) -> Self
pub fn new(config: IecHdlcSetupConfig) -> Self
Builds a new IecHdlcSetup from its configuration.
Sourcefn max_info(&self, value: u16) -> CosemDataType
fn max_info(&self, value: u16) -> CosemDataType
Encodes a maximum-info-field-length attribute with the version-dependent
type: unsigned in version 0, long-unsigned in version 1.
Trait Implementations§
Source§impl Clone for IecHdlcSetup
impl Clone for IecHdlcSetup
Source§fn clone(&self) -> IecHdlcSetup
fn clone(&self) -> IecHdlcSetup
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 IecHdlcSetup
impl Debug for IecHdlcSetup
Source§impl<'de> Deserialize<'de> for IecHdlcSetup
impl<'de> Deserialize<'de> for IecHdlcSetup
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 IecHdlcSetup
impl InterfaceClass for IecHdlcSetup
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 IecHdlcSetup
impl RefUnwindSafe for IecHdlcSetup
impl Send for IecHdlcSetup
impl Sync for IecHdlcSetup
impl Unpin for IecHdlcSetup
impl UnsafeUnpin for IecHdlcSetup
impl UnwindSafe for IecHdlcSetup
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