ServerManager Class Reference

OPC Server Manager Interface. The Servermanager is needed to start everything up and get all Namespaces. More...

#include <servermanager.h>

Collaboration diagram for ServerManager:

List of all members.

Public Member Functions

 ServerManager ()
virtual ~ServerManager ()
UaStatus startUp (ServerConfig *pServerConfig)
UaStatus shutDown ()
ServerConfiggetServerConfig ()
NodeManagergetNodeManagerRoot ()
NodeManagergetNodeManagerNS1 ()
SessionManagergetSessionManager ()
void registerDynamicEventManager (EventManager *pEventManager)
OpcUa_UInt32 startServerShutDown (OpcUa_Int32 secondsTillShutdown, const UaLocalizedText &shutdownReason)
void changeServerState (OpcUa_ServerState newState)
UaStatus browse (const UaNodeId &startingNode, const UaNodeId &referenceTypeFilter, ContinuationPointWrapper &continuationPoint, UaReferenceDescriptions &references)
UaStatus browse (const UaNodeId &startingNode, OpcUa_Boolean isInverse, const UaNodeId &referenceTypeFilter, OpcUa_UInt32 nodeClassMask, ContinuationPointWrapper &continuationPoint, UaReferenceDescriptions &references)
UaStatus read (Session *pSession, OpcUa_Double maxAge, const UaReadValueIds &nodesToRead, UaDataValues &results)
UaStatus read (Session *pSession, OpcUa_Double maxAge, const PVariableHandleArray &variableHandles, const UaReadValueIds &nodesToRead, UaDataValues &results)
UaStatus write (Session *pSession, const UaWriteValues &nodesToWrite, UaStatusCodeArray &results)
UaStatus write (Session *pSession, const PVariableHandleArray &variableHandles, const UaWriteValues &nodesToWrite, UaStatusCodeArray &results)
UaStatus call (Session *pSession, const UaNodeId &objectId, const UaNodeId &methodId, const UaVariantArray &inputArguments, UaStatusCodeArray &inputArgumentResults, UaVariantArray &outputArguments)
UaStatus createDataMonitoredItems (Session *pSession, DataMonitoredItemSpecArray &dataMonitoredItems)
UaStatus createEventMonitoredItem (Session *pSession, const UaNodeId &objectToMonitor, EventCallback *pEventCallback, OpcUa_EventFilter *pEventFilter, OpcUa_UInt32 &monitoredItemId)
UaStatus deleteMonitoredItems (Session *pSession, const UaUInt32Array &monitoredItemIds, UaStatusCodeArray &results)

Protected Member Functions

virtual SessionManagercreateSessionManager ()
virtual NodeManagercreateNodeManagerNS1 (const UaString &sServerUri)

Detailed Description

OPC Server Manager Interface. The Servermanager is needed to start everything up and get all Namespaces.

ServerManager


Constructor & Destructor Documentation

ServerManager::ServerManager (  )

construction.

ServerManager::~ServerManager (  ) [virtual]

destruction

destruction.


Member Function Documentation

UaStatus ServerManager::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.

Returns:
Status result code for the call.
Parameters:
[in]startingNodeStarting node for the browse call
[in]referenceTypeFilterReference type filter to return only nodes referenced from the starting node with this reference type or a subtype
[in,out]continuationPointContinuation point for the browse. Indicates if more results are available
[out]referencesList of browse results for the browsed node
UaStatus ServerManager::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.

Returns:
Status result code for the call.
Parameters:
[in]startingNodeStarting node for the browse call
[in]isInverseFlag indicating if the browse is inverse (True) or forward (False)
[in]referenceTypeFilterReference type filter to return only nodes referenced from the starting node with this reference type or a subtype
[in]nodeClassMaskNode 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]continuationPointContinuation point for the browse. Indicates if more results are available
[out]referencesList of browse results for the browsed node
UaStatus ServerManager::call ( Session pSession,
const UaNodeId objectId,
const UaNodeId methodId,
const UaVariantArray &  inputArguments,
UaStatusCodeArray &  inputArgumentResults,
UaVariantArray &  outputArguments 
)

Internal function to call a method.

Returns:
Status result code for the call.
Parameters:
[in]pSessionSession context for the function call
[in]objectIdObject node for the call
[in]methodIdMethod node for the call
[in]inputArgumentsArray of input arguments
[out]inputArgumentResultsArray of input argument results
[out]outputArgumentsArray of output argumens
void ServerManager::changeServerState ( OpcUa_ServerState  newState )

Change the server state represented in the address space.

This method allows the application to change the server state if the state is not longer running or to change the stat back to running after an error situation.

Parameters:
[in]newStateNew server status
UaStatus ServerManager::createDataMonitoredItems ( Session pSession,
DataMonitoredItemSpecArray dataMonitoredItems 
)

Internal function to create a list of data monitored items.

Returns:
Status result code for the call.
Parameters:
[in]pSessionSession context for the function call
[in,out]dataMonitoredItemsArray of DataMonitoredItemSpec objects containing the information for the creation in a data monitored item.
UaStatus ServerManager::createEventMonitoredItem ( Session pSession,
const UaNodeId objectToMonitor,
EventCallback pEventCallback,
OpcUa_EventFilter *  pEventFilter,
OpcUa_UInt32 &  monitoredItemId 
)

Internal function to create an event monitored item.

Returns:
Status result code for the call.
Parameters:
[in]pSessionSession context for the function call
[in]objectToMonitorObject node used as event notifier
[in]pEventCallbackEvent callback interface for the event monitored item
[in]pEventFilterEvent filter for the monitored item
[out]monitoredItemIdId of the created monitored item
NodeManager * ServerManager::createNodeManagerNS1 ( const UaString sServerUri ) [protected, virtual]

This function creates the NodeManagerNS1. The virtual function can be overwritten by a derived class to create a class derived from NodeManagerNS1 instead of NodeManagerNS1 An instance of a derived class of ServerManager can be passed to CoreModule::initialize() to force the CoreModule to use this instance instead of creating a ServerManager

SessionManager * ServerManager::createSessionManager (  ) [protected, virtual]

This function creates the SessionManager. The virtual function can be overwritten by a derived class to create a class derived from SessionManager instead of SessionManager. An instance of a derived class of ServerManager can be passed to CoreModule::initialize() to force the CoreModule to use this instance instead of creating a ServerManager

UaStatus ServerManager::deleteMonitoredItems ( Session pSession,
const UaUInt32Array &  monitoredItemIds,
UaStatusCodeArray &  results 
)

Internal function to delete a list of monitored items.

Returns:
Status result code for the call.
Parameters:
[in]pSessionSession context for the function call
[in]monitoredItemIdsArray of Ids of the monitored items to delete
[out]resultsResult array for the monitored items to delete
NodeManager * ServerManager::getNodeManagerNS1 (  )

Returns the node manager object responsible for namespace index 1 nodes.

Returns:
Namespace index 1 node manager object.
NodeManager * ServerManager::getNodeManagerRoot (  )

Returns the root node manager object.

Returns:
Root node manager object.
ServerConfig * ServerManager::getServerConfig (  )

Returns the server configuration object.

Returns:
Server configuration object.
SessionManager * ServerManager::getSessionManager (  )

Returns the OPC UA Session manager object.

Returns:
OPC UA Session manager object.
UaStatus ServerManager::read ( Session pSession,
OpcUa_Double  maxAge,
const UaReadValueIds &  nodesToRead,
UaDataValues &  results 
)

Read function for internal use.

Returns:
Status result code for the call.
Parameters:
[in]pSessionSession context for the function call
[in]maxAgeThe maximum age of a cached value that can be returned to the caller
[in]nodesToReadArray of nodes and attributes to read
[out]resultsArray of read results
UaStatus ServerManager::read ( Session pSession,
OpcUa_Double  maxAge,
const PVariableHandleArray variableHandles,
const UaReadValueIds &  nodesToRead,
UaDataValues &  results 
)

Read function for internal use.

Returns:
Status result code for the call.
Parameters:
[in]pSessionSession context for the function call
[in]maxAgeThe maximum age of a cached value that can be returned to the caller
[in]variableHandlesArray of variable handles indicating the node and attribute to read
[in]nodesToReadArray of nodes and attributes to read
[out]resultsArray of read results
void ServerManager::registerDynamicEventManager ( EventManager pEventManager )

Inform the server manager about a new event manager added after server start up.

EventManagers can be responsible for information requests from clients even if they are created after the client initiated the request. This happes especially if a client is interested in all events from the server and a new event manager is added. This method allows an EventManager to get informed about already created event subscriptions.

Parameters:
[in]pEventManagerNew and dynamically added EventManager
UaStatus ServerManager::shutDown (  )

Shut down server manager.

Returns:
Error code
OpcUa_UInt32 ServerManager::startServerShutDown ( OpcUa_Int32  secondsTillShutdown,
const UaLocalizedText shutdownReason 
)

Inform the server manager about the shutdown of the server.

Returns:
Number of active client connections.
Parameters:
[in]secondsTillShutdownSeconds till shutdown of the server
[in]shutdownReasonReason for the shutdown
UaStatus ServerManager::startUp ( ServerConfig pServerConfig )

Start up server manager.

Parameters:
pServerConfigServer configuration object.
Returns:
Error code
UaStatus ServerManager::write ( Session pSession,
const UaWriteValues &  nodesToWrite,
UaStatusCodeArray &  results 
)

Write function for internal use.

Returns:
Status result code for the call.
Parameters:
[in]pSessionSession context for the function call
[in]nodesToWriteArray of nodes, attributes and values to write
[out]resultsArray of write results
UaStatus ServerManager::write ( Session pSession,
const PVariableHandleArray variableHandles,
const UaWriteValues &  nodesToWrite,
UaStatusCodeArray &  results 
)

Write function for internal use.

Returns:
Status result code for the call.
Parameters:
[in]pSessionSession context for the function call
[in]variableHandlesArray of variable handles indicating the node and attribute to write
[in]nodesToWriteArray of nodes, attributes and values to write
[out]resultsArray of write results

The documentation for this class was generated from the following files:
  • /home/buildbot/work/uasdkcpp/src/uaserver/uaservercpp/coremodule/servermanager.h
  • /home/buildbot/work/uasdkcpp/src/uaserver/uaservercpp/coremodule/servermanager.cpp