Writer

Trait Writer 

Source
pub trait Writer: Client {
    // Required methods
    fn write_single_coil<'life0, 'async_trait>(
        &'life0 mut self,
        addr: Address,
        coil: bool,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn write_single_register<'life0, 'async_trait>(
        &'life0 mut self,
        addr: Address,
        word: u16,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn write_multiple_coils<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        addr: Address,
        coils: &'life1 [bool],
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn write_multiple_registers<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        addr: Address,
        words: &'life1 [u16],
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn masked_write_register<'life0, 'async_trait>(
        &'life0 mut self,
        addr: Address,
        and_mask: u16,
        or_mask: u16,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Asynchronous Modbus writer

Required Methods§

Source

fn write_single_coil<'life0, 'async_trait>( &'life0 mut self, addr: Address, coil: bool, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Write a single coil (0x05)

Source

fn write_single_register<'life0, 'async_trait>( &'life0 mut self, addr: Address, word: u16, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Write a single holding register (0x06)

Source

fn write_multiple_coils<'life0, 'life1, 'async_trait>( &'life0 mut self, addr: Address, coils: &'life1 [bool], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Write multiple coils (0x0F)

Source

fn write_multiple_registers<'life0, 'life1, 'async_trait>( &'life0 mut self, addr: Address, words: &'life1 [u16], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Write multiple holding registers (0x10)

Source

fn masked_write_register<'life0, 'async_trait>( &'life0 mut self, addr: Address, and_mask: u16, or_mask: u16, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set or clear individual bits of a holding register (0x16)

Implementors§