Rename [gs]et_timeout_[begin|end] to [gs]et_[response|byte]_timeout
[libmodbus.git] / src / modbus-tcp-private.h
blob1344904ffb4e0d3519039d481f04f4ffe6ac6c56
1 /*
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 {
28 /* TCP port */
29 int port;
30 /* IP address */
31 char ip[16];
32 } modbus_tcp_t;
34 #define _MODBUS_TCP_PI_NODE_LENGTH 1025
35 #define _MODBUS_TCP_PI_SERVICE_LENGTH 32
37 typedef struct _modbus_tcp_pi {
38 /* TCP port */
39 int port;
40 /* Node */
41 char node[_MODBUS_TCP_PI_NODE_LENGTH];
42 /* Service */
43 char service[_MODBUS_TCP_PI_SERVICE_LENGTH];
44 } modbus_tcp_pi_t;
46 #endif /* _MODBUS_TCP_PRIVATE_H_ */