Module client

Module client 

Source
Expand description

This module contains all client specific code.

Modules§

tokio_modbus
This module contains the actual communication methods via tokio-modbus.

Structs§

AsyncClient
Async client
AsyncDevice
Client structure for a discovered device
Config
Client configuration
DiscoveryResult
The result of a SunSpec model discovery.
UnknownModel
For every discovered but unknown model to this library this structure is returned.

Enums§

DiscoveryError
This error is returned when an error occurs during model discovery.
ModbusError
This error is returned if a communication fails because of a timeout or underlying modbus error.
ReadModelError
This error is returned if there was an error loading the requested model.
ReadPointError
This error is returned if there was an error while reading data from a point.
WritePointError
This error is returned if there was an error while writing data to a point.

Constants§

DEFAULT_MAX_READ_LENGTH
Modbus defines that a maximum of 125 registers can be read in a single request. See 6.4, Page 16: See: https://modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf
DEFAULT_MAX_WRITE_LENGTH
Modbus defines that a maximum 123 registers can be written in a single request. See 6.12, Page 30: https://modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf
DEFAULT_READ_TIMEOUT
Default timeout when reading registers
DEFAULT_WRITE_TIMEOUT
Default timeout when reading registers

Traits§

AsyncModbusClient
Async Modbus client