replaced loggers
This commit is contained in:
@ -2,18 +2,12 @@
|
||||
#define MISSION_UTILITY_TASKCREATION_H_
|
||||
|
||||
#include <fsfw/objectmanager/SystemObjectIF.h>
|
||||
#include <fsfw/serviceinterface/ServiceInterface.h>
|
||||
#include <fsfw/serviceinterface.h>
|
||||
|
||||
namespace task {
|
||||
|
||||
void printInitError(const char* objName, object_id_t objectId) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "InitMission: Adding object " << objName << "(" << std::setw(8) << std::setfill('0')
|
||||
<< std::hex << objectId << std::dec << ") failed." << std::endl;
|
||||
#else
|
||||
sif::printError("InitMission: Adding object %s (0x%08x) failed.\n", objName,
|
||||
static_cast<unsigned int>(objectId));
|
||||
#endif
|
||||
FSFW_FLOGW("InitMission: Adding object {} ({:#08x}) failed\n", objName, objectId);
|
||||
}
|
||||
|
||||
} // namespace task
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include <fsfw/ipc/QueueFactory.h>
|
||||
#include <fsfw/objectmanager/ObjectManager.h>
|
||||
#include <fsfw/serviceinterface/ServiceInterface.h>
|
||||
#include <fsfw/serviceinterface.h>
|
||||
#include <fsfw/tmtcpacket/pus/tm.h>
|
||||
|
||||
object_id_t TmFunnel::downlinkDestination = objects::NO_OBJECT;
|
||||
@ -56,9 +56,7 @@ ReturnValue_t TmFunnel::handlePacket(TmTcMessage* message) {
|
||||
result = tmQueue->sendToDefault(message);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
tmPool->deleteData(message->getStorageId());
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "TmFunnel::handlePacket: Error sending to downlink handler" << std::endl;
|
||||
#endif
|
||||
FSFW_FLOGET("{}", "handlePacket: Error sending to downlink handler\n");
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -66,9 +64,7 @@ ReturnValue_t TmFunnel::handlePacket(TmTcMessage* message) {
|
||||
result = storageQueue->sendToDefault(message);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
tmPool->deleteData(message->getStorageId());
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "TmFunnel::handlePacket: Error sending to storage handler" << std::endl;
|
||||
#endif
|
||||
FSFW_FLOGET("{}", "handlePacket: Error sending to storage handler\n");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -78,22 +74,18 @@ ReturnValue_t TmFunnel::handlePacket(TmTcMessage* message) {
|
||||
ReturnValue_t TmFunnel::initialize() {
|
||||
tmPool = ObjectManager::instance()->get<StorageManagerIF>(objects::TM_STORE);
|
||||
if (tmPool == nullptr) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "TmFunnel::initialize: TM store not set." << std::endl;
|
||||
sif::error << "Make sure the tm store is set up properly and implements StorageManagerIF"
|
||||
<< std::endl;
|
||||
#endif
|
||||
FSFW_FLOGE("{}",
|
||||
"initialize: TM store not set\n"
|
||||
"Make sure the tm store is set up properly and implements StorageManagerIF");
|
||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||
}
|
||||
|
||||
AcceptsTelemetryIF* tmTarget =
|
||||
ObjectManager::instance()->get<AcceptsTelemetryIF>(downlinkDestination);
|
||||
auto* tmTarget = ObjectManager::instance()->get<AcceptsTelemetryIF>(downlinkDestination);
|
||||
if (tmTarget == nullptr) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "TmFunnel::initialize: Downlink Destination not set." << std::endl;
|
||||
sif::error << "Make sure the downlink destination object is set up properly and implements "
|
||||
"AcceptsTelemetryIF"
|
||||
<< std::endl;
|
||||
FSFW_FLOGE("{}",
|
||||
"initialize: Downlink Destination not set. Make sure the downlink destination "
|
||||
"object is set up properly and implements AcceptsTelemetryIF\n");
|
||||
#endif
|
||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||
}
|
||||
|
Reference in New Issue
Block a user