Trait tokio_modbus::slave::SlaveContext[][src]

pub trait SlaveContext {
    fn set_slave(&mut self, slave: Slave);
}
Expand description

Stateful management of the currently active device.

RTU devices are addressed by their assigned slave id.

TCP devices are either addressed directly (= implicitly) by using the reserved unit id Slave::tcp_device() = 0xFF (default) or indirectly through an TCP/RTU gateway by setting the unit id to the desired slave id.

The names slave id and unit id are used synonymously depending on the context. This library consistently adopted the term slave.

Required methods

Select a slave device for all subsequent outgoing requests.

Implementors