pub struct Ipv4Setup {
logical_name: ObisCode,
dl_reference: Vec<u8>,
ip_address: u32,
multicast_ip_address: Vec<u32>,
ip_options: Vec<IpOption>,
subnet_mask: u32,
gateway_ip_address: u32,
use_dhcp_flag: bool,
primary_dns_address: u32,
secondary_dns_address: u32,
}Expand description
IPv4 setup interface class (class_id = 42, version = 0) per IEC 62056-6-2
§4.9.2. Configures the IPv4 network layer.
Fields§
§logical_name: ObisCode§dl_reference: Vec<u8>§ip_address: u32§multicast_ip_address: Vec<u32>§ip_options: Vec<IpOption>§subnet_mask: u32§gateway_ip_address: u32§use_dhcp_flag: bool§primary_dns_address: u32§secondary_dns_address: u32Implementations§
Source§impl Ipv4Setup
impl Ipv4Setup
Sourcepub fn new(config: Ipv4SetupConfig) -> Self
pub fn new(config: Ipv4SetupConfig) -> Self
Builds a new Ipv4Setup from its configuration.
Sourcefn add_mc_ip_address(
&mut self,
data: &CosemDataType,
) -> Result<CosemDataType, String>
fn add_mc_ip_address( &mut self, data: &CosemDataType, ) -> Result<CosemDataType, String>
Method 1: add_mc_IP_address — adds a multicast IP address.
Sourcefn delete_mc_ip_address(
&mut self,
data: &CosemDataType,
) -> Result<CosemDataType, String>
fn delete_mc_ip_address( &mut self, data: &CosemDataType, ) -> Result<CosemDataType, String>
Method 2: delete_mc_IP_address — removes a multicast IP address.
Sourcefn get_nbof_mc_ip_addresses(&self) -> CosemDataType
fn get_nbof_mc_ip_addresses(&self) -> CosemDataType
Method 3: get_nbof_mc_IP_addresses — returns the number of multicast IP
addresses currently configured.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Ipv4Setup
impl<'de> Deserialize<'de> for Ipv4Setup
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 Ipv4Setup
impl InterfaceClass for Ipv4Setup
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 Ipv4Setup
impl RefUnwindSafe for Ipv4Setup
impl Send for Ipv4Setup
impl Sync for Ipv4Setup
impl Unpin for Ipv4Setup
impl UnsafeUnpin for Ipv4Setup
impl UnwindSafe for Ipv4Setup
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