S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
sopc_toolkit_config_constants.h
Go to the documentation of this file.
1/*
2 * Licensed to Systerel under one or more contributor license
3 * agreements. See the NOTICE file distributed with this work
4 * for additional information regarding copyright ownership.
5 * Systerel licenses this file to you under the Apache
6 * License, Version 2.0 (the "License"); you may not use this
7 * file except in compliance with the License. You may obtain
8 * a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
26#ifndef SOPC_TOOLKIT_CONFIG_CONSTANTS_H_
27#define SOPC_TOOLKIT_CONFIG_CONSTANTS_H_
28
29#include <stdbool.h>
30
32
33/* See sopc_common_constants.h for common part constants */
34
36#ifndef SOPC_MAX_OPERATIONS_PER_MSG
37#define SOPC_MAX_OPERATIONS_PER_MSG 5000
38#endif /* SOPC_MAX_OPERATIONS_PER_MSG */
39
41#ifndef SOPC_MAX_HEAVY_OPERATIONS_PER_MSG
42#define SOPC_MAX_HEAVY_OPERATIONS_PER_MSG 1000
43#endif /* SOPC_MAX_OPERATIONS_PER_MSG */
44
45/* TCP SOCKETS CONFIGURATION */
46
48#ifndef SOPC_MAX_SOCKETS
49#define SOPC_MAX_SOCKETS 150
50#endif /* SOPC_MAX_SOCKETS */
51
53#ifndef SOPC_MAX_SOCKETS_CONNECTIONS
54#define SOPC_MAX_SOCKETS_CONNECTIONS 50
55#endif /* SOPC_MAX_SOCKETS_CONNECTIONS */
56
58#ifndef SOPC_MIN_BYTE_BUFFER_SIZE_READ_SOCKET
59#define SOPC_MIN_BYTE_BUFFER_SIZE_READ_SOCKET 1024
60#endif /* SOPC_MIN_BYTE_BUFFER_SIZE_READ_SOCKET */
61
62/* SECURE CHANNEL CONFIGURATION */
63
67#ifndef SOPC_MAX_ENDPOINT_DESCRIPTION_CONFIGURATIONS
68#define SOPC_MAX_ENDPOINT_DESCRIPTION_CONFIGURATIONS 10
69#endif /* SOPC_MAX_ENDPOINT_DESCRIPTION_CONFIGURATIONS */
70
71#ifndef SOPC_LISTENER_LISTEN_ALL_INTERFACES
72#define SOPC_LISTENER_LISTEN_ALL_INTERFACES true
73#endif /* SOPC_LISTENER_LISTEN_ALL_INTERFACES */
74
76#ifndef SOPC_MAX_SECURE_CONNECTIONS
77#define SOPC_MAX_SECURE_CONNECTIONS 21
78#endif /* SOPC_MAX_SECURE_CONNECTIONS */
79
85#define SOPC_MAX_SECURE_CONNECTIONS_PLUS_BUFFERED (5 * SOPC_MAX_SECURE_CONNECTIONS / 4)
86
88#ifndef SOPC_MINIMUM_SECURE_CONNECTION_LIFETIME
89#define SOPC_MINIMUM_SECURE_CONNECTION_LIFETIME 1000
90#endif
91
93#ifndef SOPC_MAX_PENDING_REQUESTS
94#define SOPC_MAX_PENDING_REQUESTS 128
95#endif
96
100#ifndef SOPC_REQUEST_TIMEOUT_MS
101#define SOPC_REQUEST_TIMEOUT_MS 10000
102#endif
103
107#ifndef SOPC_SC_CONNECTION_TIMEOUT_MS
108#define SOPC_SC_CONNECTION_TIMEOUT_MS 10000
109#endif
110
112#ifndef SOPC_MAX_REVERSE_CLIENT_CONNECTIONS
113#define SOPC_MAX_REVERSE_CLIENT_CONNECTIONS 5
114#endif
115
117#ifndef SOPC_REVERSE_CONNECTION_RETRY_DELAY_MS
118#define SOPC_REVERSE_CONNECTION_RETRY_DELAY_MS 1000
119#endif
120
122#ifndef SOPC_REVERSE_CONNECTION_RECEIVE_RHE_DELAY_MS
123#define SOPC_REVERSE_CONNECTION_RECEIVE_RHE_DELAY_MS 1000
124#endif
125
126/* SESSION CONFIGURATION */
127
129#ifndef SOPC_MAX_SESSIONS
130#define SOPC_MAX_SESSIONS 20
131#endif /* SOPC_MAX_SESSIONS */
132
134#ifndef SOPC_MAX_SESSIONS_PER_SECURE_CONNECTION
135#define SOPC_MAX_SESSIONS_PER_SECURE_CONNECTION 5
136#endif
137
139#ifndef SOPC_REQUESTED_SESSION_TIMEOUT
140#define SOPC_REQUESTED_SESSION_TIMEOUT 60000 // 60 seconds
141#endif
142
144#ifndef SOPC_MIN_SESSION_TIMEOUT
145#define SOPC_MIN_SESSION_TIMEOUT 10000 // 10 seconds
146#endif
147
149#ifndef SOPC_MAX_SESSION_TIMEOUT
150#define SOPC_MAX_SESSION_TIMEOUT 600000 // 10 minutes
151#endif
152
156#ifndef SOPC_MAX_SESSION_AUTH_ATTEMPTS
157#define SOPC_MAX_SESSION_AUTH_ATTEMPTS 3
158#endif
159
163#ifndef SOPC_CREATE_SESSION_LOCK_DELAY_SECS
164#define SOPC_CREATE_SESSION_LOCK_DELAY_SECS 60
165#endif
166
171#ifndef SOPC_SESSION_ACTIVATION_MIN_DELAY_SECS
172#define SOPC_SESSION_ACTIVATION_MIN_DELAY_SECS 10
173#endif
174
175/* SUBSCRIPTION CONFIGURATION */
176
178#ifndef SOPC_MAX_SUBSCRIPTION_PUBLISH_REQUESTS
179#define SOPC_MAX_SUBSCRIPTION_PUBLISH_REQUESTS 10
180#endif
181
183#ifndef SOPC_MIN_SUBSCRIPTION_INTERVAL_DURATION
184#define SOPC_MIN_SUBSCRIPTION_INTERVAL_DURATION 100 // 100 ms
185#endif
186
188#ifndef SOPC_MAX_SUBSCRIPTION_INTERVAL_DURATION
189#define SOPC_MAX_SUBSCRIPTION_INTERVAL_DURATION 3600000 // 1 hour
190#endif
191
193#ifndef SOPC_MIN_KEEPALIVE_PUBLISH_INTERVALS
194#define SOPC_MIN_KEEPALIVE_PUBLISH_INTERVALS 1
195#endif
196
198#ifndef SOPC_MAX_KEEPALIVE_PUBLISH_INTERVALS
199#define SOPC_MAX_KEEPALIVE_PUBLISH_INTERVALS 100
200#endif
201
203#ifndef SOPC_MIN_LIFETIME_PUBLISH_INTERVALS
204#define SOPC_MIN_LIFETIME_PUBLISH_INTERVALS 3 // >= 3 KeepAlive
205#endif
206
208#ifndef SOPC_MAX_LIFETIME_PUBLISH_INTERVALS
209#define SOPC_MAX_LIFETIME_PUBLISH_INTERVALS 300 // >= 3 KeepAlive
210#endif
211
213#ifndef SOPC_MAX_NOTIFICATION_QUEUE_SIZE
214#define SOPC_MAX_NOTIFICATION_QUEUE_SIZE 1000
215#endif
216
218#ifndef SOPC_MIN_EVENT_NOTIFICATION_QUEUE_SIZE
219#define SOPC_MIN_EVENT_NOTIFICATION_QUEUE_SIZE 10
220#endif
221
223#ifndef SOPC_DEFAULT_EVENT_NOTIFICATION_QUEUE_SIZE
224#define SOPC_DEFAULT_EVENT_NOTIFICATION_QUEUE_SIZE (SOPC_MAX_NOTIFICATION_QUEUE_SIZE / 2)
225#endif
226
227/* TRANSLATE BROWSE PATH MANAGEMENT */
228
232#ifndef SOPC_MAX_TRANSLATE_BROWSE_PATH_MATCHES
233#define SOPC_MAX_TRANSLATE_BROWSE_PATH_MATCHES 10
234#endif
235
236/* ADDRESS SPACE MANAGEMENT */
237
242#ifndef S2OPC_NODE_MANAGEMENT
243#define S2OPC_NODE_MANAGEMENT false
244#endif
245
247#ifndef S2OPC_EVENT_MANAGEMENT
248#define S2OPC_EVENT_MANAGEMENT false
249#endif
250
251/* PROFILE MANAGEMENT */
252
253#ifndef S2OPC_NANO_PROFILE
254#define S2OPC_NANO_PROFILE false
255#endif
256
258
259#endif /* SOPC_TOOLKIT_CONFIG_CONSTANTS_H_ */
Contains the configuration constants used by S2OPC common library. Those constants could be modified ...