#include <nodemanagerroot.h>
Public Member Functions | |
virtual | ~NodeManagerRoot () |
UaStatus | startUp (ServerManager *pServerManager) |
UaStatus | sessionOpened (Session *session) |
UaStatus | sessionActivated (Session *session) |
UaStatus | sessionClosed (Session *session) |
UaStatus | browse (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References) |
UaStatus | translateBrowsePathToNodeId (const ServiceContext &serviceContext, const UaNodeId &startingNode, UaRelativePath &relativePath, UaBrowsePathTargets &browsePathTargets) |
VariableHandle * | getVariableHandle (Session *pSession, VariableHandle::ServiceType serviceType, OpcUa_NodeId *pNodeId, OpcUa_Int32 AttributeId) const |
HistoryVariableHandle * | getHistoryVariableHandle (Session *pSession, HistoryVariableHandle::ServiceType serviceType, OpcUa_NodeId *pNodeId, UaStatus &result) const |
UaStatus | getEventManagers (Session *pSession, OpcUa_NodeId *pNodeId, OpcUa_EventFilter *eventFilter, EventManagerArray &eventManagers) const |
MethodHandle * | getMethodHandle (Session *pSession, OpcUa_NodeId *pObjectNodeId, OpcUa_NodeId *pMethodNodeId, UaStatus &result) const |
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) |
UaStatus | addReference (const ServiceContext &serviceContext, const UaNodeId &sourceNodeId, const UaNodeId &referenceTypeId, OpcUa_Boolean isForward, const UaNodeId &targetNodeId, OpcUa_NodeClass targetNodeClass) |
UaStatus | deleteNode (const ServiceContext &serviceContext, const UaNodeId &nodeId, OpcUa_Boolean deleteTargetReference) |
UaStatus | deleteReference (const ServiceContext &serviceContext, const UaNodeId &sourceNodeId, const UaNodeId &referenceTypeId, OpcUa_Boolean isForward, const UaNodeId &targetNodeId, OpcUa_Boolean deleteBidirectional) |
UaStatus | readNodeConfiguration (Session *pSession, const UaNodeId &nodeToRead, OpcUa_Int32 attributeID, UaVariant &value) |
NodeManagerCrossReferences * | getNodeManagerCrossReferences () |
NodeManagerConfig * | getNodeManagerConfig () |
IOManager * | getIOManager (UaNode *pUaNode, OpcUa_Int32 attributeId) const |
UaStatus | afterStartUp () |
UaStatus | beforeShutDown () |
UaStatus | readValues (const UaVariableArray &arrUaVariables, UaDataValueArray &arrDataValues) |
UaStatus | writeValues (const UaVariableArray &arrUaVariables, const PDataValueArray &arrpDataValues, UaStatusCodeArray &arrStatusCodes) |
NodeManager * | getNodeManagerByNamespace (OpcUa_UInt16 NsIdx) const |
UaStatus | addNodeManager (NodeManager *pNodeManager, const UaString &sNamespaceUri, OpcUa_UInt16 &assignedNamespaceIndex) |
UaStatus | removeNodeManager (OpcUa_UInt16 namespaceIndex) |
UaObjectServer * | pServerObject () const |
OpcUa_StatusCode | getNamespaceIndexFromAlias (const UaUShort *sAlias, OpcUa_UInt16 &nsIndex) const |
void | startServerShutDown (OpcUa_Int32 secondsTillShutdown, const UaLocalizedText &shutdownReason) |
void | changeServerState (OpcUa_ServerState newState) |
UaNode * | getNode (const UaNodeId &nodeId) |
Static Public Member Functions | |
static NodeManagerRoot * | CreateRootNodeManager () |
NodeManagerRoot::~NodeManagerRoot | ( | ) | [virtual] |
destruction
NodeManagerRoot * NodeManagerRoot::CreateRootNodeManager | ( | ) | [static] |
construction
UaStatus NodeManagerRoot::startUp | ( | ServerManager * | pServerManager | ) | [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.
Notifies the node manager that a new session was opened.
session | 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.
Notifies the node manager that a session was activated.
session | 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.
Notifies the node manager that a session was closed.
session | 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.
UaStatus NodeManagerRoot::browse | ( | const ServiceContext & | serviceContext, | |
BrowseContext & | browseContext, | |||
UaReferenceDescriptions & | References | |||
) | [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.
UaStatus NodeManagerRoot::translateBrowsePathToNodeId | ( | const ServiceContext & | serviceContext, | |
const UaNodeId & | startingNode, | |||
UaRelativePath & | relativePath, | |||
UaBrowsePathTargets & | browsePathTargets | |||
) | [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 Browsepath. |
Reimplemented from NodeManagerUaNode.
VariableHandle * NodeManagerRoot::getVariableHandle | ( | Session * | pSession, | |
VariableHandle::ServiceType | serviceType, | |||
OpcUa_NodeId * | pNodeId, | |||
OpcUa_Int32 | AttributeId | |||
) | const [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 with the following possible settings READ_EVENTS, READ_RAW, READ_MODIFIED, READ_PROCESSED, READ_ATTIME, UPDATE_DATA, UPDATE_EVENT, DELETE_DATA, DELETE_EVENT | |
pNodeId | NodeId of the requested Node. | |
AttributeId | AttributeId of the requested node |
Reimplemented from NodeManagerUaNode.
HistoryVariableHandle * NodeManagerRoot::getHistoryVariableHandle | ( | Session * | pSession, | |
HistoryVariableHandle::ServiceType | serviceType, | |||
OpcUa_NodeId * | pNodeId, | |||
UaStatus & | result | |||
) | const [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 with the following possible settings READ_EVENTS, READ_RAW, READ_MODIFIED, READ_PROCESSED, READ_ATTIME, UPDATE_DATA, UPDATE_EVENT, DELETE_DATA, DELETE_EVENT | |
pNodeId | NodeId of the requested Node. | |
result | the result of the current Operation. |
Reimplemented from NodeManager.
UaStatus NodeManagerRoot::getEventManagers | ( | Session * | pSession, | |
OpcUa_NodeId * | pNodeId, | |||
OpcUa_EventFilter * | eventFilter, | |||
EventManagerArray & | eventManagers | |||
) | const [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 NodeManager.
MethodHandle * NodeManagerRoot::getMethodHandle | ( | Session * | pSession, | |
OpcUa_NodeId * | pObjectNodeId, | |||
OpcUa_NodeId * | pMethodNodeId, | |||
UaStatus & | result | |||
) | const [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.
UaStatus NodeManagerRoot::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 | |||
) | [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.
UaStatus NodeManagerRoot::addReference | ( | const ServiceContext & | serviceContext, | |
const UaNodeId & | sourceNodeId, | |||
const UaNodeId & | referenceTypeId, | |||
OpcUa_Boolean | isForward, | |||
const UaNodeId & | targetNodeId, | |||
OpcUa_NodeClass | targetNodeClass | |||
) | [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 forwardreferenced or not. | |
targetNodeId | the NodeId of the target Node. | |
targetNodeClass | the NodeClass of the target Node. |
Reimplemented from NodeManager.
UaStatus NodeManagerRoot::deleteNode | ( | const ServiceContext & | serviceContext, | |
const UaNodeId & | nodeId, | |||
OpcUa_Boolean | deleteTargetReference | |||
) | [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.
UaStatus NodeManagerRoot::deleteReference | ( | const ServiceContext & | serviceContext, | |
const UaNodeId & | sourceNodeId, | |||
const UaNodeId & | referenceTypeId, | |||
OpcUa_Boolean | isForward, | |||
const UaNodeId & | targetNodeId, | |||
OpcUa_Boolean | deleteBidirectional | |||
) | [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 forwardreferenced or not. | |
targetNodeId | the NodeId of the target Node. | |
deleteBidirectional | TRUE if delete bidirectional FALSE if not. |
Reimplemented from NodeManager.
UaStatus NodeManagerRoot::readNodeConfiguration | ( | Session * | pSession, | |
const UaNodeId & | nodeToRead, | |||
OpcUa_Int32 | attributeID, | |||
UaVariant & | value | |||
) | [virtual] |
Read configuration information attributes of a node.
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. | |
nodeToRead | the actual Node to read from. | |
attributeID | the Id of the actual attribute. | |
value | the value of the current Node. |
Reimplemented from NodeManagerUaNode.
NodeManagerCrossReferences * NodeManagerRoot::getNodeManagerCrossReferences | ( | ) | [virtual] |
Get the interface NodeManagerCrossReferences if available.
Reimplemented from NodeManagerUaNode.
NodeManagerConfig * NodeManagerRoot::getNodeManagerConfig | ( | ) | [virtual] |
Get the interface NodeManagerConfig if available.
Reimplemented from NodeManagerUaNode.
IOManager * NodeManagerRoot::getIOManager | ( | UaNode * | pUaNode, | |
OpcUa_Int32 | attributeId | |||
) | const [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 |
Implements NodeManagerUaNode.
UaStatus NodeManagerRoot::afterStartUp | ( | ) | [virtual] |
Finish start up in derived class after starting up base class.
Implements NodeManagerUaNode.
UaStatus NodeManagerRoot::beforeShutDown | ( | ) | [virtual] |
Start shut down in derived class before shutting down base class.
Implements NodeManagerUaNode.
UaStatus NodeManagerRoot::readValues | ( | const UaVariableArray & | arrUaVariables, | |
UaDataValueArray & | arrDataValues | |||
) | [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.
UaStatus NodeManagerRoot::writeValues | ( | const UaVariableArray & | arrUaVariables, | |
const PDataValueArray & | arrpDataValues, | |||
UaStatusCodeArray & | arrStatusCodes | |||
) | [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.
NodeManager * NodeManagerRoot::getNodeManagerByNamespace | ( | OpcUa_UInt16 | NsIdx | ) | const [virtual] |
Get the NodeManager by namespace index
NsIdx | the Namespaceindex of the current Node. |
Implements NodeManagerList.
UaStatus NodeManagerRoot::addNodeManager | ( | NodeManager * | pNodeManager, | |
const UaString & | sNamespaceUri, | |||
OpcUa_UInt16 & | assignedNamespaceIndex | |||
) | [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.
UaStatus NodeManagerRoot::removeNodeManager | ( | OpcUa_UInt16 | namespaceIndex | ) | [virtual] |
Remove a NodeManager from the list
namespaceIndex | Assigned namespace index of the added NodeManager. |
Implements NodeManagerList.
UaObjectServer* NodeManagerRoot::pServerObject | ( | ) | const [inline] |
Get the server object
OpcUa_StatusCode NodeManagerRoot::getNamespaceIndexFromAlias | ( | const UaUShort * | sAlias, | |
OpcUa_UInt16 & | nsIndex | |||
) | const |
Returns a namespace index for a namespace alias.
sAlias | alias name to convert to the namespaceindex. | |
nsIndex | the Namespaceindex of the current Node. |
void NodeManagerRoot::startServerShutDown | ( | OpcUa_Int32 | secondsTillShutdown, | |
const UaLocalizedText & | shutdownReason | |||
) |
Inform the node manager about the shutdown of the server.
secondsTillShutdown | Seconds till shutdown of the server. | |
shutdownReason | Reason for the shutdown. |
void NodeManagerRoot::changeServerState | ( | OpcUa_ServerState | newState | ) |
Update the server manager about the change of the server state.
newState | New server status. |
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. |