Added machine readable exit reasons, INPUT_END trigger, OUTPUT_END trigger, and updated RECORDING_END trigger to include all of these.

This commit is contained in:
Marco 2022-12-22 13:41:10 +01:00 committed by Thulinma
parent a16d98b7b2
commit b0d4422d27
47 changed files with 493 additions and 256 deletions

View file

@ -17,7 +17,16 @@ namespace Util{
extern __thread char streamName[256]; ///< Used by debug messages to identify the stream name
void setStreamName(const std::string & sn);
extern __thread char exitReason[256];
void logExitReason(const char *format, ...);
extern __thread char* mRExitReason;
void logExitReason(const char* shortString, const char *format, ...);
enum binType {
UNSET,
INPUT,
OUTPUT,
PROCESS,
CONTROLLER
};
/// Deals with parsing configuration from commandline options.
class Config{
@ -30,6 +39,7 @@ namespace Util{
// variables
static bool is_active; ///< Set to true by activate(), set to false by the signal handler.
static bool is_restarting; ///< Set to true when restarting, set to false on boot.
static binType binaryType;
// functions
Config();
Config(std::string cmd);