mikroSDK Reference Manual
modbus_server_pdu.h
Go to the documentation of this file.
1
31#ifndef _MODBUS_SERVER_PDU_H
32#define _MODBUS_SERVER_PDU_H
33
34//Dependencies
35#include "core/net.h"
37
38//C++ guard
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43//Modbus/TCP server related functions
44error_t modbusServerProcessRequest(ModbusClientConnection *connection);
45
46error_t modbusServerProcessReadCoilsReq(ModbusClientConnection *connection,
47 const ModbusReadCoilsReq *request, size_t length);
48
49error_t modbusServerProcessReadDiscreteInputsReq(ModbusClientConnection *connection,
50 const ModbusReadDiscreteInputsReq *request, size_t length);
51
52error_t modbusServerProcessReadHoldingRegsReq(ModbusClientConnection *connection,
53 const ModbusReadHoldingRegsReq *request, size_t length);
54
55error_t modbusServerProcessReadInputRegsReq(ModbusClientConnection *connection,
56 const ModbusReadInputRegsReq *request, size_t length);
57
58error_t modbusServerProcessWriteSingleCoilReq(ModbusClientConnection *connection,
59 const ModbusWriteSingleCoilReq *request, size_t length);
60
61error_t modbusServerProcessWriteSingleRegReq(ModbusClientConnection *connection,
62 const ModbusWriteSingleRegReq *request, size_t length);
63
64error_t modbusServerProcessWriteMultipleCoilsReq(ModbusClientConnection *connection,
65 const ModbusWriteMultipleCoilsReq *request, size_t length);
66
67error_t modbusServerProcessWriteMultipleRegsReq(ModbusClientConnection *connection,
68 const ModbusWriteMultipleRegsReq *request, size_t length);
69
70error_t modbusServerProcessMaskWriteRegReq(ModbusClientConnection *connection,
71 const ModbusMaskWriteRegReq *request, size_t length);
72
73error_t modbusServerProcessReadWriteMultipleRegsReq(ModbusClientConnection *connection,
74 const ModbusReadWriteMultipleRegsReq *request, size_t length);
75
76error_t modbusServerFormatExceptionResp(ModbusClientConnection *connection,
77 ModbusFunctionCode functionCode, ModbusExceptionCode exceptionCode);
78
79//C++ guard
80#ifdef __cplusplus
81}
82#endif
83
84#endif
error_t
Error codes.
Definition error.h:43
ModbusExceptionCode
Modbus exception codes.
Definition modbus_common.h:103
ModbusFunctionCode
Modbus functions codes.
Definition modbus_common.h:75
Modbus/TCP server.
TCP/IP stack core.