_ModbusClientContext Struct Reference

Modbus/TCP client context. More...

#include <modbus_client.h>

Data Fields

ModbusClientState state
 Modbus/TCP client state. More...
 
NetInterfaceinterface
 Underlying network interface. More...
 
uint8_t unitId
 Identifier of the remote slave. More...
 
uint16_t transactionId
 Modbus transaction identifier. More...
 
Socketsocket
 Underlying TCP socket. More...
 
TlsContexttlsContext
 TLS context. More...
 
TlsSessionState tlsSession
 TLS session state. More...
 
ModbusClientTlsInitCallback tlsInitCallback
 TLS initialization callback function. More...
 
systime_t timeout
 Timeout value. More...
 
systime_t timestamp
 Timestamp to manage timeout. More...
 
uint8_t requestAdu [MODBUS_MAX_ADU_SIZE]
 Request ADU. More...
 
size_t requestAduLen
 Length of the request ADU, in bytes. More...
 
size_t requestAduPos
 Current position in the request ADU. More...
 
uint8_t responseAdu [MODBUS_MAX_ADU_SIZE]
 Response ADU. More...
 
size_t responseAduLen
 Length of the response ADU, in bytes. More...
 
size_t responseAduPos
 Current position in the response ADU. More...
 
ModbusExceptionCode exceptionCode
 Exception code. More...
 

Detailed Description

Modbus/TCP client context.

Definition at line 127 of file modbus_client.h.

Field Documentation

◆ exceptionCode

ModbusExceptionCode exceptionCode

Exception code.

Definition at line 147 of file modbus_client.h.

◆ interface

NetInterface* interface

Underlying network interface.

Definition at line 130 of file modbus_client.h.

◆ requestAdu

uint8_t requestAdu[MODBUS_MAX_ADU_SIZE]

Request ADU.

Definition at line 141 of file modbus_client.h.

◆ requestAduLen

size_t requestAduLen

Length of the request ADU, in bytes.

Definition at line 142 of file modbus_client.h.

◆ requestAduPos

size_t requestAduPos

Current position in the request ADU.

Definition at line 143 of file modbus_client.h.

◆ responseAdu

uint8_t responseAdu[MODBUS_MAX_ADU_SIZE]

Response ADU.

Definition at line 144 of file modbus_client.h.

◆ responseAduLen

size_t responseAduLen

Length of the response ADU, in bytes.

Definition at line 145 of file modbus_client.h.

◆ responseAduPos

size_t responseAduPos

Current position in the response ADU.

Definition at line 146 of file modbus_client.h.

◆ socket

Socket* socket

Underlying TCP socket.

Definition at line 133 of file modbus_client.h.

◆ state

Modbus/TCP client state.

Definition at line 129 of file modbus_client.h.

◆ timeout

systime_t timeout

Timeout value.

Definition at line 139 of file modbus_client.h.

◆ timestamp

systime_t timestamp

Timestamp to manage timeout.

Definition at line 140 of file modbus_client.h.

◆ tlsContext

TlsContext* tlsContext

TLS context.

Definition at line 135 of file modbus_client.h.

◆ tlsInitCallback

ModbusClientTlsInitCallback tlsInitCallback

TLS initialization callback function.

Definition at line 137 of file modbus_client.h.

◆ tlsSession

TlsSessionState tlsSession

TLS session state.

Definition at line 136 of file modbus_client.h.

◆ transactionId

uint16_t transactionId

Modbus transaction identifier.

Definition at line 132 of file modbus_client.h.

◆ unitId

uint8_t unitId

Identifier of the remote slave.

Definition at line 131 of file modbus_client.h.


The documentation for this struct was generated from the following file: