-
Notifications
You must be signed in to change notification settings - Fork 194
/
options.h.in
246 lines (195 loc) · 6.24 KB
/
options.h.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
/*********************************************************************
* _ _ _
* _ __ | |_ _ | | __ _ | |__ ___
* | '__|| __|(_)| | / _` || '_ \ / __|
* | | | |_ _ | || (_| || |_) |\__ \
* |_| \__|(_)|_| \__,_||_.__/ |___/
*
* www.rt-labs.com
* Copyright 2018 rt-labs AB, Sweden.
*
* This software is dual-licensed under GPLv3 and a commercial
* license. See the file LICENSE.md distributed with this software for
* full license information.
********************************************************************/
#ifndef OPTIONS_H
#define OPTIONS_H
/**
* # Profinet Stack Options
*
* The defines named `PNET_OPTION_*` may be used to extend or reduce
* the functionality of the stack. Setting these values to 0 excludes
* the specific function and may also reduce the memory usage of the
* Profinet stack.
*
* Note that none of these options are currently supported (even if
* enabled by setting the value to 1), except for parsing the RPC
* Connect request message and generating the connect RPC Connect
* response message.
*/
#if !defined (PNET_OPTION_FAST_STARTUP)
#cmakedefine01 PNET_OPTION_FAST_STARTUP
#endif
#if !defined (PNET_OPTION_PARAMETER_SERVER)
#cmakedefine01 PNET_OPTION_PARAMETER_SERVER
#endif
#if !defined (PNET_OPTION_IR)
#cmakedefine01 PNET_OPTION_IR
#endif
#if !defined (PNET_OPTION_SR)
#cmakedefine01 PNET_OPTION_SR
#endif
#if !defined (PNET_OPTION_REDUNDANCY)
#cmakedefine01 PNET_OPTION_REDUNDANCY
#endif
#if !defined (PNET_OPTION_AR_VENDOR_BLOCKS)
#cmakedefine01 PNET_OPTION_AR_VENDOR_BLOCKS
#endif
#if !defined (PNET_OPTION_RS)
#cmakedefine01 PNET_OPTION_RS
#endif
#if !defined (PNET_OPTION_MC_CR)
#cmakedefine01 PNET_OPTION_MC_CR
#endif
#if !defined (PNET_OPTION_SRL)
#cmakedefine01 PNET_OPTION_SRL
#endif
#if !defined (PNET_OPTION_SNMP)
#cmakedefine01 PNET_OPTION_SNMP
#endif
/**
* Disable use of atomic operations (stdatomic.h).
* If the compiler supports it then set this define to 1.
*/
/* TODO: compiler abstraction should be handled by cc.h */
#if !defined (PNET_USE_ATOMICS)
#cmakedefine01 PNET_USE_ATOMICS
#endif
/**
* # Memory Usage
*
* Memory usage is controlled by the `PNET_MAX_*` defines. Define the
* required number of supported items.
*
* These values directly affect the memory usage of the
* implementation. Sometimes in complicated ways.
*
* Please note that some defines have minimum requirements.
* Only a few of the defines are validated.
*/
#if !defined (PNET_MAX_AR)
/** Number of connections. Must be > 0. "Automated RT Tester" uses 2 */
#define PNET_MAX_AR @PNET_MAX_AR@
#endif
#if !defined (PNET_MAX_API)
/** Number of Application Processes. Must be > 0. */
#define PNET_MAX_API @PNET_MAX_API@
#endif
#if !defined (PNET_MAX_CR)
/** Per AR. 1 input and 1 output. */
#define PNET_MAX_CR @PNET_MAX_CR@
#endif
#if !defined (PNET_MAX_SLOTS)
/** Per API. Should be > 1 to allow at least one I/O module. */
#define PNET_MAX_SLOTS @PNET_MAX_SLOTS@
#endif
#if !defined (PNET_MAX_SUBSLOTS)
/** Per slot (3 needed for DAP). */
#define PNET_MAX_SUBSLOTS @PNET_MAX_SUBSLOTS@
#endif
#if !defined (PNET_MAX_DFP_IOCR)
/** Allowed values are 0 (zero) or 2. */
#define PNET_MAX_DFP_IOCR @PNET_MAX_DFP_IOCR@
#endif
#if !defined (PNET_MAX_LOG_BOOK_ENTRIES)
#define PNET_MAX_LOG_BOOK_ENTRIES @PNET_MAX_LOG_BOOK_ENTRIES@
#endif
#if !defined (PNET_MAX_ALARMS)
/** Per AR and queue. One queue for hi and one for lo alarms. */
#define PNET_MAX_ALARMS @PNET_MAX_ALARMS@
#endif
#if !defined (PNET_MAX_ALARM_PAYLOAD_DATA_SIZE)
/** Max size of alarm payload */
#define PNET_MAX_ALARM_PAYLOAD_DATA_SIZE @PNET_MAX_ALARM_PAYLOAD_DATA_SIZE@
#endif
#if !defined (PNET_MAX_DIAG_ITEMS)
/** Total, per device. Max is 65534 items. */
#define PNET_MAX_DIAG_ITEMS @PNET_MAX_DIAG_ITEMS@
#endif
#if !defined (PNET_MAX_DIAG_MANUF_DATA_SIZE)
/** Max size of manufacturer specific diagnosis data */
#define PNET_MAX_DIAG_MANUF_DATA_SIZE @PNET_MAX_DIAG_MANUF_DATA_SIZE@
#endif
#if PNET_OPTION_MC_CR
#if !defined (PNET_MAX_MC_CR)
/**< Per AR. */
#define PNET_MAX_MC_CR @PNET_MAX_MC_CR@
#endif
#endif /* PNET_OPTION_MC_CR */
#if PNET_OPTION_AR_VENDOR_BLOCKS
#if !defined (PNET_MAX_AR_VENDOR_BLOCKS)
/**< Must be > 0 */
#define PNET_MAX_AR_VENDOR_BLOCKS @PNET_MAX_AR_VENDOR_BLOCKS@
#endif
#if !defined (PNET_MAX_AR_VENDOR_BLOCK_DATA_LENGTH)
#define PNET_MAX_AR_VENDOR_BLOCK_DATA_LENGTH @PNET_MAX_AR_VENDOR_BLOCK_DATA_LENGTH@
#endif
#endif /* PNET_OPTION_AR_VENDOR_BLOCKS */
#if !defined (PNET_MAX_MAN_SPECIFIC_FAST_STARTUP_DATA_LENGTH)
/** or 512 (bytes) */
#define PNET_MAX_MAN_SPECIFIC_FAST_STARTUP_DATA_LENGTH @PNET_MAX_MAN_SPECIFIC_FAST_STARTUP_DATA_LENGTH@
#endif
#if !defined (PNET_MAX_SESSION_BUFFER_SIZE)
/** Max fragmented RPC request/response length */
#define PNET_MAX_SESSION_BUFFER_SIZE @PNET_MAX_SESSION_BUFFER_SIZE@
#endif
#if !defined (PNET_MAX_FILENAME_SIZE)
/** Max filename size, including termination */
#define PNET_MAX_FILENAME_SIZE @PNET_MAX_FILENAME_SIZE@
#endif
#if !defined (PNET_MAX_PORT_DESCRIPTION_SIZE)
/** Max port description size, including termination */
#define PNET_MAX_PORT_DESCRIPTION_SIZE @PNET_MAX_PORT_DESCRIPTION_SIZE@
#endif
/**
* # Logging
*
* The following options controlling logging.
*/
#ifndef LOG_LEVEL
#define LOG_LEVEL (LOG_LEVEL_@LOG_LEVEL@)
#endif
#ifndef PF_ETH_LOG
#define PF_ETH_LOG (LOG_STATE_@PF_ETH_LOG@)
#endif
#ifndef PF_LLDP_LOG
#define PF_LLDP_LOG (LOG_STATE_@PF_LLDP_LOG@)
#endif
#ifndef PF_SNMP_LOG
#define PF_SNMP_LOG (LOG_STATE_@PF_SNMP_LOG@)
#endif
#ifndef PF_CPM_LOG
#define PF_CPM_LOG (LOG_STATE_@PF_CPM_LOG@)
#endif
#ifndef PF_PPM_LOG
#define PF_PPM_LOG (LOG_STATE_@PF_PPM_LOG@)
#endif
#ifndef PF_DCP_LOG
#define PF_DCP_LOG (LOG_STATE_@PF_DCP_LOG@)
#endif
#ifndef PF_RPC_LOG
#define PF_RPC_LOG (LOG_STATE_@PF_RPC_LOG@)
#endif
#ifndef PF_ALARM_LOG
#define PF_ALARM_LOG (LOG_STATE_@PF_ALARM_LOG@)
#endif
#ifndef PF_AL_BUF_LOG
#define PF_AL_BUF_LOG (LOG_STATE_@PF_AL_BUF_LOG@)
#endif
#ifndef PF_PNAL_LOG
#define PF_PNAL_LOG (LOG_STATE_@PF_PNAL_LOG@)
#endif
#ifndef PNET_LOG
#define PNET_LOG (LOG_STATE_@PNET_LOG@)
#endif
#endif /* OPTIONS_H */