High Performance OPC UA Server SDK  1.2.0.193
shutdown

Functionality for server shutdown and configuration reload. More...

Functions

int ua_shutdown_register_handler (void)
 Register the shutdown handler. More...
 
int ua_shutdown_unregister_handler (void)
 Unregister the shutdown handler. More...
 
int ua_shutdown_request_shutdown (void)
 Trigger manual shutdown.
 
int ua_shutdown_should_shutdown (void)
 Returns 1 if the server should shutdown, 0 otherwise. More...
 
int ua_shutdown_should_reload (void)
 Returns 1 if the server should reload the config. More...
 

Detailed Description

Functionality for server shutdown and configuration reload.

Applications can use this to handle shutdown events and reload events. Note: ua_shutdown_register_handler is not called by ua_platform_init, because it is an application decision to handle these events.

Applications must call them manually if they want to use this functionality:

int main(void)
{
// main server loop
return 0;
}

Plaforms which don't support this should simply return 0 in all functions and make this operations a NOP.

Function Documentation

int ua_shutdown_register_handler ( void  )

Register the shutdown handler.

Returns
Zero on success or errorcode on failure
int ua_shutdown_should_reload ( void  )

Returns 1 if the server should reload the config.

The internal state gets automitically reset, so this function returns 1 only one time.

int ua_shutdown_should_shutdown ( void  )

Returns 1 if the server should shutdown, 0 otherwise.

This function can be used in the main loop as shutdown condition.

int ua_shutdown_unregister_handler ( void  )

Unregister the shutdown handler.

Returns
Zero on success or errorcode on failure