pub trait ModbusTCPPI {
// Required methods
fn new_tcp_pi(node: &str, service: &str) -> Result<Modbus, Error>;
fn tcp_pi_accept(&mut self, socket: &mut i32) -> Result<i32, Error>;
fn tcp_pi_listen(&mut self, num_connection: i32) -> Result<i32, Error>;
}
Expand description
The TCP PI (Protocol Independent) backend implements a Modbus variant used for communications over TCP IPv4 and IPv6 networks. It does not require a checksum calculation as lower layer takes care of the same.
Contrary to the TCP IPv4 only backend, the TCP PI backend offers hostname resolution but it consumes about 1Kb of additional memory.
- Create a Modbus TCP context
Required Methods§
fn new_tcp_pi(node: &str, service: &str) -> Result<Modbus, Error>
fn tcp_pi_accept(&mut self, socket: &mut i32) -> Result<i32, Error>
fn tcp_pi_listen(&mut self, num_connection: i32) -> Result<i32, Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.