open62541 1.4.15
Open source implementation of OPC UA
Loading...
Searching...
No Matches
server.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 2014-2024 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
6 * Copyright 2015-2016 (c) Sten GrĂ¼ner
7 * Copyright 2014-2015, 2017 (c) Florian Palm
8 * Copyright 2015-2016 (c) Chris Iatrou
9 * Copyright 2015-2016 (c) Oleksiy Vasylyev
10 * Copyright 2016-2017 (c) Stefan Profanter, fortiss GmbH
11 * Copyright 2017 (c) Henrik Norrman
12 * Copyright 2018 (c) Fabian Arndt, Root-Core
13 * Copyright 2017-2020 (c) HMS Industrial Networks AB (Author: Jonas Green)
14 * Copyright 2020-2022 (c) Christian von Arnim, ISW University of Stuttgart (for VDW and umati)
15 */
16
17#ifndef UA_SERVER_H_
18#define UA_SERVER_H_
19
20#include <open62541/types.h>
21#include <open62541/common.h>
22#include <open62541/util.h>
23
30
31#include <open62541/client.h>
32
33#ifdef UA_ENABLE_PUBSUB
35#endif
36
37#ifdef UA_ENABLE_HISTORIZING
39#endif
40
42
43/** Forward declarations */
47
48
49
51 void *context; /* Used to attach custom data to a server config. This can
52 * then be retrieved e.g. in a callback that forwards a
53 * pointer to the server. */
54 UA_Logger *logging; /* Plugin for log output */
55
56
59
60
61 /* Delay in ms from the shutdown signal (ctrl-c) until the actual shutdown.
62 * Clients need to be able to get a notification ahead of time. */
64
65 /* If an asynchronous server shutdown is used, this callback notifies about
66 * the current lifecycle state (notably the STOPPING -> STOPPED
67 * transition). */
69
70
71
72 /* Verify that the server sends a timestamp in the request header */
74
75 /* Variables (that don't have a DataType of BaseDataType) must not have an
76 * empty variant value. The default behaviour is to auto-create a matching
77 * zeroed-out value for empty VariableNodes when they are added. */
79
80
82
83
84
85
87 UA_Boolean externalEventLoop; /* The EventLoop is not deleted with the config */
88
89
92
93
95 UA_UInt32 tcpBufSize; /* Max length of sent and received chunks (packets)
96 * (default: 64kB) */
97 UA_UInt32 tcpMaxMsgSize; /* Max length of messages
98 * (default: 0 -> unbounded) */
99 UA_UInt32 tcpMaxChunks; /* Max number of chunks per message
100 * (default: 0 -> unbounded) */
102
103
106
107 /* Endpoints with combinations of SecurityPolicy and SecurityMode. If the
108 * UserIdentityToken array of the Endpoint is not set, then it will be
109 * filled by the server for all UserTokenPolicies that are configured in the
110 * AccessControl plugin. */
113
114 /* Only allow the following discovery services to be executed on a
115 * SecureChannel with SecurityPolicyNone: GetEndpointsRequest,
116 * FindServersRequest and FindServersOnNetworkRequest.
117 *
118 * Only enable this option if there is no endpoint with SecurityPolicy#None
119 * in the endpoints list. The SecurityPolicy#None must be present in the
120 * securityPolicies list. */
122
123 /* Allow clients without encryption support to connect with username and password.
124 * This requires to transmit the password in plain text over the network which is
125 * why this option is disabled by default.
126 * Make sure you really need this before enabling plain text passwords. */
128
129 /* Different sets of certificates are trusted for SecureChannel / Session */
132
133
135
136
139
140
142
143
144 /* Limits for SecureChannels */
147
148 /* Limits for Sessions */
151
152 /* Operation limits */
161
162 /* Limits for Requests */
164
165
166#if UA_MULTITHREADING >= 100
167 UA_Double asyncOperationTimeout; /* in ms, 0 => unlimited */
168 size_t maxAsyncOperationQueueSize; /* 0 => unlimited */
169 /* Notify workers when an async operation was enqueued */
170 UA_Server_AsyncOperationNotifyCallback asyncOperationNotifyCallback;
171#endif
172
173
174#ifdef UA_ENABLE_DISCOVERY
175 /* Timeout in seconds when to automatically remove a registered server from
176 * the list, if it doesn't re-register within the given time frame. A value
177 * of 0 disables automatic removal. Default is 60 Minutes (60*60). Must be
178 * bigger than 10 seconds, because cleanup is only triggered approximately
179 * every 10 seconds. The server will still be removed depending on the
180 * state of the semaphore file. */
182
183# ifdef UA_ENABLE_DISCOVERY_MULTICAST
184 UA_Boolean mdnsEnabled;
186 UA_String mdnsInterfaceIP;
187# if !defined(UA_HAS_GETIFADDR)
188 size_t mdnsIpAddressListSize;
189 UA_UInt32 *mdnsIpAddressList;
190# endif
191# endif
192#endif
193
194
196#ifdef UA_ENABLE_SUBSCRIPTIONS
197 /* Limits for Subscriptions */
200 UA_DurationRange publishingIntervalLimits; /* in ms (must not be less than 5) */
205 UA_UInt32 maxRetransmissionQueueSize; /* 0 -> unlimited size */
206# ifdef UA_ENABLE_SUBSCRIPTIONS_EVENTS
207 UA_UInt32 maxEventsPerNode; /* 0 -> unlimited size */
208# endif
209
210 /* Limits for MonitoredItems */
213 UA_DurationRange samplingIntervalLimits; /* in ms (must not be less than 5) */
214 UA_UInt32Range queueSizeLimits; /* Negotiated with the client */
215
216 /* Limits for PublishRequests */
218
219 /* Register MonitoredItem in Userland
220 *
221 * @param server Allows the access to the server object
222 * @param sessionId The session id, represented as an node id
223 * @param sessionContext An optional pointer to user-defined data for the
224 * specific data source
225 * @param nodeid Id of the node in question
226 * @param nodeidContext An optional pointer to user-defined data, associated
227 * with the node in the nodestore. Note that, if the node has already
228 * been removed, this value contains a NULL pointer.
229 * @param attributeId Identifies which attribute (value, data type etc.) is
230 * monitored
231 * @param removed Determines if the MonitoredItem was removed or created. */
233 const UA_NodeId *sessionId,
234 void *sessionContext,
235 const UA_NodeId *nodeId,
236 void *nodeContext,
237 UA_UInt32 attibuteId,
238 UA_Boolean removed);
239#endif
240
241
243#ifdef UA_ENABLE_PUBSUB
245#endif
246
247
249#ifdef UA_ENABLE_HISTORIZING
251
253 UA_UInt32 maxReturnDataValues; /* 0 -> unlimited size */
254
256 UA_UInt32 maxReturnEventValues; /* 0 -> unlimited size */
257
261
264
267
271#endif
272
273
274 UA_UInt32 reverseReconnectInterval; /* Default is 15000 ms */
275
276
277#ifdef UA_ENABLE_ENCRYPTION
278 /* If the private key is in PEM format and password protected, this callback
279 * is called during initialization to get the password to decrypt the
280 * private key. The memory containing the password is freed by the client
281 * after use. The callback should be set early, other parts of the client
282 * config setup may depend on it. */
284 UA_ByteString *password);
285#endif
286};
287
288void
290
291
292
293/** Create a new server with a default configuration that adds plugins for
294 * networking, security, logging and so on. See `server_config_default.h` for
295 * more detailed options.
296 *
297 * The default configuration can be used as the starting point to adjust the
298 * server configuration to individual needs. UA_Server_new is implemented in the
299 * /plugins folder under the CC0 license. Furthermore the server confiugration
300 * only uses the public server API.
301 *
302 * @return Returns the configured server or NULL if an error occurs. */
303UA_EXPORT UA_Server *
305
306/** Creates a new server. Moves the config into the server with a shallow copy.
307 * The config content is cleared together with the server. */
308UA_EXPORT UA_Server *
310
311/** Delete the server. */
312UA_EXPORT UA_StatusCode
314
315/** Get the configuration. Always succeeds as this simplfy resolves a pointer.
316 * Attention! Do not adjust the configuration while the server is running! */
317UA_EXPORT UA_ServerConfig *
319
320/** Get the current server lifecycle state */
321UA_EXPORT UA_LifecycleState
323
324/** Runs the server until interrupted. On Unix/Windows this registers an
325 * interrupt for SIGINT (ctrl-c). The method only returns after having received
326 * the interrupt. The logical sequence is as follows:
327 *
328 * - UA_Server_run_startup
329 * - Loop until interrupt: UA_Server_run_iterate
330 * - UA_Server_run_shutdown
331 *
332 * @param server The server object.
333 * @return Returns a bad statuscode if an error occurred internally. */
334UA_EXPORT UA_StatusCode
335UA_Server_run(UA_Server *server, const volatile UA_Boolean *running);
336
337/** Runs the server until interrupted. On Unix/Windows this registers an
338 * interrupt for SIGINT (ctrl-c). The method only returns after having received
339 * the interrupt or upon an error condition. The logical sequence is as follows:
340 *
341 * - Register the interrupt
342 * - UA_Server_run_startup
343 * - Loop until interrupt: UA_Server_run_iterate
344 * - UA_Server_run_shutdown
345 * - Deregister the interrupt
346 *
347 * Attention! This method is implemented individually for the different
348 * platforms (POSIX/Win32/etc.). The default implementation is in
349 * /plugins/ua_config_default.c under the CC0 license. Adjust as needed.
350 *
351 * @param server The server object.
352 * @return Returns a bad statuscode if an error occurred internally. */
353UA_EXPORT UA_StatusCode
355
356/** The prologue part of UA_Server_run (no need to use if you call
357 * UA_Server_run or UA_Server_runUntilInterrupt) */
358UA_EXPORT UA_StatusCode
360
361/** Executes a single iteration of the server's main loop.
362 *
363 * @param server The server object.
364 * @param waitInternal Should we wait for messages in the networklayer?
365 * Otherwise, the timouts for the networklayers are set to zero.
366 * The default max wait time is 200ms.
367 * @return Returns how long we can wait until the next scheduled
368 * callback (in ms) */
369UA_EXPORT UA_UInt16
371
372/** The epilogue part of UA_Server_run (no need to use if you call
373 * UA_Server_run or UA_Server_runUntilInterrupt) */
374UA_EXPORT UA_StatusCode
376
377
378
379/** Add a callback for execution at a specified time. If the indicated time lies
380 * in the past, then the callback is executed at the next iteration of the
381 * server's main loop.
382 *
383 * @param server The server object.
384 * @param callback The callback that shall be added.
385 * @param data Data that is forwarded to the callback.
386 * @param date The timestamp for the execution time.
387 * @param callbackId Set to the identifier of the repeated callback . This can
388 * be used to cancel the callback later on. If the pointer is null, the
389 * identifier is not set.
390 * @return Upon success, ``UA_STATUSCODE_GOOD`` is returned. An error code
391 * otherwise. */
394 void *data, UA_DateTime date, UA_UInt64 *callbackId);
395
396/** Add a callback for cyclic repetition to the server.
397 *
398 * @param server The server object.
399 * @param callback The callback that shall be added.
400 * @param data Data that is forwarded to the callback.
401 * @param interval_ms The callback shall be repeatedly executed with the given
402 * interval (in ms). The interval must be positive. The first execution
403 * occurs at now() + interval at the latest.
404 * @param callbackId Set to the identifier of the repeated callback . This can
405 * be used to cancel the callback later on. If the pointer is null, the
406 * identifier is not set.
407 * @return Upon success, ``UA_STATUSCODE_GOOD`` is returned. An error code
408 * otherwise. */
411 void *data, UA_Double interval_ms,
412 UA_UInt64 *callbackId);
413
416 UA_Double interval_ms);
417
418/** Remove a repeated callback. Does nothing if the callback is not found.
419 *
420 * @param server The server object.
421 * @param callbackId The id of the callback */
422void UA_THREADSAFE
424
425#define UA_Server_removeRepeatedCallback(server, callbackId) \
426 UA_Server_removeCallback(server, callbackId);
427
428
429
430/** Manually close a session */
432UA_Server_closeSession(UA_Server *server, const UA_NodeId *sessionId);
433
434
435
436/** Returns a shallow copy of the attribute. Don't _clear or _delete the value
437 * variant. Don't use the value once the Session could be already closed in the
438 * background or the attribute of the session replaced. Hence don't use this in a
439 * multi-threaded application. */
440UA_EXPORT UA_StatusCode
442 const UA_QualifiedName key, UA_Variant *outValue);
443
444/** Return a deep copy of the attribute */
447 const UA_QualifiedName key, UA_Variant *outValue);
448
449/** Returns NULL if the attribute is not defined or not a scalar or not of the
450 * right datatype. Otherwise a shallow copy of the scalar value is created at
451 * the target location of the void pointer. Hence don't use this in a
452 * multi-threaded application. */
453UA_EXPORT UA_StatusCode
455 const UA_NodeId *sessionId,
456 const UA_QualifiedName key,
457 const UA_DataType *type,
458 void *outValue);
459
462 const UA_QualifiedName key,
463 const UA_Variant *value);
464
467 const UA_QualifiedName key);
468
469
470
471/** Read an attribute of a node. The specialized functions below provide a more
472 * concise syntax.
473 *
474 * @param server The server object.
475 * @param item ReadValueIds contain the NodeId of the target node, the id of the
476 * attribute to read and (optionally) an index range to read parts
477 * of an array only. See the section on NumericRange for the format
478 * used for array ranges.
479 * @param timestamps Which timestamps to return for the attribute.
480 * @return Returns a DataValue that contains either an error code, or a variant
481 * with the attribute value and the timestamps. */
484 UA_TimestampsToReturn timestamps);
485
486/** Don't use this function. There are typed versions for every supported
487 * attribute. */
490 UA_AttributeId attributeId, void *v);
491
493UA_Server_readNodeId(UA_Server *server, const UA_NodeId nodeId,
494 UA_NodeId *outNodeId) {
495 return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_NODEID, outNodeId);
496}
497
499UA_Server_readNodeClass(UA_Server *server, const UA_NodeId nodeId,
500 UA_NodeClass *outNodeClass) {
502 outNodeClass);
503}
504
506UA_Server_readBrowseName(UA_Server *server, const UA_NodeId nodeId,
507 UA_QualifiedName *outBrowseName) {
509 outBrowseName);
510}
511
513UA_Server_readDisplayName(UA_Server *server, const UA_NodeId nodeId,
514 UA_LocalizedText *outDisplayName) {
516 outDisplayName);
517}
518
520UA_Server_readDescription(UA_Server *server, const UA_NodeId nodeId,
521 UA_LocalizedText *outDescription) {
523 outDescription);
524}
525
527UA_Server_readWriteMask(UA_Server *server, const UA_NodeId nodeId,
528 UA_UInt32 *outWriteMask) {
530 outWriteMask);
531}
532
534UA_Server_readIsAbstract(UA_Server *server, const UA_NodeId nodeId,
535 UA_Boolean *outIsAbstract) {
537 outIsAbstract);
538}
539
541UA_Server_readSymmetric(UA_Server *server, const UA_NodeId nodeId,
542 UA_Boolean *outSymmetric) {
544 outSymmetric);
545}
546
548UA_Server_readInverseName(UA_Server *server, const UA_NodeId nodeId,
549 UA_LocalizedText *outInverseName) {
551 outInverseName);
552}
553
555UA_Server_readContainsNoLoops(UA_Server *server, const UA_NodeId nodeId,
556 UA_Boolean *outContainsNoLoops) {
558 outContainsNoLoops);
559}
560
562UA_Server_readEventNotifier(UA_Server *server, const UA_NodeId nodeId,
563 UA_Byte *outEventNotifier) {
565 outEventNotifier);
566}
567
569UA_Server_readValue(UA_Server *server, const UA_NodeId nodeId,
570 UA_Variant *outValue) {
571 return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_VALUE, outValue);
572}
573
575UA_Server_readDataType(UA_Server *server, const UA_NodeId nodeId,
576 UA_NodeId *outDataType) {
578 outDataType);
579}
580
582UA_Server_readValueRank(UA_Server *server, const UA_NodeId nodeId,
583 UA_Int32 *outValueRank) {
585 outValueRank);
586}
587
588/** Returns a variant with an int32 array */
590UA_Server_readArrayDimensions(UA_Server *server, const UA_NodeId nodeId,
591 UA_Variant *outArrayDimensions) {
593 outArrayDimensions);
594}
595
597UA_Server_readAccessLevel(UA_Server *server, const UA_NodeId nodeId,
598 UA_Byte *outAccessLevel) {
600 outAccessLevel);
601}
602
604UA_Server_readAccessLevelEx(UA_Server *server, const UA_NodeId nodeId,
605 UA_UInt32 *outAccessLevelEx) {
607 outAccessLevelEx);
608}
609
611UA_Server_readMinimumSamplingInterval(UA_Server *server, const UA_NodeId nodeId,
612 UA_Double *outMinimumSamplingInterval) {
613 return __UA_Server_read(server, &nodeId,
615 outMinimumSamplingInterval);
616}
617
619UA_Server_readHistorizing(UA_Server *server, const UA_NodeId nodeId,
620 UA_Boolean *outHistorizing) {
622 outHistorizing);
623}
624
626UA_Server_readExecutable(UA_Server *server, const UA_NodeId nodeId,
627 UA_Boolean *outExecutable) {
629 outExecutable);
630}
631
632
633
634/** Overwrite an attribute of a node. The specialized functions below provide a
635 * more concise syntax.
636 *
637 * @param server The server object.
638 * @param value WriteValues contain the NodeId of the target node, the id of the
639 * attribute to overwritten, the actual value and (optionally) an
640 * index range to replace parts of an array only. of an array only.
641 * See the section on NumericRange for the format used for array
642 * ranges.
643 * @return Returns a status code. */
646
647/** Don't use this function. There are typed versions with no additional
648 * overhead. */
651 const UA_AttributeId attributeId,
652 const UA_DataType *attr_type, const void *attr);
653
655UA_Server_writeBrowseName(UA_Server *server, const UA_NodeId nodeId,
656 const UA_QualifiedName browseName) {
658 &UA_TYPES[UA_TYPES_QUALIFIEDNAME], &browseName);
659}
660
662UA_Server_writeDisplayName(UA_Server *server, const UA_NodeId nodeId,
663 const UA_LocalizedText displayName) {
665 &UA_TYPES[UA_TYPES_LOCALIZEDTEXT], &displayName);
666}
667
669UA_Server_writeDescription(UA_Server *server, const UA_NodeId nodeId,
670 const UA_LocalizedText description) {
672 &UA_TYPES[UA_TYPES_LOCALIZEDTEXT], &description);
673}
674
676UA_Server_writeWriteMask(UA_Server *server, const UA_NodeId nodeId,
677 const UA_UInt32 writeMask) {
679 &UA_TYPES[UA_TYPES_UINT32], &writeMask);
680}
681
683UA_Server_writeIsAbstract(UA_Server *server, const UA_NodeId nodeId,
684 const UA_Boolean isAbstract) {
686 &UA_TYPES[UA_TYPES_BOOLEAN], &isAbstract);
687}
688
690UA_Server_writeInverseName(UA_Server *server, const UA_NodeId nodeId,
691 const UA_LocalizedText inverseName) {
693 &UA_TYPES[UA_TYPES_LOCALIZEDTEXT], &inverseName);
694}
695
697UA_Server_writeEventNotifier(UA_Server *server, const UA_NodeId nodeId,
698 const UA_Byte eventNotifier) {
700 &UA_TYPES[UA_TYPES_BYTE], &eventNotifier);
701}
702
704UA_Server_writeValue(UA_Server *server, const UA_NodeId nodeId,
705 const UA_Variant value) {
707 &UA_TYPES[UA_TYPES_VARIANT], &value);
708}
709
710/** Writes an UA_DataValue to a variable/variableType node. In contrast to
711 * UA_Server_writeValue, this functions can also write SourceTimestamp,
712 * ServerTimestamp and StatusCode. */
714UA_Server_writeDataValue(UA_Server *server, const UA_NodeId nodeId,
715 const UA_DataValue value) {
717 &UA_TYPES[UA_TYPES_DATAVALUE], &value);
718}
719
721UA_Server_writeDataType(UA_Server *server, const UA_NodeId nodeId,
722 const UA_NodeId dataType) {
724 &UA_TYPES[UA_TYPES_NODEID], &dataType);
725}
726
728UA_Server_writeValueRank(UA_Server *server, const UA_NodeId nodeId,
729 const UA_Int32 valueRank) {
731 &UA_TYPES[UA_TYPES_INT32], &valueRank);
732}
733
735UA_Server_writeArrayDimensions(UA_Server *server, const UA_NodeId nodeId,
736 const UA_Variant arrayDimensions) {
738 &UA_TYPES[UA_TYPES_VARIANT], &arrayDimensions);
739}
740
742UA_Server_writeAccessLevel(UA_Server *server, const UA_NodeId nodeId,
743 const UA_Byte accessLevel) {
745 &UA_TYPES[UA_TYPES_BYTE], &accessLevel);
746}
747
749UA_Server_writeAccessLevelEx(UA_Server *server, const UA_NodeId nodeId,
750 const UA_UInt32 accessLevelEx) {
752 &UA_TYPES[UA_TYPES_UINT32], &accessLevelEx);
753}
754
756UA_Server_writeMinimumSamplingInterval(UA_Server *server, const UA_NodeId nodeId,
757 const UA_Double miniumSamplingInterval) {
758 return __UA_Server_write(server, &nodeId,
761 &miniumSamplingInterval);
762}
763
765UA_Server_writeHistorizing(UA_Server *server, const UA_NodeId nodeId,
766 const UA_Boolean historizing) {
767 return __UA_Server_write(server, &nodeId,
770 &historizing);
771}
772
774UA_Server_writeExecutable(UA_Server *server, const UA_NodeId nodeId,
775 const UA_Boolean executable) {
777 &UA_TYPES[UA_TYPES_BOOLEAN], &executable); }
778
779
780
781/** Browse the references of a particular node. See the definition of
782 * BrowseDescription structure for details. */
784UA_Server_browse(UA_Server *server, UA_UInt32 maxReferences,
785 const UA_BrowseDescription *bd);
786
788UA_Server_browseNext(UA_Server *server, UA_Boolean releaseContinuationPoint,
789 const UA_ByteString *continuationPoint);
790
791/** Non-standard version of the Browse service that recurses into child nodes.
792 *
793 * Possible loops (that can occur for non-hierarchical references) are handled
794 * internally. Every node is added at most once to the results array.
795 *
796 * Nodes are only added if they match the NodeClassMask in the
797 * BrowseDescription. However, child nodes are still recursed into if the
798 * NodeClass does not match. So it is possible, for example, to get all
799 * VariableNodes below a certain ObjectNode, with additional objects in the
800 * hierarchy below. */
803 size_t *resultsSize, UA_ExpandedNodeId **results);
804
807 const UA_BrowsePath *browsePath);
808
809/** A simplified TranslateBrowsePathsToNodeIds based on the
810 * SimpleAttributeOperand type (Part 4, 7.4.4.5).
811 *
812 * This specifies a relative path using a list of BrowseNames instead of the
813 * RelativePath structure. The list of BrowseNames is equivalent to a
814 * RelativePath that specifies forward references which are subtypes of the
815 * HierarchicalReferences ReferenceType. All Nodes followed by the browsePath
816 * shall be of the NodeClass Object or Variable. */
819 size_t browsePathSize,
820 const UA_QualifiedName *browsePath);
821
822#ifndef HAVE_NODEITER_CALLBACK
823#define HAVE_NODEITER_CALLBACK
824/** Iterate over all nodes referenced by parentNodeId by calling the callback
825 * function for each child node (in ifdef because GCC/CLANG handle include order
826 * differently) */
828(*UA_NodeIteratorCallback)(UA_NodeId childId, UA_Boolean isInverse,
829 UA_NodeId referenceTypeId, void *handle);
830#endif
831
834 UA_NodeIteratorCallback callback, void *handle);
835
836#ifdef UA_ENABLE_DISCOVERY
837
838
839
840/** Register the given server instance at the discovery server. This should be
841 * called periodically, for example every 10 minutes, depending on the
842 * configuration of the discovery server. You should also call
843 * _unregisterDiscovery when the server shuts down.
844 *
845 * The supplied client configuration is used to create a new client to connect
846 * to the discovery server. The client configuration is moved over to the server
847 * and eventually cleaned up internally. The structure pointed at by `cc` is
848 * zeroed to avoid accessing outdated information.
849 *
850 * The eventloop and logging plugins in the client configuration are replaced by
851 * those configured in the server. */
854 const UA_String discoveryServerUrl,
855 const UA_String semaphoreFilePath);
856
857/** Deregister the given server instance from the discovery server.
858 * This should be called when the server is shutting down. */
861 const UA_String discoveryServerUrl);
862
863
864
865/** Callback for RegisterServer. Data is passed from the register call */
866typedef void
868 void* data);
869
870/** Set the callback which is called if another server registeres or unregisters
871 * with this instance. This callback is called every time the server gets a
872 * register call. This especially means that for every periodic server register
873 * the callback will be called.
874 *
875 * @param server
876 * @param cb the callback
877 * @param data data passed to the callback
878 * @return ``UA_STATUSCODE_SUCCESS`` on success */
879void UA_THREADSAFE
881 UA_Server_registerServerCallback cb, void* data);
882
883#ifdef UA_ENABLE_DISCOVERY_MULTICAST
884
885/** Callback for server detected through mDNS. Data is passed from the register
886 * call
887 *
888 * @param isServerAnnounce indicates if the server has just been detected. If
889 * set to false, this means the server is shutting down.
890 * @param isTxtReceived indicates if we already received the corresponding TXT
891 * record with the path and caps data */
892typedef void
893(*UA_Server_serverOnNetworkCallback)(const UA_ServerOnNetwork *serverOnNetwork,
894 UA_Boolean isServerAnnounce,
895 UA_Boolean isTxtReceived, void* data);
896
897/** Set the callback which is called if another server is found through mDNS or
898 * deleted. It will be called for any mDNS message from the remote server, thus
899 * it may be called multiple times for the same instance. Also the SRV and TXT
900 * records may arrive later, therefore for the first call the server
901 * capabilities may not be set yet. If called multiple times, previous data will
902 * be overwritten.
903 *
904 * @param server
905 * @param cb the callback
906 * @param data data passed to the callback
907 * @return ``UA_STATUSCODE_SUCCESS`` on success */
908void UA_THREADSAFE
909UA_Server_setServerOnNetworkCallback(UA_Server *server,
910 UA_Server_serverOnNetworkCallback cb,
911 void* data);
912
913#endif /* UA_ENABLE_DISCOVERY_MULTICAST */
914
915#endif /* UA_ENABLE_DISCOVERY */
916
917
918
919void
921 void *context);
922
925 UA_NodeTypeLifecycle lifecycle);
926
929 void **nodeContext);
930
931/** Careful! The user has to ensure that the destructor callbacks still work. */
934 void *nodeContext);
935
936
937
940 const UA_DataSource dataSource);
941
944 const UA_NodeId nodeId,
945 const UA_ValueCallback callback);
946
949 const UA_NodeId nodeId,
950 const UA_ValueBackend valueBackend);
951
952
953
954#ifdef UA_ENABLE_SUBSCRIPTIONS
955
957 (UA_Server *server, UA_UInt32 monitoredItemId, void *monitoredItemContext,
958 const UA_NodeId *nodeId, void *nodeContext, UA_UInt32 attributeId,
959 const UA_DataValue *value);
960
962 (UA_Server *server, UA_UInt32 monId, void *monContext,
963 size_t nEventFields, const UA_Variant *eventFields);
964
965/** Create a local MonitoredItem with a sampling interval that detects data
966 * changes.
967 *
968 * @param server The server executing the MonitoredItem
969 * @timestampsToReturn Shall timestamps be added to the value for the callback?
970 * @item The parameters of the new MonitoredItem. Note that the attribute of the
971 * ReadValueId (the node that is monitored) can not be
972 * ``UA_ATTRIBUTEID_EVENTNOTIFIER``. A different callback type needs to be
973 * registered for event notifications.
974 * @monitoredItemContext A pointer that is forwarded with the callback
975 * @callback The callback that is executed on detected data changes
976 *
977 * @return Returns a description of the created MonitoredItem. The structure
978 * also contains a StatusCode (in case of an error) and the identifier of the
979 * new MonitoredItem. */
982 UA_TimestampsToReturn timestampsToReturn,
984 void *monitoredItemContext,
986
987/** UA_MonitoredItemCreateResult */
988/** UA_Server_createEventMonitoredItem(UA_Server *server, */
989/** UA_TimestampsToReturn timestampsToReturn, */
990/** const UA_MonitoredItemCreateRequest item, void *context, */
991/** UA_Server_EventNotificationCallback callback); */
992
995
996#endif
997
998
999
1000#ifdef UA_ENABLE_METHODCALLS
1003 const UA_NodeId methodNodeId,
1004 UA_MethodCallback methodCallback);
1005
1006/** Backwards compatibility definition */
1007#define UA_Server_setMethodNode_callback(server, methodNodeId, methodCallback) \
1008 UA_Server_setMethodNodeCallback(server, methodNodeId, methodCallback)
1009
1012 const UA_NodeId methodNodeId,
1013 UA_MethodCallback *outMethodCallback);
1014
1017#endif
1018
1019
1020
1021/** Write an object property. The property is represented as a VariableNode with
1022 * a ``HasProperty`` reference from the ObjectNode. The VariableNode is
1023 * identified by its BrowseName. Writing the property sets the value attribute
1024 * of the VariableNode.
1025 *
1026 * @param server The server object
1027 * @param objectId The identifier of the object (node)
1028 * @param propertyName The name of the property
1029 * @param value The value to be set for the event attribute
1030 * @return The StatusCode for setting the event attribute */
1033 const UA_QualifiedName propertyName,
1034 const UA_Variant value);
1035
1036/** Directly point to the scalar value instead of a variant */
1039 const UA_QualifiedName propertyName,
1040 const void *value, const UA_DataType *type);
1041
1042/** Read an object property.
1043 *
1044 * @param server The server object
1045 * @param objectId The identifier of the object (node)
1046 * @param propertyName The name of the property
1047 * @param value Contains the property value after reading. Must not be NULL.
1048 * @return The StatusCode for setting the event attribute */
1051 const UA_QualifiedName propertyName,
1052 UA_Variant *value);
1053
1054
1055
1056/** Don't use this function. There are typed versions as inline functions. */
1059 const UA_NodeId *requestedNewNodeId,
1060 const UA_NodeId *parentNodeId,
1061 const UA_NodeId *referenceTypeId,
1062 const UA_QualifiedName browseName,
1063 const UA_NodeId *typeDefinition,
1064 const UA_NodeAttributes *attr,
1065 const UA_DataType *attributeType,
1066 void *nodeContext, UA_NodeId *outNewNodeId);
1067
1069UA_Server_addVariableNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
1070 const UA_NodeId parentNodeId,
1071 const UA_NodeId referenceTypeId,
1072 const UA_QualifiedName browseName,
1073 const UA_NodeId typeDefinition,
1074 const UA_VariableAttributes attr,
1075 void *nodeContext, UA_NodeId *outNewNodeId) {
1076 return __UA_Server_addNode(server, UA_NODECLASS_VARIABLE, &requestedNewNodeId,
1077 &parentNodeId, &referenceTypeId, browseName,
1078 &typeDefinition, (const UA_NodeAttributes*)&attr,
1080 nodeContext, outNewNodeId);
1081}
1082
1084UA_Server_addVariableTypeNode(UA_Server *server,
1085 const UA_NodeId requestedNewNodeId,
1086 const UA_NodeId parentNodeId,
1087 const UA_NodeId referenceTypeId,
1088 const UA_QualifiedName browseName,
1089 const UA_NodeId typeDefinition,
1090 const UA_VariableTypeAttributes attr,
1091 void *nodeContext, UA_NodeId *outNewNodeId) {
1093 &requestedNewNodeId, &parentNodeId, &referenceTypeId,
1094 browseName, &typeDefinition,
1095 (const UA_NodeAttributes*)&attr,
1097 nodeContext, outNewNodeId);
1098}
1099
1101UA_Server_addObjectNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
1102 const UA_NodeId parentNodeId,
1103 const UA_NodeId referenceTypeId,
1104 const UA_QualifiedName browseName,
1105 const UA_NodeId typeDefinition,
1106 const UA_ObjectAttributes attr,
1107 void *nodeContext, UA_NodeId *outNewNodeId) {
1108 return __UA_Server_addNode(server, UA_NODECLASS_OBJECT, &requestedNewNodeId,
1109 &parentNodeId, &referenceTypeId, browseName,
1110 &typeDefinition, (const UA_NodeAttributes*)&attr,
1112 nodeContext, outNewNodeId);
1113}
1114
1116UA_Server_addObjectTypeNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
1117 const UA_NodeId parentNodeId,
1118 const UA_NodeId referenceTypeId,
1119 const UA_QualifiedName browseName,
1120 const UA_ObjectTypeAttributes attr,
1121 void *nodeContext, UA_NodeId *outNewNodeId) {
1122 return __UA_Server_addNode(server, UA_NODECLASS_OBJECTTYPE, &requestedNewNodeId,
1123 &parentNodeId, &referenceTypeId, browseName,
1124 &UA_NODEID_NULL, (const UA_NodeAttributes*)&attr,
1126 nodeContext, outNewNodeId);
1127}
1128
1130UA_Server_addViewNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
1131 const UA_NodeId parentNodeId,
1132 const UA_NodeId referenceTypeId,
1133 const UA_QualifiedName browseName,
1134 const UA_ViewAttributes attr,
1135 void *nodeContext, UA_NodeId *outNewNodeId) {
1136 return __UA_Server_addNode(server, UA_NODECLASS_VIEW, &requestedNewNodeId,
1137 &parentNodeId, &referenceTypeId, browseName,
1138 &UA_NODEID_NULL, (const UA_NodeAttributes*)&attr,
1140 nodeContext, outNewNodeId);
1141}
1142
1144UA_Server_addReferenceTypeNode(UA_Server *server,
1145 const UA_NodeId requestedNewNodeId,
1146 const UA_NodeId parentNodeId,
1147 const UA_NodeId referenceTypeId,
1148 const UA_QualifiedName browseName,
1149 const UA_ReferenceTypeAttributes attr,
1150 void *nodeContext, UA_NodeId *outNewNodeId) {
1152 &requestedNewNodeId, &parentNodeId, &referenceTypeId,
1153 browseName, &UA_NODEID_NULL,
1154 (const UA_NodeAttributes*)&attr,
1156 nodeContext, outNewNodeId);
1157}
1158
1160UA_Server_addDataTypeNode(UA_Server *server,
1161 const UA_NodeId requestedNewNodeId,
1162 const UA_NodeId parentNodeId,
1163 const UA_NodeId referenceTypeId,
1164 const UA_QualifiedName browseName,
1165 const UA_DataTypeAttributes attr,
1166 void *nodeContext, UA_NodeId *outNewNodeId) {
1167 return __UA_Server_addNode(server, UA_NODECLASS_DATATYPE, &requestedNewNodeId,
1168 &parentNodeId, &referenceTypeId, browseName,
1169 &UA_NODEID_NULL, (const UA_NodeAttributes*)&attr,
1171 nodeContext, outNewNodeId);
1172}
1173
1176 const UA_NodeId requestedNewNodeId,
1177 const UA_NodeId parentNodeId,
1178 const UA_NodeId referenceTypeId,
1179 const UA_QualifiedName browseName,
1180 const UA_NodeId typeDefinition,
1181 const UA_VariableAttributes attr,
1182 const UA_DataSource dataSource,
1183 void *nodeContext, UA_NodeId *outNewNodeId);
1184
1185/** VariableNodes that are "dynamic" (default for user-created variables) receive
1186 * and store a SourceTimestamp. For non-dynamic VariableNodes the current time
1187 * is used for the SourceTimestamp. */
1190 UA_Boolean isDynamic);
1191
1192#ifdef UA_ENABLE_METHODCALLS
1193
1195UA_Server_addMethodNodeEx(UA_Server *server, const UA_NodeId requestedNewNodeId,
1196 const UA_NodeId parentNodeId,
1197 const UA_NodeId referenceTypeId,
1198 const UA_QualifiedName browseName,
1199 const UA_MethodAttributes attr, UA_MethodCallback method,
1200 size_t inputArgumentsSize, const UA_Argument *inputArguments,
1201 const UA_NodeId inputArgumentsRequestedNewNodeId,
1202 UA_NodeId *inputArgumentsOutNewNodeId,
1203 size_t outputArgumentsSize, const UA_Argument *outputArguments,
1204 const UA_NodeId outputArgumentsRequestedNewNodeId,
1205 UA_NodeId *outputArgumentsOutNewNodeId,
1206 void *nodeContext, UA_NodeId *outNewNodeId);
1207
1209UA_Server_addMethodNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
1210 const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
1211 const UA_QualifiedName browseName, const UA_MethodAttributes attr,
1212 UA_MethodCallback method,
1213 size_t inputArgumentsSize, const UA_Argument *inputArguments,
1214 size_t outputArgumentsSize, const UA_Argument *outputArguments,
1215 void *nodeContext, UA_NodeId *outNewNodeId) {
1216 return UA_Server_addMethodNodeEx(server, requestedNewNodeId, parentNodeId,
1217 referenceTypeId, browseName, attr, method,
1218 inputArgumentsSize, inputArguments,
1219 UA_NODEID_NULL, NULL,
1220 outputArgumentsSize, outputArguments,
1221 UA_NODEID_NULL, NULL,
1222 nodeContext, outNewNodeId);
1223}
1224
1225#endif
1226
1227
1228
1229
1230/** The ``attr`` argument must have a type according to the NodeClass.
1231 * ``VariableAttributes`` for variables, ``ObjectAttributes`` for objects, and
1232 * so on. Missing attributes are taken from the TypeDefinition node if
1233 * applicable. */
1236 const UA_NodeId requestedNewNodeId,
1237 const UA_NodeId parentNodeId,
1238 const UA_NodeId referenceTypeId,
1239 const UA_QualifiedName browseName,
1240 const UA_NodeId typeDefinition,
1241 const void *attr, const UA_DataType *attributeType,
1242 void *nodeContext, UA_NodeId *outNewNodeId);
1243
1246
1247#ifdef UA_ENABLE_METHODCALLS
1248
1251 UA_MethodCallback method,
1252 size_t inputArgumentsSize, const UA_Argument *inputArguments,
1253 size_t outputArgumentsSize, const UA_Argument *outputArguments);
1254
1255#endif
1256
1257/** Deletes a node and optionally all references leading to the node. */
1260 UA_Boolean deleteReferences);
1261
1262
1263
1266 const UA_NodeId refTypeId,
1267 const UA_ExpandedNodeId targetId, UA_Boolean isForward);
1268
1271 const UA_NodeId referenceTypeId, UA_Boolean isForward,
1272 const UA_ExpandedNodeId targetNodeId,
1273 UA_Boolean deleteBidirectional);
1274
1275
1276
1277#ifdef UA_ENABLE_SUBSCRIPTIONS_EVENTS
1278
1279/** Creates a node representation of an event
1280 *
1281 * @param server The server object
1282 * @param eventType The type of the event for which a node should be created
1283 * @param outNodeId The NodeId of the newly created node for the event
1284 * @return The StatusCode of the UA_Server_createEvent method */
1287 UA_NodeId *outNodeId);
1288
1289/** Triggers a node representation of an event by applying EventFilters and
1290 * adding the event to the appropriate queues.
1291 *
1292 * @param server The server object
1293 * @param eventNodeId The NodeId of the node representation of the event which
1294 * should be triggered
1295 * @param outEvent the EventId of the new event
1296 * @param deleteEventNode Specifies whether the node representation of the event
1297 * should be deleted
1298 * @return The StatusCode of the UA_Server_triggerEvent method */
1300UA_Server_triggerEvent(UA_Server *server, const UA_NodeId eventNodeId,
1301 const UA_NodeId originId, UA_ByteString *outEventId,
1302 const UA_Boolean deleteEventNode);
1303
1304#endif /* UA_ENABLE_SUBSCRIPTIONS_EVENTS */
1305
1306
1307
1308#ifdef UA_ENABLE_SUBSCRIPTIONS_ALARMS_CONDITIONS
1309typedef enum UA_TwoStateVariableCallbackType {
1310 UA_ENTERING_ENABLEDSTATE,
1311 UA_ENTERING_ACKEDSTATE,
1312 UA_ENTERING_CONFIRMEDSTATE,
1313 UA_ENTERING_ACTIVESTATE
1314} UA_TwoStateVariableCallbackType;
1315
1316/** Callback prototype to set user specific callbacks */
1317typedef UA_StatusCode
1318(*UA_TwoStateVariableChangeCallback)(UA_Server *server, const UA_NodeId *condition);
1319
1320/** Create condition instance. The function checks first whether the passed
1321 * conditionType is a subType of ConditionType. Then checks whether the
1322 * condition source has HasEventSource reference to its parent. If not, a
1323 * HasEventSource reference will be created between condition source and server
1324 * object. To expose the condition in address space, a hierarchical
1325 * ReferenceType should be passed to create the reference to condition source.
1326 * Otherwise, UA_NODEID_NULL should be passed to make the condition not exposed.
1327 *
1328 * @param server The server object
1329 * @param conditionId The NodeId of the requested Condition Object. When passing
1330 * UA_NODEID_NUMERIC(X,0) an unused nodeid in namespace X will be used.
1331 * E.g. passing UA_NODEID_NULL will result in a NodeId in namespace 0.
1332 * @param conditionType The NodeId of the node representation of the ConditionType
1333 * @param conditionName The name of the condition to be created
1334 * @param conditionSource The NodeId of the Condition Source (Parent of the Condition)
1335 * @param hierarchialReferenceType The NodeId of Hierarchical ReferenceType
1336 * between Condition and its source
1337 * @param outConditionId The NodeId of the created Condition
1338 * @return The StatusCode of the UA_Server_createCondition method */
1340UA_Server_createCondition(UA_Server *server,
1341 const UA_NodeId conditionId,
1342 const UA_NodeId conditionType,
1343 const UA_QualifiedName conditionName,
1344 const UA_NodeId conditionSource,
1345 const UA_NodeId hierarchialReferenceType,
1346 UA_NodeId *outConditionId);
1347
1348/** The method pair UA_Server_addCondition_begin and _finish splits the
1349 * UA_Server_createCondtion in two parts similiar to the
1350 * UA_Server_addNode_begin / _finish pair. This is useful if the node shall be
1351 * modified before finish the instantiation. For example to add children with
1352 * specific NodeIds.
1353 * For details refer to the UA_Server_addNode_begin / _finish methods.
1354 *
1355 * Additionally to UA_Server_addNode_begin UA_Server_addCondition_begin checks
1356 * if the passed condition type is a subtype of the OPC UA ConditionType.
1357 *
1358 * @param server The server object
1359 * @param conditionId The NodeId of the requested Condition Object. When passing
1360 * UA_NODEID_NUMERIC(X,0) an unused nodeid in namespace X will be used.
1361 * E.g. passing UA_NODEID_NULL will result in a NodeId in namespace 0.
1362 * @param conditionType The NodeId of the node representation of the ConditionType
1363 * @param conditionName The name of the condition to be added
1364 * @param outConditionId The NodeId of the added Condition
1365 * @return The StatusCode of the UA_Server_addCondition_begin method */
1367UA_Server_addCondition_begin(UA_Server *server,
1368 const UA_NodeId conditionId,
1369 const UA_NodeId conditionType,
1370 const UA_QualifiedName conditionName,
1371 UA_NodeId *outConditionId);
1372
1373/** Second call of the UA_Server_addCondition_begin and _finish pair.
1374 * Additionally to UA_Server_addNode_finish UA_Server_addCondition_finish:
1375 * - checks whether the condition source has HasEventSource reference to its
1376 * parent. If not, a HasEventSource reference will be created between
1377 * condition source and server object
1378 * - exposes the condition in the address space if hierarchialReferenceType is
1379 * not UA_NODEID_NULL by adding a reference of this type from the condition
1380 * source to the condition instance
1381 * - initializes the standard condition fields and callbacks
1382 *
1383 * @param server The server object
1384 * @param conditionId The NodeId of the unfinished Condition Object
1385 * @param conditionSource The NodeId of the Condition Source (Parent of the Condition)
1386 * @param hierarchialReferenceType The NodeId of Hierarchical ReferenceType
1387 * between Condition and its source
1388 * @return The StatusCode of the UA_Server_addCondition_finish method */
1389
1391UA_Server_addCondition_finish(UA_Server *server,
1392 const UA_NodeId conditionId,
1393 const UA_NodeId conditionSource,
1394 const UA_NodeId hierarchialReferenceType);
1395
1396/** Set the value of condition field.
1397 *
1398 * @param server The server object
1399 * @param condition The NodeId of the node representation of the Condition Instance
1400 * @param value Variant Value to be written to the Field
1401 * @param fieldName Name of the Field in which the value should be written
1402 * @return The StatusCode of the UA_Server_setConditionField method*/
1404UA_Server_setConditionField(UA_Server *server,
1405 const UA_NodeId condition,
1406 const UA_Variant *value,
1407 const UA_QualifiedName fieldName);
1408
1409/** Set the value of property of condition field.
1410 *
1411 * @param server The server object
1412 * @param condition The NodeId of the node representation of the Condition
1413 * Instance
1414 * @param value Variant Value to be written to the Field
1415 * @param variableFieldName Name of the Field which has a property
1416 * @param variablePropertyName Name of the Field Property in which the value
1417 * should be written
1418 * @return The StatusCode of the UA_Server_setConditionVariableFieldProperty*/
1420UA_Server_setConditionVariableFieldProperty(UA_Server *server,
1421 const UA_NodeId condition,
1422 const UA_Variant *value,
1423 const UA_QualifiedName variableFieldName,
1424 const UA_QualifiedName variablePropertyName);
1425
1426/** Triggers an event only for an enabled condition. The condition list is
1427 * updated then with the last generated EventId.
1428 *
1429 * @param server The server object
1430 * @param condition The NodeId of the node representation of the Condition Instance
1431 * @param conditionSource The NodeId of the node representation of the Condition Source
1432 * @param outEventId last generated EventId
1433 * @return The StatusCode of the UA_Server_triggerConditionEvent method */
1435UA_Server_triggerConditionEvent(UA_Server *server,
1436 const UA_NodeId condition,
1437 const UA_NodeId conditionSource,
1438 UA_ByteString *outEventId);
1439
1440/** Add an optional condition field using its name. (TODO Adding optional methods
1441 * is not implemented yet)
1442 *
1443 * @param server The server object
1444 * @param condition The NodeId of the node representation of the Condition Instance
1445 * @param conditionType The NodeId of the node representation of the Condition Type
1446 * from which the optional field comes
1447 * @param fieldName Name of the optional field
1448 * @param outOptionalVariable The NodeId of the created field (Variable Node)
1449 * @return The StatusCode of the UA_Server_addConditionOptionalField method */
1451UA_Server_addConditionOptionalField(UA_Server *server,
1452 const UA_NodeId condition,
1453 const UA_NodeId conditionType,
1454 const UA_QualifiedName fieldName,
1455 UA_NodeId *outOptionalVariable);
1456
1457/** Function used to set a user specific callback to TwoStateVariable Fields of a
1458 * condition. The callbacks will be called before triggering the events when
1459 * transition to true State of EnabledState/Id, AckedState/Id, ConfirmedState/Id
1460 * and ActiveState/Id occurs.
1461 *
1462 * @param server The server object
1463 * @param condition The NodeId of the node representation of the Condition Instance
1464 * @param conditionSource The NodeId of the node representation of the Condition Source
1465 * @param removeBranch (Not Implemented yet)
1466 * @param callback User specific callback function
1467 * @param callbackType Callback function type, indicates where it should be called
1468 * @return The StatusCode of the UA_Server_setConditionTwoStateVariableCallback method */
1470UA_Server_setConditionTwoStateVariableCallback(UA_Server *server,
1471 const UA_NodeId condition,
1472 const UA_NodeId conditionSource,
1473 UA_Boolean removeBranch,
1474 UA_TwoStateVariableChangeCallback callback,
1475 UA_TwoStateVariableCallbackType callbackType);
1476
1477/** Delete a condition from the address space and the internal lists.
1478 *
1479 * @param server The server object
1480 * @param condition The NodeId of the node representation of the Condition Instance
1481 * @param conditionSource The NodeId of the node representation of the Condition Source
1482 * @return ``UA_STATUSCODE_GOOD`` on success */
1484UA_Server_deleteCondition(UA_Server *server,
1485 const UA_NodeId condition,
1486 const UA_NodeId conditionSource);
1487
1488/** Set the LimitState of the LimitAlarmType
1489 *
1490 * @param server The server object
1491 * @param conditionId NodeId of the node representation of the Condition Instance
1492 * @param limitValue The value from the trigger node */
1494UA_Server_setLimitState(UA_Server *server, const UA_NodeId conditionId,
1495 UA_Double limitValue);
1496
1497/** Parse the certifcate and set Expiration date
1498 *
1499 * @param server The server object
1500 * @param conditionId NodeId of the node representation of the Condition Instance
1501 * @param cert The certificate for parsing */
1503UA_Server_setExpirationDate(UA_Server *server, const UA_NodeId conditionId,
1504 UA_ByteString cert);
1505
1506#endif /* UA_ENABLE_SUBSCRIPTIONS_ALARMS_CONDITIONS */
1507
1508
1509
1512 const UA_ByteString *oldCertificate,
1513 const UA_ByteString *newCertificate,
1514 const UA_ByteString *newPrivateKey,
1515 UA_Boolean closeSessions,
1516 UA_Boolean closeSecureChannels);
1517
1518
1519
1520/** Lookup a datatype by its NodeId. Takes the custom types in the server
1521 * configuration into account. Return NULL if none found. */
1522UA_EXPORT const UA_DataType *
1524
1525/** Add a new namespace to the server. Returns the index of the new namespace */
1528
1529/** Get namespace by name from the server. */
1532 size_t* foundIndex);
1533
1534/** Get namespace by id from the server. */
1537 UA_String *foundUri);
1538
1539
1540
1541#if UA_MULTITHREADING >= 100
1542
1543/** Set the async flag in a method node */
1545UA_Server_setMethodNodeAsync(UA_Server *server, const UA_NodeId id,
1546 UA_Boolean isAsync);
1547
1548typedef enum {
1549 UA_ASYNCOPERATIONTYPE_INVALID, /* 0, the default */
1550 UA_ASYNCOPERATIONTYPE_CALL
1551 /* UA_ASYNCOPERATIONTYPE_READ, */
1552 /* UA_ASYNCOPERATIONTYPE_WRITE, */
1553} UA_AsyncOperationType;
1554
1555typedef union {
1556 UA_CallMethodRequest callMethodRequest;
1557 /* UA_ReadValueId readValueId; */
1558 /* UA_WriteValue writeValue; */
1559} UA_AsyncOperationRequest;
1560
1561typedef union {
1562 UA_CallMethodResult callMethodResult;
1563 /* UA_DataValue readResult; */
1564 /* UA_StatusCode writeResult; */
1565} UA_AsyncOperationResponse;
1566
1567/** Get the next async operation without blocking
1568 *
1569 * @param server The server object
1570 * @param type The type of the async operation
1571 * @param request Receives pointer to the operation
1572 * @param context Receives the pointer to the operation context
1573 * @param timeout The timestamp when the operation times out and can
1574 * no longer be returned to the client. The response has to
1575 * be set in UA_Server_setAsyncOperationResult in any case.
1576 * @return false if queue is empty, true else */
1578UA_Server_getAsyncOperationNonBlocking(UA_Server *server,
1579 UA_AsyncOperationType *type,
1580 const UA_AsyncOperationRequest **request,
1581 void **context, UA_DateTime *timeout);
1582
1583/** UA_Boolean */
1584/** UA_Server_getAsyncOperationBlocking(UA_Server *server, */
1585/** UA_AsyncOperationType *type, */
1586/** const UA_AsyncOperationRequest **request, */
1587/** void **context, UA_DateTime *timeout); */
1588
1589/** Submit an async operation result
1590 *
1591 * @param server The server object
1592 * @param response Pointer to the operation result
1593 * @param context Pointer to the operation context */
1594void
1595UA_Server_setAsyncOperationResult(UA_Server *server,
1596 const UA_AsyncOperationResponse *response,
1597 void *context);
1598
1599#endif /* !UA_MULTITHREADING >= 100 */
1600
1601
1602
1607
1610
1611
1612
1613/** The reverse connect state change callback is called whenever the state of a
1614 * reverse connect is changed by a connection attempt, a successful connection
1615 * or a connection loss.
1616 *
1617 * The reverse connect states reflect the state of the secure channel currently
1618 * associated with a reverse connect. The state will remain
1619 * UA_SECURECHANNELSTATE_CONNECTING while the server attempts repeatedly to
1620 * establish a connection. */
1622 UA_UInt64 handle,
1624 void *context);
1625
1626/** Registers a reverse connect in the server. The server periodically attempts
1627 * to establish a connection if the initial connect fails or if the connection
1628 * breaks.
1629 *
1630 * @param server The server object
1631 * @param url The URL of the remote client
1632 * @param stateCallback The callback which will be called on state changes
1633 * @param callbackContext The context for the state callback
1634 * @param handle Is set to the handle of the reverse connect if not NULL
1635 * @return Returns UA_STATUSCODE_GOOD if the reverse connect has been registered */
1639 void *callbackContext, UA_UInt64 *handle);
1640
1641/** Removes a reverse connect from the server and closes the connection if it is
1642 * currently open.
1643 *
1644 * @param server The server object
1645 * @param handle The handle of the reverse connect to remove
1646 * @return Returns UA_STATUSCODE_GOOD if the reverse connect has been
1647 * successfully removed */
1650
1652
1653#ifdef UA_ENABLE_PUBSUB
1655#endif
1656
1657#endif /* UA_SERVER_H_ */
UA_LifecycleState
Definition common.h:189
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_CONTAINSNOLOOPS
Definition common.h:33
@ UA_ATTRIBUTEID_DESCRIPTION
Definition common.h:27
@ 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_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
void(* UA_ServerCallback)(UA_Server *server, void *data)
Definition common.h:203
UA_RuleHandling
Definition common.h:105
UA_SecureChannelState
Definition common.h:133
struct UA_Server UA_Server
Definition common.h:198
#define _UA_BEGIN_DECLS
#undef UA_DEBUG_DUMP_PKGS
Definition config.h:100
#define UA_THREADSAFE
Definition config.h:413
#define _UA_END_DECLS
Definition config.h:107
UA_StatusCode(* UA_MethodCallback)(UA_Server *server, const UA_NodeId *sessionId, void *sessionContext, const UA_NodeId *methodId, void *methodContext, const UA_NodeId *objectId, void *objectContext, size_t inputSize, const UA_Variant *input, size_t outputSize, UA_Variant *output)
Definition nodestore.h:538
UA_StatusCode UA_THREADSAFE UA_Server_forEachChildNodeCall(UA_Server *server, UA_NodeId parentNodeId, UA_NodeIteratorCallback callback, void *handle)
UA_StatusCode UA_THREADSAFE UA_Server_setMethodNodeCallback(UA_Server *server, const UA_NodeId methodNodeId, UA_MethodCallback methodCallback)
UA_CallMethodResult UA_THREADSAFE UA_Server_call(UA_Server *server, const UA_CallMethodRequest *request)
UA_StatusCode(* UA_NodeIteratorCallback)(UA_NodeId childId, UA_Boolean isInverse, UA_NodeId referenceTypeId, void *handle)
Iterate over all nodes referenced by parentNodeId by calling the callback function for each child nod...
Definition server.h:828
UA_EXPORT UA_StatusCode UA_Server_getSessionAttribute_scalar(UA_Server *server, const UA_NodeId *sessionId, const UA_QualifiedName key, const UA_DataType *type, void *outValue)
Returns NULL if the attribute is not defined or not a scalar or not of the right datatype.
UA_StatusCode UA_THREADSAFE UA_Server_getNodeContext(UA_Server *server, UA_NodeId nodeId, void **nodeContext)
UA_EXPORT UA_StatusCode UA_Server_runUntilInterrupt(UA_Server *server)
Runs the server until interrupted.
UA_StatusCode UA_THREADSAFE UA_Server_setVariableNode_valueBackend(UA_Server *server, const UA_NodeId nodeId, const UA_ValueBackend valueBackend)
UA_EXPORT const UA_DataType * UA_Server_findDataType(UA_Server *server, const UA_NodeId *typeId)
Lookup a datatype by its NodeId.
UA_StatusCode UA_THREADSAFE UA_Server_addMethodNode_finish(UA_Server *server, const UA_NodeId nodeId, UA_MethodCallback method, size_t inputArgumentsSize, const UA_Argument *inputArguments, size_t outputArgumentsSize, const UA_Argument *outputArguments)
UA_BrowseResult UA_THREADSAFE UA_Server_browseNext(UA_Server *server, UA_Boolean releaseContinuationPoint, const UA_ByteString *continuationPoint)
UA_StatusCode UA_THREADSAFE UA_Server_deleteNode(UA_Server *server, const UA_NodeId nodeId, UA_Boolean deleteReferences)
Deletes a node and optionally all references leading to the node.
UA_StatusCode UA_THREADSAFE UA_Server_addMethodNodeEx(UA_Server *server, const UA_NodeId requestedNewNodeId, const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId, const UA_QualifiedName browseName, const UA_MethodAttributes attr, UA_MethodCallback method, size_t inputArgumentsSize, const UA_Argument *inputArguments, const UA_NodeId inputArgumentsRequestedNewNodeId, UA_NodeId *inputArgumentsOutNewNodeId, size_t outputArgumentsSize, const UA_Argument *outputArguments, const UA_NodeId outputArgumentsRequestedNewNodeId, UA_NodeId *outputArgumentsOutNewNodeId, void *nodeContext, UA_NodeId *outNewNodeId)
UA_EXPORT UA_StatusCode UA_Server_getSessionAttribute(UA_Server *server, const UA_NodeId *sessionId, const UA_QualifiedName key, UA_Variant *outValue)
Returns a shallow copy of the attribute.
UA_DataValue UA_THREADSAFE UA_Server_read(UA_Server *server, const UA_ReadValueId *item, UA_TimestampsToReturn timestamps)
Read an attribute of a node.
UA_StatusCode UA_THREADSAFE UA_Server_readObjectProperty(UA_Server *server, const UA_NodeId objectId, const UA_QualifiedName propertyName, UA_Variant *value)
Read an object property.
UA_StatusCode UA_THREADSAFE UA_Server_setNodeContext(UA_Server *server, UA_NodeId nodeId, void *nodeContext)
Careful! The user has to ensure that the destructor callbacks still work.
void UA_Server_setAdminSessionContext(UA_Server *server, void *context)
void UA_ServerConfig_clean(UA_ServerConfig *config)
UA_StatusCode UA_Server_updateCertificate(UA_Server *server, const UA_ByteString *oldCertificate, const UA_ByteString *newCertificate, const UA_ByteString *newPrivateKey, UA_Boolean closeSessions, UA_Boolean closeSecureChannels)
UA_EXPORT UA_UInt16 UA_Server_run_iterate(UA_Server *server, UA_Boolean waitInternal)
Executes a single iteration of the server's main loop.
void(* UA_Server_AsyncOperationNotifyCallback)(UA_Server *server)
Definition server.h:46
void(* UA_Server_ReverseConnectStateCallback)(UA_Server *server, UA_UInt64 handle, UA_SecureChannelState state, void *context)
The reverse connect state change callback is called whenever the state of a reverse connect is change...
Definition server.h:1621
UA_EXPORT UA_Server * UA_Server_newWithConfig(UA_ServerConfig *config)
Creates a new server.
UA_StatusCode UA_THREADSAFE __UA_Server_read(UA_Server *server, const UA_NodeId *nodeId, UA_AttributeId attributeId, void *v)
Don't use this function.
UA_BrowsePathResult UA_THREADSAFE UA_Server_browseSimplifiedBrowsePath(UA_Server *server, const UA_NodeId origin, size_t browsePathSize, const UA_QualifiedName *browsePath)
A simplified TranslateBrowsePathsToNodeIds based on the SimpleAttributeOperand type (Part 4,...
void UA_THREADSAFE UA_Server_removeCallback(UA_Server *server, UA_UInt64 callbackId)
Remove a repeated callback.
UA_StatusCode UA_THREADSAFE UA_Server_addDataSourceVariableNode(UA_Server *server, const UA_NodeId requestedNewNodeId, const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId, const UA_QualifiedName browseName, const UA_NodeId typeDefinition, const UA_VariableAttributes attr, const UA_DataSource dataSource, void *nodeContext, UA_NodeId *outNewNodeId)
UA_ServerStatistics UA_THREADSAFE UA_Server_getStatistics(UA_Server *server)
UA_StatusCode UA_THREADSAFE UA_Server_addRepeatedCallback(UA_Server *server, UA_ServerCallback callback, void *data, UA_Double interval_ms, UA_UInt64 *callbackId)
Add a callback for cyclic repetition to the server.
UA_StatusCode UA_THREADSAFE UA_Server_addTimedCallback(UA_Server *server, UA_ServerCallback callback, void *data, UA_DateTime date, UA_UInt64 *callbackId)
Add a callback for execution at a specified time.
UA_EXPORT UA_StatusCode UA_THREADSAFE UA_Server_getSessionAttributeCopy(UA_Server *server, const UA_NodeId *sessionId, const UA_QualifiedName key, UA_Variant *outValue)
Return a deep copy of the attribute.
UA_EXPORT UA_StatusCode UA_Server_delete(UA_Server *server)
Delete the server.
UA_StatusCode UA_THREADSAFE UA_Server_addNode_begin(UA_Server *server, const UA_NodeClass nodeClass, const UA_NodeId requestedNewNodeId, const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId, const UA_QualifiedName browseName, const UA_NodeId typeDefinition, const void *attr, const UA_DataType *attributeType, void *nodeContext, UA_NodeId *outNewNodeId)
The attr argument must have a type according to the NodeClass.
UA_StatusCode UA_THREADSAFE UA_Server_write(UA_Server *server, const UA_WriteValue *value)
Overwrite an attribute of a node.
UA_StatusCode UA_THREADSAFE UA_Server_deregisterDiscovery(UA_Server *server, UA_ClientConfig *cc, const UA_String discoveryServerUrl)
Deregister the given server instance from the discovery server.
UA_StatusCode UA_THREADSAFE UA_Server_writeObjectProperty_scalar(UA_Server *server, const UA_NodeId objectId, const UA_QualifiedName propertyName, const void *value, const UA_DataType *type)
Directly point to the scalar value instead of a variant.
UA_MonitoredItemCreateResult UA_THREADSAFE UA_Server_createDataChangeMonitoredItem(UA_Server *server, UA_TimestampsToReturn timestampsToReturn, const UA_MonitoredItemCreateRequest item, void *monitoredItemContext, UA_Server_DataChangeNotificationCallback callback)
Create a local MonitoredItem with a sampling interval that detects data changes.
UA_StatusCode UA_THREADSAFE UA_Server_createEvent(UA_Server *server, const UA_NodeId eventType, UA_NodeId *outNodeId)
Creates a node representation of an event.
UA_BrowseResult UA_THREADSAFE UA_Server_browse(UA_Server *server, UA_UInt32 maxReferences, const UA_BrowseDescription *bd)
Browse the references of a particular node.
UA_StatusCode UA_THREADSAFE UA_Server_getNamespaceByIndex(UA_Server *server, const size_t namespaceIndex, UA_String *foundUri)
Get namespace by id from the server.
UA_EXPORT UA_LifecycleState UA_Server_getLifecycleState(UA_Server *server)
Get the current server lifecycle state.
UA_StatusCode UA_THREADSAFE UA_Server_changeRepeatedCallbackInterval(UA_Server *server, UA_UInt64 callbackId, UA_Double interval_ms)
UA_StatusCode UA_THREADSAFE UA_Server_addNode_finish(UA_Server *server, const UA_NodeId nodeId)
void(* UA_Server_registerServerCallback)(const UA_RegisteredServer *registeredServer, void *data)
Callback for RegisterServer.
Definition server.h:867
UA_StatusCode UA_THREADSAFE UA_Server_getMethodNodeCallback(UA_Server *server, const UA_NodeId methodNodeId, UA_MethodCallback *outMethodCallback)
UA_StatusCode UA_Server_addReverseConnect(UA_Server *server, UA_String url, UA_Server_ReverseConnectStateCallback stateCallback, void *callbackContext, UA_UInt64 *handle)
Registers a reverse connect in the server.
UA_EXPORT UA_StatusCode UA_Server_run_shutdown(UA_Server *server)
The epilogue part of UA_Server_run (no need to use if you call UA_Server_run or UA_Server_runUntilInt...
void(* UA_Server_EventNotificationCallback)(UA_Server *server, UA_UInt32 monId, void *monContext, size_t nEventFields, const UA_Variant *eventFields)
Definition server.h:962
UA_StatusCode UA_THREADSAFE __UA_Server_write(UA_Server *server, const UA_NodeId *nodeId, const UA_AttributeId attributeId, const UA_DataType *attr_type, const void *attr)
Don't use this function.
UA_StatusCode UA_THREADSAFE UA_Server_setNodeTypeLifecycle(UA_Server *server, UA_NodeId nodeId, UA_NodeTypeLifecycle lifecycle)
void(* UA_Server_DataChangeNotificationCallback)(UA_Server *server, UA_UInt32 monitoredItemId, void *monitoredItemContext, const UA_NodeId *nodeId, void *nodeContext, UA_UInt32 attributeId, const UA_DataValue *value)
Definition server.h:957
void UA_THREADSAFE UA_Server_setRegisterServerCallback(UA_Server *server, UA_Server_registerServerCallback cb, void *data)
Set the callback which is called if another server registeres or unregisters with this instance.
UA_StatusCode UA_THREADSAFE UA_Server_setVariableNodeDynamic(UA_Server *server, const UA_NodeId nodeId, UA_Boolean isDynamic)
VariableNodes that are "dynamic" (default for user-created variables) receive and store a SourceTimes...
UA_StatusCode UA_THREADSAFE UA_Server_browseRecursive(UA_Server *server, const UA_BrowseDescription *bd, size_t *resultsSize, UA_ExpandedNodeId **results)
Non-standard version of the Browse service that recurses into child nodes.
UA_UInt16 UA_THREADSAFE UA_Server_addNamespace(UA_Server *server, const char *name)
Add a new namespace to the server.
UA_EXPORT UA_ServerConfig * UA_Server_getConfig(UA_Server *server)
Get the configuration.
UA_StatusCode UA_THREADSAFE UA_Server_setVariableNode_dataSource(UA_Server *server, const UA_NodeId nodeId, const UA_DataSource dataSource)
UA_StatusCode UA_THREADSAFE __UA_Server_addNode(UA_Server *server, const UA_NodeClass nodeClass, const UA_NodeId *requestedNewNodeId, const UA_NodeId *parentNodeId, const UA_NodeId *referenceTypeId, const UA_QualifiedName browseName, const UA_NodeId *typeDefinition, const UA_NodeAttributes *attr, const UA_DataType *attributeType, void *nodeContext, UA_NodeId *outNewNodeId)
Don't use this function.
UA_StatusCode UA_THREADSAFE UA_Server_registerDiscovery(UA_Server *server, UA_ClientConfig *cc, const UA_String discoveryServerUrl, const UA_String semaphoreFilePath)
Register the given server instance at the discovery server.
UA_StatusCode UA_Server_removeReverseConnect(UA_Server *server, UA_UInt64 handle)
Removes a reverse connect from the server and closes the connection if it is currently open.
UA_EXPORT UA_StatusCode UA_THREADSAFE UA_Server_closeSession(UA_Server *server, const UA_NodeId *sessionId)
Manually close a session.
UA_StatusCode UA_THREADSAFE UA_Server_addReference(UA_Server *server, const UA_NodeId sourceId, const UA_NodeId refTypeId, const UA_ExpandedNodeId targetId, UA_Boolean isForward)
UA_StatusCode UA_THREADSAFE UA_Server_setVariableNode_valueCallback(UA_Server *server, const UA_NodeId nodeId, const UA_ValueCallback callback)
UA_StatusCode UA_THREADSAFE UA_Server_deleteMonitoredItem(UA_Server *server, UA_UInt32 monitoredItemId)
UA_MonitoredItemCreateResult.
UA_StatusCode UA_THREADSAFE UA_Server_writeObjectProperty(UA_Server *server, const UA_NodeId objectId, const UA_QualifiedName propertyName, const UA_Variant value)
Write an object property.
UA_StatusCode UA_THREADSAFE UA_Server_getNamespaceByName(UA_Server *server, const UA_String namespaceUri, size_t *foundIndex)
Get namespace by name from the server.
UA_EXPORT UA_StatusCode UA_THREADSAFE UA_Server_deleteSessionAttribute(UA_Server *server, const UA_NodeId *sessionId, const UA_QualifiedName key)
UA_BrowsePathResult UA_THREADSAFE UA_Server_translateBrowsePathToNodeIds(UA_Server *server, const UA_BrowsePath *browsePath)
UA_EXPORT UA_StatusCode UA_Server_run(UA_Server *server, const volatile UA_Boolean *running)
Runs the server until interrupted.
UA_StatusCode UA_THREADSAFE UA_Server_triggerEvent(UA_Server *server, const UA_NodeId eventNodeId, const UA_NodeId originId, UA_ByteString *outEventId, const UA_Boolean deleteEventNode)
Triggers a node representation of an event by applying EventFilters and adding the event to the appro...
UA_EXPORT UA_Server * UA_Server_new(void)
Create a new server with a default configuration that adds plugins for networking,...
UA_EXPORT UA_StatusCode UA_THREADSAFE UA_Server_setSessionAttribute(UA_Server *server, const UA_NodeId *sessionId, const UA_QualifiedName key, const UA_Variant *value)
UA_EXPORT UA_StatusCode UA_Server_run_startup(UA_Server *server)
The prologue part of UA_Server_run (no need to use if you call UA_Server_run or UA_Server_runUntilInt...
UA_StatusCode UA_THREADSAFE UA_Server_deleteReference(UA_Server *server, const UA_NodeId sourceNodeId, const UA_NodeId referenceTypeId, UA_Boolean isForward, const UA_ExpandedNodeId targetNodeId, UA_Boolean deleteBidirectional)
ApplicationDescription.
BrowseDescription.
BrowsePathResult.
CallMethodRequest.
CallMethodResult.
Datatype arrays with custom type definitions can be added in a linked list to the client or server co...
Definition types.h:878
DataTypeAttributes.
EndpointDescription.
MdnsDiscoveryConfiguration.
MethodAttributes.
MonitoredItemCreateRequest.
MonitoredItemCreateResult.
NodeAttributes.
ObjectAttributes.
ObjectTypeAttributes.
General PubSub configuration.
ReferenceTypeAttributes.
RegisteredServer.
UA_UInt32 maxRetransmissionQueueSize
Definition server.h:205
UA_UInt32 maxNodesPerMethodCall
Definition server.h:155
UA_RuleHandling allowEmptyVariables
Definition server.h:78
size_t securityPoliciesSize
Definition server.h:104
UA_UInt32Range lifeTimeCountLimits
Definition server.h:201
UA_DurationRange samplingIntervalLimits
Definition server.h:213
UA_UInt32 tcpMaxMsgSize
Definition server.h:97
UA_Boolean insertEventCapability
Definition server.h:259
UA_UInt32 maxReturnDataValues
Definition server.h:253
UA_Logger * logging
Definition server.h:54
UA_Boolean enableRetransmissionQueue
Definition server.h:204
UA_Boolean accessHistoryDataCapability
Definition server.h:252
UA_UInt32 maxSubscriptionsPerSession
Definition server.h:199
UA_RuleHandling verifyRequestTimestamp
Definition server.h:73
UA_String * serverUrls
Definition server.h:90
UA_UInt32 discoveryCleanupTimeout
Definition server.h:181
UA_Boolean insertDataCapability
Definition server.h:258
UA_Double maxSessionTimeout
Definition server.h:150
UA_UInt32 maxNodesPerTranslateBrowsePathsToNodeIds
Definition server.h:158
UA_Boolean deleteAtTimeDataCapability
Definition server.h:270
UA_EventLoop * eventLoop
Definition server.h:86
UA_SecurityPolicy * securityPolicies
Definition server.h:105
UA_GlobalNodeLifecycle nodeLifecycle
Definition server.h:138
void(* notifyLifecycleState)(UA_Server *server, UA_LifecycleState state)
Definition server.h:68
UA_UInt32 maxNotificationsPerPublish
Definition server.h:203
UA_UInt32 maxNodesPerWrite
Definition server.h:154
UA_UInt32 maxNodesPerRead
Definition server.h:153
UA_UInt32 maxPublishReqPerSession
Definition server.h:217
UA_UInt32 maxReturnEventValues
Definition server.h:256
UA_UInt32 maxMonitoredItemsPerCall
Definition server.h:160
UA_Boolean updateEventCapability
Definition server.h:266
UA_Boolean externalEventLoop
Definition server.h:87
UA_UInt32 tcpBufSize
Definition server.h:95
UA_Boolean accessHistoryEventsCapability
Definition server.h:255
UA_AccessControl accessControl
Definition server.h:134
UA_Boolean replaceDataCapability
Definition server.h:262
UA_UInt32 maxEventsPerNode
Definition server.h:207
UA_Boolean deleteRawCapability
Definition server.h:268
UA_Boolean tcpEnabled
Definition server.h:94
UA_UInt32 maxNodesPerBrowse
Definition server.h:156
UA_UInt16 maxSessions
Definition server.h:149
UA_UInt32 maxReferencesPerNode
Definition server.h:163
UA_UInt32Range keepAliveCountLimits
Definition server.h:202
UA_Boolean allowNonePolicyPassword
Definition server.h:127
UA_BuildInfo buildInfo
Definition server.h:57
UA_CertificateVerification secureChannelPKI
Definition server.h:130
UA_Boolean insertAnnotationsCapability
Definition server.h:260
size_t endpointsSize
Definition server.h:111
UA_Boolean historizingEnabled
Definition server.h:248
size_t serverUrlsSize
Definition server.h:91
UA_Boolean updateDataCapability
Definition server.h:265
UA_Boolean replaceEventCapability
Definition server.h:263
UA_UInt32 maxSubscriptions
Definition server.h:198
UA_Boolean subscriptionsEnabled
Definition server.h:195
UA_Double shutdownDelay
Definition server.h:63
UA_UInt32 maxNodesPerNodeManagement
Definition server.h:159
UA_UInt32Range queueSizeLimits
Definition server.h:214
UA_HistoryDatabase historyDatabase
Definition server.h:250
void * context
Definition server.h:51
UA_Boolean modellingRulesOnInstances
Definition server.h:141
const UA_DataTypeArray * customDataTypes
Definition server.h:81
UA_Boolean securityPolicyNoneDiscoveryOnly
Definition server.h:121
UA_UInt32 maxMonitoredItems
Definition server.h:211
UA_Boolean tcpReuseAddr
Definition server.h:101
UA_DurationRange publishingIntervalLimits
Definition server.h:200
UA_UInt32 reverseReconnectInterval
Definition server.h:274
UA_PubSubConfiguration pubSubConfig
Definition server.h:244
UA_StatusCode(* privateKeyPasswordCallback)(UA_ServerConfig *sc, UA_ByteString *password)
Definition server.h:283
UA_UInt32 tcpMaxChunks
Definition server.h:99
UA_Nodestore nodestore
Definition server.h:137
UA_Boolean deleteEventCapability
Definition server.h:269
UA_EndpointDescription * endpoints
Definition server.h:112
UA_UInt32 maxSecurityTokenLifetime
Definition server.h:146
UA_UInt32 maxMonitoredItemsPerSubscription
Definition server.h:212
void(* monitoredItemRegisterCallback)(UA_Server *server, const UA_NodeId *sessionId, void *sessionContext, const UA_NodeId *nodeId, void *nodeContext, UA_UInt32 attibuteId, UA_Boolean removed)
Definition server.h:232
UA_Boolean pubsubEnabled
Definition server.h:242
UA_UInt16 maxSecureChannels
Definition server.h:145
UA_CertificateVerification sessionPKI
Definition server.h:131
UA_ApplicationDescription applicationDescription
Definition server.h:58
UA_UInt32 maxNodesPerRegisterNodes
Definition server.h:157
ServerOnNetwork.
UA_SessionStatistics ss
Definition server.h:1605
UA_SecureChannelStatistics scs
Definition server.h:1604
This Source Code Form is subject to the terms of the Mozilla Public License, v.
Definition util.h:19
VariableAttributes.
VariableTypeAttributes.
ViewAttributes.
int32_t UA_Int32
Definition types.h:52
char id nodeId
Definition types.h:440
_UA_BEGIN_DECLS typedef bool UA_Boolean
This Source Code Form is subject to the terms of the Mozilla Public License, v.
Definition types.h:27
uint16_t UA_UInt16
Definition types.h:47
id namespaceUri
Definition types.h:441
UA_EXPORT const UA_NodeId UA_NODEID_NULL
uint32_t UA_UInt32
Definition types.h:57
id namespaceIndex
Definition types.h:338
uint32_t UA_StatusCode
Definition types.h:82
qn name
Definition types.h:517
double UA_Double
Definition types.h:77
uint8_t UA_Byte
Definition types.h:37
uint64_t UA_UInt64
Definition types.h:67
const UA_DataType * type
Definition types.h:626
#define UA_TYPES_NODEID
NodeId.
#define UA_TYPES_VARIANT
Variant.
#define UA_TYPES_UINT32
UInt32.
#define UA_TYPES_VIEWATTRIBUTES
#define UA_TYPES_LOCALIZEDTEXT
LocalizedText.
#define UA_TYPES_REFERENCETYPEATTRIBUTES
#define UA_TYPES_INT32
Int32.
#define UA_TYPES_BOOLEAN
Boolean.
#define UA_TYPES_QUALIFIEDNAME
QualifiedName.
#define UA_TYPES_DOUBLE
Double.
#define UA_TYPES_DATATYPEATTRIBUTES
#define UA_TYPES_DATAVALUE
DataValue.
#define UA_TYPES_VARIABLEATTRIBUTES
#define UA_TYPES_OBJECTTYPEATTRIBUTES
#define UA_TYPES_VARIABLETYPEATTRIBUTES
UA_TimestampsToReturn
TimestampsToReturn.
#define UA_TYPES_OBJECTATTRIBUTES
#define UA_TYPES_BYTE
Byte.
UA_NodeClass
NodeClass.
@ UA_NODECLASS_OBJECTTYPE
@ UA_NODECLASS_REFERENCETYPE
@ UA_NODECLASS_OBJECT
@ UA_NODECLASS_DATATYPE
@ UA_NODECLASS_VIEW
@ UA_NODECLASS_VARIABLETYPE
@ UA_NODECLASS_VARIABLE
UA_DataType UA_TYPES[388]