#include <session.h>
List of all members.
Detailed Description
Class used to manage a client session in the server. It manages all Session relevant settings including the lifetime of the Session. The object is reference counted and can not be deleted directly.
Constructor & Destructor Documentation
Session::Session |
( |
) |
[protected] |
Prohibit use of default constructor
Session::~Session |
( |
) |
[protected, virtual] |
Prohibit use of destructor
Prohibit use of default destructor
Session::Session |
( |
OpcUa_Int32 |
sessionId, |
|
|
const UaNodeId & |
authenticationToken |
|
) |
| |
construction
- Parameters:
-
sessionId | the id of the current Session. |
authenticationToken | Secret session Id created by the server application. |
Member Function Documentation
UaStatus Session::activate |
( |
OpcUa_UInt32 |
uSecureChannelId, |
|
|
UaUserIdentityToken * |
pUserIdentityToken, |
|
|
const UaStringArray & |
localeIDs |
|
) |
| [virtual] |
Activate the session. Sets the Session to a valid state.
- Parameters:
-
uSecureChannelId | The if of the secure channel used for the session. |
pUserIdentityToken | The passed object can be an instance UaUserIdentityTokenAnonymous for the user type Anonymous and UaUserIdentityTokenUserPassword for the user type UserPassword |
localeIDs | List of locale ids in priority order for localized strings. |
- Returns:
- Error code
UaStatus Session::close |
( |
OpcUa_Boolean |
deleteSubscriptions ) |
[virtual] |
Close the session This method is called if the Client closes the Session with the service CloseSession or if the internal clean up routine is closing the Session after a Session timeout
- Parameters:
-
deleteSubscriptions | Indicates if the subscriptions should be deleted by the server |
- Returns:
- Error code
Reimplemented in UaSession.
void Session::getAuthenticationToken |
( |
OpcUa_NodeId & |
authenticationToken ) |
const |
Returns the private ID of the session This ID is private to the client and server application and must be kept private inside the management of the session in the client and server code.
- Parameters:
-
authenticationToken | Secret session Id created by the server application. |
BrowseContext * Session::getBrowseContext |
( |
OpcUa_ByteString * |
pCP ) |
[virtual] |
Get a browse continuation point
- Parameters:
-
pCP | the continuationpoint as ByteString. |
- Returns:
- a browse continuation point.
const OpcUa_ByteString * Session::getClientCertificate |
( |
) |
const |
Returns the client certificate of the client created the session
- Returns:
- Client certificate
UaString Session::getClientUserId |
( |
) |
const |
Returns the client user id for the session.
Get a history read continuation point
- Parameters:
-
pCP | the continuationpoint as ByteString. |
- Returns:
- The history read continuation point data pointer.
OpcUa_Int32 Session::getIntegerSessionId |
( |
) |
const |
Returns the integer ID of the session
- Returns:
- Integer session ID of the session object
Get the first local Id used for the session
- Returns:
- The first localId used for the session as UaString.
const UaStringArray * Session::getLocalIds |
( |
) |
const |
Get the list of all local Ids used for the session
- Returns:
- The list of all localIds used for the session as const UaStringArray*.
OpcUa_UInt32 Session::getSecureChannelId |
( |
) |
const |
Returns the ID of the SecureChannel assigned to the session
- Returns:
- SecureChannel ID used for the session object
UaString Session::getSessionName |
( |
) |
const |
Returns the name of the session
- Returns:
- Name of the session object
void Session::getSessionNodeId |
( |
OpcUa_NodeId & |
sessionId ) |
const |
Returns the NodeId of the session
- Parameters:
-
sessionId | the NodeId of the current Session. |
OpcUa_UInt32 Session::getSessionTimeout |
( |
) |
const |
Returns the timeout of the session
- Returns:
- Timeout of the session object
OpcUa_Boolean Session::hasExpired |
( |
) |
const [virtual] |
Checks if the session timeout expired
- Returns:
- TRUE if session timeout expired FALSE if not
OpcUa_Boolean Session::isSecureChannelValid |
( |
) |
[virtual] |
Check if the secure channel assigned to the session is valid.
- Returns:
- TRUE if valid FALSE if not.
UaStatus Session::isValid |
( |
OpcUa_UInt32 |
uSecureChannelId ) |
[virtual] |
Checks if the session is valid
- Returns:
- Error code.
OpcUa_Boolean Session::mustDelete |
( |
) |
[virtual] |
Checks if the session must be deleted
- Returns:
- TRUE if session is to delete FALSE if not
Open the session. Sets the Session timeout and the client name. But the Session is still not valid. An additional call to activateSession is necessary to make the Session valid.
- Parameters:
-
sessionName | Displayable string that identifies the OPC client session. |
clientCertificate | Certificate of the OPC client application. |
sessionTimeout | Maximum number of milliseconds that the session should remain open without activity. |
- See also:
- activate
- Returns:
- Error code
Queue a browse continuation point
- Parameters:
-
pBCP | the actual Browsecontext as a pointer. |
pCP | the continuationpoint as ByteString. |
- Returns:
- Error code
Queue a history read continuation point
- Parameters:
-
pHistoryReadCP | the actual continuation point data as a pointer. |
pCP | the continuationpoint as ByteString. |
- Returns:
- Error code
void Session::resetTimeout |
( |
) |
|
Reset session timeout. This method is called every time a valid service call is executed in the Session context.
void Session::setInvalid |
( |
) |
[virtual] |
Set the state of the session to invalid
void Session::setSecureChannelInvalid |
( |
) |
[virtual] |
Invalidate the secure channel assigned to the session.
Reimplemented in UaSession.
The documentation for this class was generated from the following files:
- /home/buildbot/work/uasdkcpp/src/uaserver/uaservercpp/coremodule/session.h
- /home/buildbot/work/uasdkcpp/src/uaserver/uaservercpp/coremodule/session.cpp