#include <uasession.h>

Inheritance diagram for UaSession:
Collaboration diagram for UaSession:

List of all members.

Public Member Functions

 UaSession (OpcUa_Int32 sessionId, const UaNodeId &authenticationToken)
virtual UaStatus close (OpcUa_Boolean deleteSubscriptions)
virtual OpcUa_Boolean matchUser (UaSession *pOtherSession)
virtual UaStatus queuePublishRequest (UaPublishContext *pUaPublishContext, UaSubscription **ppSubscription)
virtual UaPublishContextgetPublishRequest ()
virtual void setSecureChannelInvalid ()
virtual UaStatus queueSubscriptionForPublish (UaSubscription *pSubscription)
virtual void queueSubscriptionStatusChangeNotification (OpcUa_UInt32 subscriptionId, const UaStatus &status)
virtual UaStatus subscriptionCreated (UaSubscription *pSubscription)
virtual UaStatus subscriptionInvalidated (UaSubscription *pSubscription)
virtual void sendSubscriptionStatusChangeNotification (UaPublishContext *pUaPublishContext, OpcUa_UInt32 subscriptionId, const UaStatus &status)
virtual RegisteredNodegetRegisteredNode (OpcUa_UInt32 handle) const
virtual OpcUa_UInt32 addRegisteredNode (RegisteredNode *pRegisteredNode)
virtual UaStatusCode removeRegisteredNode (OpcUa_UInt32 handle)
void lockSendResponse ()
void unlockSendResponse ()
void startingServiceProcessing ()
void finishedServiceProcessing ()
OpcUa_UInt32 activeServiceCount () const
void setServerNonce (const OpcUa_ByteString *pServerNonce)
const OpcUa_ByteString * getServerNonce () const
void setEndpoint (UaEndpoint *pEndpoint)
UaEndpointpEndpoint () const

Protected Member Functions

virtual ~UaSession ()

Detailed Description

Class used to manage a OPC UA client session in the server. It manages all OPC UA session relevant settings. All general session settings including the lifetime of the session are managed by the Session class which this class is derived from. The object is reference counted and can not be deleted directly.


Constructor & Destructor Documentation

UaSession::~UaSession (  ) [protected, virtual]

Prohibit use of default destructor

UaSession::UaSession ( OpcUa_Int32  sessionId,
const UaNodeId authenticationToken 
)

construction

Parameters:
sessionIdthe id of the current UaSession.
authenticationTokenSecret session Id created by the server application.

Member Function Documentation

OpcUa_UInt32 UaSession::activeServiceCount (  ) const

Get count of Service currently processed by the server

Returns:
the number of actual available Services.
OpcUa_UInt32 UaSession::addRegisteredNode ( RegisteredNode pRegisteredNode ) [virtual]

Adds a registered node and returns a handle

Parameters:
pRegisteredNodethe actual registered Node to add.
Returns:
Handle for the node
UaStatus UaSession::close ( OpcUa_Boolean  deleteSubscriptions ) [virtual]

Close the session This method is called if the Client closes the UaSession with the service CloseSession or if the internal clean up routine is closing the UaSession after a UaSession timeout

Parameters:
deleteSubscriptionsIndicates if the subscriptions should be deleted by the server
Returns:
Error code

Reimplemented from Session.

void UaSession::finishedServiceProcessing (  )

Called to decrement the active service counter

UaPublishContext * UaSession::getPublishRequest (  ) [virtual]

Returns a Publish context if one is available for the session

Returns:
a Publish context for the session.
RegisteredNode * UaSession::getRegisteredNode ( OpcUa_UInt32  handle ) const [virtual]

Returns the registered node for a handle

Parameters:
handleHandle for the node.
Returns:
Registered Node Information
const OpcUa_ByteString * UaSession::getServerNonce (  ) const

Returns the last created server nonce The server nonce gets created during CreateSession or ActiveSession

Returns:
a pointer to the ServerNonce information.
void UaSession::lockSendResponse (  )

Lock access to UA Stack EndSendResponse method.

OpcUa_Boolean UaSession::matchUser ( UaSession pOtherSession ) [virtual]

Check if the user in both sessions is the same.

This method is used to check if the user in both sessions is identical. This is used in transfer subscription. The method can be overwritten in a derived class if a special user handling is implemented.

Parameters:
pOtherSessionThe other session to compare with.
Returns:
True if the users of both sessions are identical, False if they are different.
UaEndpoint * UaSession::pEndpoint (  ) const

Get the endpoint data object containing information about the endpoint used by the client for this session

UaStatus UaSession::queuePublishRequest ( UaPublishContext pUaPublishContext,
UaSubscription **  ppSubscription 
) [virtual]

Queue a Publish context for the session

Parameters:
pUaPublishContexta pointer to the information of the PublishContext.
ppSubscriptiona pointer to the information of the Subscription.
Returns:
Error code
UaStatus UaSession::queueSubscriptionForPublish ( UaSubscription pSubscription ) [virtual]

Queue a subscriptions that is waiting for a publish

Parameters:
pSubscriptiona pointer to the information of the Subscription.
Returns:
Error code
void UaSession::queueSubscriptionStatusChangeNotification ( OpcUa_UInt32  subscriptionId,
const UaStatus status 
) [virtual]

Queue a StatusChangeNotification for a subscription

Parameters:
pUaPublishContexta pointer to the information of the PublishContext.
subscriptionIdIdentifier for the Subscription.
statusStatus code for the StatusChangeNotification.
Returns:
Error code
UaStatusCode UaSession::removeRegisteredNode ( OpcUa_UInt32  handle ) [virtual]

Removes a registered node

Parameters:
handleHandle for the node.
void UaSession::sendSubscriptionStatusChangeNotification ( UaPublishContext pUaPublishContext,
OpcUa_UInt32  subscriptionId,
const UaStatus status 
) [virtual]

Send a StatusChangeNotification

Parameters:
subscriptionIdIdentifier for the Subscription.
statusStatus code for the StatusChangeNotification.
Returns:
Error code
void UaSession::setEndpoint ( UaEndpoint pEndpoint )

Set the endpoint data object containing information about the endpoint used by the client for this session

void UaSession::setSecureChannelInvalid (  ) [virtual]

Invalidate the secure channel assigned to the session.

Reimplemented from Session.

void UaSession::setServerNonce ( const OpcUa_ByteString *  pServerNonce )

Set the last created server nonce The server nonce gets created during CreateSession or ActiveSession

Parameters:
pServerNoncea pointer to the ServerNonce information.
void UaSession::startingServiceProcessing (  )

Called to increment the active service counter

UaStatus UaSession::subscriptionCreated ( UaSubscription pSubscription ) [virtual]

A new subscription in the session context was created

Parameters:
pSubscriptiona pointer to the information of the Subscription.
Returns:
Error code.
UaStatus UaSession::subscriptionInvalidated ( UaSubscription pSubscription ) [virtual]

A subscription in the session context was invalidated

Parameters:
pSubscriptiona pointer to the information of the Subscription.
Returns:
Error code
void UaSession::unlockSendResponse (  )

Unlock access to UA Stack EndSendResponse method.


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