Trait tokio_modbus::client::Reader
source · pub trait Reader: Client {
// Required methods
fn read_coils<'life0, 'async_trait>(
&'life0 mut self,
__arg1: Address,
__arg2: Quantity
) -> Pin<Box<dyn Future<Output = Result<Vec<bool>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn read_discrete_inputs<'life0, 'async_trait>(
&'life0 mut self,
__arg1: Address,
__arg2: Quantity
) -> Pin<Box<dyn Future<Output = Result<Vec<bool>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn read_holding_registers<'life0, 'async_trait>(
&'life0 mut self,
__arg1: Address,
__arg2: Quantity
) -> Pin<Box<dyn Future<Output = Result<Vec<u16>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn read_input_registers<'life0, 'async_trait>(
&'life0 mut self,
__arg1: Address,
__arg2: Quantity
) -> Pin<Box<dyn Future<Output = Result<Vec<u16>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn read_write_multiple_registers<'life0, 'life1, 'async_trait>(
&'life0 mut self,
read_addr: Address,
read_count: Quantity,
write_addr: Address,
write_data: &'life1 [u16]
) -> Pin<Box<dyn Future<Output = Result<Vec<u16>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
Asynchronous Modbus reader
Required Methods§
sourcefn read_coils<'life0, 'async_trait>(
&'life0 mut self,
__arg1: Address,
__arg2: Quantity
) -> Pin<Box<dyn Future<Output = Result<Vec<bool>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_coils<'life0, 'async_trait>( &'life0 mut self, __arg1: Address, __arg2: Quantity ) -> Pin<Box<dyn Future<Output = Result<Vec<bool>, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Read multiple coils (0x01)
sourcefn read_discrete_inputs<'life0, 'async_trait>(
&'life0 mut self,
__arg1: Address,
__arg2: Quantity
) -> Pin<Box<dyn Future<Output = Result<Vec<bool>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_discrete_inputs<'life0, 'async_trait>( &'life0 mut self, __arg1: Address, __arg2: Quantity ) -> Pin<Box<dyn Future<Output = Result<Vec<bool>, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Read multiple discrete inputs (0x02)
sourcefn read_holding_registers<'life0, 'async_trait>(
&'life0 mut self,
__arg1: Address,
__arg2: Quantity
) -> Pin<Box<dyn Future<Output = Result<Vec<u16>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_holding_registers<'life0, 'async_trait>( &'life0 mut self, __arg1: Address, __arg2: Quantity ) -> Pin<Box<dyn Future<Output = Result<Vec<u16>, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Read multiple holding registers (0x03)
sourcefn read_input_registers<'life0, 'async_trait>(
&'life0 mut self,
__arg1: Address,
__arg2: Quantity
) -> Pin<Box<dyn Future<Output = Result<Vec<u16>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_input_registers<'life0, 'async_trait>( &'life0 mut self, __arg1: Address, __arg2: Quantity ) -> Pin<Box<dyn Future<Output = Result<Vec<u16>, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Read multiple input registers (0x04)
sourcefn read_write_multiple_registers<'life0, 'life1, 'async_trait>(
&'life0 mut self,
read_addr: Address,
read_count: Quantity,
write_addr: Address,
write_data: &'life1 [u16]
) -> Pin<Box<dyn Future<Output = Result<Vec<u16>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_write_multiple_registers<'life0, 'life1, 'async_trait>( &'life0 mut self, read_addr: Address, read_count: Quantity, write_addr: Address, write_data: &'life1 [u16] ) -> Pin<Box<dyn Future<Output = Result<Vec<u16>, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Read and write multiple holding registers (0x17)
The write operation is performed before the read unlike the name of the operation might suggest!