C++ Based OPC UA Client/Server SDK
1.6.1.391
|
Main NodeManager responsible for all OPC UA defined nodes. More...
#include <nodemanagerroot.h>
Inherits NodeManagerBase, and NodeManagerList.
Public Member Functions | |
virtual | ~NodeManagerRoot () |
Destroys the NodeManagerRoot object. More... | |
NodeManager * | getNodeManagerByNamespace (OpcUa_UInt16 NsIdx) const |
Get the NodeManager by namespace index. More... | |
UaStatus | addNodeManager (NodeManager *pNodeManager, const UaString &sNamespaceUri, OpcUa_UInt16 &assignedNamespaceIndex) |
Add a NodeManager to the list. More... | |
UaStatus | removeNodeManager (OpcUa_UInt16 namespaceIndex) |
Remove a NodeManager from the list. More... | |
NodeAccessInfo * | getDefaultPermissions (OpcUa_UInt16 namespaceIndex) const |
Get the default access permissions for a namespace. More... | |
UaObjectServer * | pServerObject () const |
Get the server object. More... | |
OpcUa_StatusCode | getNamespaceIndexFromUri (const UaString &sNamespaceUri, OpcUa_UInt16 &namespaceIndex) |
Returns a namespace index for a namespace URI. More... | |
OpcUa_StatusCode | getNamespaceUriFromIndex (OpcUa_UInt16 namespaceIndex, UaString &sNamespaceUri) const |
Returns a namespace URI for a namespace index. More... | |
OpcUa_StatusCode | getNamespaceIndexFromComAlias (const UaString &comAlias, OpcUa_UInt16 &namespaceIndex) |
Returns a namespace index for a COM alias. More... | |
OpcUa_StatusCode | getComAliasFromIndex (OpcUa_UInt16 namespaceIndex, UaString &sComAlias) const |
Returns a COM alias for a namespace index. More... | |
void | startServerShutDown (OpcUa_Int32 secondsTillShutdown, const UaLocalizedText &shutdownReason) |
Inform the node manager about the shutdown of the server. More... | |
void | startServerShutDown (OpcUa_Int32 secondsTillShutdown, const UaLocalizedTextArray &shutdownReason) |
Inform the node manager about the shutdown of the server. More... | |
void | changeServerState (OpcUa_ServerState newState) |
Update the server manager about the change of the server state. More... | |
void | changeServiceLevel (OpcUa_Byte serviceLevel, OpcUa_Byte changeMask) |
Update the ServiceLevel property of the Server object. More... | |
UaNode * | getNode (const UaNodeId &nodeId) |
Get a UaNode pointer for a requested nodeId. More... | |
UaStatus | browse (const UaNodeId &startingNode, const UaNodeId &referenceTypeFilter, ContinuationPointWrapper &continuationPoint, UaReferenceDescriptions &references) |
Browse function for internal use for forward browsing. More... | |
UaStatus | browse (const UaNodeId &startingNode, OpcUa_Boolean isInverse, const UaNodeId &referenceTypeFilter, OpcUa_UInt32 nodeClassMask, ContinuationPointWrapper &continuationPoint, UaReferenceDescriptions &references) |
Browse function for internal use. More... | |
UaStatus | browse (Session *pSession, const UaNodeId &startingNode, OpcUa_Boolean isInverse, const UaNodeId &referenceTypeFilter, OpcUa_UInt32 nodeClassMask, ContinuationPointWrapper &continuationPoint, UaReferenceDescriptions &references) |
Browse function for internal use. More... | |
UaStatus | browse (Session *pSession, const UaNodeId &startingNode, OpcUa_BrowseDirection browseDirection, const UaNodeId &referenceTypeFilter, OpcUa_UInt32 nodeClassMask, ContinuationPointWrapper &continuationPoint, UaReferenceDescriptions &references) |
Browse function for internal use. More... | |
UaStatus | getListOfSuperTypes (const UaNodeId &startingNode, UaNodeIdArray &superTypeList) |
Returns the list of super types for a passed OPC UA type node. More... | |
ServerManager * | pServerManager () |
Get the server manager. More... | |
UaStatus | startUp (ServerManager *pServerManager) |
Start up NodeManager. More... | |
UaStatus | sessionOpened (Session *session) |
Notifies the node manager that a new session was opened. More... | |
UaStatus | sessionActivated (Session *session) |
Notifies the node manager that a session was activated. More... | |
UaStatus | sessionClosed (Session *session) |
Notifies the node manager that a session was closed. More... | |
UaStatus | browse (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &references) |
Discover the references of a specified node of a view. More... | |
UaStatus | translateBrowsePathToNodeId (const ServiceContext &serviceContext, const UaNodeId &startingNode, UaRelativePath &relativePath, UaBrowsePathTargets &browsePathTargets) |
Translates a relative browse path to a node id. More... | |
VariableHandle * | getVariableHandle (Session *pSession, VariableHandle::ServiceType serviceType, OpcUa_NodeId *pNodeId, OpcUa_Int32 AttributeId) const |
Get the variable handle for the passed node Id. More... | |
HistoryVariableHandle * | getHistoryVariableHandle (Session *pSession, HistoryVariableHandle::ServiceType serviceType, OpcUa_NodeId *pNodeId, UaStatus &result) const |
Get the history variable handle for the passed node Id. More... | |
UaStatus | getEventManagers (Session *pSession, OpcUa_NodeId *pNodeId, OpcUa_EventFilter *eventFilter, EventManagerArray &eventManagers) const |
Get a list of EventManager interfaces for an event notifier. More... | |
MethodHandle * | getMethodHandle (Session *pSession, OpcUa_NodeId *pObjectNodeId, OpcUa_NodeId *pMethodNodeId, UaStatus &result) const |
Get the method handle for the passed node Id. More... | |
UaStatus | addNode (const ServiceContext &serviceContext, const UaNodeId &parentNodeId, const UaNodeId &referenceTypeId, const UaNodeId &requestedNewNodeId, const UaQualifiedName &browseName, OpcUa_NodeClass nodeClass, const UaExtensionObject &nodeAttributes, const UaNodeId &typeDefinition, UaNodeId &addedNodeId) |
Add node to the NodeManager. More... | |
UaStatus | addReference (const ServiceContext &serviceContext, const UaNodeId &sourceNodeId, const UaNodeId &referenceTypeId, OpcUa_Boolean isForward, const UaNodeId &targetNodeId, OpcUa_NodeClass targetNodeClass) |
Add reference to the NodeManager. More... | |
UaStatus | deleteNode (const ServiceContext &serviceContext, const UaNodeId &nodeId, OpcUa_Boolean deleteTargetReference) |
Delete node from the NodeManager. More... | |
UaStatus | deleteReference (const ServiceContext &serviceContext, const UaNodeId &sourceNodeId, const UaNodeId &referenceTypeId, OpcUa_Boolean isForward, const UaNodeId &targetNodeId, OpcUa_Boolean deleteBidirectional) |
Delete reference from the NodeManager. More... | |
NodeManagerCrossReferences * | getNodeManagerCrossReferences () |
Get the interface NodeManagerCrossReferences if available. More... | |
NodeManagerConfig * | getNodeManagerConfig () |
Get the interface NodeManagerConfig if available. More... | |
UaStatus | afterStartUp () |
Finish start up in derived class after starting up base class. More... | |
UaStatus | beforeShutDown () |
Start shut down in derived class before shutting down base class. More... | |
UaStatus | readValues (const UaVariableArray &arrUaVariables, UaDataValueArray &arrDataValues) |
Reads the value attributes for a list of UaVariables. More... | |
UaStatus | writeValues (const UaVariableArray &arrUaVariables, const PDataValueArray &arrpDataValues, UaStatusCodeArray &arrStatusCodes) |
Writes the value attributes for a list of UaVariables. More... | |
Public Member Functions inherited from NodeManagerBase | |
NodeManagerBase (const UaString &sNamespaceUri, OpcUa_Boolean firesEvents=OpcUa_False, OpcUa_Int32 nHashTableSize=10007) | |
Constructs a NodeManagerUaNode object. More... | |
virtual | ~NodeManagerBase () |
Destroys the NodeManagerUaNode object and all nodes managed by the node manager. | |
void | setFiresEvents (OpcUa_Boolean firesEvents) |
Set the flag that indicates if the NodeManager fires events. More... | |
void | setHistoryManager (HistoryManager *pHistoryManager) |
Set the HistoryManager responsible for the NodeManager. More... | |
void | setHistoryManagerForUaNode (const UaNodeId &nodeWithHistory, HistoryManager *pHistoryManager) |
Set the HistoryManager responsible for a node. More... | |
void | removeHistoryManagerForUaNode (const UaNodeId &nodeToRemove) |
Remove HistoryManager handling for the node. | |
virtual IOManager * | getIOManager (UaNode *pUaNode, OpcUa_Int32 attributeId) const |
Get the responsible IOManager for the node and attribute combination. More... | |
virtual EventManagerUaNode * | getEventManagerUaNode () |
Get the EventManagerUaNode interface if implemented by the class implementing the NodeManagerConfig interface. More... | |
virtual void | setDefaultPermissions (NodeAccessInfo *pDefaultPermissions) |
Set the default permissions defined for this namespace. | |
Public Member Functions inherited from NodeManagerUaNode | |
NodeManagerUaNode (const UaString &sNamespaceUri, OpcUa_Int32 nHashTableSize) | |
Constructs a NodeManagerUaNode object. More... | |
virtual | ~NodeManagerUaNode () |
Destroys the NodeManagerUaNode object and all nodes managed by the NodeManager. More... | |
void | registerBrowseUaNodeCallback (BrowseUaNodeCallback *pBrowseUaNodeCallback) |
Registers a callback interface used to influence browse results. | |
void | setDefaultMethodManager (MethodManager *pMethodManager) |
Sets a default MethodManager; used if Object does not implement MethodManager. More... | |
void | setFallbackMethodManager (MethodManager *pMethodManager) |
Set a fallback MethodManager; used if Object and Method are not available as UaNode. More... | |
UaStatus | createNamespaceMetaData (bool addNamespaceFile, const UaString &sNamespaceFile, bool addPermissionProperties) |
Creates the namespace metadata object. More... | |
OpcUa::NamespaceMetadataType * | pNamespaceMetaData () const |
Get the namespace metadata object if it was created. More... | |
UaStatus | addUaNode (UaNode *pNewNode) |
Adds a new UaNode to the node management. More... | |
UaStatus | deleteUaNode (UaNode *pNode, OpcUa_Boolean deleteTargetReferences, OpcUa_Boolean deleteSourceReferences=OpcUa_False, OpcUa_Boolean deleteAllChildren=OpcUa_False) |
Removes a UaNode from the node management. More... | |
UaStatus | addNodeAndReference (UaReferenceLists *pSourceNode, UaReferenceLists *pNewNode, const UaNodeId &referenceTypeId) |
Adds the new node to the node management and creates a reference. More... | |
UaStatus | addNodeAndReference (const UaNodeId &sourceNode, UaReferenceLists *pNewNode, const UaNodeId &referenceTypeId) |
Adds the new node to the node management and creates a reference. More... | |
UaStatus | addUaReference (UaReferenceLists *pSourceNode, UaReferenceLists *pTargetNode, const UaNodeId &referenceTypeId) |
Adds a reference from source node to target node. More... | |
UaStatus | addUaReference (const UaNodeId &sourceId, const UaNodeId &targetId, const UaNodeId &referenceTypeId) |
Adds a reference from the source node to the target node. More... | |
UaStatus | deleteUaReference (UaReferenceLists *pSourceNode, UaReferenceLists *pTargetNode, const UaNodeId &referenceTypeId) |
Deletes the reference from the source node to the target node. More... | |
UaStatus | deleteUaReference (const UaNodeId &sourceId, const UaNodeId &targetId, const UaNodeId &referenceTypeId) |
Deletes the reference from the source node to the target node. More... | |
OpcUa_UInt16 | getNameSpaceIndex () const |
Get the namespace index of the NodeManager. More... | |
void | lockNodes () |
Lock access to nodes managed by the NodeManagerConfig. | |
void | unlockNodes () |
Unlock access to nodes managed by the NodeManagerConfig. | |
virtual UaStatus | shutDown () |
Shut down module. More... | |
virtual NodeManagerUaNode * | getNodeManagerUaNode () |
Gets the interface NodeManagerUaNode if available. More... | |
virtual UaStatus | createRoleOperations (const UaString &roleName, RoleTypeOperations **ppRoleTypeOperations) |
Create a new Role with the specified name and return a pointer to the new RoleTypeOperation instance. More... | |
virtual UaStatus | removeRoleOperations (RoleTypeOperations *pRoleTypeOperations) |
Remove a Role that was created by this NodeManager. More... | |
virtual UaStatus | connectStartingNode (const UaNodeId &, NodeManager *, OpcUa_Boolean, OpcUa_Boolean) |
Connect a starting node to the passed NodeManager This method is used to tell the NodeManager A (implements this method) that another NodeManager B has a Nodes with references to a Node in A but is not able to specify the list. More... | |
virtual UaStatus | disconnectStartingNode (const UaNodeId &, NodeManager *) |
Disconnect a starting node from the passed NodeManager. More... | |
virtual UaStatus | addCrossReference (const UaNodeId &, const UaNodeId &, OpcUa_Boolean, const UaNodeId &, NodeManager *) |
Creates a reference between nodes managed by different NodeManagers. More... | |
virtual UaStatus | deleteCrossReference (const UaNodeId &, const UaNodeId &, OpcUa_Boolean, const UaNodeId &, NodeManager *) |
Deletes a reference between nodes managed by different NodeManagers. More... | |
UaStatus | addTypeDictionary (const UaNodeId &nodeId, const UaString &sName, const UaString &sNamespaceUri=UaString()) |
Adds a DataTypeDictionary to the Binary DataTypeSystem. More... | |
UaStatus | setTypeDictionary (OpcUa::DataTypeDictionaryType *pTypeDictionary) |
Adds a DataTypeDictionary to the Binary DataTypeSystem without adding nodes. More... | |
UaStatus | addTypeDictionaryXml (const UaNodeId &nodeId, const UaString &sName, const UaString &sNamespaceUri=UaString()) |
Adds a DataTypeDictionary to the XML DataTypeSystem. More... | |
UaStatus | setXmlTypeDictionary (OpcUa::DataTypeDictionaryType *pTypeDictionary) |
Adds a DataTypeDictionary to the XML DataTypeSystem without adding nodes. More... | |
UaStatus | addStructuredType (const UaStructureDefinition &structure) |
Adds a new DataType node and all needed DataTypeEncoding and DataTypeDescription nodes. More... | |
UaStatus | addStructuredTypes (std::list< UaStructureDefinition > &structures) |
Adds a list of new DataType nodes and all needed DataTypeEncoding and DataTypeDescription nodes. More... | |
UaStatus | addStructuredTypeDefinition (const UaStructureDefinition &structure) |
Adds a structured DataType definition without adding nodes. More... | |
UaStatus | addEnumeratedType (const UaEnumDefinition &enumeration, const UaNodeId &enumerationPropertyId=UaNodeId()) |
Adds a new DataType node and the needed property. More... | |
UaStatus | addEnumeratedTypes (std::list< UaEnumDefinition > &enumerations) |
Adds a list of new DataType nodes and the needed property. More... | |
UaStatus | addOptionSetType (const UaOptionSetDefinition &optionSet, const UaNodeId &optionSetPropertyId=UaNodeId()) |
Adds a new DataType node and the needed property. More... | |
UaStatus | addOptionSetTypes (std::list< UaOptionSetDefinition > &optionSets) |
Adds a list of new DataType nodes and the needed property. More... | |
void | setDataTypeVersion (const UaString &sDataTypeVersion) |
Sets the version of the dictionaries. More... | |
UaString | dataTypeVersion () const |
Returns the version of the dictionaries. More... | |
void | findDefinitionsForStructureFields () |
Searches for UaEnumDefinitions and UaStructureDefinitions in UaStructureFields. | |
virtual UaDataTypeDictionary::DefinitionType | definitionType (const UaNodeId &dataTypeId) |
Returns the UaDataTypeDictionary::DefinitionType for a data type. More... | |
virtual UaEnumDefinition | enumDefinition (const UaNodeId &dataTypeId) |
Returns the UaEnumDefinition for a specified DataType. More... | |
virtual UaStructureDefinition | structureDefinition (const UaNodeId &dataTypeId) |
Returns the UaStructureDefinition for a specified DataType. More... | |
virtual UaOptionSetDefinition | optionSetDefinition (const UaNodeId &dataTypeId) |
Returns the UaOptionSetDefinition for the specified data type. More... | |
virtual UaStatus | exportNamespace (const ServiceContext &serviceContext, OpcUa::AddressSpaceFileType *pAddressSpaceFile) |
Provides a way to export the namespace from the Server address space to the XML file represented by the AddressSpaceFileType. More... | |
Public Member Functions inherited from NodeManager | |
NodeManager () | |
construction | |
virtual | ~NodeManager () |
destruction | |
Public Member Functions inherited from NodeManagerConfig | |
NodeManagerConfig () | |
construction | |
virtual | ~NodeManagerConfig () |
destruction | |
virtual NodeManagerNodeSetXml * | getNodeManagerNodeSetXml () |
Get the NodeManagerNodeSetXml interface if implemented by the class implementing the NodeManagerConfig interface. More... | |
Public Member Functions inherited from NodeManagerCrossReferences | |
NodeManagerCrossReferences () | |
construction | |
virtual | ~NodeManagerCrossReferences () |
destruction | |
Public Member Functions inherited from UaDataTypeDictionary | |
DefinitionType | definitionType (const UaVariant &vValue) |
Returns the UaDataTypeDictionary::DefinitionType of a variant. More... | |
DefinitionType | definitionType (const UaExtensionObject &vValue) |
Returns the UaDataTypeDictionary::DefinitionType of an ExtensionObject. More... | |
UaStructureDefinition | structureDefinition (const UaVariant &vValue) |
Returns the UaStructureDefinition of a variant. More... | |
UaStructureDefinition | structureDefinition (const UaExtensionObject &vValue) |
Returns the UaStructureDefinition of an ExtensionObject. More... | |
Public Member Functions inherited from EventManagerUaNode | |
EventManagerUaNode () | |
Construction. | |
virtual | ~EventManagerUaNode () |
Destruction. | |
virtual UaStatus | OnEnable (const ServiceContext &serviceContext, OpcUa::ConditionType *pCondition) |
Event handlers for Condition method Enable called from UA client. More... | |
virtual UaStatus | OnDisable (const ServiceContext &serviceContext, OpcUa::ConditionType *pCondition) |
Event handlers for Condition method Disable called from UA client. More... | |
virtual UaStatus | OnAddComment (const ServiceContext &serviceContext, OpcUa::ConditionType *pCondition, const UaByteString &EventId, const UaLocalizedText &Comment) |
Event handlers for Condition method AddComment called from UA client. More... | |
virtual UaStatus | OnRespond (const ServiceContext &serviceContext, OpcUa::ConditionType *pCondition, OpcUa_UInt32 selectedResponse) |
Event handlers for DialogConditionType method Respond called from UA client. More... | |
virtual UaStatus | OnAcknowledge (const ServiceContext &serviceContext, OpcUa::AcknowledgeableConditionType *pCondition, const UaByteString &EventId, const UaLocalizedText &Comment) |
Event handlers for AcknowledgeableConditionType method Acknowledge called from UA client. More... | |
virtual UaStatus | OnConfirm (const ServiceContext &serviceContext, OpcUa::AcknowledgeableConditionType *pCondition, const UaByteString &EventId, const UaLocalizedText &Comment) |
Event handlers for AcknowledgeableConditionType method Confirm called from UA client. More... | |
virtual UaStatus | OnOneShotShelve (const ServiceContext &serviceContext, OpcUa::AlarmConditionType *pCondition) |
Event handlers for AlarmConditionType method OneShotShelve called from UA client. More... | |
virtual UaStatus | OnTimedShelve (const ServiceContext &serviceContext, OpcUa::AlarmConditionType *pCondition, OpcUa_Double ShelvingTime) |
Event handlers for AlarmConditionType method TimedShelve called from UA client. More... | |
virtual UaStatus | OnUnshelve (const ServiceContext &serviceContext, OpcUa::AlarmConditionType *pCondition) |
Event handlers for AlarmConditionType method Unshelve called from UA client. More... | |
virtual UaStatus | OnPlaceInService (const ServiceContext &serviceContext, OpcUa::AlarmConditionType *pCondition) |
Event handlers for AlarmConditionType method PlaceInService called from UA client. More... | |
virtual UaStatus | OnRemoveFromService (const ServiceContext &serviceContext, OpcUa::AlarmConditionType *pCondition) |
Event handlers for AlarmConditionType method RemoveFromService called from UA client. More... | |
virtual UaStatus | OnReset (const ServiceContext &serviceContext, OpcUa::AlarmConditionType *pCondition) |
Event handlers for AlarmConditionType method Reset called from UA client. More... | |
virtual UaStatus | OnSilence (const ServiceContext &serviceContext, OpcUa::AlarmConditionType *pCondition) |
Event handlers for AlarmConditionType method Silence called from UA client. More... | |
virtual UaStatus | OnSuppress (const ServiceContext &serviceContext, OpcUa::AlarmConditionType *pCondition) |
Event handlers for AlarmConditionType method Suppress called from UA client. More... | |
virtual UaStatus | OnUnsuppress (const ServiceContext &serviceContext, OpcUa::AlarmConditionType *pCondition) |
Event handlers for AlarmConditionType method Unsuppress called from UA client. More... | |
Public Member Functions inherited from EventManagerBase | |
EventManagerBase () | |
Constructs an EventManagerBase object providing a base implementation of the EventManager interface. More... | |
virtual | ~EventManagerBase () |
Destroys the EventManagerBase object. More... | |
virtual void | shutDownEM () |
Shut down the event manager instance. More... | |
virtual void | fireEvent (UaEventData *pEventData) |
Fire an event with the passed event data to interested clients. More... | |
virtual bool | beforeSendEvent (UaEventData *pEventData, Session *pSession) |
Checks if the user is allowed to receive the event. More... | |
virtual void | registerEventNotifier (const UaNodeId &parentNotifier, const UaNodeId &newNotifier) |
Add an event notifier to the event notifier tree. More... | |
virtual void | registerEventSource (const UaNodeId &parentNotifier, const UaNodeId &newSource) |
Add an event source to the event notifier tree. More... | |
virtual void | unregisterEventNotifier (const UaNodeId ¬ifier) |
Removes an event notifier and all of its notifier children and event sources from the event notifier tree. More... | |
virtual OpcUa_Boolean | isNotifier (const UaNodeId &eventNotifier) const |
Checks whether the passed NodeId is the NodeId of an event notifier object. More... | |
virtual OpcUa_Boolean | isEventManagerRootNotifier (const UaNodeId ¬ifier) const |
Checks whether the passed NodeId is a root notifier for this EventManager. More... | |
virtual OpcUa_Boolean | inNotifierTree (const UaNodeId &eventNotifier, const UaNodeId &sourceNode, UaEventData *pEventData) const |
Checks whether the passed sourceNode matches the event notifier or is part of the event notifier tree below the eventNotifier. More... | |
virtual UaStatus | beginEventTransaction (EventManagerCallback *, const ServiceContext &, OpcUa_UInt32, OpcUa_UInt32, EventTransactionType, OpcUa_Handle &) |
Begins a transaction for modifying the list of event monitored items. More... | |
virtual UaStatus | beginStartMonitoring (OpcUa_Handle, OpcUa_UInt32, OpcUa_UInt32, EventCallback *, const EventMonitoringContextCreate &) |
Start monitoring of an event notifier. More... | |
virtual UaStatus | beginModifyMonitoring (OpcUa_Handle, OpcUa_UInt32, OpcUa_UInt32, OpcUa_UInt32, const EventMonitoringContext &) |
Notify EventManager about modifying monitoring parameters of an event notifier. More... | |
virtual UaStatus | beginStopMonitoring (OpcUa_Handle hEventManagerContext, OpcUa_UInt32, OpcUa_UInt32, OpcUa_UInt32) |
Notify EventManager about stopping monitoring of an event notifier. More... | |
virtual UaStatus | finishEventTransaction (OpcUa_Handle) |
Finishes the transaction for changing the list of event monitored items. More... | |
virtual UaStatus | beginConditionRefresh (const ServiceContext &serviceContext, OpcUa_UInt32 hEventItem, const UaByteString &, const UaByteString &) |
This method triggers a refresh for all conditions of interest in the EventManager. More... | |
virtual UaStatus | sendRefreshRequired (OpcUa_UInt32 hEventItem, const UaByteString &eventId) |
This method triggers a RefreshRequired event to the clients This event forces the clients to synchronize with the current Condition states by calling ConditionRefresh This method needs to be implemented in every EventManager that is part of a system that provides condition objects. More... | |
Public Member Functions inherited from EventManager | |
EventManager () | |
construction | |
virtual | ~EventManager () |
destruction | |
Public Member Functions inherited from IOManagerUaNode | |
IOManagerUaNode () | |
Creates an IOManagerUaNode instance initialized with default values. More... | |
virtual | ~IOManagerUaNode () |
Destroys the IOManagerUaNode object. More... | |
virtual UaStatus | startUpIO (ServerManager *pServerManager) |
Starts and initalizes the IOManager. More... | |
virtual UaStatus | shutDownIO () |
Shut down IOManager. | |
virtual OpcUa_Boolean | beforeSetAttributeValue (Session *pSession, UaNode *pNode, OpcUa_Int32 attributeId, const UaDataValue &dataValue, OpcUa_Boolean &checkWriteMask) |
Event that is called before the value of an attribute of a Node is set. More... | |
virtual void | afterSetAttributeValue (Session *pSession, UaNode *pNode, OpcUa_Int32 attributeId, const UaDataValue &dataValue) |
Event that is called after the value of an attribute of a Node was updated. More... | |
virtual void | afterGetAttributeValue (Session *pSession, UaNode *pNode, OpcUa_Int32 attributeId, UaDataValue &dataValue) |
Event that is called after the value of an attribute of a Node was read from the node. More... | |
virtual UaStatus | beforeMonitorAttributeValue (Session *pSession, UaNode *pNode, OpcUa_Int32 attributeId, OpcUa_Boolean &returnErrorInCreate) |
Event that is called before a data monitored item is created. More... | |
virtual void | variableCacheMonitoringChanged (UaVariableCache *pVariable, TransactionType transactionType) |
Event that is called after the monitoring of a cache variable was changed. More... | |
void | setTimestampWriteSupport (OpcUa_Boolean isSupported) |
Method used to enable or disable support for writing timestamp. More... | |
void | setStatusWriteSupport (OpcUa_Boolean isSupported) |
Method used to enable or disable support for writing status. More... | |
UaStatus | beginTransaction (IOManagerCallback *, const ServiceContext &, OpcUa_UInt32, OpcUa_UInt32, OpcUa_Double, OpcUa_TimestampsToReturn, TransactionType, OpcUa_Handle &) |
Begin a IOManager transaction. More... | |
UaStatus | beginStartMonitoring (OpcUa_Handle, OpcUa_UInt32, IOVariableCallback *, VariableHandle *, MonitoringContext &) |
Begin start monitoring of an item. More... | |
UaStatus | beginModifyMonitoring (OpcUa_Handle, OpcUa_UInt32, OpcUa_UInt32, MonitoringContext &) |
Begin modify monitoring of an item. More... | |
UaStatus | beginStopMonitoring (OpcUa_Handle, OpcUa_UInt32, OpcUa_UInt32) |
Begin stop monitoring of an item. More... | |
UaStatus | beginRead (OpcUa_Handle, OpcUa_UInt32, VariableHandle *, OpcUa_ReadValueId *) |
Begin reading an attribute value of a node. More... | |
UaStatus | beginWrite (OpcUa_Handle, OpcUa_UInt32, VariableHandle *, OpcUa_WriteValue *) |
Begin writing an attribute value for a node. More... | |
UaStatus | finishTransaction (OpcUa_Handle) |
Finish a transaction. More... | |
Public Member Functions inherited from IOManager | |
IOManager () | |
Construction. | |
virtual | ~IOManager () |
Destruction. | |
Public Member Functions inherited from NodeManagerList | |
NodeManagerList () | |
construction | |
virtual | ~NodeManagerList () |
destruction | |
Static Public Member Functions | |
static NodeManagerRoot * | CreateRootNodeManager () |
Creates the NodeManagerRoot or returns a pointer to the one and only instance of this class (singleton) | |
static OpcUa_Int16 | getTypeNamespace () |
Get the type namespace index. More... | |
Static Public Member Functions inherited from EventManagerBase | |
static void | buildEventId (const UaByteString &userEventId, UaByteString &clientEventId) |
Build a unique EventId that can be send to the client and include a user specific part if provided. More... | |
static void | getUserEventId (const UaByteString &clientEventId, UaByteString &userEventId) |
Get the user part of a unique EventId that was sent to the client. More... | |
static void | registerEventType (const UaNodeId &superType, const UaNodeId &newType) |
Adds a custom event type to the event type tree. More... | |
static OpcUa_UInt32 | registerEventField (const UaQualifiedName &fieldName) |
Add a custom event field to assign a unique index for selection of the field of the custom type. More... | |
static OpcUa_UInt32 | registerEventField (const UaQualifiedNameArray &path) |
Add a custom event field to assign a unique index for selection of the field of the custom type. More... | |
static OpcUa_UInt32 | registerEventField (const UaString &fieldName) |
Add a custom event field to assign a unique index for selection of the field of the custom type. More... | |
static void | unregisterEventType (const UaNodeId &typeToRemove) |
Removes a custom event type from the event type tree. More... | |
static void | unregisterEventField (OpcUa_UInt32 fieldIndex) |
Removes a custom event field with the unique index assigned in EventManagerBase::registerEventField(). More... | |
static OpcUa_UInt32 | getFieldIndex (const OpcUa_SimpleAttributeOperand &selectClause, OpcUa_StatusCode &fieldResult) |
Internal SDK method to get the index of a registered event field. More... | |
static OpcUa_Boolean | isOfType (const UaNodeId &eventType, const UaNodeId &typeToEvaluate) |
Internal SDK method used to evaluate the event type with the event filter. More... | |
static void | clearStaticMembers () |
Internal SDK method to clean up static members. More... | |
Additional Inherited Members | |
Public Types inherited from UaDataTypeDictionary | |
enum | DefinitionType |
Enumeration that indicates whether a UaEnumDefinition or a UaStructureDefinition is available. | |
Public Types inherited from EventManager | |
enum | EventTransactionType { MONITOR_BEGIN, MONITOR_MODIFY, MONITOR_STOP, INVALID } |
EventTransactionType enumeration. More... | |
Public Types inherited from IOManager | |
enum | TransactionType { TransactionRead, TransactionWrite, TransactionMonitorBegin, TransactionMonitorModify, TransactionMonitorStop, TransactionInvalid } |
TransactionType enumeration. More... | |
Protected Member Functions inherited from NodeManagerUaNode | |
UaStatusCode | clearAllNodes () |
Clears all nodes in the NodeManager and all references to other NodeManagers. More... | |
UaNode * | findNode (const UaNodeId &nodeId) const |
Find a UaNode by UaNodeId. More... | |
UaNode * | findNode (const OpcUa_NodeId *pNodeId) const |
Find a UaNode by OpcUa_NodeId. More... | |
UaString | getNameSpaceUri () |
Gets the namespace URI of this NodeManager. More... | |
OpcUa_Boolean | isStarted () |
Checks whether the NodeManager is started or not. More... | |
Protected Attributes inherited from NodeManagerUaNode | |
ServerManager * | m_pServerManager |
Central server manager object. | |
NodeManagerCrossReferences * | m_pNodeManagerCrossReferences0 |
NodeManagerCrossReferences interface of NodeManager root (namespace 0). | |
NodeManagerList * | m_pNodeManagerList |
NodeManagerList interface of NodeManager root (namespace 0). | |
UaString | m_defaultLocaleId |
Default LocaleId for the NodeManager. | |
OpcUa_Boolean | m_isStarted |
Flag indicating whether the NodeManager was started. | |
UaMutex | m_mutexNodes |
This mutex is used to synchronize access to the nodes and references in this NodeManager. | |
OpcUa_UInt16 | m_nNamespaceIndex |
Namespace index of this NodeManager. | |
UaString | m_sNamespaceUri |
Namespace URI of this NodeManager. | |
HashTable * | m_pTable |
Hash table for the nodes managed by this NodeManager. | |
UaMutex | m_mutexAliasTable |
Mutex used to protect access to the cross NodeManager alias nodes. | |
UaObjectPointerArray< UaNodeId > | m_crossNodeManagerAliasNodes |
List of cross NodeManager alias nodes. | |
BrowseUaNodeCallback * | m_pBrowseUaNodeCallback |
Callback interface to influence browse results. | |
MethodManager * | m_pDefaultMethodManager |
Method manager called if object and method were found but object does not implement MethodManager. | |
MethodManager * | m_pFallbackMethodManager |
Method manager called with NodeIds if object and method were not found, like for conditions without nodes in address space. | |
TypeDictionaries * | m_pTypeDictionaries |
Used for managing custom Structured DataTypes and Enumerated DataTypes that are added during runtime. More... | |
Main NodeManager responsible for all OPC UA defined nodes.
This NodeManager manages all OPC UA defined nodes with the namespace URI http://opcfoundation.org/UA/ and the predefined namespace index 0. It implements also the interface NodeManagerList used to manage all other NodeManagers. Therefore it is the root for all node access and forward requests to other NodeManagers based on the namespace index in the NodeId used for the node access.
The class is a singleton implementation and a pointer to the one and only instance of this class can be requested with the static method NodeManagerRoot::CreateRootNodeManager(). The interface of this class can be used to access all other important interfaces of the OPC UA server like ServerManager or UaObjectServer.
|
virtual |
Destroys the NodeManagerRoot object.
|
virtual |
Add node to the NodeManager.
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. |
parentNodeId | the parentNodeId of the current Node. |
referenceTypeId | Type of the reference to create from the source node to the new node. |
requestedNewNodeId | the new NodeId of the requested Node. |
browseName | the actual browse name of the Node. |
nodeClass | the actual node class of the Node. |
nodeAttributes | all attributes of the current Node. |
typeDefinition | the Definition of the actual Node. |
addedNodeId | the added NodeId. |
Reimplemented from NodeManager.
|
virtual |
Add a NodeManager to the list.
pNodeManager | Pointer to NodeManager that manages references from the starting node to nodes in the that NodeManager. |
sNamespaceUri | Namespace URI used for the NodeManager. |
assignedNamespaceIndex | Assigned namespace index of the added NodeManager. |
Implements NodeManagerList.
|
virtual |
Add reference to the NodeManager.
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. |
sourceNodeId | the source NodeId of the actual Node. |
referenceTypeId | Type of the reference to create from the source node to the new node. |
isForward | indicates if the Node is forward referenced or not. |
targetNodeId | the NodeId of the target Node. |
targetNodeClass | the NodeClass of the target Node. |
Reimplemented from NodeManager.
|
virtual |
Finish start up in derived class after starting up base class.
Implements NodeManagerUaNode.
|
virtual |
Start shut down in derived class before shutting down base class.
Implements NodeManagerUaNode.
UaStatus NodeManagerRoot::browse | ( | const UaNodeId & | startingNode, |
const UaNodeId & | referenceTypeFilter, | ||
ContinuationPointWrapper & | continuationPoint, | ||
UaReferenceDescriptions & | references | ||
) |
Browse function for internal use for forward browsing.
This method provides a simplified browse function for internal use. It uses the normal NodeManager::browse but hides the handling that is necessary for the remote access from a client.
This version of the simplified browse is browsing forward and returns all node classes.
[in] | startingNode | Starting node for the browse call |
[in] | referenceTypeFilter | Reference type filter to return only nodes referenced from the starting node with this reference type or a subtype |
[in,out] | continuationPoint | Continuation point for the browse. Indicates if more results are available |
[out] | references | List of browse results for the browsed node |
UaStatus NodeManagerRoot::browse | ( | const UaNodeId & | startingNode, |
OpcUa_Boolean | isInverse, | ||
const UaNodeId & | referenceTypeFilter, | ||
OpcUa_UInt32 | nodeClassMask, | ||
ContinuationPointWrapper & | continuationPoint, | ||
UaReferenceDescriptions & | references | ||
) |
Browse function for internal use.
This method provides a simplified browse function for internal use. It uses the normal NodeManager::browse but hides the handling that is necessary for the remote access from a client.
[in] | startingNode | Starting node for the browse call |
[in] | isInverse | Flag indicating if the browse is inverse (True) or forward (False) |
[in] | referenceTypeFilter | Reference type filter to return only nodes referenced from the starting node with this reference type or a subtype |
[in] | nodeClassMask | Node class filter mask identifing the node classes to include in the browse result Bit mask containing the following options: OpcUa_NodeClass_Object = 1 OpcUa_NodeClass_Variable = 2 OpcUa_NodeClass_Method = 4 OpcUa_NodeClass_ObjectType = 8 OpcUa_NodeClass_VariableType = 16 OpcUa_NodeClass_ReferenceType = 32 OpcUa_NodeClass_DataType = 64 OpcUa_NodeClass_View = 128 If set to zero, all node classes are returned. |
[in,out] | continuationPoint | Continuation point for the browse. Indicates if more results are available |
[out] | references | List of browse results for the browsed node |
UaStatus NodeManagerRoot::browse | ( | Session * | pSession, |
const UaNodeId & | startingNode, | ||
OpcUa_Boolean | isInverse, | ||
const UaNodeId & | referenceTypeFilter, | ||
OpcUa_UInt32 | nodeClassMask, | ||
ContinuationPointWrapper & | continuationPoint, | ||
UaReferenceDescriptions & | references | ||
) |
Browse function for internal use.
This method provides a simplified browse function for internal use. It uses the normal NodeManager::browse but hides the handling that is necessary for the remote access from a client.
[in] | pSession | Session context for the browse call |
[in] | startingNode | Starting node for the browse call |
[in] | isInverse | Flag indicating if the browse is inverse (True) or forward (False) |
[in] | referenceTypeFilter | Reference type filter to return only nodes referenced from the starting node with this reference type or a subtype |
[in] | nodeClassMask | Node class filter mask identifing the node classes to include in the browse result Bit mask containing the following options: OpcUa_NodeClass_Object = 1 OpcUa_NodeClass_Variable = 2 OpcUa_NodeClass_Method = 4 OpcUa_NodeClass_ObjectType = 8 OpcUa_NodeClass_VariableType = 16 OpcUa_NodeClass_ReferenceType = 32 OpcUa_NodeClass_DataType = 64 OpcUa_NodeClass_View = 128 If set to zero, all node classes are returned. |
[in,out] | continuationPoint | Continuation point for the browse. Indicates if more results are available |
[out] | references | List of browse results for the browsed node |
UaStatus NodeManagerRoot::browse | ( | Session * | pSession, |
const UaNodeId & | startingNode, | ||
OpcUa_BrowseDirection | browseDirection, | ||
const UaNodeId & | referenceTypeFilter, | ||
OpcUa_UInt32 | nodeClassMask, | ||
ContinuationPointWrapper & | continuationPoint, | ||
UaReferenceDescriptions & | references | ||
) |
Browse function for internal use.
This method provides a simplified browse function for internal use. It uses the normal NodeManager::browse but hides the handling that is necessary for the remote access from a client.
[in] | pSession | Session context for the browse call |
[in] | startingNode | Starting node for the browse call |
[in] | browseDirection | Browse direction with the options Forward, Inverse and Both |
[in] | referenceTypeFilter | Reference type filter to return only nodes referenced from the starting node with this reference type or a subtype |
[in] | nodeClassMask | Node class filter mask identifing the node classes to include in the browse result Bit mask containing the following options: OpcUa_NodeClass_Object = 1 OpcUa_NodeClass_Variable = 2 OpcUa_NodeClass_Method = 4 OpcUa_NodeClass_ObjectType = 8 OpcUa_NodeClass_VariableType = 16 OpcUa_NodeClass_ReferenceType = 32 OpcUa_NodeClass_DataType = 64 OpcUa_NodeClass_View = 128 If set to zero, all node classes are returned. |
[in,out] | continuationPoint | Continuation point for the browse. Indicates if more results are available |
[out] | references | List of browse results for the browsed node |
|
virtual |
Discover the references of a specified node of a view.
This method is used to return a list of references and target nodes for the passed node to browse for the services Browse and BrowseNext.
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. |
browseContext | Browse context for the first browse or the following browse with continuation point. |
references | Array of ReferenceDescription results for the browsed node. |
Reimplemented from NodeManagerUaNode.
void NodeManagerRoot::changeServerState | ( | OpcUa_ServerState | newState | ) |
Update the server manager about the change of the server state.
newState | New server status. |
void NodeManagerRoot::changeServiceLevel | ( | OpcUa_Byte | serviceLevel, |
OpcUa_Byte | changeMask | ||
) |
Update the ServiceLevel property of the Server object.
serviceLevel | The new service level to set. |
changeMask | A mask indicating which bits of the service level should be set. If a bit is set to 1, the according bit of serviceLevel is set in the server's serviceLevel. If a bit is set to 0, the according bit in the server's serviceLevel will remain untouched. |
|
virtual |
Delete node from the NodeManager.
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. |
nodeId | the Id of the current Node. |
deleteTargetReference | Indicates if the inverse references in the target nodes must be deleted |
Reimplemented from NodeManager.
|
virtual |
Delete reference from the NodeManager.
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. |
sourceNodeId | the source NodeId of the actual Node. |
referenceTypeId | Type of the reference to create from the source node to the new node. |
isForward | indicates if the Node is forward referenced or not. |
targetNodeId | the NodeId of the target Node. |
deleteBidirectional | TRUE if delete bidirectional FALSE if not. |
Reimplemented from NodeManager.
OpcUa_StatusCode NodeManagerRoot::getComAliasFromIndex | ( | OpcUa_UInt16 | namespaceIndex, |
UaString & | sComAlias | ||
) | const |
Returns a COM alias for a namespace index.
namespaceIndex | Namespace index to convert to the namespace URI. |
sComAlias | COM alias for the passed namespace index. |
|
virtual |
Get the default access permissions for a namespace.
namespaceIndex | Namespace index of the namespace to get the default NodeAccessInfo. |
Implements NodeManagerList.
|
virtual |
Get a list of EventManager interfaces for an event notifier.
pSession | Interface pointer of the new Session. The session was created by the ServerConfig object in the Method createSession. This vendor specific implementation can create a derived Session class with vendor specific information. |
pNodeId | NodeId of the requested node |
eventFilter | Event filter defined by the client |
eventManagers | a list of EventManager interfaces for an event notifier. |
Reimplemented from NodeManagerBase.
|
virtual |
Get the history variable handle for the passed node Id.
pSession | Interface pointer of the new Session. The session was created by the ServerConfig object in the Method createSession. This vendor specific implementation can create a derived Session class with vendor specific information. |
serviceType | Service type enumerator |
pNodeId | NodeId of the requested Node. |
result | the result of the current Operation. |
Reimplemented from NodeManagerBase.
UaStatus NodeManagerRoot::getListOfSuperTypes | ( | const UaNodeId & | startingNode, |
UaNodeIdArray & | superTypeList | ||
) |
Returns the list of super types for a passed OPC UA type node.
[in] | startingNode | Starting type node for the type tree resolution |
[out] | superTypeList | List of super types for the passed type node |
|
virtual |
Get the method handle for the passed node Id.
pSession | Interface pointer of the new Session. The session was created by the ServerConfig object in the Method createSession. This vendor specific implementation can create a derived Session class with vendor specific information. |
pObjectNodeId | the NodeId of the actual Object. |
pMethodNodeId | the NodeId of the actual Method. |
result | the result of the current Operation. |
Reimplemented from NodeManagerUaNode.
OpcUa_StatusCode NodeManagerRoot::getNamespaceIndexFromComAlias | ( | const UaString & | comAlias, |
OpcUa_UInt16 & | namespaceIndex | ||
) |
Returns a namespace index for a COM alias.
comAlias | COM alias to convert to the namespace index. |
namespaceIndex | The Namespace index for the passed namespace URI. |
OpcUa_StatusCode NodeManagerRoot::getNamespaceIndexFromUri | ( | const UaString & | sNamespaceUri, |
OpcUa_UInt16 & | namespaceIndex | ||
) |
Returns a namespace index for a namespace URI.
sNamespaceUri | Namespace URI to convert to the namespace index. |
namespaceIndex | The Namespace index for the passed namespace URI. |
OpcUa_StatusCode NodeManagerRoot::getNamespaceUriFromIndex | ( | OpcUa_UInt16 | namespaceIndex, |
UaString & | sNamespaceUri | ||
) | const |
Returns a namespace URI for a namespace index.
namespaceIndex | Namespace index to convert to the namespace URI. |
sNamespaceUri | Namespace URI for the passed namespace index. |
Get a UaNode pointer for a requested nodeId.
If a UaNode object is found for the nodeId the reference count of the node gets incremented and a pointer to the node ist returned. The caller must release the reference when the node is not longer needed.
nodeId | NodeId of the node to return. |
Reimplemented from NodeManagerUaNode.
|
virtual |
Get the NodeManager by namespace index.
NsIdx | the Namespace index of the current Node. |
Implements NodeManagerList.
|
virtual |
Get the interface NodeManagerConfig if available.
Reimplemented from NodeManagerUaNode.
|
virtual |
Get the interface NodeManagerCrossReferences if available.
Reimplemented from NodeManagerUaNode.
|
inlinestatic |
Get the type namespace index.
|
virtual |
Get the variable handle for the passed node Id.
pSession | Interface pointer of the new Session. The session was created by the ServerConfig object in the Method createSession. This vendor specific implementation can create a derived Session class with vendor specific information. |
serviceType | Service type enumerator |
pNodeId | NodeId of the requested Node. |
AttributeId | AttributeId of the requested node |
Reimplemented from NodeManagerUaNode.
|
inline |
Get the server manager.
|
inline |
Get the server object.
|
virtual |
Reads the value attributes for a list of UaVariables.
arrUaVariables | An array of UaVariable interface pointers used to indicate which variables should be read. The implementation of the interface needs to have the necessary information to access the data from the external source. |
arrDataValues | An array of OpcUa_DataValue structures used to return the values to read. |
Reimplemented from IOManagerUaNode.
|
virtual |
Remove a NodeManager from the list.
namespaceIndex | Assigned namespace index of the added NodeManager. |
Implements NodeManagerList.
Notifies the node manager that a session was activated.
pSession | Interface pointer of the activated Session. The session was created by the ServerConfig object in the Method createSession. This vendor specific implementation can create a derived Session class with vendor specific information. |
Reimplemented from NodeManager.
Notifies the node manager that a session was closed.
pSession | Interface pointer of the closed Session. The session was created by the ServerConfig object in the Method createSession. This vendor specific implementation can create a derived Session class with vendor specific information. |
Reimplemented from NodeManager.
Notifies the node manager that a new session was opened.
pSession | Interface pointer of the new Session. The session was created by the ServerConfig object in the Method createSession. This vendor specific implementation can create a derived Session class with vendor specific information. |
Reimplemented from NodeManager.
void NodeManagerRoot::startServerShutDown | ( | OpcUa_Int32 | secondsTillShutdown, |
const UaLocalizedText & | shutdownReason | ||
) |
Inform the node manager about the shutdown of the server.
[in] | secondsTillShutdown | Seconds till shutdown of the server |
[in] | shutdownReason | Reason for the shutdown |
void NodeManagerRoot::startServerShutDown | ( | OpcUa_Int32 | secondsTillShutdown, |
const UaLocalizedTextArray & | shutdownReason | ||
) |
Inform the node manager about the shutdown of the server.
This is an overload to provide the shutdown reason as a list of localized text in different languages
[in] | secondsTillShutdown | Seconds till shutdown of the server |
[in] | shutdownReason | Reason for the shutdown in different languages |
|
virtual |
Start up NodeManager.
pServerManager | Interface to the central ServerManager object. This interface pointer should be stored in the NodeManager instance to have access to core module objects like the root NodeManager or the ServerConfig |
Reimplemented from NodeManagerBase.
|
virtual |
Translates a relative browse path to a node id.
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. |
startingNode | Starting node from where the relative path is defined. |
relativePath | Relative path from the starting node to the searched node. |
browsePathTargets | all needed targets of the browse path. |
Reimplemented from NodeManagerUaNode.
|
virtual |
Writes the value attributes for a list of UaVariables.
arrUaVariables | An array of UaVariable interface pointers used to indicate which variables should be read. The implementation of the interface needs to have the necessary information to access the data from the external source. |
arrpDataValues | Array of pointers to OpcUa_DataValue structures containing the data to write. |
arrStatusCodes | An array of OpcUa_StatusCode values used to indicate if the write succeeds on a single variable base. |
Reimplemented from IOManagerUaNode.