S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
sopc_config_constants_check.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
20#ifndef SOPC_CONFIG_CONSTANTS_CHECK_H_
21#define SOPC_CONFIG_CONSTANTS_CHECK_H_
22
23#include <stdint.h>
24
27
28/* Maximum value accepted in B model */
29#if SOPC_MAX_ENDPOINT_DESCRIPTION_CONFIGURATIONS > INT32_MAX
30#error "Max number of endpoint descriptions cannot be more than INT32_MAX"
31#endif
32
33#if SOPC_MAX_SECURE_CONNECTIONS_PLUS_BUFFERED > SOPC_MAX_SOCKETS
34#error "Max number of secure connections cannot be greater than max number of sockets"
35#endif
36
37/* Maximum value accepted in B model */
38#if SOPC_MAX_SECURE_CONNECTIONS_PLUS_BUFFERED > INT32_MAX
39#error "Max number of secure connections cannot be more than INT32_MAX"
40#endif
41
42/* It is expected by specification that server supports one more SecureChannel than Sessions*/
43#if SOPC_MAX_SECURE_CONNECTIONS <= SOPC_MAX_SESSIONS
44#error "Maximum number of secure channel shall be greater than maximum number of session"
45#endif
46
47/* Maximum value accepted in B model */
48#if SOPC_MAX_SESSIONS > INT32_MAX
49#error "Max number of sessions cannot be more than INT32_MAX"
50#endif
51
52/* Maximum session timeout accepted */
53#if SOPC_MAX_SESSION_TIMEOUT > UINT32_MAX
54#error "Maximum requested session timeout is > UINT32_MAX"
55#endif
56#if SOPC_MAX_SESSION_TIMEOUT < SOPC_MIN_SESSION_TIMEOUT
57#error "Maximum requested session timeout is < MIN"
58#endif
59
60/* Minimum session timeout accepted */
61#if SOPC_MIN_SESSION_TIMEOUT < 10000
62#error "Minimum requested session timeout is < 10000"
63#endif
64#if SOPC_MIN_SESSION_TIMEOUT > SOPC_MAX_SESSION_TIMEOUT
65#error "Minimum requested session timeout is > MAX"
66#endif
67
69#if SOPC_MAX_SUBSCRIPTION_PUBLISH_REQUESTS <= 0
70#error "Minimum subscription publish requests <= 0"
71#endif
72
75#if SOPC_MAX_SUBSCRIPTION_PUBLISH_REQUESTS > INT32_MAX / 2
76#error "Maximum subscription publish requests > INT32_MAX / 2"
77#endif
78
80#if 2 * SOPC_TIMER_RESOLUTION_MS > SOPC_MIN_SUBSCRIPTION_INTERVAL_DURATION
81#error "Minimum publish interval < 2 * SOPC_TIMER_RESOLUTION_MS"
82#endif
83
85#if SOPC_MIN_KEEPALIVE_PUBLISH_INTERVALS < 1
86#error "Minimum subscription keep alive intervals < 1"
87#endif
88
90#if SOPC_MAX_KEEPALIVE_PUBLISH_INTERVALS > INT32_MAX
91#error "Maximum subscription keep alive intervals > INT32_MAX"
92#endif
93
95#if SOPC_MAX_LIFETIME_PUBLISH_INTERVALS > INT32_MAX
96#error "Maximum subscription lifetime intervals > INT32_MAX"
97#endif
98
100#if SOPC_MIN_LIFETIME_PUBLISH_INTERVALS < 3 * SOPC_MIN_KEEPALIVE_PUBLISH_INTERVALS
101#error "Minimum subscription lifetime intervals < 3 * SOPC_MIN_KEEPALIVE_PUBLISH_INTERVALS"
102#endif
103
105#if SOPC_MAX_LIFETIME_PUBLISH_INTERVALS < 3 * SOPC_MAX_KEEPALIVE_PUBLISH_INTERVALS
106#error "Maximum subscription lifetime intervals < 3 * SOPC_MAX_KEEPALIVE_PUBLISH_INTERVALS"
107#endif
108
109/* Maximum number of operations representable */
110#if SOPC_MAX_OPERATIONS_PER_MSG > INT32_MAX
111#error "Maximum number of operations per message cannot be > INT32_MAX"
112#endif
113
115#if S2OPC_NODE_MANAGEMENT && S2OPC_NANO_PROFILE != false
116#error "Node management services cannot be activated for clients with S2OPC_NANO_PROFILE variable set"
117#endif
118
119#endif
An event timer manager which allow to associate an event to enqueue in an event dispatcher manager on...
Contains the configuration constants used by the Tookit. Those constants could be modified for specif...