C++ Based OPC UA Client/Server SDK
1.6.1.391
|
Main OPC Server object. More...
#include <opcserver.h>
Inherits UaServerApplication.
Public Member Functions | |
OpcServer () | |
Construction. More... | |
OpcServer (int argc, char *argv[], bool bRunAsService, const UaString &sApplicationName) | |
Construction. More... | |
virtual | ~OpcServer () |
Destruction. More... | |
virtual OpcUa_DateTime | getBuildDate () const |
Get the build date from the static compiled in string. More... | |
Public Member Functions inherited from UaServerApplication | |
UaServerApplication () | |
Construction. More... | |
UaServerApplication (int argc, char *argv[], bool bRunAsService, const UaString &sApplicationName) | |
Construction. More... | |
virtual | ~UaServerApplication () |
Destruction. More... | |
OpcUa_UInt32 | getEndpointCount () |
Returns the number of OPC UA endpoints in the server. More... | |
UaEndpoint * | getEndpoint (OpcUa_UInt32 endpointIndex) |
Returns the endpoint at the sepcified index. More... | |
OpcUa_UInt32 | addEndpoint (UaEndpoint *pEndpoint) |
Adds an endpoint to the server. More... | |
UaStatus | restartUaServer () |
Open endpoints to restart OPC UA communication. More... | |
UaStatus | pauseUaServer () |
Pause the OPC UA communication and close endpoints. More... | |
UaStatus | requestServerStateChange (Session *pSession, OpcUa_ServerState state, const UaDateTime &estimatedReturnTime, OpcUa_UInt32 secondsTillShutdown, const UaLocalizedText &shutdownReason, OpcUa_Boolean restart) |
Requests the shutdown of the OPC UA Server application from the SDK module through an OPC UA method. More... | |
void | beforeEndpointOpen (UaEndpoint *pEndpoint, bool certificateAvailable) |
Information about an endpoint that will be opened by the server. More... | |
Public Member Functions inherited from UaCoreServerApplication | |
UaCoreServerApplication () | |
Creates an instance of UaCoreServerApplication with default settings. More... | |
UaCoreServerApplication (int argc, char *argv[], bool bRunAsService, const UaString &sApplicationName) | |
Creates an instance of UaCoreServerApplication with service related settings. More... | |
virtual | ~UaCoreServerApplication () |
Destroys the UaCoreServerApplication object. More... | |
int | setServerConfig (const UaString &configurationFile, const UaString &sApplicationPath) |
Sets the server configuration by passing the path of the configuration file. More... | |
int | setServerConfig (const UaString &configurationFile, const UaString &sApplicationPath, const UaString &sConfigPath, const UaString &sTracePath) |
Sets the server configuration by passing the path of the configuration file. More... | |
int | setServerConfig (ServerConfig *pServerConfig) |
Sets the server configuration by passing a server configuration object. More... | |
int | addNodeManager (NodeManager *pNodeManager) |
Adds a node manager to the SDK. More... | |
int | addModule (UaServerApplicationModule *pModule) |
Adds a Module to the SDK. More... | |
int | removeNodeManager (NodeManager *pNodeManager) |
Removes and deletes the NodeManager from the SDK. More... | |
int | removeModule (UaServerApplicationModule *pModule) |
Removes and deletes the Module from the SDK. More... | |
int | setCallback (UaServerApplicationCallback *pUaServerApplicationCallback) |
Sets the callback interface for the server object. More... | |
void | setSecondsTillShutdown (OpcUa_Int32 secondsTillShutdown) |
Set seconds till shudown sent to OPC UA client during shut down. | |
void | setShutdownReason (const UaLocalizedText &shutdownReason) |
Set shudown reason sent to OPC UA client during shut down. | |
int | start () |
Starts the OPC server Initializes and starts up all NodeManagers and SDK modules. More... | |
int | stop (OpcUa_Int32 secondsTillShutdown, const UaLocalizedText &shutdownReason) |
Stopps the OPC server Shutdown and deletes all SDK modules and NodeManagers. More... | |
NodeManagerConfig * | getDefaultNodeManager () |
Returns the default node manager for server specific nodes in namespace one. More... | |
ServerManager * | getServerManager () |
Returns the ServerManager object. | |
ServerConfig * | getServerConfig () |
Returns the ServerConfig object. | |
CoreModule * | getCoreModule () |
Returns the CoreModule object. | |
OpcUa_Boolean | isStarted () |
Returns the isStarted flag. | |
OpcUa_Int32 | secondsTillShutdown () |
Get seconds till shudown sent to OPC UA client during shut down. | |
UaLocalizedText | shutdownReason () |
Get shudown reason sent to OPC UA client during shut down. | |
Public Member Functions inherited from UaApplicationControlCallback | |
UaApplicationControlCallback () | |
Construction. | |
virtual | ~UaApplicationControlCallback () |
Destruction. | |
Protected Member Functions | |
virtual UaStatus | afterStartUp () |
This method needs to be implemented by the derived class and is called to finish the start-up of the UaCoreServerApplication. More... | |
Protected Member Functions inherited from UaServerApplication | |
virtual Session * | createDefaultSession (OpcUa_Int32 sessionID, const UaNodeId &authenticationToken) |
Creates a session object for the OPC server. More... | |
virtual UaStatus | afterInitialize () |
This method needs to be implemented by the derived class and is called to finish the initialization of the UaCoreServerApplication. More... | |
virtual UaStatus | beforeShutdown () |
This method needs to be implemented by the derived class and is called to start the shutdown of the UaCoreServerApplication. More... | |
Protected Member Functions inherited from UaCoreServerApplication | |
virtual int | main () |
Main function for server process. More... | |
Main OPC Server object.
This class is a utility class managing all server SDK modules for common use cases in a simplified way. Enhanced users may replace this class with their own implementation to be able to use derived classes to overwrite SDK functionality.
OpcServer::OpcServer | ( | ) |
Construction.
OpcServer::OpcServer | ( | int | argc, |
char * | argv[], | ||
bool | bRunAsService, | ||
const UaString & | sApplicationName | ||
) |
Construction.
|
virtual |
Destruction.
|
protectedvirtual |
This method needs to be implemented by the derived class and is called to finish the start-up of the UaCoreServerApplication.
This method is typically used to start up the communication modules like the UaModule.
Reimplemented from UaServerApplication.
|
virtual |
Get the build date from the static compiled in string.
Reimplemented from UaCoreServerApplication.