reworked watchdog
This commit is contained in:
@ -1,24 +1,22 @@
|
||||
#include "Watchdog.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "Watchdog.h"
|
||||
|
||||
/**
|
||||
* @brief This watchdog application uses a FIFO to check whether the OBSW is still running.
|
||||
* It checks whether the OBSW writes to the the FIFO regularly.
|
||||
*/
|
||||
int main() {
|
||||
std::cout << "eive-watchdog: Starting OBSW watchdog.." << std::endl;
|
||||
try {
|
||||
WatchdogTask watchdogTask;
|
||||
int result = watchdogTask.performOperation();
|
||||
if(result != 0) {
|
||||
return result;
|
||||
}
|
||||
std::cout << "eive-watchdog: Starting OBSW watchdog.." << std::endl;
|
||||
try {
|
||||
WatchdogTask watchdogTask;
|
||||
int result = watchdogTask.performOperation();
|
||||
if (result != 0) {
|
||||
return result;
|
||||
}
|
||||
catch(const std::runtime_error& e) {
|
||||
std::cerr << "eive-watchdog: Run time exception " << e.what() << std::endl;
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
} catch (const std::runtime_error& e) {
|
||||
std::cerr << "eive-watchdog: Run time exception " << e.what() << std::endl;
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user