open62541 1.4.15
Open source implementation of OPC UA
Loading...
Searching...
No Matches
common.h
Go to the documentation of this file.
1/** This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 *
5 * Copyright 2016-2020 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
6 * Copyright 2016 (c) Sten GrĂ¼ner
7 * Copyright 2016-2017 (c) Stefan Profanter, fortiss GmbH
8 * Copyright 2017 (c) Florian Palm
9 * Copyright 2020 (c) HMS Industrial Networks AB (Author: Jonas Green)
10 */
11
12#ifndef UA_COMMON_H_
13#define UA_COMMON_H_
14
15#include <open62541/config.h>
16#include <open62541/nodeids.h>
17
19
20
21
51
52
53
54#define UA_ACCESSLEVELMASK_READ (0x01u << 0u)
55#define UA_ACCESSLEVELMASK_WRITE (0x01u << 1u)
56#define UA_ACCESSLEVELMASK_HISTORYREAD (0x01u << 2u)
57#define UA_ACCESSLEVELMASK_HISTORYWRITE (0x01u << 3u)
58#define UA_ACCESSLEVELMASK_SEMANTICCHANGE (0x01u << 4u)
59#define UA_ACCESSLEVELMASK_STATUSWRITE (0x01u << 5u)
60#define UA_ACCESSLEVELMASK_TIMESTAMPWRITE (0x01u << 6u)
61
62
63
64#define UA_WRITEMASK_ACCESSLEVEL (0x01u << 0u)
65#define UA_WRITEMASK_ARRRAYDIMENSIONS (0x01u << 1u)
66#define UA_WRITEMASK_BROWSENAME (0x01u << 2u)
67#define UA_WRITEMASK_CONTAINSNOLOOPS (0x01u << 3u)
68#define UA_WRITEMASK_DATATYPE (0x01u << 4u)
69#define UA_WRITEMASK_DESCRIPTION (0x01u << 5u)
70#define UA_WRITEMASK_DISPLAYNAME (0x01u << 6u)
71#define UA_WRITEMASK_EVENTNOTIFIER (0x01u << 7u)
72#define UA_WRITEMASK_EXECUTABLE (0x01u << 8u)
73#define UA_WRITEMASK_HISTORIZING (0x01u << 9u)
74#define UA_WRITEMASK_INVERSENAME (0x01u << 10u)
75#define UA_WRITEMASK_ISABSTRACT (0x01u << 11u)
76#define UA_WRITEMASK_MINIMUMSAMPLINGINTERVAL (0x01u << 12u)
77#define UA_WRITEMASK_NODECLASS (0x01u << 13u)
78#define UA_WRITEMASK_NODEID (0x01u << 14u)
79#define UA_WRITEMASK_SYMMETRIC (0x01u << 15u)
80#define UA_WRITEMASK_USERACCESSLEVEL (0x01u << 16u)
81#define UA_WRITEMASK_USEREXECUTABLE (0x01u << 17u)
82#define UA_WRITEMASK_USERWRITEMASK (0x01u << 18u)
83#define UA_WRITEMASK_VALUERANK (0x01u << 19u)
84#define UA_WRITEMASK_WRITEMASK (0x01u << 20u)
85#define UA_WRITEMASK_VALUEFORVARIABLETYPE (0x01u << 21u)
86#define UA_WRITEMASK_ACCESSLEVELEX (0x01u << 25u)
87
88
89
90#define UA_VALUERANK_SCALAR_OR_ONE_DIMENSION -3
91#define UA_VALUERANK_ANY -2
92#define UA_VALUERANK_SCALAR -1
93#define UA_VALUERANK_ONE_OR_MORE_DIMENSIONS 0
94#define UA_VALUERANK_ONE_DIMENSION 1
95#define UA_VALUERANK_TWO_DIMENSIONS 2
96#define UA_VALUERANK_THREE_DIMENSIONS 3
97
98
99
100#define UA_EVENTNOTIFIER_SUBSCRIBE_TO_EVENT (0x01u << 0u)
101#define UA_EVENTNOTIFIER_HISTORY_READ (0x01u << 2u)
102#define UA_EVENTNOTIFIER_HISTORY_WRITE (0x01u << 3u)
103
104
105typedef enum {
107 UA_RULEHANDLING_ABORT, /* Abort the operation and return an error code */
108 UA_RULEHANDLING_WARN, /* Print a message in the logs and continue */
109 UA_RULEHANDLING_ACCEPT, /* Continue and disregard the broken rule */
111
112
113
119
120
121
122typedef enum {
123 UA_CONNECTIONSTATE_CLOSED, /* The socket has been closed and the connection
124 * will be deleted */
125 UA_CONNECTIONSTATE_OPENING, /* The socket is open, but the HEL/ACK handshake
126 * is not done */
127 UA_CONNECTIONSTATE_ESTABLISHED,/* The socket is open and the connection
128 * configured */
129 UA_CONNECTIONSTATE_CLOSING /* The socket is closing down */
131
132
148
157
158
159
168
169typedef struct {
173 size_t channelTimeoutCount; /* only used by servers */
175 size_t channelPurgeCount; /* only used by servers */
177
178typedef struct {
181 size_t securityRejectedSessionCount; /* only used by servers */
183 size_t sessionTimeoutCount; /* only used by servers */
184 size_t sessionAbortCount; /* only used by servers */
186
187
188
194
195
196
197struct UA_Server;
198typedef struct UA_Server UA_Server;
199
200struct UA_ServerConfig;
202
203typedef void (*UA_ServerCallback)(UA_Server *server, void *data);
204
205struct UA_Client;
206typedef struct UA_Client UA_Client;
207
208
209
211
212#endif /* UA_COMMON_H_ */
UA_LifecycleState
Definition common.h:189
@ UA_LIFECYCLESTATE_STARTED
Definition common.h:191
@ UA_LIFECYCLESTATE_STOPPED
Definition common.h:190
@ UA_LIFECYCLESTATE_STOPPING
Definition common.h:192
struct UA_Client UA_Client
Definition common.h:206
UA_AttributeId
This Source Code Form is subject to the terms of the Mozilla Public License, v.
Definition common.h:22
@ UA_ATTRIBUTEID_NODEID
Definition common.h:23
@ UA_ATTRIBUTEID_VALUERANK
Definition common.h:37
@ UA_ATTRIBUTEID_EXECUTABLE
Definition common.h:43
@ UA_ATTRIBUTEID_ACCESSLEVEL
Definition common.h:39
@ UA_ATTRIBUTEID_ISABSTRACT
Definition common.h:30
@ UA_ATTRIBUTEID_SYMMETRIC
Definition common.h:31
@ UA_ATTRIBUTEID_HISTORIZING
Definition common.h:42
@ UA_ATTRIBUTEID_ACCESSRESTRICTIONS
Definition common.h:48
@ UA_ATTRIBUTEID_CONTAINSNOLOOPS
Definition common.h:33
@ UA_ATTRIBUTEID_USEREXECUTABLE
Definition common.h:44
@ UA_ATTRIBUTEID_USERWRITEMASK
Definition common.h:29
@ UA_ATTRIBUTEID_ROLEPERMISSIONS
Definition common.h:46
@ UA_ATTRIBUTEID_DESCRIPTION
Definition common.h:27
@ UA_ATTRIBUTEID_USERROLEPERMISSIONS
Definition common.h:47
@ UA_ATTRIBUTEID_WRITEMASK
Definition common.h:28
@ UA_ATTRIBUTEID_VALUE
Definition common.h:35
@ UA_ATTRIBUTEID_ARRAYDIMENSIONS
Definition common.h:38
@ UA_ATTRIBUTEID_BROWSENAME
Definition common.h:25
@ UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL
Definition common.h:41
@ UA_ATTRIBUTEID_DATATYPE
Definition common.h:36
@ UA_ATTRIBUTEID_INVERSENAME
Definition common.h:32
@ UA_ATTRIBUTEID_USERACCESSLEVEL
Definition common.h:40
@ UA_ATTRIBUTEID_DATATYPEDEFINITION
Definition common.h:45
@ UA_ATTRIBUTEID_EVENTNOTIFIER
Definition common.h:34
@ UA_ATTRIBUTEID_DISPLAYNAME
Definition common.h:26
@ UA_ATTRIBUTEID_ACCESSLEVELEX
Definition common.h:49
@ UA_ATTRIBUTEID_NODECLASS
Definition common.h:24
UA_ConnectionState
Definition common.h:122
@ UA_CONNECTIONSTATE_CLOSING
Definition common.h:129
@ UA_CONNECTIONSTATE_ESTABLISHED
Definition common.h:127
@ UA_CONNECTIONSTATE_CLOSED
Definition common.h:123
@ UA_CONNECTIONSTATE_OPENING
Definition common.h:125
UA_SessionState
Definition common.h:149
@ UA_SESSIONSTATE_ACTIVATE_REQUESTED
Definition common.h:153
@ UA_SESSIONSTATE_CREATED
Definition common.h:152
@ UA_SESSIONSTATE_ACTIVATED
Definition common.h:154
@ UA_SESSIONSTATE_CLOSING
Definition common.h:155
@ UA_SESSIONSTATE_CREATE_REQUESTED
Definition common.h:151
@ UA_SESSIONSTATE_CLOSED
Definition common.h:150
void(* UA_ServerCallback)(UA_Server *server, void *data)
Definition common.h:203
UA_RuleHandling
Definition common.h:105
@ UA_RULEHANDLING_DEFAULT
Definition common.h:106
@ UA_RULEHANDLING_ABORT
Definition common.h:107
@ UA_RULEHANDLING_ACCEPT
Definition common.h:109
@ UA_RULEHANDLING_WARN
Definition common.h:108
UA_SecureChannelState
Definition common.h:133
@ UA_SECURECHANNELSTATE_REVERSE_LISTENING
Definition common.h:135
@ UA_SECURECHANNELSTATE_HEL_RECEIVED
Definition common.h:141
@ UA_SECURECHANNELSTATE_CLOSED
Definition common.h:134
@ UA_SECURECHANNELSTATE_CLOSING
Definition common.h:146
@ UA_SECURECHANNELSTATE_RHE_SENT
Definition common.h:139
@ UA_SECURECHANNELSTATE_OPN_SENT
Definition common.h:144
@ UA_SECURECHANNELSTATE_CONNECTING
Definition common.h:136
@ UA_SECURECHANNELSTATE_OPEN
Definition common.h:145
@ UA_SECURECHANNELSTATE_HEL_SENT
Definition common.h:140
@ UA_SECURECHANNELSTATE_ACK_SENT
Definition common.h:142
@ UA_SECURECHANNELSTATE_ACK_RECEIVED
Definition common.h:143
@ UA_SECURECHANNELSTATE_CONNECTED
Definition common.h:137
@ UA_SECURECHANNELSTATE_REVERSE_CONNECTED
Definition common.h:138
UA_ShutdownReason
Definition common.h:160
@ UA_SHUTDOWNREASON_ABORT
Definition common.h:165
@ UA_SHUTDOWNREASON_TIMEOUT
Definition common.h:164
@ UA_SHUTDOWNREASON_REJECT
Definition common.h:162
@ UA_SHUTDOWNREASON_SECURITYREJECT
Definition common.h:163
@ UA_SHUTDOWNREASON_PURGE
Definition common.h:166
@ UA_SHUTDOWNREASON_CLOSE
Definition common.h:161
struct UA_Server UA_Server
Definition common.h:198
UA_Order
Definition common.h:114
@ UA_ORDER_LESS
Definition common.h:115
@ UA_ORDER_MORE
Definition common.h:117
@ UA_ORDER_EQ
Definition common.h:116
#define _UA_BEGIN_DECLS
#undef UA_DEBUG_DUMP_PKGS
Definition config.h:100
#define _UA_END_DECLS
Definition config.h:107
size_t sessionTimeoutCount
Definition common.h:183
size_t currentSessionCount
Definition common.h:179
size_t securityRejectedSessionCount
Definition common.h:181
size_t rejectedSessionCount
Definition common.h:182
size_t cumulatedSessionCount
Definition common.h:180
size_t sessionAbortCount
Definition common.h:184