36 lines
931 B
C++
36 lines
931 B
C++
#ifndef WATCHDOG_DEFINITIONS_H_
|
|
#define WATCHDOG_DEFINITIONS_H_
|
|
|
|
#include <watchdogConf.h>
|
|
|
|
namespace watchdog {
|
|
|
|
namespace first {
|
|
|
|
// Start or restart character
|
|
static constexpr char START_CHAR = 'b';
|
|
// Suspend watchdog operations temporarily
|
|
static constexpr char SUSPEND_CHAR = 's';
|
|
// Causes the watchdog to close down
|
|
static constexpr char CANCEL_CHAR = 'c';
|
|
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
|
|
|
|
static constexpr int TIMEOUT_MS = 5 * 1000;
|
|
// 2 minutes
|
|
static constexpr unsigned MAX_NOT_RUNNING_MS = 2 * 60 * 1000;
|
|
const std::string FIFO_NAME = "/tmp/watchdog-pipe";
|
|
const std::string RUNNING_FILE_NAME = "/tmp/obsw-running";
|
|
|
|
} // namespace watchdog
|
|
|
|
#endif /* WATCHDOG_DEFINITIONS_H_ */
|