2 * Copyright © 2001-2011 Stéphane Raimbault <stephane.raimbault@gmail.com>
4 * SPDX-License-Identifier: LGPL-2.1+
7 #ifndef MODBUS_TCP_PRIVATE_H
8 #define MODBUS_TCP_PRIVATE_H
10 #define _MODBUS_TCP_HEADER_LENGTH 7
11 #define _MODBUS_TCP_PRESET_REQ_LENGTH 12
12 #define _MODBUS_TCP_PRESET_RSP_LENGTH 8
14 #define _MODBUS_TCP_CHECKSUM_LENGTH 0
16 /* In both structures, the transaction ID must be placed on first position
17 to have a quick access not dependant of the TCP backend */
18 typedef struct _modbus_tcp
{
19 /* Extract from MODBUS Messaging on TCP/IP Implementation Guide V1.0b
21 The transaction identifier is used to associate the future response
22 with the request. This identifier is unique on each TCP connection. */
30 #define _MODBUS_TCP_PI_NODE_LENGTH 1025
31 #define _MODBUS_TCP_PI_SERVICE_LENGTH 32
33 typedef struct _modbus_tcp_pi
{
39 char node
[_MODBUS_TCP_PI_NODE_LENGTH
];
41 char service
[_MODBUS_TCP_PI_SERVICE_LENGTH
];
44 #endif /* MODBUS_TCP_PRIVATE_H */