modbus_server.h
Go to the documentation of this file.
263 ModbusServerReadCoilCallback readDiscreteInputCallback; ///<Get discrete input state callback function
266 ModbusServerReadRegCallback readHoldingRegCallback; ///<Get holding register value callback function
267 ModbusServerReadRegCallback readInputRegCallback; ///<Get input register value callback function
error_t(* ModbusServerReadRegCallback)(const char_t *role, uint16_t address, uint16_t *value)
Get register value callback function.
Definition: modbus_server.h:217
ModbusServerTlsInitCallback tlsInitCallback
TLS initialization callback function.
Definition: modbus_server.h:258
error_t modbusServerStart(ModbusServerContext *context)
Start Modbus/TCP server.
Definition: modbus_server.c:167
ModbusServerOpenCallback openCallback
TCP connection open callback function.
Definition: modbus_server.h:255
void(* ModbusServerCloseCallback)(ModbusClientConnection *connection)
TCP connection close callback function.
Definition: modbus_server.h:167
@ MODBUS_CONNECTION_STATE_CONNECT_TLS
Definition: modbus_server.h:146
ModbusServerReadCoilCallback readDiscreteInputCallback
Get discrete input state callback function.
Definition: modbus_server.h:263
ModbusServerUnlockCallback unlockCallback
Unlock Modbus table callback function.
Definition: modbus_server.h:261
ModbusServerReadRegCallback readHoldingRegCallback
Get holding register value callback function.
Definition: modbus_server.h:266
void modbusServerDeinit(ModbusServerContext *context)
Release Modbus/TCP server context.
Definition: modbus_server.c:420
@ MODBUS_CONNECTION_STATE_SHUTDOWN_TLS
Definition: modbus_server.h:149
error_t(* ModbusServerWriteRegCallback)(const char_t *role, uint16_t address, uint16_t value, bool_t commit)
Set register value callback function.
Definition: modbus_server.h:225
ModbusServerWriteCoilCallback writeCoilCallback
Set coil state callback function.
Definition: modbus_server.h:264
error_t(* ModbusServerTlsInitCallback)(ModbusClientConnection *connection, TlsContext *tlsContext)
TLS initialization callback function.
Definition: modbus_server.h:178
ModbusServerLockCallback lockCallback
Lock Modbus table callback function.
Definition: modbus_server.h:260
error_t(* ModbusServerProcessPduCallback)(const uint8_t *request, size_t requestLen, uint8_t *response, size_t *responseLen)
PDU processing callback function.
Definition: modbus_server.h:233
ModbusServerCloseCallback closeCallback
TCP connection close callback function.
Definition: modbus_server.h:256
error_t modbusServerStop(ModbusServerContext *context)
Stop Modbus/TCP server.
Definition: modbus_server.c:261
ModbusServerReadCoilCallback readCoilCallback
Get coil state callback function.
Definition: modbus_server.h:262
@ MODBUS_CONNECTION_STATE_SHUTDOWN_RX
Definition: modbus_server.h:151
void modbusServerTask(ModbusServerContext *context)
Modbus/TCP server task.
Definition: modbus_server.c:314
ModbusServerProcessPduCallback processPduCallback
PDU processing callback function.
Definition: modbus_server.h:269
ModbusServerReadRegCallback readRegCallback
Get register value callback function.
Definition: modbus_server.h:265
General definitions for cryptographic algorithms.
ModbusClientConnection connection[MODBUS_SERVER_MAX_CONNECTIONS]
Client connections.
Definition: modbus_server.h:311
error_t(* ModbusServerReadCoilCallback)(const char_t *role, uint16_t address, bool_t *state)
Get coil state callback function.
Definition: modbus_server.h:201
void modbusServerGetDefaultSettings(ModbusServerSettings *settings)
Initialize settings with default values.
Definition: modbus_server.c:49
ModbusServerReadRegCallback readInputRegCallback
Get input register value callback function.
Definition: modbus_server.h:267
void(* ModbusServerTickCallback)(ModbusServerContext *context)
Tick callback function.
Definition: modbus_server.h:241
TLS session tickets.
void(* ModbusServerLockCallback)(void)
Lock Modbus table callback function.
Definition: modbus_server.h:187
error_t(* ModbusServerOpenCallback)(ModbusClientConnection *connection, IpAddr clientIpAddr, uint16_t clientPort)
TCP connection open callback function.
Definition: modbus_server.h:159
Definitions common to Modbus/TCP client and server.
error_t modbusServerInit(ModbusServerContext *context, const ModbusServerSettings *settings)
Initialize Modbus/TCP server context.
Definition: modbus_server.c:108
TLS (Transport Layer Security)
void(* ModbusServerUnlockCallback)(void)
Unlock Modbus table callback function.
Definition: modbus_server.h:194
ModbusServerWriteRegCallback writeRegCallback
Set register value callback function.
Definition: modbus_server.h:268
TCP/IP stack core.
@ MODBUS_CONNECTION_STATE_SHUTDOWN_TX
Definition: modbus_server.h:150
error_t(* ModbusServerWriteCoilCallback)(const char_t *role, uint16_t address, bool_t state, bool_t commit)
Set coil state callback function.
Definition: modbus_server.h:209