UTILLib 2.0
Common C++ library with utilities.
|
Interface against a task that supervise that an executable is running. More...
#include <algorithm>
#include <atomic>
#include <string>
#include <string_view>
#include <vector>
Go to the source code of this file.
Classes | |
class | util::supervise::ISuperviseApplication |
Supervise an executable application. More... |
Namespaces | |
namespace | util |
Main namespace for the util library. | |
namespace | util::xml |
The xml namespace is used for XML related classes and functions. |
Enumerations | |
enum class | util::supervise::ApplicationState : uint8_t { Stopped = 0 , Running = 1 , Failing = 2 , Ready = 3 } |
The supervisor state. More... | |
enum class | util::supervise::ApplicationStartup : uint8_t { Manual = 0 , Once = 1 , Automatic = 2 } |
Defines the type of startup for tha tas. More... | |
enum class | util::supervise::ApplicationPriority : uint8_t { Realtime , High , AboveNormal , Normal , BelowNormal , Idle } |
Defines the priority uses when it is running. More... |
Interface against a task that start, supervise and stop an executable. It belongs to a Supervise Master which is a list of applications that should be supervised.
|
strong |
Defines the priority the application uses when it is running. Background task should use Idle priority or High priority. GUI task should use Normal priority. Realtime should not be used as this may hang the computer.
|
strong |
The startup mode is set to each application and defines how it start, stop and being supervised.
In the Manual mode, the application is started when it is taken in-service by a remote application. If it is taken out-of-service, it stops. If it exit before it is taken out-of-service, the state is set to ApplicationState::Ready.
In the Once mode, the application only run once at startup. It is very similar to the Manual mode but it is set to in-service at startup.
In the Automatic mode, the application is started at startup and then checked that it is running. If the application stops, it will be restarted. Note that the restart is delayed 2-10 seconds. If number of restarts reach a maximum limit, it will stop restarting and a critical log event will be generated.
Enumerator | |
---|---|
Manual | Manual start and stop of the application. |
Once | Starts only one time. |
Automatic | Starts and restarts if stopped. |
|
strong |