![]() |
EVE 1.0
|
modbus_state_t structure holds internal state of the Modbus driver. More...
#include <modbus.h>

Data Fields | |
| const struct modbus_t * | Module |
| Pointer to the Modbus driver instance structure. | |
| struct process | Process |
| Process running the instance (it starts during the MbInit() function call) | |
| struct mwork_t | RespTOwork |
| Client' timeout counter. | |
| uint32_t | RespTO |
| Client' timeout value in ms. | |
| struct uwork_t | T35work |
| UART 3.5 chars timeout timer. | |
| uint32_t | TimerT35 |
| UART 3.5 chars timeout value in us. | |
| MbException_t | Exception |
| Last communication status. | |
| MbState_t | MbState |
| State of the instance (disables/enabled/busy) | |
| uint8_t | MyAddress |
| Slave address of the interface on the Modbus (semistatic, assigned in MbInit() function call) | |
| uint8_t | RcvAddress |
| Slave address of the currently processing Modbus frame. | |
| uint8_t | DestAddress |
| Slave address of the last sent Modbus frame (client only) | |
| uint16_t | DestReg |
| First destination register of the last sent Read command (client only) | |
| uint8_t * | MbFrame |
| Current pointer to the processing/assembling Modbus frame. | |
| uint16_t | MbFrameLen |
| Current length of the processing/assembling Modbus frame. | |
| void * | Transport |
| Pointer to the structure holding transport instance (UART, TCP, TLS...) | |
| uint8_t | SlaveIdBuf [MB_SLAVEID_BUF_LEN] |
| Buffer holding the Slave ID string. | |
| uint16_t | SlaveIdLen |
| Length of the Slave ID string. | |
| uint8_t | SndState |
| UART send state for RTU and ASCII. | |
| uint8_t | RcvState |
| UART receive state for RTU and ASCII. | |
| uint8_t | UartBuf [MB_SER_PDU_SIZE_MAX] |
| Main buffer for assembling the receiving/transmitting Modbus frame. | |
| uint8_t * | UartSndBufCur |
| Current sending pointer in the UartBuf. | |
| uint16_t | UartSndBufCount |
| Counter of bytes sent from the UartBuf. | |
| uint16_t | UartRcvBufPos |
| Counter of bytes received to the UartBuf. | |
| uint8_t | LastFunction |
| For client only: function of last sent packet. | |
| mb_transfer_file_t | TransferFile |
| Variables related to Transfer File function. | |