C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537
UaServerApplicationCallback Class Referenceabstract

Callback interface for the Server application object. More...

#include <uacoreserverapplication.h>

Public Member Functions

 UaServerApplicationCallback ()
 Construction.
 
virtual ~UaServerApplicationCallback ()
 Destruction.
 
virtual SessioncreateSession (OpcUa_Int32 sessionID, const UaNodeId &authenticationToken)=0
 Creates a session object for the OPC server. More...
 
virtual UaStatus logonSessionUser (Session *pSession, UaUserIdentityToken *pUserIdentityToken, ServerConfig *pServerConfig)=0
 Validates the user identity token and sets the user for the session. More...
 
virtual void afterLoadConfiguration (ServerConfig *pServerConfig)
 Optional method used to inform the application that the configuration was loaded. More...
 
virtual UaServercreateUaServer ()
 Optional method used to create an application specific UaServer object used as main entry point for the UA communication. More...
 
virtual UaStatus requestServerStateChange (Session *pSession, OpcUa_ServerState state, const UaDateTime &estimatedReturnTime, OpcUa_UInt32 secondsTillShutdown, const UaLocalizedText &shutdownReason, OpcUa_Boolean restart)
 Optional method to requests the state change, shutdown or restart of the OPC UA Server application. More...
 
virtual void beforeEndpointOpen (UaEndpoint *pEndpoint, bool certificateAvailable)
 Optional method providing information about an endpoint that will be opened and the certificate that will be used by the server. More...
 
virtual void afterCoreModuleStarted ()
 Optional method used to inform the application that the CoreModules was started. More...
 
virtual void afterNodeManagersStarted ()
 Optional method used to inform the application that all NodeManagers were started. More...
 
virtual bool nodeManagerStartUpError (NodeManager *pNodeManager)
 Optional method used to inform the application that a NodeManagers could not be started. More...
 
virtual void afterModulesStarted ()
 Optional method used to inform the application that all Modules were started.
 
virtual bool serverApplicationModuleStartUpError (UaServerApplicationModule *pModule)
 Optional method used to inform the application that a UaServerApplicationModule could not be started. More...
 
virtual void roleAdded (RoleTypeOperations *pRoleTypeOperations)
 Optional method used to inform the application that a Role was added.
 
virtual void roleModified (RoleTypeOperations *pRoleTypeOperations)
 Optional method used to inform the application that a Role was modified.
 
virtual void roleRemoved (RoleTypeOperations *pRoleTypeOperations)
 Optional method used to inform the application that a Role was removed.
 

Detailed Description

Callback interface for the Server application object.

This callback interface needs to be implemented if the application wants to implement user authentication.

Member Function Documentation

void UaServerApplicationCallback::afterCoreModuleStarted ( )
virtual

Optional method used to inform the application that the CoreModules was started.

This callback allows the application to add roles that are used server wide (roles in namespace1.

void UaServerApplicationCallback::afterLoadConfiguration ( ServerConfig pServerConfig)
virtual

Optional method used to inform the application that the configuration was loaded.

This callback allows the application to overwrite settings from configuration files before the server is started. This ensures that hard coded settings can not be changed by entering the configuration setting into the configuration file.

Parameters
pServerConfigThe server configuration interface
void UaServerApplicationCallback::afterNodeManagersStarted ( )
virtual

Optional method used to inform the application that all NodeManagers were started.

This callback allows the application to add rules to existing roles e.g. assing OperatorRole to user 'john'.

void UaServerApplicationCallback::beforeEndpointOpen ( UaEndpoint pEndpoint,
bool  certificateAvailable 
)
virtual

Optional method providing information about an endpoint that will be opened and the certificate that will be used by the server.

This callbacks allows certificate checks or the creation of a certificate before it is created by the SDK. UaEndpoint::pEndpointCertificateSettings() returns the certificate configuration used by the endpoint

Parameters
[in]pEndpointUaEndpoint that will be opened by the server
[in]certificateAvailableFlag indicating if a certificate is available
virtual Session* UaServerApplicationCallback::createSession ( OpcUa_Int32  sessionID,
const UaNodeId authenticationToken 
)
pure virtual

Creates a session object for the OPC server.

This callback allows the application to create its own session class derived from UaSession to store user specific information and to implement the user log-on and user verification.

Parameters
sessionIDSession Id created by the server application.
authenticationTokenSecret session Id created by the server application.
Returns
A pointer to the created session.
virtual UaServer* UaServerApplicationCallback::createUaServer ( )
inlinevirtual

Optional method used to create an application specific UaServer object used as main entry point for the UA communication.

The SDK creates an instance of the UaServer class as default implementation.

Returns
UaServer object or NULL if the SDK should use the default implementation.
virtual UaStatus UaServerApplicationCallback::logonSessionUser ( Session pSession,
UaUserIdentityToken pUserIdentityToken,
ServerConfig pServerConfig 
)
pure virtual

Validates the user identity token and sets the user for the session.

Parameters
pSessionInterface to the Session context for the method call
pUserIdentityTokenSecret session Id created by the server application.
pServerConfigThe server configuration interface
Returns
Error code.
bool UaServerApplicationCallback::nodeManagerStartUpError ( NodeManager pNodeManager)
virtual

Optional method used to inform the application that a NodeManagers could not be started.

This callback allows the application to decide if the server should ignore the error and continue to startup.

Returns
If the method returns true the SDK ignores the error and the server continues to start.
UaStatus UaServerApplicationCallback::requestServerStateChange ( Session pSession,
OpcUa_ServerState  state,
const UaDateTime estimatedReturnTime,
OpcUa_UInt32  secondsTillShutdown,
const UaLocalizedText shutdownReason,
OpcUa_Boolean  restart 
)
virtual

Optional method to requests the state change, shutdown or restart of the OPC UA Server application.

Returns
Result of the request. If the result tis Good, the application must folwow the request. If the result is Bad, the application will not change state.
Parameters
[in]pSessionSession context for the client request
[in]stateThe requested target state for the Server
[in]estimatedReturnTimeIndicates the time at which the Server is expected to be available in the state RUNNING_0.
[in]secondsTillShutdownSeconds till shutdown of the server. This parameter is ignored unless the state is set to SHUTDOWN_4 or restart is set to True.
[in]shutdownReasonReason for the shutdown
[in]restartA flag indicating if the Server should be restarted after shutdown
bool UaServerApplicationCallback::serverApplicationModuleStartUpError ( UaServerApplicationModule pModule)
virtual

Optional method used to inform the application that a UaServerApplicationModule could not be started.

This callback allows the application to decide if the server should ignore the error and continue to startup.

Returns
If the method returns true the SDK ignores the error and the server continues to start.

The documentation for this class was generated from the following files: