This class provides the context for a Service invocation. More...
#include <opcuatypes.h>
Public Member Functions | |
ServiceContext () | |
virtual | ~ServiceContext () |
ServiceContext (const ServiceContext &) | |
ServiceContext & | operator= (const ServiceContext &) |
Session * | pSession () 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) |
UaMutex * | getNodeManagementMutex (OpcUa_UInt16 namespaceIndex) const |
< [in] Namespace index of the NodeManager |
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.
ServiceContext::ServiceContext | ( | ) |
Construction
ServiceContext::~ServiceContext | ( | ) | [virtual] |
Destruction
ServiceContext::ServiceContext | ( | const ServiceContext & | other ) |
Copy constructor
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.
ServiceContext & ServiceContext::operator= | ( | const ServiceContext & | other ) |
Assignment operatior
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
[in] | pSession | Interface 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] | header | The 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.
[in] | pMutex | Mutex for the NodeManagers node list |
[in] | namespaceIndex | Namespace 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
[in] | returnDiagnostics | Requested diagnostic level |
void ServiceContext::setSession | ( | Session * | pSession ) |
Sets the Session object. Used internally by the SDK
[in] | pSession | Interface 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.