UA Server SDK C++ Bundle
1.4.0.258
|
Class providing a simplified base NodeManager, IOManager and optional EventManager implementation for most use cases. More...
#include <nodemanagerbase.h>
Inherits NodeManagerUaNode, EventManagerUaNode, and IOManagerUaNode.
Inherited by NodeManagerNodeSetXml, and NodeManagerNS1.
Public Member Functions | |
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... | |
virtual UaStatus | startUp (ServerManager *) |
Start up NodeManager. More... | |
virtual UaStatus | getEventManagers (Session *pSession, OpcUa_NodeId *pNodeId, OpcUa_EventFilter *eventFilter, EventManagerArray &eventManagers) const |
Get a list of EventManager interfaces for an event notifier. More... | |
virtual HistoryVariableHandle * | getHistoryVariableHandle (Session *pSession, HistoryVariableHandle::ServiceType serviceType, OpcUa_NodeId *pNodeId, UaStatus &result) const |
Get the history variable handle for the passed node Id. More... | |
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 IOManagerUaNode * | getIOManagerUaNode () |
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 node manager. | |
virtual UaStatus | afterStartUp ()=0 |
This method needs to be implemented by the derived class and is called to finish the start up of the NodeManager. More... | |
virtual UaStatus | beforeShutDown ()=0 |
This method needs to be implemented by the derived class and is called to start the shut down of the NodeManager. More... | |
virtual UaNode * | getNode (const UaNodeId &nodeId) |
Get a UaNode pointer for a requested nodeId. More... | |
void | registerBrowseUaNodeCallback (BrowseUaNodeCallback *pBrowseUaNodeCallback) |
Registers a callback interface used to influence browse results. | |
void | setDefaultMethodManager (MethodManager *pMethodManager) |
Set 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 | addUaNode (UaNode *pNewNode) |
Add 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) |
Remove 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 reference. More... | |
UaStatus | addNodeAndReference (const UaNodeId &sourceNode, UaReferenceLists *pNewNode, const UaNodeId &referenceTypeId) |
Adds the new node to the node management and creates 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 source node to target node. More... | |
UaStatus | deleteUaReference (UaReferenceLists *pSourceNode, UaReferenceLists *pTargetNode, const UaNodeId &referenceTypeId) |
Delete the reference from source node to target node. More... | |
UaStatus | deleteUaReference (const UaNodeId &sourceId, const UaNodeId &targetId, const UaNodeId &referenceTypeId) |
Delete the reference from source node to target node. More... | |
OpcUa_UInt16 | getNameSpaceIndex () const |
Get the namespace index of the node manager. More... | |
virtual UaStatus | shutDown () |
Shut down NodeManager. More... | |
virtual UaStatus | browse (const ServiceContext &, BrowseContext &, UaReferenceDescriptions &) |
Discover the references of a specified node of a view. More... | |
virtual UaStatus | translateBrowsePathToNodeId (const ServiceContext &, const UaNodeId &, UaRelativePath &, UaBrowsePathTargets &) |
Translates a relative browse path to a node id. More... | |
virtual VariableHandle * | getVariableHandle (Session *, VariableHandle::ServiceType, OpcUa_NodeId *, OpcUa_Int32) const |
Get the variable handle for the passed node Id. More... | |
virtual MethodHandle * | getMethodHandle (Session *, OpcUa_NodeId *, OpcUa_NodeId *, UaStatus &) const |
Get the method handle for the passed node Id. More... | |
virtual NodeManagerCrossReferences * | getNodeManagerCrossReferences () |
Get the interface NodeManagerCrossReferences if available. More... | |
virtual NodeManagerConfig * | getNodeManagerConfig () |
Get the interface NodeManagerConfig if available. More... | |
virtual NodeManagerUaNode * | getNodeManagerUaNode () |
Get the interface NodeManagerUaNode if available. 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 *) |
Create a reference between nodes managed by different node managers. More... | |
virtual UaStatus | deleteCrossReference (const UaNodeId &, const UaNodeId &, OpcUa_Boolean, const UaNodeId &, NodeManager *) |
Delete a reference between nodes managed by different node managers. More... | |
UaStatus | addTypeDictionary (const UaNodeId &nodeId, const UaString &sName) |
Adds a DataTypeDictionary to the Binary DataTypeSystem. More... | |
UaStatus | addTypeDictionaryXml (const UaNodeId &nodeId, const UaString &sName) |
UaStatus | addStructuredType (const UaStructureDefinition &structure) |
Adds a new DataType node and all needed DataTypeEncoding and DataTypeDescription nodes. More... | |
UaStatus | addEnumeratedType (const UaEnumDefinition &enumeration, const UaNodeId &enumerationPropertyId=UaNodeId()) |
Adds a new DataType node 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... | |
virtual UaDataTypeDictionary::DefinitionType | definitionType (const UaNodeId &dataTypeId) |
virtual UaEnumDefinition | enumDefinition (const UaNodeId &dataTypeId) |
virtual UaStructureDefinition | structureDefinition (const UaNodeId &dataTypeId) |
Public Member Functions inherited from NodeManager | |
NodeManager () | |
construction | |
virtual | ~NodeManager () |
destruction | |
virtual UaStatus | sessionOpened (Session *) |
Notifies the node manager that a new session was opened. More... | |
virtual UaStatus | sessionActivated (Session *) |
Notifies the node manager that a session was activated. More... | |
virtual UaStatus | sessionClosed (Session *) |
Notifies the node manager that a session was closed. More... | |
virtual 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... | |
virtual 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... | |
virtual UaStatus | deleteNode (const ServiceContext &serviceContext, const UaNodeId &nodeId, OpcUa_Boolean deleteTargetReference) |
Delete node from the NodeManager. More... | |
virtual 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... | |
Public Member Functions inherited from NodeManagerConfig | |
NodeManagerConfig () | |
construction | |
virtual | ~NodeManagerConfig () |
destruction | |
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... | |
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. 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 () | |
construction | |
virtual | ~IOManagerUaNode () |
destruction | |
virtual UaStatus | startUpIO (ServerManager *pServerManager) |
Start up IOManager. More... | |
virtual UaStatus | shutDownIO () |
Shut down IOManager. More... | |
virtual UaStatus | readValues (const UaVariableArray &arrUaVariables, UaDataValueArray &arrDataValues) |
Reads the value attributes for a list of UaVariables. More... | |
virtual UaStatus | writeValues (const UaVariableArray &arrUaVariables, const PDataValueArray &arrpDataValues, UaStatusCodeArray &arrStatusCodes) |
Writes the value attributes for a list of UaVariables. More... | |
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... | |
void | beforeRemoveMonitoredVariableCache (UaVariableCache *pUaVariableCache) |
void | afterAddVariableCache (UaVariableCache *pUaVariableCache) |
Public Member Functions inherited from IOManager | |
IOManager () | |
Construction. | |
virtual | ~IOManager () |
Destruction. | |
Additional Inherited Members | |
Public Types inherited from UaDataTypeDictionary | |
enum | DefinitionType { DefinitionType_None = 0, DefinitionType_Structure, DefinitionType_Enum } |
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... | |
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... | |
Protected Member Functions inherited from NodeManagerUaNode | |
UaStatusCode | createNodeManagerAliasNode (const UaNodeId &sourceNodeId) |
UaStatusCode | clearAllNodes () |
Clear all nodes in the node manager and all references to other node managers. More... | |
UaNode * | findNode (const UaNodeId &id) const |
Find a UaNode by UaNodeId. More... | |
UaNode * | findNode (const OpcUa_NodeId *pId) const |
Find a UaNode by OpcUa_NodeId. More... | |
UaString | getNameSpaceUri () |
Get the name space URI of this node manager. More... | |
OpcUa_Boolean | isStarted () |
Check if 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 node manager root (name space 0). | |
NodeManagerList * | m_pNodeManagerList |
NodeManagerList interface of node manager root (name space 0). | |
UaString | m_defaultLocaleId |
Default LocaleId for the node manager. | |
OpcUa_Boolean | m_isStarted |
Flag indicating if the node manager was started. | |
OpcUa_Boolean | m_isStartUpCompleted |
UaMutex | m_mutexNodes |
This mutex is used to synconize access to the nodes and references in this node manager. | |
OpcUa_UInt16 | m_nNamespaceIndex |
Name space index of this node manager. | |
UaString | m_sNamespaceUri |
Name space URI of this node manager. | |
HashTable * | m_pTable |
Hash table for the nodes managed by this node manager. | |
UaMutex | m_mutexAliasTable |
Mutex used to protect access to the hash table. | |
UaObjectPointerArray< UaNodeId > | m_crossNodeManagerAliasNodes |
List of cross node manager 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 |
Protected Attributes inherited from EventManagerBase | |
HandleManager< EventItem > | m_EventItemsHandleManager |
UaMutex | m_mutex |
EventNotifierTreeElement * | m_pEventNotifierTree |
std::map< UaNodeId, EventNotifierTreeElement * > | m_notifierTreeEntries |
std::map< UaNodeId, ConditionBranchList * > | m_activeConditions |
OpcUa_Boolean | m_isShutDown |
Static Protected Attributes inherited from EventManagerBase | |
static UaMutex * | s_pMutex = NULL |
static OpcUa_UInt32 | s_maxFieldIndex = 0 |
static std::map< UaString, OpcUa_UInt32 > | s_eventFields |
static EventTypeTreeElement * | s_pEventTypeTree = NULL |
static std::map< UaNodeId, EventTypeTreeElement * > | s_eventTreeEntries |
Class providing a simplified base NodeManager, IOManager and optional EventManager implementation for most use cases.
NodeManagerBase::NodeManagerBase | ( | const UaString & | sNamespaceUri, |
OpcUa_Boolean | firesEvents = OpcUa_False , |
||
OpcUa_Int32 | nHashTableSize = 10007 |
||
) |
Constructs a NodeManagerUaNode object.
[in] | sNamespaceUri | Name space URI for the name space managed by this node manager instance |
[in] | firesEvents | Flag indicating if the nodes in this node manager do fire events. The default value is OpcUa_False. |
[in] | nHashTableSize | Size of the hash table. The default value is 10.007. The size can be smaller than the total number of nodes managed by the node manager but it is better for the performance to avoid collisions with a large size. Prefered sizes are 1.009, 10.007, 100.003, 1.000.003, 10.000.019 |
|
virtual |
Get a list of EventManager interfaces for an event notifier.
This method is used to get a list of EventManager interfaces for the passed object node which must be an event notifier. Since the event notifier can be the root for an event hierarchy with different event sources and different EventManagers. The NodeManager can filter based on the passed event filter. But this can be done also later by the EventManager.
pSession | Interface to the Session context for the method call |
pNodeId | NodeId of the requested event notifier node. The pointer to the NodeId is only valid during this call. |
eventFilter | Event filter defined by the client. The pointer to the event filter is only valid during this call. The event filter is also passed to EventManager::beginStartMonitoring() in the EventMonitoringContextCreate. |
eventManagers | The list of EventManager interfaces for the passed event notifier. This list is returned by the NodeManager. |
Reimplemented from NodeManager.
|
virtual |
Get the EventManagerUaNode interface if implemented by the class implementing the NodeManagerConfig interface.
The implementation in this class returns a NULL pointer. Classes derived from NodeManagerConfig and EventManagerUaNode must overwrite this method and must return the EventManagerUaNode interface. This connection is used to provide the EventManagerUaNode interface to UaCondition classes keeping a NodeManagerConfig interface but needing also the EventManagerUaNode Interface for sending events.
Reimplemented from NodeManagerConfig.
|
virtual |
Get the history variable handle for the passed node Id.
This method is used to get the HistoryVariableHandle for a node used to access the related HistoryManager in the services ReadHistory and UpdateHistory.
pSession | Interface to the Session context for the method call |
serviceType | Service type enumerator |
pNodeId | NodeId of the requested node. The pointer to the NodeId is only valid during this call. |
result | the result of the current Operation. |
Reimplemented from NodeManager.
Reimplemented in NodeManagerNS1.
|
virtual |
Get the responsible IOManager for the node and attribute combination.
pUaNode | the actual Node where to get all information from. |
attributeId | AttributeId of the requested node |
[in] | pUaNode | The requested UA node |
[in] | attributeId | AttributeId requested for the node |
Implements NodeManagerUaNode.
void NodeManagerBase::setFiresEvents | ( | OpcUa_Boolean | firesEvents | ) |
Set the flag that indicates if the NodeManager fires events.
void NodeManagerBase::setHistoryManager | ( | HistoryManager * | pHistoryManager | ) |
Set the HistoryManager responsible for the NodeManager.
The NodeManagerBase implements getHistoryVariableHandle and provides a history variable handle if the requested node is available. Additional checks need to be implemented in the HistoryManager.
The NodeManagerBase creates a HistoryVariableHandle of the type HistoryVariableHandleUaNode. This type contains the UaNode pointer for the node to read.
|
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 NodeManagerUaNode.
Reimplemented in NodeManagerNS1.