![]() |
EVE 1.0
|
modbus_t structure is used for configuration of Modbus instance. The structure must be initialized before the Modbus driver may be used. More...
#include <modbus.h>

Data Fields | |
| struct modbus_state_t * | State |
| Pointer to the Modbus driver instance state structure. | |
| MbMode_t | Protocol |
| Protocol type for the instance: TCP, RTU or ASCII. | |
| MbRole_t | Role |
| Instance role on the Modbus: Client, Server or Sniffer. | |
| uint32_t | RespTODefault |
| Default client' timeout value in ms (can overrides in each command) | |
| const struct MbVirtualfunc_t * | Virtualfunc |
| Callbacks specific to the protocol to start/stop the protocol, receive/send data. For UART these functions are embedded in the Modbus driver (const struct MbVirtualfunc_t MbVirtualFuncRtu). For other carriers such as TLS they must be implemented on the application level. | |
| const struct MbFunctionDescriptor_t * | FuncHandlers |
| Callbacks specific to the command and being called during the command processing to perform command/unit specific task. | |
| MbSessionClosed_t | MbSessionClosedCb |
| Callback being called on the command processing end (reporting overall success/error) | |
| const struct modbus_t * | MbClient |
| For sniffer only. Modbus client instance on the same device (for confirmations sending) | |