|
open62541 1.4.15
Open source implementation of OPC UA
|
#include <open62541/types.h>#include <open62541/common.h>#include <open62541/util.h>#include <open62541/plugin/log.h>#include <open62541/plugin/pki.h>#include <open62541/plugin/nodestore.h>#include <open62541/plugin/eventloop.h>#include <open62541/plugin/accesscontrol.h>#include <open62541/plugin/securitypolicy.h>#include <open62541/client.h>#include <open62541/server_pubsub.h>#include <open62541/plugin/historydatabase.h>Go to the source code of this file.
Data Structures | |
| struct | UA_ServerConfig |
| struct | UA_ServerStatistics |
Macros | |
| #define | UA_Server_removeRepeatedCallback(server, callbackId) UA_Server_removeCallback(server, callbackId); |
| #define | HAVE_NODEITER_CALLBACK |
| #define | UA_Server_setMethodNode_callback(server, methodNodeId, methodCallback) UA_Server_setMethodNodeCallback(server, methodNodeId, methodCallback) |
Typedefs | |
| typedef struct UA_PubSubConfiguration | UA_PubSubConfiguration |
| typedef void(* | UA_Server_AsyncOperationNotifyCallback) (UA_Server *server) |
| typedef UA_StatusCode(* | UA_NodeIteratorCallback) (UA_NodeId childId, UA_Boolean isInverse, UA_NodeId referenceTypeId, void *handle) |
| typedef void(* | UA_Server_registerServerCallback) (const UA_RegisteredServer *registeredServer, void *data) |
| typedef 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) |
| typedef void(* | UA_Server_EventNotificationCallback) (UA_Server *server, UA_UInt32 monId, void *monContext, size_t nEventFields, const UA_Variant *eventFields) |
| typedef void(* | UA_Server_ReverseConnectStateCallback) (UA_Server *server, UA_UInt64 handle, UA_SecureChannelState state, void *context) |
| #define UA_Server_removeRepeatedCallback | ( | server, | |
| callbackId | |||
| ) | UA_Server_removeCallback(server, callbackId); |
| #define UA_Server_setMethodNode_callback | ( | server, | |
| methodNodeId, | |||
| methodCallback | |||
| ) | UA_Server_setMethodNodeCallback(server, methodNodeId, methodCallback) |
| typedef UA_StatusCode(* UA_NodeIteratorCallback) (UA_NodeId childId, UA_Boolean isInverse, UA_NodeId referenceTypeId, void *handle) |
| typedef struct UA_PubSubConfiguration UA_PubSubConfiguration |
| typedef void(* UA_Server_AsyncOperationNotifyCallback) (UA_Server *server) |
| typedef void(* UA_Server_EventNotificationCallback) (UA_Server *server, UA_UInt32 monId, void *monContext, size_t nEventFields, const UA_Variant *eventFields) |
| typedef void(* UA_Server_registerServerCallback) (const UA_RegisteredServer *registeredServer, void *data) |
| typedef 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 changed by a connection attempt, a successful connection or a connection loss.
The reverse connect states reflect the state of the secure channel currently associated with a reverse connect. The state will remain UA_SECURECHANNELSTATE_CONNECTING while the server attempts repeatedly to establish a connection.
| 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.
There are typed versions as inline functions.
| UA_StatusCode UA_THREADSAFE __UA_Server_read | ( | UA_Server * | server, |
| const UA_NodeId * | nodeId, | ||
| UA_AttributeId | attributeId, | ||
| void * | v | ||
| ) |
Don't use this function.
There are typed versions for every supported attribute.
| 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.
There are typed versions with no additional overhead.
| 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_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_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_UInt16 UA_THREADSAFE UA_Server_addNamespace | ( | UA_Server * | server, |
| const char * | name | ||
| ) |
Add a new namespace to the server.
Returns the index of the new namespace
| 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.
VariableAttributes for variables, ObjectAttributes for objects, and so on. Missing attributes are taken from the TypeDefinition node if applicable.
| UA_StatusCode UA_THREADSAFE UA_Server_addNode_finish | ( | UA_Server * | server, |
| const UA_NodeId | nodeId | ||
| ) |
| 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_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.
| server | The server object. |
| callback | The callback that shall be added. |
| data | Data that is forwarded to the callback. |
| interval_ms | The callback shall be repeatedly executed with the given interval (in ms). The interval must be positive. The first execution occurs at now() + interval at the latest. |
| callbackId | Set to the identifier of the repeated callback . This can be used to cancel the callback later on. If the pointer is null, the identifier is not set. |
UA_STATUSCODE_GOOD is returned. An error code otherwise. | 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.
The server periodically attempts to establish a connection if the initial connect fails or if the connection breaks.
| server | The server object |
| url | The URL of the remote client |
| stateCallback | The callback which will be called on state changes |
| callbackContext | The context for the state callback |
| handle | Is set to the handle of the reverse connect if not NULL |
| 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.
If the indicated time lies in the past, then the callback is executed at the next iteration of the server's main loop.
| server | The server object. |
| callback | The callback that shall be added. |
| data | Data that is forwarded to the callback. |
| date | The timestamp for the execution time. |
| callbackId | Set to the identifier of the repeated callback . This can be used to cancel the callback later on. If the pointer is null, the identifier is not set. |
UA_STATUSCODE_GOOD is returned. An error code otherwise. | UA_BrowseResult UA_THREADSAFE UA_Server_browse | ( | UA_Server * | server, |
| UA_UInt32 | maxReferences, | ||
| const UA_BrowseDescription * | bd | ||
| ) |
Browse the references of a particular node.
See the definition of BrowseDescription structure for details.
Referenced by getTypeDefinitionId(), and hasReference().
| UA_BrowseResult UA_THREADSAFE UA_Server_browseNext | ( | UA_Server * | server, |
| UA_Boolean | releaseContinuationPoint, | ||
| const UA_ByteString * | continuationPoint | ||
| ) |
| 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.
Possible loops (that can occur for non-hierarchical references) are handled internally. Every node is added at most once to the results array.
Nodes are only added if they match the NodeClassMask in the BrowseDescription. However, child nodes are still recursed into if the NodeClass does not match. So it is possible, for example, to get all VariableNodes below a certain ObjectNode, with additional objects in the hierarchy below.
| 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, 7.4.4.5).
This specifies a relative path using a list of BrowseNames instead of the RelativePath structure. The list of BrowseNames is equivalent to a RelativePath that specifies forward references which are subtypes of the HierarchicalReferences ReferenceType. All Nodes followed by the browsePath shall be of the NodeClass Object or Variable.
| UA_CallMethodResult UA_THREADSAFE UA_Server_call | ( | UA_Server * | server, |
| const UA_CallMethodRequest * | request | ||
| ) |
| UA_StatusCode UA_THREADSAFE UA_Server_changeRepeatedCallbackInterval | ( | UA_Server * | server, |
| UA_UInt64 | callbackId, | ||
| UA_Double | interval_ms | ||
| ) |
| UA_EXPORT UA_StatusCode UA_THREADSAFE UA_Server_closeSession | ( | UA_Server * | server, |
| const UA_NodeId * | sessionId | ||
| ) |
Manually close a session.
| 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.
| server | The server executing the MonitoredItem @timestampsToReturn Shall timestamps be added to the value for the callback? @item The parameters of the new MonitoredItem. Note that the attribute of the ReadValueId (the node that is monitored) can not be UA_ATTRIBUTEID_EVENTNOTIFIER. A different callback type needs to be registered for event notifications. @monitoredItemContext A pointer that is forwarded with the callback @callback The callback that is executed on detected 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.
| server | The server object |
| eventType | The type of the event for which a node should be created |
| outNodeId | The NodeId of the newly created node for the event |
| UA_EXPORT UA_StatusCode UA_Server_delete | ( | UA_Server * | server | ) |
Delete the server.
| UA_StatusCode UA_THREADSAFE UA_Server_deleteMonitoredItem | ( | UA_Server * | server, |
| UA_UInt32 | monitoredItemId | ||
| ) |
UA_Server_createEventMonitoredItem(UA_Server *server, UA_TimestampsToReturn timestampsToReturn, const UA_MonitoredItemCreateRequest item, void *context, UA_Server_EventNotificationCallback callback);
| 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_deleteReference | ( | UA_Server * | server, |
| const UA_NodeId | sourceNodeId, | ||
| const UA_NodeId | referenceTypeId, | ||
| UA_Boolean | isForward, | ||
| const UA_ExpandedNodeId | targetNodeId, | ||
| UA_Boolean | deleteBidirectional | ||
| ) |
| UA_EXPORT UA_StatusCode UA_THREADSAFE UA_Server_deleteSessionAttribute | ( | UA_Server * | server, |
| const UA_NodeId * | sessionId, | ||
| const UA_QualifiedName | key | ||
| ) |
| 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.
This should be called when the server is shutting down.
| UA_EXPORT const UA_DataType * UA_Server_findDataType | ( | UA_Server * | server, |
| const UA_NodeId * | typeId | ||
| ) |
Lookup a datatype by its NodeId.
Takes the custom types in the server configuration into account. Return NULL if none found.
| UA_StatusCode UA_THREADSAFE UA_Server_forEachChildNodeCall | ( | UA_Server * | server, |
| UA_NodeId | parentNodeId, | ||
| UA_NodeIteratorCallback | callback, | ||
| void * | handle | ||
| ) |
| UA_EXPORT UA_ServerConfig * UA_Server_getConfig | ( | UA_Server * | server | ) |
Get the configuration.
Always succeeds as this simplfy resolves a pointer. Attention! Do not adjust the configuration while the server is running!
| UA_EXPORT UA_LifecycleState UA_Server_getLifecycleState | ( | UA_Server * | server | ) |
Get the current server lifecycle state.
| UA_StatusCode UA_THREADSAFE UA_Server_getMethodNodeCallback | ( | UA_Server * | server, |
| const UA_NodeId | methodNodeId, | ||
| UA_MethodCallback * | outMethodCallback | ||
| ) |
| 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_StatusCode UA_THREADSAFE UA_Server_getNamespaceByName | ( | UA_Server * | server, |
| const UA_String | namespaceUri, | ||
| size_t * | foundIndex | ||
| ) |
Get namespace by name from the server.
| UA_StatusCode UA_THREADSAFE UA_Server_getNodeContext | ( | UA_Server * | server, |
| UA_NodeId | nodeId, | ||
| void ** | nodeContext | ||
| ) |
| 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.
Don't _clear or _delete the value variant. Don't use the value once the Session could be already closed in the background or the attribute of the session replaced. Hence don't use this in a multi-threaded application.
| 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.
Otherwise a shallow copy of the scalar value is created at the target location of the void pointer. Hence don't use this in a multi-threaded application.
| 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_ServerStatistics UA_THREADSAFE UA_Server_getStatistics | ( | UA_Server * | server | ) |
| UA_EXPORT UA_Server * UA_Server_new | ( | void | ) |
Create a new server with a default configuration that adds plugins for networking, security, logging and so on.
See server_config_default.h for more detailed options.
The default configuration can be used as the starting point to adjust the server configuration to individual needs. UA_Server_new is implemented in the /plugins folder under the CC0 license. Furthermore the server confiugration only uses the public server API.
| UA_EXPORT UA_Server * UA_Server_newWithConfig | ( | UA_ServerConfig * | config | ) |
Creates a new server.
Moves the config into the server with a shallow copy. The config content is cleared together with the server.
| UA_DataValue UA_THREADSAFE UA_Server_read | ( | UA_Server * | server, |
| const UA_ReadValueId * | item, | ||
| UA_TimestampsToReturn | timestamps | ||
| ) |
Read an attribute of a node.
The specialized functions below provide a more concise syntax.
| server | The server object. |
| item | ReadValueIds contain the NodeId of the target node, the id of the attribute to read and (optionally) an index range to read parts of an array only. See the section on NumericRange for the format used for array ranges. |
| timestamps | Which timestamps to return for the attribute. |
| 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.
| server | The server object |
| objectId | The identifier of the object (node) |
| propertyName | The name of the property |
| value | Contains the property value after reading. Must not be NULL. |
| 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.
This should be called periodically, for example every 10 minutes, depending on the configuration of the discovery server. You should also call _unregisterDiscovery when the server shuts down.
The supplied client configuration is used to create a new client to connect to the discovery server. The client configuration is moved over to the server and eventually cleaned up internally. The structure pointed at by cc is zeroed to avoid accessing outdated information.
The eventloop and logging plugins in the client configuration are replaced by those configured in the server.
| void UA_THREADSAFE UA_Server_removeCallback | ( | UA_Server * | server, |
| UA_UInt64 | callbackId | ||
| ) |
Remove a repeated callback.
Does nothing if the callback is not found.
| server | The server object. |
| callbackId | The id of the callback |
| 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.
| server | The server object |
| handle | The handle of the reverse connect to remove |
| UA_EXPORT UA_StatusCode UA_Server_run | ( | UA_Server * | server, |
| const volatile UA_Boolean * | running | ||
| ) |
Runs the server until interrupted.
On Unix/Windows this registers an interrupt for SIGINT (ctrl-c). The method only returns after having received the interrupt. The logical sequence is as follows:
| server | The server object. |
| UA_EXPORT UA_UInt16 UA_Server_run_iterate | ( | UA_Server * | server, |
| UA_Boolean | waitInternal | ||
| ) |
Executes a single iteration of the server's main loop.
| server | The server object. |
| waitInternal | Should we wait for messages in the networklayer? Otherwise, the timouts for the networklayers are set to zero. The default max wait time is 200ms. |
| 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_runUntilInterrupt)
| 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_runUntilInterrupt)
| UA_EXPORT UA_StatusCode UA_Server_runUntilInterrupt | ( | UA_Server * | server | ) |
Runs the server until interrupted.
On Unix/Windows this registers an interrupt for SIGINT (ctrl-c). The method only returns after having received the interrupt or upon an error condition. The logical sequence is as follows:
Attention! This method is implemented individually for the different platforms (POSIX/Win32/etc.). The default implementation is in /plugins/ua_config_default.c under the CC0 license. Adjust as needed.
| server | The server object. |
| void UA_Server_setAdminSessionContext | ( | UA_Server * | server, |
| void * | context | ||
| ) |
| UA_StatusCode UA_THREADSAFE UA_Server_setMethodNodeCallback | ( | UA_Server * | server, |
| const UA_NodeId | methodNodeId, | ||
| UA_MethodCallback | methodCallback | ||
| ) |
| 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.
| UA_StatusCode UA_THREADSAFE UA_Server_setNodeTypeLifecycle | ( | UA_Server * | server, |
| UA_NodeId | nodeId, | ||
| UA_NodeTypeLifecycle | lifecycle | ||
| ) |
| 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.
This callback is called every time the server gets a register call. This especially means that for every periodic server register the callback will be called.
| server | |
| cb | the callback |
| data | data passed to the callback |
UA_STATUSCODE_SUCCESS on success | 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_StatusCode UA_THREADSAFE UA_Server_setVariableNode_dataSource | ( | UA_Server * | server, |
| const UA_NodeId | nodeId, | ||
| const UA_DataSource | dataSource | ||
| ) |
| UA_StatusCode UA_THREADSAFE UA_Server_setVariableNode_valueBackend | ( | UA_Server * | server, |
| const UA_NodeId | nodeId, | ||
| const UA_ValueBackend | valueBackend | ||
| ) |
| 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_setVariableNodeDynamic | ( | UA_Server * | server, |
| const UA_NodeId | nodeId, | ||
| UA_Boolean | isDynamic | ||
| ) |
VariableNodes that are "dynamic" (default for user-created variables) receive and store a SourceTimestamp.
For non-dynamic VariableNodes the current time is used for the SourceTimestamp.
| UA_BrowsePathResult UA_THREADSAFE UA_Server_translateBrowsePathToNodeIds | ( | UA_Server * | server, |
| const UA_BrowsePath * | browsePath | ||
| ) |
| 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 appropriate queues.
| server | The server object |
| eventNodeId | The NodeId of the node representation of the event which should be triggered |
| outEvent | the EventId of the new event |
| deleteEventNode | Specifies whether the node representation of the event should be deleted |
| 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_StatusCode UA_THREADSAFE UA_Server_write | ( | UA_Server * | server, |
| const UA_WriteValue * | value | ||
| ) |
Overwrite an attribute of a node.
The specialized functions below provide a more concise syntax.
| server | The server object. |
| value | WriteValues contain the NodeId of the target node, the id of the attribute to overwritten, the actual value and (optionally) an index range to replace parts of an array only. of an array only. See the section on NumericRange for the format used for array ranges. |
| 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.
The property is represented as a VariableNode with a HasProperty reference from the ObjectNode. The VariableNode is identified by its BrowseName. Writing the property sets the value attribute of the VariableNode.
| server | The server object |
| objectId | The identifier of the object (node) |
| propertyName | The name of the property |
| value | The value to be set for the event attribute |
| 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.
| void UA_ServerConfig_clean | ( | UA_ServerConfig * | config | ) |