C++ Based OPC UA Client/Server/PubSub SDK
1.7.9.586
|
This class provides the context for a Service invocation. More...
#include <opcuatypes.h>
Public Member Functions | |
ServiceContext () | |
Construction. | |
virtual | ~ServiceContext () |
Destruction. | |
ServiceContext (const ServiceContext &) | |
Copy constructor. | |
ServiceContext & | operator= (const ServiceContext &) |
Assignment operator. | |
Session * | pSession () const |
Returns the Session object. More... | |
const SessionUserContext * | pSessionUserContext () const |
Returns the SessionUserContext object. More... | |
OpcUa_UInt32 | timeoutHint () const |
Returns the timeout hint in milliseconds set by the client for this service invocation. More... | |
UaDateTime | receiveTime () const |
Returns the timestamp the server received this service invocation. More... | |
UaDateTime | clientTime () const |
Returns the timestamp set by the client for this service invocation. More... | |
OpcUa_UInt32 | returnDiagnostics () const |
Returns the client requested diagnostic level for this service invocation. More... | |
OpcUa_UInt32 | requestHandle () const |
Returns the request handle set by the client for this service invocation. | |
UaString | clientAuditEntryId () const |
Returns the AuditEntryId set by the client for this service invocation. | |
void | 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. More... | |
void | setSession (Session *pSession) |
Sets the Session object. More... | |
void | setReturnDiagnostics (OpcUa_UInt32 returnDiagnostics) |
Set the client requested diagnostic level for this service invocation. More... | |
void | setTimeoutHint (OpcUa_UInt32 timeoutHint) |
Set the client requested timeout hint for the service call. More... | |
void | setNodeManagementMutex (UaMutex *pMutex) |
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. More... | |
UaMutex * | getNodeManagementMutex () const |
Gets the mutex for the node list in a NodeManagerUaNode for locking in UaNodes when accessing the reference lists or other nodes. More... | |
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.
|
inline |
Returns the timestamp set by the client for this service invocation.
UaMutex * ServiceContext::getNodeManagementMutex | ( | ) | const |
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.
|
inline |
const SessionUserContext * ServiceContext::pSessionUserContext | ( | ) | const |
Returns the SessionUserContext object.
The SessionUserContext is only valid as long as the session is valid. Used internally by the SDK.
|
inline |
Returns the timestamp the server received this service invocation.
|
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 | ) |
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.
[in] | pMutex | Mutex for the NodeManagers node list |
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. |
void ServiceContext::setTimeoutHint | ( | OpcUa_UInt32 | timeoutHint | ) |
Set the client requested timeout hint for the service call.
[in] | timeoutHint | Timout hint in milliseconds |
|
inline |
Returns the timeout hint in milliseconds set by the client for this service invocation.
A client side stack returns an timeout error to the caller after the timeout expired.