ServiceContext Class Reference

This class provides the context for a Service invocation. More...

#include <opcuatypes.h>

Collaboration diagram for ServiceContext:

List of all members.

Public Member Functions

 ServiceContext ()
virtual ~ServiceContext ()
 ServiceContext (const ServiceContext &)
ServiceContextoperator= (const ServiceContext &)
SessionpSession () const
OpcUa_UInt32 timeoutHint () const
UaDateTime receiveTime () const
OpcUa_UInt32 returnDiagnostics () const
void setContext (Session *pSession, const OpcUa_RequestHeader &header)
void setSession (Session *pSession)
void setReturnDiagnostics (OpcUa_UInt32 returnDiagnostics)
void setNodeManagementMutex (UaMutex *pMutex, OpcUa_UInt16 namespaceIndex)
UaMutexgetNodeManagementMutex (OpcUa_UInt16 namespaceIndex) const
 < [in] Namespace index of the NodeManager

Detailed Description

This class provides the context for a Service invocation.

This context contains the Session object used for the Service call and the general client side settings like the timeout hint and the level of requested diagnostic information.


Constructor & Destructor Documentation

ServiceContext::ServiceContext (  )

Construction

ServiceContext::~ServiceContext (  ) [virtual]

Destruction

ServiceContext::ServiceContext ( const ServiceContext other )

Copy constructor


Member Function Documentation

UaMutex * ServiceContext::getNodeManagementMutex ( OpcUa_UInt16  namespaceIndex ) const

< [in] Namespace index of the NodeManager

Gets the mutex for the node list in a NodeManagerUaNode for locking in UaNodes when accessing the reference lists or other nodes. This mutex is used to avoid configuration changes during this time. The NodeManager is identified by the namespace index.

Returns:
Mutex for the NodeManagers node list or NULL if the mutex was not added with setNodeManagementMutex.
ServiceContext & ServiceContext::operator= ( const ServiceContext other )

Assignment operatior

Session* ServiceContext::pSession (  ) const [inline]

Returns the Session object.

UaDateTime ServiceContext::receiveTime (  ) const [inline]

Returns the timestamp the server received this service invocation.

OpcUa_UInt32 ServiceContext::returnDiagnostics (  ) const [inline]

Returns the client requested diagnostic level for this service invocation. Bit mask that defines the diagnostic information to be returned from the server.
Bit Value --- Diagnostics to return -------------- Define
0x0000 0001 - ServiceLevel / SymbolicId ---------- OpcUa_DiagnosticsMasks_ServiceSymbolicId
0x0000 0002 - ServiceLevel / LocalizedText ------- OpcUa_DiagnosticsMasks_ServiceLocalizedText
0x0000 0004 - ServiceLevel / AdditionalInfo ------ OpcUa_DiagnosticsMasks_ServiceAdditionalInfo
0x0000 0008 - ServiceLevel / Inner StatusCode ---- OpcUa_DiagnosticsMasks_ServiceInnerStatusCode
0x0000 0010 - ServiceLevel / Inner Diagnostics --- OpcUa_DiagnosticsMasks_ServiceInnerDiagnostics
0x0000 0020 - OperationLevel / SymbolicId -------- OpcUa_DiagnosticsMasks_OperationSymbolicId
0x0000 0040 - OperationLevel / LocalizedText ----- OpcUa_DiagnosticsMasks_OperationLocalizedText
0x0000 0080 - OperationLevel / AdditionalInfo ---- OpcUa_DiagnosticsMasks_OperationAdditionalInfo
0x0000 0100 - OperationLevel / Inner StatusCode -- OpcUa_DiagnosticsMasks_OperationInnerStatusCode
0x0000 0200 - OperationLevel / Inner Diagnostics - OpcUa_DiagnosticsMasks_OperationInnerDiagnostics

void ServiceContext::setContext ( Session pSession,
const OpcUa_RequestHeader &  header 
)

Sets the Service context with information provided by the client in the request header and with the session object related to the request. Used internally by the SDK

Parameters:
[in]pSessionInterface pointer of the Session object The session was created by the ServerConfig object in the Method createSession. A vendor specific implementation can create a derived Session class with vendor specific information.
[in]headerThe requested header provided by the client for the service call
void ServiceContext::setNodeManagementMutex ( UaMutex pMutex,
OpcUa_UInt16  namespaceIndex 
)

Sets the mutex for the node list in a NodeManagerUaNode for locking in UaNodes when accessing the reference lists or other nodes to avoid configuration changes during this time. The NodeManager is identified by the namespace index.

Parameters:
[in]pMutexMutex for the NodeManagers node list
[in]namespaceIndexNamespace index of the NodeManager
void ServiceContext::setReturnDiagnostics ( OpcUa_UInt32  returnDiagnostics )

Set the client requested diagnostic level for this service invocation. Used internally by the SDK

Parameters:
[in]returnDiagnosticsRequested diagnostic level
void ServiceContext::setSession ( Session pSession )

Sets the Session object. Used internally by the SDK

Parameters:
[in]pSessionInterface pointer of the Session object The session was created by the ServerConfig object in the Method createSession. A vendor specific implementation can create a derived Session class with vendor specific information.
OpcUa_UInt32 ServiceContext::timeoutHint (  ) const [inline]

Returns the timeout hint set by the client for this service invocation. A client side stack returns an timeout error to the caller after the timeout expired.


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