#ifndef BSP_Q7S_CORE_WATCHDOGHANDLER_H_
#define BSP_Q7S_CORE_WATCHDOGHANDLER_H_

#include "fsfw/returnvalues/returnvalue.h"

class WatchdogHandler {
 public:
  WatchdogHandler();

  ReturnValue_t initialize(bool enableWatchFunction);
  void periodicOperation();

 private:
  // Designated value for rechecking FIFO open
  static constexpr int RETRY_FIFO_OPEN = -2;

  int watchdogFifoFd = 0;
  bool enableWatchFunction = false;

  ReturnValue_t performStartHandling();
};

#endif /* BSP_Q7S_CORE_WATCHDOGHANDLER_H_ */