eive-obsw/watchdog/definitions.h

36 lines
931 B
C
Raw Normal View History

2022-02-22 13:35:12 +01:00
#ifndef WATCHDOG_DEFINITIONS_H_
#define WATCHDOG_DEFINITIONS_H_
2022-04-19 17:24:04 +02:00
#include <watchdogConf.h>
2022-02-22 13:35:12 +01:00
namespace watchdog {
2023-02-23 23:56:11 +01:00
namespace first {
// Start or restart character
static constexpr char START_CHAR = 'b';
2022-02-22 13:35:12 +01:00
// Suspend watchdog operations temporarily
static constexpr char SUSPEND_CHAR = 's';
// Causes the watchdog to close down
static constexpr char CANCEL_CHAR = 'c';
2023-02-23 23:56:11 +01:00
static constexpr char IDLE_CHAR = 'i';
} // namespace first
namespace second {
// Supplied with the start character. This will instruct the watchdog to actually watch
// the OBSW is runnng all the time.
static constexpr char WATCH_FLAG = 'w';
} // namespace second
2022-02-22 13:35:12 +01:00
static constexpr int TIMEOUT_MS = 5 * 1000;
2023-02-23 23:56:11 +01:00
// 2 minutes
static constexpr unsigned MAX_NOT_RUNNING_MS = 2 * 60 * 1000;
2022-02-22 13:35:12 +01:00
const std::string FIFO_NAME = "/tmp/watchdog-pipe";
const std::string RUNNING_FILE_NAME = "/tmp/obsw-running";
2023-02-23 23:56:11 +01:00
} // namespace watchdog
2022-02-22 13:35:12 +01:00
#endif /* WATCHDOG_DEFINITIONS_H_ */