complete iostream log replacements
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
namespace task {
|
||||
|
||||
void printInitError(const char* objName, object_id_t objectId) {
|
||||
FSFW_FLOGW("InitMission: Adding object {} ({:#08x}) failed\n", objName, objectId);
|
||||
FSFW_LOGW("InitMission: Adding object {} ({:#08x}) failed\n", objName, objectId);
|
||||
}
|
||||
|
||||
} // namespace task
|
||||
|
@ -56,7 +56,7 @@ ReturnValue_t TmFunnel::handlePacket(TmTcMessage* message) {
|
||||
result = tmQueue->sendToDefault(message);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
tmPool->deleteData(message->getStorageId());
|
||||
FSFW_FLOGET("{}", "handlePacket: Error sending to downlink handler\n");
|
||||
FSFW_LOGET("{}", "handlePacket: Error sending to downlink handler\n");
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ ReturnValue_t TmFunnel::handlePacket(TmTcMessage* message) {
|
||||
result = storageQueue->sendToDefault(message);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
tmPool->deleteData(message->getStorageId());
|
||||
FSFW_FLOGET("{}", "handlePacket: Error sending to storage handler\n");
|
||||
FSFW_LOGET("{}", "handlePacket: Error sending to storage handler\n");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -74,18 +74,18 @@ ReturnValue_t TmFunnel::handlePacket(TmTcMessage* message) {
|
||||
ReturnValue_t TmFunnel::initialize() {
|
||||
tmPool = ObjectManager::instance()->get<StorageManagerIF>(objects::TM_STORE);
|
||||
if (tmPool == nullptr) {
|
||||
FSFW_FLOGE("{}",
|
||||
"initialize: TM store not set\n"
|
||||
"Make sure the tm store is set up properly and implements StorageManagerIF");
|
||||
FSFW_LOGE("{}",
|
||||
"initialize: TM store not set\n"
|
||||
"Make sure the tm store is set up properly and implements StorageManagerIF");
|
||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||
}
|
||||
|
||||
auto* tmTarget = ObjectManager::instance()->get<AcceptsTelemetryIF>(downlinkDestination);
|
||||
if (tmTarget == nullptr) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
FSFW_FLOGE("{}",
|
||||
"initialize: Downlink Destination not set. Make sure the downlink destination "
|
||||
"object is set up properly and implements AcceptsTelemetryIF\n");
|
||||
FSFW_LOGE("{}",
|
||||
"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;
|
||||
}
|
||||
|
@ -1,22 +1,16 @@
|
||||
#include "utility.h"
|
||||
|
||||
#include <FSFWConfig.h>
|
||||
#include <OBSWVersion.h>
|
||||
#include <fsfw/serviceinterface/ServiceInterface.h>
|
||||
|
||||
#include "fsfw/serviceinterface.h"
|
||||
|
||||
void utility::commonInitPrint(const char* const os, const char* const board) {
|
||||
if (os == nullptr or board == nullptr) {
|
||||
return;
|
||||
}
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
std::cout << "-- FSFW Example (" << os << ") v" << FSFW_EXAMPLE_VERSION << "."
|
||||
<< FSFW_EXAMPLE_SUBVERSION << "." << FSFW_EXAMPLE_REVISION << " --" << std::endl;
|
||||
std::cout << "-- Compiled for " << board << " --" << std::endl;
|
||||
std::cout << "-- Compiled on " << __DATE__ << " " << __TIME__ << " --" << std::endl;
|
||||
#else
|
||||
printf("\n\r-- FSFW Example (%s) v%d.%d.%d --\n", os, FSFW_EXAMPLE_VERSION,
|
||||
FSFW_EXAMPLE_SUBVERSION, FSFW_EXAMPLE_REVISION);
|
||||
printf("-- Compiled for %s --\n", board);
|
||||
printf("-- Compiled on %s %s --\n", __DATE__, __TIME__);
|
||||
#endif
|
||||
fmt::print("-- FSFW Example ({}) v{}.{}.{} --\n", os, FSFW_EXAMPLE_VERSION,
|
||||
FSFW_EXAMPLE_SUBVERSION, FSFW_EXAMPLE_REVISION);
|
||||
fmt::print("-- Compiled for {}\n", board);
|
||||
fmt::print("-- Compiled on {} {}\n", __DATE__, __TIME__);
|
||||
sif::initialize();
|
||||
}
|
||||
|
Reference in New Issue
Block a user