modbus_server.h
Go to the documentation of this file.
255 ModbusServerReadCoilCallback readDiscreteInputCallback; ///<Get discrete input state callback function
258 ModbusServerReadRegCallback readHoldingRegCallback; ///<Get holding register value callback function
259 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:210
ModbusServerTlsInitCallback tlsInitCallback
TLS initialization callback function.
Definition: modbus_server.h:250
error_t modbusServerStart(ModbusServerContext *context)
Start Modbus/TCP server.
Definition: modbus_server.c:158
ModbusServerOpenCallback openCallback
TCP connection open callback function.
Definition: modbus_server.h:247
void(* ModbusServerCloseCallback)(ModbusClientConnection *connection)
TCP connection close callback function.
Definition: modbus_server.h:160
@ MODBUS_CONNECTION_STATE_CONNECT_TLS
Definition: modbus_server.h:139
ModbusServerReadCoilCallback readDiscreteInputCallback
Get discrete input state callback function.
Definition: modbus_server.h:255
ModbusServerUnlockCallback unlockCallback
Unlock Modbus table callback function.
Definition: modbus_server.h:253
ModbusServerReadRegCallback readHoldingRegCallback
Get holding register value callback function.
Definition: modbus_server.h:258
void modbusServerDeinit(ModbusServerContext *context)
Release Modbus/TCP server context.
Definition: modbus_server.c:413
@ MODBUS_CONNECTION_STATE_SHUTDOWN_TLS
Definition: modbus_server.h:142
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:218
ModbusServerWriteCoilCallback writeCoilCallback
Set coil state callback function.
Definition: modbus_server.h:256
error_t(* ModbusServerTlsInitCallback)(ModbusClientConnection *connection, TlsContext *tlsContext)
TLS initialization callback function.
Definition: modbus_server.h:171
ModbusServerLockCallback lockCallback
Lock Modbus table callback function.
Definition: modbus_server.h:252
error_t(* ModbusServerProcessPduCallback)(const uint8_t *request, size_t requestLen, uint8_t *response, size_t *responseLen)
PDU processing callback function.
Definition: modbus_server.h:226
ModbusServerCloseCallback closeCallback
TCP connection close callback function.
Definition: modbus_server.h:248
error_t modbusServerStop(ModbusServerContext *context)
Stop Modbus/TCP server.
Definition: modbus_server.c:260
ModbusServerReadCoilCallback readCoilCallback
Get coil state callback function.
Definition: modbus_server.h:254
@ MODBUS_CONNECTION_STATE_SHUTDOWN_RX
Definition: modbus_server.h:144
void modbusServerTask(ModbusServerContext *context)
Modbus/TCP server task.
Definition: modbus_server.c:307
ModbusServerProcessPduCallback processPduCallback
PDU processing callback function.
Definition: modbus_server.h:261
ModbusServerReadRegCallback readRegCallback
Get register value callback function.
Definition: modbus_server.h:257
General definitions for cryptographic algorithms.
ModbusClientConnection connection[MODBUS_SERVER_MAX_CONNECTIONS]
Client connections.
Definition: modbus_server.h:306
error_t(* ModbusServerReadCoilCallback)(const char_t *role, uint16_t address, bool_t *state)
Get coil state callback function.
Definition: modbus_server.h:194
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:259
void(* ModbusServerTickCallback)(ModbusServerContext *context)
Tick callback function.
Definition: modbus_server.h:234
TLS session tickets.
void(* ModbusServerLockCallback)(void)
Lock Modbus table callback function.
Definition: modbus_server.h:180
error_t(* ModbusServerOpenCallback)(ModbusClientConnection *connection, IpAddr clientIpAddr, uint16_t clientPort)
TCP connection open callback function.
Definition: modbus_server.h:152
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:103
TLS (Transport Layer Security)
void(* ModbusServerUnlockCallback)(void)
Unlock Modbus table callback function.
Definition: modbus_server.h:187
ModbusServerWriteRegCallback writeRegCallback
Set register value callback function.
Definition: modbus_server.h:260
TCP/IP stack core.
@ MODBUS_CONNECTION_STATE_SHUTDOWN_TX
Definition: modbus_server.h:143
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:202