pub struct RoutePath {
pub slots: Vec<u8>,
pub ports: Vec<u8>,
pub addresses: Vec<String>,
}Expand description
Route path for PLC communication
Fields§
§slots: Vec<u8>§ports: Vec<u8>§addresses: Vec<String>Implementations§
Source§impl RoutePath
impl RoutePath
Sourcepub fn add_address(self, address: String) -> Self
pub fn add_address(self, address: String) -> Self
Adds a network address to the route
Sourcepub fn to_cip_bytes(&self) -> Vec<u8> ⓘ
pub fn to_cip_bytes(&self) -> Vec<u8> ⓘ
Builds CIP route path bytes
Reference: EtherNetIP_Connection_Paths_and_Routing.md, Port Segment Encoding According to the examples: Port 1 (backplane), Slot X = [0x01, X] The 0x01 byte encodes both “Port Segment (8-bit link)” AND “Port 1 (backplane)” Examples from documentation:
- Slot 0:
01 00 - Slot 1:
01 01 - Slot 2:
01 02
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RoutePath
impl RefUnwindSafe for RoutePath
impl Send for RoutePath
impl Sync for RoutePath
impl Unpin for RoutePath
impl UnwindSafe for RoutePath
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