5735b406
Peter M. Groen
Revert "Setting u...
|
1
2
3
4
5
6
7
8
|
/*
* Copyright © 2001-2011 Stéphane Raimbault <stephane.raimbault@gmail.com>
*
* SPDX-License-Identifier: LGPL-2.1+
*/
#ifndef MODBUS_TCP_PRIVATE_H
#define MODBUS_TCP_PRIVATE_H
|
500c015a
Peter M. Groen
Setting up workin...
|
9
10
11
12
13
14
15
16
17
|
#define _MODBUS_TCP_HEADER_LENGTH 7
#define _MODBUS_TCP_PRESET_REQ_LENGTH 12
#define _MODBUS_TCP_PRESET_RSP_LENGTH 8
#define _MODBUS_TCP_CHECKSUM_LENGTH 0
/* In both structures, the transaction ID must be placed on first position
to have a quick access not dependant of the TCP backend */
|
5735b406
Peter M. Groen
Revert "Setting u...
|
18
|
typedef struct _modbus_tcp {
|
500c015a
Peter M. Groen
Setting up workin...
|
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/* Extract from MODBUS Messaging on TCP/IP Implementation Guide V1.0b
(page 23/46):
The transaction identifier is used to associate the future response
with the request. This identifier is unique on each TCP connection. */
uint16_t t_id;
/* TCP port */
int port;
/* IP address */
char ip[16];
} modbus_tcp_t;
#define _MODBUS_TCP_PI_NODE_LENGTH 1025
#define _MODBUS_TCP_PI_SERVICE_LENGTH 32
|
5735b406
Peter M. Groen
Revert "Setting u...
|
33
|
typedef struct _modbus_tcp_pi {
|
500c015a
Peter M. Groen
Setting up workin...
|
34
35
36
37
38
39
40
41
42
43
|
/* Transaction ID */
uint16_t t_id;
/* TCP port */
int port;
/* Node */
char node[_MODBUS_TCP_PI_NODE_LENGTH];
/* Service */
char service[_MODBUS_TCP_PI_SERVICE_LENGTH];
} modbus_tcp_pi_t;
|
5735b406
Peter M. Groen
Revert "Setting u...
|
44
|
#endif /* MODBUS_TCP_PRIVATE_H */
|