2 * Copyright © 2001-2010 Stéphane Raimbault <stephane.raimbault@gmail.com>
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.
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.
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/>.
18 #ifndef _MODBUS_TCP_PRIVATE_H_
19 #define _MODBUS_TCP_PRIVATE_H_
21 #define _MODBUS_TCP_HEADER_LENGTH 7
22 #define _MODBUS_TCP_PRESET_REQ_LENGTH 12
23 #define _MODBUS_TCP_PRESET_RSP_LENGTH 8
25 #define _MODBUS_TCP_CHECKSUM_LENGTH 0
27 typedef struct _modbus_tcp
{
34 #define _MODBUS_TCP_PI_NODE_LENGTH 1025
35 #define _MODBUS_TCP_PI_SERVICE_LENGTH 32
37 typedef struct _modbus_tcp_pi
{
41 char node
[_MODBUS_TCP_PI_NODE_LENGTH
];
43 char service
[_MODBUS_TCP_PI_SERVICE_LENGTH
];
46 #endif /* _MODBUS_TCP_PRIVATE_H_ */