liblightmodbus  2.0
A lightweight, cross-platform Modbus RTU library
mpcoils.h
Go to the documentation of this file.
1 /*
2  liblightmodbus - a lightweight, multiplatform Modbus library
3  Copyright (C) 2017 Jacek Wieczorek <mrjjot@gmail.com>
4 
5  This file is part of liblightmodbus.
6 
7  Liblightmodbus is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  Liblightmodbus is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
26 #ifndef LIGHTMODBUS_MPCOILS_H
27 #define LIGHTMODBUS_MPCOILS_H
28 
29 #include <inttypes.h>
30 #include "../libconf.h"
31 #include "../lightmodbus.h"
32 #include "../master.h"
33 
34 //Functions for parsing responses
35 #if defined(LIGHTMODBUS_F01M) || defined(LIGHTMODBUS_F02M)
36 #define modbusParseResponse01 modbusParseResponse0102
37 #define modbusParseResponse02 modbusParseResponse0102
38 
47 extern ModbusError modbusParseResponse0102( ModbusMaster *status, ModbusParser *parser, ModbusParser *requestParser );
48 #endif
49 
50 #ifdef LIGHTMODBUS_F05M
51 
59 extern ModbusError modbusParseResponse05( ModbusMaster *status, ModbusParser *parser, ModbusParser *requestParser );
60 #endif
61 
62 #ifdef LIGHTMODBUS_F15M
63 
71 extern ModbusError modbusParseResponse15( ModbusMaster *status, ModbusParser *parser, ModbusParser *requestParser );
72 #endif
73 
74 #endif
ModbusError modbusParseResponse15(ModbusMaster *status, ModbusParser *parser, ModbusParser *requestParser)
Processes responses for request 15 (write multiple coils)
Definition: mpcoils.c:189
A big union of structures used for parsing standard Modbus requests and building responses.
Definition: parser.h:43
ModbusError modbusParseResponse0102(ModbusMaster *status, ModbusParser *parser, ModbusParser *requestParser)
Processes responses for requests 01 (read multiple coils) and 02 (read multiple discrete inputs) ...
Definition: mpcoils.c:29
ModbusError modbusParseResponse05(ModbusMaster *status, ModbusParser *parser, ModbusParser *requestParser)
Processes responses for request 05 (write a single coil)
Definition: mpcoils.c:108
Represents Modbus master device&#39;s status and configuration.
Definition: master.h:71
enum modbusError ModbusError
Represents a library runtime error code.