31#ifndef _MODBUS_SERVER_MISC_H
32#define _MODBUS_SERVER_MISC_H
44void modbusServerTick(ModbusServerContext *context);
46void modbusServerRegisterConnectionEvents(ModbusClientConnection *connection,
49void modbusServerProcessConnectionEvents(ModbusClientConnection *connection);
51error_t modbusServerParseMbapHeader(ModbusClientConnection *connection);
53error_t modbusServerFormatMbapHeader(ModbusClientConnection *connection,
56void *modbusServerGetRequestPdu(ModbusClientConnection *connection,
59void *modbusServerGetResponsePdu(ModbusClientConnection *connection);
61void modbusServerLock(ModbusClientConnection *connection);
62void modbusServerUnlock(ModbusClientConnection *connection);
64error_t modbusServerReadCoil(ModbusClientConnection *connection,
65 uint16_t address, bool_t *state);
67error_t modbusServerReadDiscreteInput(ModbusClientConnection *connection,
68 uint16_t address, bool_t *state);
70error_t modbusServerWriteCoil(ModbusClientConnection *connection,
71 uint16_t address, bool_t state, bool_t commit);
73error_t modbusServerReadHoldingReg(ModbusClientConnection *connection,
74 uint16_t address, uint16_t *value);
76error_t modbusServerReadInputReg(ModbusClientConnection *connection,
77 uint16_t address, uint16_t *value);
79error_t modbusServerWriteReg(ModbusClientConnection *connection,
80 uint16_t address, uint16_t value, bool_t commit);
error_t
Error codes.
Definition error.h:43
ModbusExceptionCode
Modbus exception codes.
Definition modbus_common.h:103
Structure describing socket events.
Definition socket.h:395