Robin Mueller
4a6840f098
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
- Tests finished
28 lines
698 B
C++
28 lines
698 B
C++
|
|
#include "utility.h"
|
|
|
|
#include <cstring>
|
|
|
|
#include "FSFWConfig.h"
|
|
#include "OBSWConfig.h"
|
|
#include "fsfw/serviceinterface/ServiceInterface.h"
|
|
#include "fsfw/timemanager/Clock.h"
|
|
|
|
void utility::handleSystemError(int retcode, std::string function) {
|
|
#if OBSW_VERBOSE_LEVEL >= 1
|
|
sif::warning << function << ": System call failed with code " << retcode << ": "
|
|
<< strerror(retcode) << std::endl;
|
|
#endif
|
|
}
|
|
|
|
bool utility::timeSanityCheck() {
|
|
timeval currentTime = {};
|
|
Clock::getUptime(¤tTime);
|
|
Clock::TimeOfDay_t currTimeOfDay = {};
|
|
Clock::convertTimevalToTimeOfDay(¤tTime, &currTimeOfDay);
|
|
if (currTimeOfDay.year == 2000) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|