eive-obsw/mission/system/tree/util.cpp

20 lines
638 B
C++
Raw Normal View History

#include "util.h"
2022-11-03 20:57:55 +01:00
#include "fsfw/container/FixedMap.h"
#include "fsfw/serviceinterface.h"
void subsystem::checkInsert(ReturnValue_t result, const char* ctx) {
2022-08-29 15:56:18 +02:00
if (result != returnvalue::OK) {
2022-11-03 20:57:55 +01:00
sif::warning << "satsystem::checkInsert: Insertion failed at " << ctx;
2022-11-10 15:12:50 +01:00
if (result == containers::KEY_ALREADY_EXISTS) {
2022-11-03 20:57:55 +01:00
sif::warning << ": Key already exists" << std::endl;
2022-11-10 15:12:50 +01:00
} else if (result == containers::MAP_FULL) {
2022-11-03 20:57:55 +01:00
sif::warning << ": Map full" << std::endl;
2022-11-10 15:12:50 +01:00
} else if (result == containers::LIST_FULL) {
sif::warning << ": List full" << std::endl;
2022-11-03 20:57:55 +01:00
} else {
sif::warning << std::endl;
}
}
}