modbus-version.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2010 Stéphane Raimbault <stephane.raimbault@gmail.com>
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef _MODBUS_VERSION_H_
19 #define _MODBUS_VERSION_H_
20 
21 /* The major version, (1, if %LIBMODBUS_VERSION is 1.2.3) */
22 #define LIBMODBUS_VERSION_MAJOR (3)
23 
24 /* The minor version (2, if %LIBMODBUS_VERSION is 1.2.3) */
25 #define LIBMODBUS_VERSION_MINOR (0)
26 
27 /* The micro version (3, if %LIBMODBUS_VERSION is 1.2.3) */
28 #define LIBMODBUS_VERSION_MICRO (6)
29 
30 /* The full version, like 1.2.3 */
31 #define LIBMODBUS_VERSION 3.0.6
32 
33 /* The full version, in string form (suited for string concatenation)
34  */
35 #define LIBMODBUS_VERSION_STRING "3.0.6"
36 
37 /* Numerically encoded version, like 0x010203 */
38 #define LIBMODBUS_VERSION_HEX ((LIBMODBUS_MAJOR_VERSION << 24) | \
39  (LIBMODBUS_MINOR_VERSION << 16) | \
40  (LIBMODBUS_MICRO_VERSION << 8))
41 
42 /* Evaluates to True if the version is greater than @major, @minor and @micro
43  */
44 #define LIBMODBUS_VERSION_CHECK(major,minor,micro) \
45  (LIBMODBUS_VERSION_MAJOR > (major) || \
46  (LIBMODBUS_VERSION_MAJOR == (major) && \
47  LIBMODBUS_VERSION_MINOR > (minor)) || \
48  (LIBMODBUS_VERSION_MAJOR == (major) && \
49  LIBMODBUS_VERSION_MINOR == (minor) && \
50  LIBMODBUS_VERSION_MICRO >= (micro)))
51 
52 #endif /* _MODBUS_VERSION_H_ */


libmodbus
Author(s):
autogenerated on Sat Nov 21 2020 03:17:32