|
@@ -188,6 +188,256 @@ UA_StatusCode UA_EXPORT UA_Server_removeRepeatedJob(UA_Server *server, UA_Guid j
|
|
/* Add a new namespace to the server. Returns the index of the new namespace */
|
|
/* Add a new namespace to the server. Returns the index of the new namespace */
|
|
UA_UInt16 UA_EXPORT UA_Server_addNamespace(UA_Server *server, const char* name);
|
|
UA_UInt16 UA_EXPORT UA_Server_addNamespace(UA_Server *server, const char* name);
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * Reading / Writing Node Attributes
|
|
|
|
+ * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
+ *
|
|
|
|
+ * The node attributes are read/written separately. The read/write functions do
|
|
|
|
+ * not require the construction of variants used in the service definition. This
|
|
|
|
+ * is handled internally.
|
|
|
|
+ *
|
|
|
|
+ * Reading Node Attributes
|
|
|
|
+ * ~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
+ *
|
|
|
|
+ * The following attributes cannot be read, since the local "admin" user always has
|
|
|
|
+ * full rights.
|
|
|
|
+ *
|
|
|
|
+ * - UserWriteMask
|
|
|
|
+ * - UserAccessLevel
|
|
|
|
+ * - UserExecutable */
|
|
|
|
+/* Don't use this function. There are typed versions for every supported attribute. */
|
|
|
|
+UA_StatusCode UA_EXPORT
|
|
|
|
+__UA_Server_read(UA_Server *server, const UA_NodeId *nodeId,
|
|
|
|
+ UA_AttributeId attributeId, void *v);
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_readNodeId(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ UA_NodeId *outNodeId) {
|
|
|
|
+ return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_NODEID, outNodeId); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_readNodeClass(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ UA_NodeClass *outNodeClass) {
|
|
|
|
+ return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_NODECLASS, outNodeClass); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_readBrowseName(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ UA_QualifiedName *outBrowseName) {
|
|
|
|
+ return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_BROWSENAME, outBrowseName); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_readDisplayName(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ UA_LocalizedText *outDisplayName) {
|
|
|
|
+ return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_DISPLAYNAME, outDisplayName); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_readDescription(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ UA_LocalizedText *outDescription) {
|
|
|
|
+ return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_DESCRIPTION, outDescription); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_readWriteMask(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ UA_UInt32 *outWriteMask) {
|
|
|
|
+ return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_WRITEMASK, outWriteMask); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_readIsAbstract(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ UA_Boolean *outIsAbstract) {
|
|
|
|
+ return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_ISABSTRACT, outIsAbstract); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_readSymmetric(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ UA_Boolean *outSymmetric) {
|
|
|
|
+ return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_SYMMETRIC, outSymmetric); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_readInverseName(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ UA_LocalizedText *outInverseName) {
|
|
|
|
+ return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_INVERSENAME, outInverseName); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_readContainsNoLoop(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ UA_Boolean *outContainsNoLoops) {
|
|
|
|
+ return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_CONTAINSNOLOOPS,
|
|
|
|
+ outContainsNoLoops); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_readEventNotifier(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ UA_Byte *outEventNotifier) {
|
|
|
|
+ return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_EVENTNOTIFIER, outEventNotifier); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_readValue(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ UA_Variant *outValue) {
|
|
|
|
+ return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_VALUE, outValue); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_readDataType(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ UA_NodeId *outDataType) {
|
|
|
|
+ return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_DATATYPE, outDataType); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_readValueRank(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ UA_Int32 *outValueRank) {
|
|
|
|
+ return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_VALUERANK, outValueRank); }
|
|
|
|
+
|
|
|
|
+/* Returns a variant with an int32 array */
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_readArrayDimensions(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ UA_Variant *outArrayDimensions) {
|
|
|
|
+ return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_ARRAYDIMENSIONS,
|
|
|
|
+ outArrayDimensions); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_readAccessLevel(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ UA_UInt32 *outAccessLevel) {
|
|
|
|
+ return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_ACCESSLEVEL, outAccessLevel); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_readMinimumSamplingInterval(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ UA_Double *outMinimumSamplingInterval) {
|
|
|
|
+ return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL,
|
|
|
|
+ outMinimumSamplingInterval); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_readHistorizing(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ UA_Boolean *outHistorizing) {
|
|
|
|
+ return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_HISTORIZING, outHistorizing); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_readExecutable(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ UA_Boolean *outExecutable) {
|
|
|
|
+ return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_EXECUTABLE, outExecutable); }
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * Writing Node Attributes
|
|
|
|
+ * ~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
+ *
|
|
|
|
+ * The following node attributes cannot be changed once a node has been created:
|
|
|
|
+ *
|
|
|
|
+ * - NodeClass
|
|
|
|
+ * - NodeId
|
|
|
|
+ * - Symmetric
|
|
|
|
+ * - ContainsNoLoop
|
|
|
|
+ *
|
|
|
|
+ * The following attributes cannot be written from the server, as they are
|
|
|
|
+ * specific to the different users:
|
|
|
|
+ *
|
|
|
|
+ * - UserWriteMask
|
|
|
|
+ * - UserAccessLevel
|
|
|
|
+ * - UserExecutable
|
|
|
|
+ *
|
|
|
|
+ * The following attributes are currently taken from the value variant and not
|
|
|
|
+ * stored separately in the nodes:
|
|
|
|
+ *
|
|
|
|
+ * - DataType
|
|
|
|
+ * - ValueRank
|
|
|
|
+ * - ArrayDimensions
|
|
|
|
+ *
|
|
|
|
+ * Historizing is currently unsupported */
|
|
|
|
+/* Don't use this function. There are typed versions with no additional overhead. */
|
|
|
|
+UA_StatusCode UA_EXPORT
|
|
|
|
+__UA_Server_write(UA_Server *server, const UA_NodeId *nodeId,
|
|
|
|
+ const UA_AttributeId attributeId,
|
|
|
|
+ const UA_DataType *type, const void *value);
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_writeBrowseName(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ const UA_QualifiedName browseName) {
|
|
|
|
+ return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_BROWSENAME,
|
|
|
|
+ &UA_TYPES[UA_TYPES_QUALIFIEDNAME], &browseName); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_writeDisplayName(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ const UA_LocalizedText displayName) {
|
|
|
|
+ return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_DISPLAYNAME,
|
|
|
|
+ &UA_TYPES[UA_TYPES_LOCALIZEDTEXT], &displayName); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_writeDescription(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ const UA_LocalizedText description) {
|
|
|
|
+ return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_DESCRIPTION,
|
|
|
|
+ &UA_TYPES[UA_TYPES_LOCALIZEDTEXT], &description); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_writeWriteMask(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ const UA_UInt32 writeMask) {
|
|
|
|
+ return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_WRITEMASK,
|
|
|
|
+ &UA_TYPES[UA_TYPES_UINT32], &writeMask); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_writeIsAbstract(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ const UA_Boolean isAbstract) {
|
|
|
|
+ return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_ISABSTRACT,
|
|
|
|
+ &UA_TYPES[UA_TYPES_BOOLEAN], &isAbstract); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_writeInverseName(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ const UA_LocalizedText inverseName) {
|
|
|
|
+ return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_INVERSENAME,
|
|
|
|
+ &UA_TYPES[UA_TYPES_LOCALIZEDTEXT], &inverseName); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_writeEventNotifier(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ const UA_Byte eventNotifier) {
|
|
|
|
+ return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_EVENTNOTIFIER,
|
|
|
|
+ &UA_TYPES[UA_TYPES_BYTE], &eventNotifier); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_writeValue(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ const UA_Variant value) {
|
|
|
|
+ return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_VALUE,
|
|
|
|
+ &UA_TYPES[UA_TYPES_VARIANT], &value); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_writeAccessLevel(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ const UA_UInt32 accessLevel) {
|
|
|
|
+ return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_ACCESSLEVEL,
|
|
|
|
+ &UA_TYPES[UA_TYPES_UINT32], &accessLevel); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_writeMinimumSamplingInterval(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ const UA_Double miniumSamplingInterval) {
|
|
|
|
+ return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL,
|
|
|
|
+ &UA_TYPES[UA_TYPES_DOUBLE], &miniumSamplingInterval); }
|
|
|
|
+
|
|
|
|
+static UA_INLINE UA_StatusCode
|
|
|
|
+UA_Server_writeExecutable(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
+ const UA_Boolean executable) {
|
|
|
|
+ return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_EXECUTABLE,
|
|
|
|
+ &UA_TYPES[UA_TYPES_BOOLEAN], &executable); }
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * Browsing
|
|
|
|
+ * -------- */
|
|
|
|
+UA_BrowseResult UA_EXPORT
|
|
|
|
+UA_Server_browse(UA_Server *server, UA_UInt32 maxrefs, const UA_BrowseDescription *descr);
|
|
|
|
+
|
|
|
|
+UA_BrowseResult UA_EXPORT
|
|
|
|
+UA_Server_browseNext(UA_Server *server, UA_Boolean releaseContinuationPoint,
|
|
|
|
+ const UA_ByteString *continuationPoint);
|
|
|
|
+
|
|
|
|
+#ifndef HAVE_NODEITER_CALLBACK
|
|
|
|
+#define HAVE_NODEITER_CALLBACK
|
|
|
|
+/* Iterate over all nodes referenced by parentNodeId by calling the callback
|
|
|
|
+ * function for each child node (in ifdef because GCC/CLANG handle include order
|
|
|
|
+ * differently) */
|
|
|
|
+typedef UA_StatusCode (*UA_NodeIteratorCallback)(UA_NodeId childId, UA_Boolean isInverse,
|
|
|
|
+ UA_NodeId referenceTypeId, void *handle);
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+UA_StatusCode UA_EXPORT
|
|
|
|
+UA_Server_forEachChildNodeCall(UA_Server *server, UA_NodeId parentNodeId,
|
|
|
|
+ UA_NodeIteratorCallback callback, void *handle);
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * Method Call
|
|
|
|
+ * ----------- */
|
|
|
|
+#ifdef UA_ENABLE_METHODCALLS
|
|
|
|
+UA_CallMethodResult UA_EXPORT
|
|
|
|
+UA_Server_call(UA_Server *server, const UA_CallMethodRequest *request);
|
|
|
|
+#endif
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Node Management
|
|
* Node Management
|
|
* ---------------
|
|
* ---------------
|
|
@@ -208,9 +458,15 @@ UA_UInt16 UA_EXPORT UA_Server_addNamespace(UA_Server *server, const char* name);
|
|
*
|
|
*
|
|
* Data Source Callback
|
|
* Data Source Callback
|
|
* ~~~~~~~~~~~~~~~~~~~~
|
|
* ~~~~~~~~~~~~~~~~~~~~
|
|
- * Datasources are the interface to local data providers. It is expected that
|
|
|
|
- * the read and release callbacks are implemented. The write callback can be set
|
|
|
|
- * to a null-pointer. */
|
|
|
|
|
|
+ *
|
|
|
|
+ * The server has a unique way of dealing with the content of variables. Instead
|
|
|
|
+ * of storing a variant attached to the variable node, the node can point to a
|
|
|
|
+ * function with a local data provider. Whenever the value attribute is read,
|
|
|
|
+ * the function will be called and asked to provide a UA_DataValue return value
|
|
|
|
+ * that contains the value content and additional timestamps.
|
|
|
|
+ *
|
|
|
|
+ * It is expected that the read callback is implemented. The write callback can
|
|
|
|
+ * be set to a null-pointer. */
|
|
typedef struct {
|
|
typedef struct {
|
|
void *handle; /* A custom pointer to reuse the same datasource functions for
|
|
void *handle; /* A custom pointer to reuse the same datasource functions for
|
|
multiple sources */
|
|
multiple sources */
|
|
@@ -298,13 +554,22 @@ UA_Server_setMethodNode_callback(UA_Server *server, const UA_NodeId methodNodeId
|
|
#endif
|
|
#endif
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * .. _addnodes:
|
|
|
|
+ *
|
|
* Node Addition and Deletion
|
|
* Node Addition and Deletion
|
|
- * ^^^^^^^^^^^^^^^^^^^^^^^^^^ */
|
|
|
|
-UA_StatusCode UA_EXPORT
|
|
|
|
-UA_Server_deleteNode(UA_Server *server, const UA_NodeId nodeId, UA_Boolean deleteReferences);
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * The instantiation callback is used to track the addition of new nodes. It is
|
|
|
|
|
|
+ * ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
+ *
|
|
|
|
+ * When creating dynamic node instances at runtime, chances are that you will
|
|
|
|
+ * not care about the specific NodeId of the new node, as long as you can
|
|
|
|
+ * reference it later. When passing numeric NodeIds with a numeric identifier 0,
|
|
|
|
+ * the stack evaluates this as "select a randome free NodeId in that namespace".
|
|
|
|
+ * To find out which NodeId was actually assigned to the new node, you may pass
|
|
|
|
+ * a pointer `outNewNodeId`, which will (after a successfull node insertion)
|
|
|
|
+ * contain the nodeId of the new node. You may also pass NULL pointer if this
|
|
|
|
+ * result is not relevant. The namespace index for nodes you create should never
|
|
|
|
+ * be 0, as that index is reserved for OPC UA's self-description (namespace 0). */
|
|
|
|
+
|
|
|
|
+/* The instantiation callback is used to track the addition of new nodes. It is
|
|
* also called for all sub-nodes contained in an object or variable type node
|
|
* also called for all sub-nodes contained in an object or variable type node
|
|
* that is instantiated. */
|
|
* that is instantiated. */
|
|
typedef struct {
|
|
typedef struct {
|
|
@@ -430,214 +695,8 @@ UA_Server_addMethodNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
|
|
UA_NodeId *outNewNodeId);
|
|
UA_NodeId *outNewNodeId);
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-/**
|
|
|
|
- * Write Node Attributes
|
|
|
|
- * ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
- * The following node attributes cannot be written
|
|
|
|
- *
|
|
|
|
- * - NodeClass
|
|
|
|
- * - NodeId
|
|
|
|
- * - Symmetric
|
|
|
|
- * - ContainsNoLoop
|
|
|
|
- *
|
|
|
|
- * The following attributes cannot be written from the server, as there is no "user" in the server
|
|
|
|
- *
|
|
|
|
- * - UserWriteMask
|
|
|
|
- * - UserAccessLevel
|
|
|
|
- * - UserExecutable
|
|
|
|
- *
|
|
|
|
- * The following attributes are currently taken from the value variant:
|
|
|
|
- * TODO: Handle them independent from the variable, ensure that the implicit constraints hold
|
|
|
|
- *
|
|
|
|
- * - DataType
|
|
|
|
- * - ValueRank
|
|
|
|
- * - ArrayDimensions
|
|
|
|
- *
|
|
|
|
- * - Historizing is currently unsupported */
|
|
|
|
-/* Don't use this function. There are typed versions with no additional overhead. */
|
|
|
|
-UA_StatusCode UA_EXPORT
|
|
|
|
-__UA_Server_write(UA_Server *server, const UA_NodeId *nodeId,
|
|
|
|
- const UA_AttributeId attributeId,
|
|
|
|
- const UA_DataType *type, const void *value);
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_writeBrowseName(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- const UA_QualifiedName browseName) {
|
|
|
|
- return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_BROWSENAME,
|
|
|
|
- &UA_TYPES[UA_TYPES_QUALIFIEDNAME], &browseName); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_writeDisplayName(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- const UA_LocalizedText displayName) {
|
|
|
|
- return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_DISPLAYNAME,
|
|
|
|
- &UA_TYPES[UA_TYPES_LOCALIZEDTEXT], &displayName); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_writeDescription(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- const UA_LocalizedText description) {
|
|
|
|
- return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_DESCRIPTION,
|
|
|
|
- &UA_TYPES[UA_TYPES_LOCALIZEDTEXT], &description); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_writeWriteMask(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- const UA_UInt32 writeMask) {
|
|
|
|
- return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_WRITEMASK,
|
|
|
|
- &UA_TYPES[UA_TYPES_UINT32], &writeMask); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_writeIsAbstract(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- const UA_Boolean isAbstract) {
|
|
|
|
- return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_ISABSTRACT,
|
|
|
|
- &UA_TYPES[UA_TYPES_BOOLEAN], &isAbstract); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_writeInverseName(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- const UA_LocalizedText inverseName) {
|
|
|
|
- return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_INVERSENAME,
|
|
|
|
- &UA_TYPES[UA_TYPES_LOCALIZEDTEXT], &inverseName); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_writeEventNotifier(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- const UA_Byte eventNotifier) {
|
|
|
|
- return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_EVENTNOTIFIER,
|
|
|
|
- &UA_TYPES[UA_TYPES_BYTE], &eventNotifier); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_writeValue(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- const UA_Variant value) {
|
|
|
|
- return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_VALUE,
|
|
|
|
- &UA_TYPES[UA_TYPES_VARIANT], &value); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_writeAccessLevel(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- const UA_UInt32 accessLevel) {
|
|
|
|
- return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_ACCESSLEVEL,
|
|
|
|
- &UA_TYPES[UA_TYPES_UINT32], &accessLevel); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_writeMinimumSamplingInterval(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- const UA_Double miniumSamplingInterval) {
|
|
|
|
- return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL,
|
|
|
|
- &UA_TYPES[UA_TYPES_DOUBLE], &miniumSamplingInterval); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_writeExecutable(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- const UA_Boolean executable) {
|
|
|
|
- return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_EXECUTABLE,
|
|
|
|
- &UA_TYPES[UA_TYPES_BOOLEAN], &executable); }
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * Read Node Attributes
|
|
|
|
- * ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
- * The following attributes cannot be read, since the local "admin" user always has
|
|
|
|
- * full rights.
|
|
|
|
- *
|
|
|
|
- * - UserWriteMask
|
|
|
|
- * - UserAccessLevel
|
|
|
|
- * - UserExecutable */
|
|
|
|
-/* Don't use this function. There are typed versions for every supported attribute. */
|
|
|
|
UA_StatusCode UA_EXPORT
|
|
UA_StatusCode UA_EXPORT
|
|
-__UA_Server_read(UA_Server *server, const UA_NodeId *nodeId,
|
|
|
|
- UA_AttributeId attributeId, void *v);
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_readNodeId(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- UA_NodeId *outNodeId) {
|
|
|
|
- return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_NODEID, outNodeId); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_readNodeClass(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- UA_NodeClass *outNodeClass) {
|
|
|
|
- return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_NODECLASS, outNodeClass); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_readBrowseName(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- UA_QualifiedName *outBrowseName) {
|
|
|
|
- return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_BROWSENAME, outBrowseName); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_readDisplayName(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- UA_LocalizedText *outDisplayName) {
|
|
|
|
- return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_DISPLAYNAME, outDisplayName); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_readDescription(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- UA_LocalizedText *outDescription) {
|
|
|
|
- return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_DESCRIPTION, outDescription); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_readWriteMask(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- UA_UInt32 *outWriteMask) {
|
|
|
|
- return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_WRITEMASK, outWriteMask); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_readIsAbstract(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- UA_Boolean *outIsAbstract) {
|
|
|
|
- return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_ISABSTRACT, outIsAbstract); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_readSymmetric(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- UA_Boolean *outSymmetric) {
|
|
|
|
- return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_SYMMETRIC, outSymmetric); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_readInverseName(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- UA_LocalizedText *outInverseName) {
|
|
|
|
- return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_INVERSENAME, outInverseName); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_readContainsNoLoop(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- UA_Boolean *outContainsNoLoops) {
|
|
|
|
- return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_CONTAINSNOLOOPS,
|
|
|
|
- outContainsNoLoops); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_readEventNotifier(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- UA_Byte *outEventNotifier) {
|
|
|
|
- return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_EVENTNOTIFIER, outEventNotifier); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_readValue(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- UA_Variant *outValue) {
|
|
|
|
- return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_VALUE, outValue); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_readDataType(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- UA_NodeId *outDataType) {
|
|
|
|
- return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_DATATYPE, outDataType); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_readValueRank(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- UA_Int32 *outValueRank) {
|
|
|
|
- return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_VALUERANK, outValueRank); }
|
|
|
|
-
|
|
|
|
-/* Returns a variant with an int32 array */
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_readArrayDimensions(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- UA_Variant *outArrayDimensions) {
|
|
|
|
- return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_ARRAYDIMENSIONS,
|
|
|
|
- outArrayDimensions); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_readAccessLevel(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- UA_UInt32 *outAccessLevel) {
|
|
|
|
- return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_ACCESSLEVEL, outAccessLevel); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_readMinimumSamplingInterval(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- UA_Double *outMinimumSamplingInterval) {
|
|
|
|
- return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL,
|
|
|
|
- outMinimumSamplingInterval); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_readHistorizing(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- UA_Boolean *outHistorizing) {
|
|
|
|
- return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_HISTORIZING, outHistorizing); }
|
|
|
|
-
|
|
|
|
-static UA_INLINE UA_StatusCode
|
|
|
|
-UA_Server_readExecutable(UA_Server *server, const UA_NodeId nodeId,
|
|
|
|
- UA_Boolean *outExecutable) {
|
|
|
|
- return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_EXECUTABLE, outExecutable); }
|
|
|
|
|
|
+UA_Server_deleteNode(UA_Server *server, const UA_NodeId nodeId, UA_Boolean deleteReferences);
|
|
|
|
|
|
/**
|
|
/**
|
|
* Reference Management
|
|
* Reference Management
|
|
@@ -651,37 +710,6 @@ UA_Server_deleteReference(UA_Server *server, const UA_NodeId sourceNodeId,
|
|
const UA_NodeId referenceTypeId, UA_Boolean isForward,
|
|
const UA_NodeId referenceTypeId, UA_Boolean isForward,
|
|
const UA_ExpandedNodeId targetNodeId, UA_Boolean deleteBidirectional);
|
|
const UA_ExpandedNodeId targetNodeId, UA_Boolean deleteBidirectional);
|
|
|
|
|
|
-/**
|
|
|
|
- * Browsing
|
|
|
|
- * -------- */
|
|
|
|
-UA_BrowseResult UA_EXPORT
|
|
|
|
-UA_Server_browse(UA_Server *server, UA_UInt32 maxrefs, const UA_BrowseDescription *descr);
|
|
|
|
-
|
|
|
|
-UA_BrowseResult UA_EXPORT
|
|
|
|
-UA_Server_browseNext(UA_Server *server, UA_Boolean releaseContinuationPoint,
|
|
|
|
- const UA_ByteString *continuationPoint);
|
|
|
|
-
|
|
|
|
-#ifndef HAVE_NODEITER_CALLBACK
|
|
|
|
-#define HAVE_NODEITER_CALLBACK
|
|
|
|
-/* Iterate over all nodes referenced by parentNodeId by calling the callback
|
|
|
|
- * function for each child node (in ifdef because GCC/CLANG handle include order
|
|
|
|
- * differently) */
|
|
|
|
-typedef UA_StatusCode (*UA_NodeIteratorCallback)(UA_NodeId childId, UA_Boolean isInverse,
|
|
|
|
- UA_NodeId referenceTypeId, void *handle);
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
-UA_StatusCode UA_EXPORT
|
|
|
|
-UA_Server_forEachChildNodeCall(UA_Server *server, UA_NodeId parentNodeId,
|
|
|
|
- UA_NodeIteratorCallback callback, void *handle);
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * Method Call
|
|
|
|
- * ----------- */
|
|
|
|
-#ifdef UA_ENABLE_METHODCALLS
|
|
|
|
-UA_CallMethodResult UA_EXPORT
|
|
|
|
-UA_Server_call(UA_Server *server, const UA_CallMethodRequest *request);
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
#ifdef __cplusplus
|
|
#ifdef __cplusplus
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|