replaced all fsfw:: by sif:: for printouts
This commit is contained in:
parent
071ce21f09
commit
7e394ea15f
@ -73,8 +73,8 @@ void PoolEntry<T>::print() {
|
|||||||
sif::info << "PoolEntry information." << std::endl;
|
sif::info << "PoolEntry information." << std::endl;
|
||||||
sif::info << "PoolEntry validity: " << validString << std::endl;
|
sif::info << "PoolEntry validity: " << validString << std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printInfo("PoolEntry information.\n");
|
sif::printInfo("PoolEntry information.\n");
|
||||||
fsfw::printInfo("PoolEntry validity: %s\n", validString);
|
sif::printInfo("PoolEntry validity: %s\n", validString);
|
||||||
#endif
|
#endif
|
||||||
arrayprinter::print(reinterpret_cast<uint8_t*>(address), getByteSize());
|
arrayprinter::print(reinterpret_cast<uint8_t*>(address), getByteSize());
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ public:
|
|||||||
sif::warning << "HasLocalDataPoolIF::getPoolObjectHandle: Not overriden"
|
sif::warning << "HasLocalDataPoolIF::getPoolObjectHandle: Not overriden"
|
||||||
<< ". Returning nullptr!" << std::endl;
|
<< ". Returning nullptr!" << std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printWarning("HasLocalDataPoolIF::getPoolObjectHandle: "
|
sif::printWarning("HasLocalDataPoolIF::getPoolObjectHandle: "
|
||||||
"Not overriden. Returning nullptr!\n");
|
"Not overriden. Returning nullptr!\n");
|
||||||
#endif
|
#endif
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
@ -20,7 +20,7 @@ LocalDataPoolManager::LocalDataPoolManager(HasLocalDataPoolIF* owner,
|
|||||||
MessageQueueIF* queueToUse, bool appendValidityBuffer):
|
MessageQueueIF* queueToUse, bool appendValidityBuffer):
|
||||||
appendValidityBuffer(appendValidityBuffer) {
|
appendValidityBuffer(appendValidityBuffer) {
|
||||||
if(owner == nullptr) {
|
if(owner == nullptr) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
|
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
||||||
"LocalDataPoolManager", HasReturnvaluesIF::RETURN_FAILED,
|
"LocalDataPoolManager", HasReturnvaluesIF::RETURN_FAILED,
|
||||||
"Invalid supplied owner");
|
"Invalid supplied owner");
|
||||||
return;
|
return;
|
||||||
@ -28,7 +28,7 @@ LocalDataPoolManager::LocalDataPoolManager(HasLocalDataPoolIF* owner,
|
|||||||
this->owner = owner;
|
this->owner = owner;
|
||||||
mutex = MutexFactory::instance()->createMutex();
|
mutex = MutexFactory::instance()->createMutex();
|
||||||
if(mutex == nullptr) {
|
if(mutex == nullptr) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_ERROR,
|
printWarningOrError(sif::OutputTypes::OUT_ERROR,
|
||||||
"LocalDataPoolManager", HasReturnvaluesIF::RETURN_FAILED,
|
"LocalDataPoolManager", HasReturnvaluesIF::RETURN_FAILED,
|
||||||
"Could not create mutex");
|
"Could not create mutex");
|
||||||
}
|
}
|
||||||
@ -41,7 +41,7 @@ LocalDataPoolManager::~LocalDataPoolManager() {}
|
|||||||
ReturnValue_t LocalDataPoolManager::initialize(MessageQueueIF* queueToUse) {
|
ReturnValue_t LocalDataPoolManager::initialize(MessageQueueIF* queueToUse) {
|
||||||
if(queueToUse == nullptr) {
|
if(queueToUse == nullptr) {
|
||||||
// error, all destinations invalid
|
// error, all destinations invalid
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_ERROR,
|
printWarningOrError(sif::OutputTypes::OUT_ERROR,
|
||||||
"initialize", QUEUE_OR_DESTINATION_INVALID);
|
"initialize", QUEUE_OR_DESTINATION_INVALID);
|
||||||
}
|
}
|
||||||
hkQueue = queueToUse;
|
hkQueue = queueToUse;
|
||||||
@ -49,7 +49,7 @@ ReturnValue_t LocalDataPoolManager::initialize(MessageQueueIF* queueToUse) {
|
|||||||
ipcStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
|
ipcStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
|
||||||
if(ipcStore == nullptr) {
|
if(ipcStore == nullptr) {
|
||||||
// error, all destinations invalid
|
// error, all destinations invalid
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_ERROR,
|
printWarningOrError(sif::OutputTypes::OUT_ERROR,
|
||||||
"initialize", HasReturnvaluesIF::RETURN_FAILED,
|
"initialize", HasReturnvaluesIF::RETURN_FAILED,
|
||||||
"Could not set IPC store.");
|
"Could not set IPC store.");
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
@ -63,7 +63,7 @@ ReturnValue_t LocalDataPoolManager::initialize(MessageQueueIF* queueToUse) {
|
|||||||
hkDestinationId = hkPacketReceiver->getHkQueue();
|
hkDestinationId = hkPacketReceiver->getHkQueue();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_ERROR,
|
printWarningOrError(sif::OutputTypes::OUT_ERROR,
|
||||||
"initialize", QUEUE_OR_DESTINATION_INVALID);
|
"initialize", QUEUE_OR_DESTINATION_INVALID);
|
||||||
return QUEUE_OR_DESTINATION_INVALID;
|
return QUEUE_OR_DESTINATION_INVALID;
|
||||||
}
|
}
|
||||||
@ -88,7 +88,7 @@ ReturnValue_t LocalDataPoolManager::initializeHousekeepingPoolEntriesOnce() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
|
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
||||||
"initialize", HasReturnvaluesIF::RETURN_FAILED,
|
"initialize", HasReturnvaluesIF::RETURN_FAILED,
|
||||||
"The map should only be initialized once");
|
"The map should only be initialized once");
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
@ -155,7 +155,7 @@ ReturnValue_t LocalDataPoolManager::handleNotificationUpdate(
|
|||||||
LocalPoolObjectBase* poolObj = owner->getPoolObjectHandle(
|
LocalPoolObjectBase* poolObj = owner->getPoolObjectHandle(
|
||||||
receiver.dataId.localPoolId);
|
receiver.dataId.localPoolId);
|
||||||
if(poolObj == nullptr) {
|
if(poolObj == nullptr) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
|
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
||||||
"handleNotificationUpdate", POOLOBJECT_NOT_FOUND);
|
"handleNotificationUpdate", POOLOBJECT_NOT_FOUND);
|
||||||
return POOLOBJECT_NOT_FOUND;
|
return POOLOBJECT_NOT_FOUND;
|
||||||
}
|
}
|
||||||
@ -177,7 +177,7 @@ ReturnValue_t LocalDataPoolManager::handleNotificationUpdate(
|
|||||||
LocalPoolDataSetBase* dataSet = owner->getDataSetHandle(
|
LocalPoolDataSetBase* dataSet = owner->getDataSetHandle(
|
||||||
receiver.dataId.sid);
|
receiver.dataId.sid);
|
||||||
if(dataSet == nullptr) {
|
if(dataSet == nullptr) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
|
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
||||||
"handleNotificationUpdate", DATASET_NOT_FOUND);
|
"handleNotificationUpdate", DATASET_NOT_FOUND);
|
||||||
return DATASET_NOT_FOUND;
|
return DATASET_NOT_FOUND;
|
||||||
}
|
}
|
||||||
@ -209,7 +209,7 @@ ReturnValue_t LocalDataPoolManager::handleNotificationSnapshot(
|
|||||||
LocalPoolObjectBase* poolObj = owner->getPoolObjectHandle(
|
LocalPoolObjectBase* poolObj = owner->getPoolObjectHandle(
|
||||||
receiver.dataId.localPoolId);
|
receiver.dataId.localPoolId);
|
||||||
if(poolObj == nullptr) {
|
if(poolObj == nullptr) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
|
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
||||||
"handleNotificationSnapshot", POOLOBJECT_NOT_FOUND);
|
"handleNotificationSnapshot", POOLOBJECT_NOT_FOUND);
|
||||||
return POOLOBJECT_NOT_FOUND;
|
return POOLOBJECT_NOT_FOUND;
|
||||||
}
|
}
|
||||||
@ -247,7 +247,7 @@ ReturnValue_t LocalDataPoolManager::handleNotificationSnapshot(
|
|||||||
LocalPoolDataSetBase* dataSet = owner->getDataSetHandle(
|
LocalPoolDataSetBase* dataSet = owner->getDataSetHandle(
|
||||||
receiver.dataId.sid);
|
receiver.dataId.sid);
|
||||||
if(dataSet == nullptr) {
|
if(dataSet == nullptr) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
|
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
||||||
"handleNotificationSnapshot", DATASET_NOT_FOUND);
|
"handleNotificationSnapshot", DATASET_NOT_FOUND);
|
||||||
return DATASET_NOT_FOUND;
|
return DATASET_NOT_FOUND;
|
||||||
}
|
}
|
||||||
@ -355,7 +355,7 @@ ReturnValue_t LocalDataPoolManager::subscribeForPeriodicPacket(sid_t sid,
|
|||||||
AcceptsHkPacketsIF* hkReceiverObject =
|
AcceptsHkPacketsIF* hkReceiverObject =
|
||||||
objectManager->get<AcceptsHkPacketsIF>(packetDestination);
|
objectManager->get<AcceptsHkPacketsIF>(packetDestination);
|
||||||
if(hkReceiverObject == nullptr) {
|
if(hkReceiverObject == nullptr) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
|
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
||||||
"subscribeForPeriodicPacket", QUEUE_OR_DESTINATION_INVALID);
|
"subscribeForPeriodicPacket", QUEUE_OR_DESTINATION_INVALID);
|
||||||
return QUEUE_OR_DESTINATION_INVALID;
|
return QUEUE_OR_DESTINATION_INVALID;
|
||||||
}
|
}
|
||||||
@ -385,7 +385,7 @@ ReturnValue_t LocalDataPoolManager::subscribeForUpdatePackets(sid_t sid,
|
|||||||
AcceptsHkPacketsIF* hkReceiverObject =
|
AcceptsHkPacketsIF* hkReceiverObject =
|
||||||
objectManager->get<AcceptsHkPacketsIF>(packetDestination);
|
objectManager->get<AcceptsHkPacketsIF>(packetDestination);
|
||||||
if(hkReceiverObject == nullptr) {
|
if(hkReceiverObject == nullptr) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
|
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
||||||
"subscribeForPeriodicPacket", QUEUE_OR_DESTINATION_INVALID);
|
"subscribeForPeriodicPacket", QUEUE_OR_DESTINATION_INVALID);
|
||||||
return QUEUE_OR_DESTINATION_INVALID;
|
return QUEUE_OR_DESTINATION_INVALID;
|
||||||
}
|
}
|
||||||
@ -594,7 +594,7 @@ ReturnValue_t LocalDataPoolManager::printPoolEntry(
|
|||||||
lp_id_t localPoolId) {
|
lp_id_t localPoolId) {
|
||||||
auto poolIter = localPoolMap.find(localPoolId);
|
auto poolIter = localPoolMap.find(localPoolId);
|
||||||
if (poolIter == localPoolMap.end()) {
|
if (poolIter == localPoolMap.end()) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_WARNING, "printPoolEntry",
|
printWarningOrError(sif::OutputTypes::OUT_WARNING, "printPoolEntry",
|
||||||
HasLocalDataPoolIF::POOL_ENTRY_NOT_FOUND);
|
HasLocalDataPoolIF::POOL_ENTRY_NOT_FOUND);
|
||||||
return HasLocalDataPoolIF::POOL_ENTRY_NOT_FOUND;
|
return HasLocalDataPoolIF::POOL_ENTRY_NOT_FOUND;
|
||||||
}
|
}
|
||||||
@ -615,7 +615,7 @@ ReturnValue_t LocalDataPoolManager::generateHousekeepingPacket(sid_t sid,
|
|||||||
MessageQueueId_t destination) {
|
MessageQueueId_t destination) {
|
||||||
if(dataSet == nullptr) {
|
if(dataSet == nullptr) {
|
||||||
// Configuration error.
|
// Configuration error.
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
|
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
||||||
"generateHousekeepingPacket",
|
"generateHousekeepingPacket",
|
||||||
DATASET_NOT_FOUND);
|
DATASET_NOT_FOUND);
|
||||||
return DATASET_NOT_FOUND;
|
return DATASET_NOT_FOUND;
|
||||||
@ -641,7 +641,7 @@ ReturnValue_t LocalDataPoolManager::generateHousekeepingPacket(sid_t sid,
|
|||||||
|
|
||||||
if(hkQueue == nullptr) {
|
if(hkQueue == nullptr) {
|
||||||
// error, no queue available to send packet with.
|
// error, no queue available to send packet with.
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
|
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
||||||
"generateHousekeepingPacket",
|
"generateHousekeepingPacket",
|
||||||
QUEUE_OR_DESTINATION_INVALID);
|
QUEUE_OR_DESTINATION_INVALID);
|
||||||
return QUEUE_OR_DESTINATION_INVALID;
|
return QUEUE_OR_DESTINATION_INVALID;
|
||||||
@ -649,7 +649,7 @@ ReturnValue_t LocalDataPoolManager::generateHousekeepingPacket(sid_t sid,
|
|||||||
if(destination == MessageQueueIF::NO_QUEUE) {
|
if(destination == MessageQueueIF::NO_QUEUE) {
|
||||||
if(hkDestinationId == MessageQueueIF::NO_QUEUE) {
|
if(hkDestinationId == MessageQueueIF::NO_QUEUE) {
|
||||||
// error, all destinations invalid
|
// error, all destinations invalid
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
|
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
||||||
"generateHousekeepingPacket",
|
"generateHousekeepingPacket",
|
||||||
QUEUE_OR_DESTINATION_INVALID);
|
QUEUE_OR_DESTINATION_INVALID);
|
||||||
}
|
}
|
||||||
@ -688,7 +688,7 @@ void LocalDataPoolManager::performPeriodicHkGeneration(HkReceiver& receiver) {
|
|||||||
sid_t sid = receiver.dataId.sid;
|
sid_t sid = receiver.dataId.sid;
|
||||||
LocalPoolDataSetBase* dataSet = owner->getDataSetHandle(sid);
|
LocalPoolDataSetBase* dataSet = owner->getDataSetHandle(sid);
|
||||||
if(dataSet == nullptr) {
|
if(dataSet == nullptr) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
|
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
||||||
"performPeriodicHkGeneration",
|
"performPeriodicHkGeneration",
|
||||||
DATASET_NOT_FOUND);
|
DATASET_NOT_FOUND);
|
||||||
return;
|
return;
|
||||||
@ -715,7 +715,7 @@ void LocalDataPoolManager::performPeriodicHkGeneration(HkReceiver& receiver) {
|
|||||||
sif::warning << "LocalDataPoolManager::performHkOperation: "
|
sif::warning << "LocalDataPoolManager::performHkOperation: "
|
||||||
<< "HK generation failed." << std::endl;
|
<< "HK generation failed." << std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printWarning("LocalDataPoolManager::performHkOperation: "
|
sif::printWarning("LocalDataPoolManager::performHkOperation: "
|
||||||
"HK generation failed.\n");
|
"HK generation failed.\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -762,7 +762,7 @@ ReturnValue_t LocalDataPoolManager::generateSetStructurePacket(sid_t sid,
|
|||||||
// Get and check dataset first.
|
// Get and check dataset first.
|
||||||
LocalPoolDataSetBase* dataSet = owner->getDataSetHandle(sid);
|
LocalPoolDataSetBase* dataSet = owner->getDataSetHandle(sid);
|
||||||
if(dataSet == nullptr) {
|
if(dataSet == nullptr) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
|
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
||||||
"performPeriodicHkGeneration",
|
"performPeriodicHkGeneration",
|
||||||
DATASET_NOT_FOUND);
|
DATASET_NOT_FOUND);
|
||||||
return DATASET_NOT_FOUND;
|
return DATASET_NOT_FOUND;
|
||||||
@ -789,7 +789,7 @@ ReturnValue_t LocalDataPoolManager::generateSetStructurePacket(sid_t sid,
|
|||||||
ReturnValue_t result = ipcStore->getFreeElement(&storeId,
|
ReturnValue_t result = ipcStore->getFreeElement(&storeId,
|
||||||
expectedSize,&storePtr);
|
expectedSize,&storePtr);
|
||||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_ERROR,
|
printWarningOrError(sif::OutputTypes::OUT_ERROR,
|
||||||
"generateSetStructurePacket", HasReturnvaluesIF::RETURN_FAILED,
|
"generateSetStructurePacket", HasReturnvaluesIF::RETURN_FAILED,
|
||||||
"Could not get free element from IPC store.");
|
"Could not get free element from IPC store.");
|
||||||
return result;
|
return result;
|
||||||
@ -800,7 +800,7 @@ ReturnValue_t LocalDataPoolManager::generateSetStructurePacket(sid_t sid,
|
|||||||
result = setPacket.serialize(&storePtr, &size, expectedSize,
|
result = setPacket.serialize(&storePtr, &size, expectedSize,
|
||||||
SerializeIF::Endianness::BIG);
|
SerializeIF::Endianness::BIG);
|
||||||
if(expectedSize != size) {
|
if(expectedSize != size) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
|
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
||||||
"generateSetStructurePacket", HasReturnvaluesIF::RETURN_FAILED,
|
"generateSetStructurePacket", HasReturnvaluesIF::RETURN_FAILED,
|
||||||
"Expected size is not equal to serialized size");
|
"Expected size is not equal to serialized size");
|
||||||
}
|
}
|
||||||
@ -825,7 +825,7 @@ void LocalDataPoolManager::clearReceiversList() {
|
|||||||
HkReceivers().swap(hkReceiversMap);
|
HkReceivers().swap(hkReceiversMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocalDataPoolManager::printWarningOrError(fsfw::OutputTypes outputType,
|
void LocalDataPoolManager::printWarningOrError(sif::OutputTypes outputType,
|
||||||
const char* functionName, ReturnValue_t error, const char* errorPrint) {
|
const char* functionName, ReturnValue_t error, const char* errorPrint) {
|
||||||
if(errorPrint == nullptr) {
|
if(errorPrint == nullptr) {
|
||||||
if(error == DATASET_NOT_FOUND) {
|
if(error == DATASET_NOT_FOUND) {
|
||||||
@ -835,7 +835,7 @@ void LocalDataPoolManager::printWarningOrError(fsfw::OutputTypes outputType,
|
|||||||
errorPrint = "Pool Object not found";
|
errorPrint = "Pool Object not found";
|
||||||
}
|
}
|
||||||
else if(error == HasReturnvaluesIF::RETURN_FAILED) {
|
else if(error == HasReturnvaluesIF::RETURN_FAILED) {
|
||||||
if(outputType == fsfw::OutputTypes::OUT_WARNING) {
|
if(outputType == sif::OutputTypes::OUT_WARNING) {
|
||||||
errorPrint = "Generic Warning";
|
errorPrint = "Generic Warning";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -856,25 +856,25 @@ void LocalDataPoolManager::printWarningOrError(fsfw::OutputTypes outputType,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(outputType == fsfw::OutputTypes::OUT_WARNING) {
|
if(outputType == sif::OutputTypes::OUT_WARNING) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::warning << "LocalDataPoolManager::" << functionName
|
sif::warning << "LocalDataPoolManager::" << functionName
|
||||||
<< ": Object ID " << std::setw(8) << std::setfill('0')
|
<< ": Object ID " << std::setw(8) << std::setfill('0')
|
||||||
<< std::hex << owner->getObjectId() << " | " << errorPrint
|
<< std::hex << owner->getObjectId() << " | " << errorPrint
|
||||||
<< std::dec << std::setfill(' ') << std::endl;
|
<< std::dec << std::setfill(' ') << std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printWarning("LocalDataPoolManager::%s: Object ID 0x%08x | %s\n",
|
sif::printWarning("LocalDataPoolManager::%s: Object ID 0x%08x | %s\n",
|
||||||
owner->getObjectId(), errorPrint);
|
owner->getObjectId(), errorPrint);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if(outputType == fsfw::OutputTypes::OUT_ERROR) {
|
else if(outputType == sif::OutputTypes::OUT_ERROR) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "LocalDataPoolManager::" << functionName
|
sif::error << "LocalDataPoolManager::" << functionName
|
||||||
<< ": Object ID " << std::setw(8) << std::setfill('0')
|
<< ": Object ID " << std::setw(8) << std::setfill('0')
|
||||||
<< std::hex << owner->getObjectId() << " | " << errorPrint
|
<< std::hex << owner->getObjectId() << " | " << errorPrint
|
||||||
<< std::dec << std::setfill(' ') << std::endl;
|
<< std::dec << std::setfill(' ') << std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printError("LocalDataPoolManager::%s: Object ID 0x%08x | %s\n",
|
sif::printError("LocalDataPoolManager::%s: Object ID 0x%08x | %s\n",
|
||||||
owner->getObjectId(), errorPrint);
|
owner->getObjectId(), errorPrint);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -377,7 +377,7 @@ private:
|
|||||||
ReturnValue_t addUpdateToStore(HousekeepingPacketUpdate& updatePacket,
|
ReturnValue_t addUpdateToStore(HousekeepingPacketUpdate& updatePacket,
|
||||||
store_address_t& storeId);
|
store_address_t& storeId);
|
||||||
|
|
||||||
void printWarningOrError(fsfw::OutputTypes outputType,
|
void printWarningOrError(sif::OutputTypes outputType,
|
||||||
const char* functionName,
|
const char* functionName,
|
||||||
ReturnValue_t errorCode = HasReturnvaluesIF::RETURN_FAILED,
|
ReturnValue_t errorCode = HasReturnvaluesIF::RETURN_FAILED,
|
||||||
const char* errorPrint = nullptr);
|
const char* errorPrint = nullptr);
|
||||||
@ -389,14 +389,14 @@ ReturnValue_t LocalDataPoolManager::fetchPoolEntry(lp_id_t localPoolId,
|
|||||||
PoolEntry<T> **poolEntry) {
|
PoolEntry<T> **poolEntry) {
|
||||||
auto poolIter = localPoolMap.find(localPoolId);
|
auto poolIter = localPoolMap.find(localPoolId);
|
||||||
if (poolIter == localPoolMap.end()) {
|
if (poolIter == localPoolMap.end()) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_ERROR, "fetchPoolEntry",
|
printWarningOrError(sif::OutputTypes::OUT_ERROR, "fetchPoolEntry",
|
||||||
HasLocalDataPoolIF::POOL_ENTRY_NOT_FOUND);
|
HasLocalDataPoolIF::POOL_ENTRY_NOT_FOUND);
|
||||||
return HasLocalDataPoolIF::POOL_ENTRY_NOT_FOUND;
|
return HasLocalDataPoolIF::POOL_ENTRY_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
*poolEntry = dynamic_cast< PoolEntry<T>* >(poolIter->second);
|
*poolEntry = dynamic_cast< PoolEntry<T>* >(poolIter->second);
|
||||||
if(*poolEntry == nullptr) {
|
if(*poolEntry == nullptr) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_ERROR, "fetchPoolEntry",
|
printWarningOrError(sif::OutputTypes::OUT_ERROR, "fetchPoolEntry",
|
||||||
HasLocalDataPoolIF::POOL_ENTRY_TYPE_CONFLICT);
|
HasLocalDataPoolIF::POOL_ENTRY_TYPE_CONFLICT);
|
||||||
return HasLocalDataPoolIF::POOL_ENTRY_TYPE_CONFLICT;
|
return HasLocalDataPoolIF::POOL_ENTRY_TYPE_CONFLICT;
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ LocalPoolDataSetBase::LocalPoolDataSetBase(HasLocalDataPoolIF *hkOwner,
|
|||||||
sif::error << "LocalPoolDataSetBase::LocalPoolDataSetBase: Owner "
|
sif::error << "LocalPoolDataSetBase::LocalPoolDataSetBase: Owner "
|
||||||
<< "invalid!" << std::endl;
|
<< "invalid!" << std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printError("LocalPoolDataSetBase::LocalPoolDataSetBase: Owner "
|
sif::printError("LocalPoolDataSetBase::LocalPoolDataSetBase: Owner "
|
||||||
"invalid!\n\r");
|
"invalid!\n\r");
|
||||||
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
|
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
|
||||||
return;
|
return;
|
||||||
@ -171,7 +171,7 @@ ReturnValue_t LocalPoolDataSetBase::serializeLocalPoolIds(uint8_t** buffer,
|
|||||||
sif::warning << "LocalPoolDataSetBase::serializeLocalPoolIds: "
|
sif::warning << "LocalPoolDataSetBase::serializeLocalPoolIds: "
|
||||||
<< "Serialization error!" << std::endl;
|
<< "Serialization error!" << std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printWarning("LocalPoolDataSetBase::serializeLocalPoolIds: "
|
sif::printWarning("LocalPoolDataSetBase::serializeLocalPoolIds: "
|
||||||
"Serialization error!\n\r");
|
"Serialization error!\n\r");
|
||||||
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
|
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
|
||||||
return result;
|
return result;
|
||||||
@ -235,7 +235,7 @@ void LocalPoolDataSetBase::bitSetter(uint8_t* byte, uint8_t position) const {
|
|||||||
sif::warning << "LocalPoolDataSetBase::bitSetter: Invalid position!"
|
sif::warning << "LocalPoolDataSetBase::bitSetter: Invalid position!"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printWarning("LocalPoolDataSetBase::bitSetter: "
|
sif::printWarning("LocalPoolDataSetBase::bitSetter: "
|
||||||
"Invalid position!\n\r");
|
"Invalid position!\n\r");
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
@ -114,7 +114,7 @@ void LocalPoolObjectBase::reportReadCommitError(const char* variableType,
|
|||||||
<< std::setfill('0') << objectId << std::dec << " LPID: " << lpId
|
<< std::setfill('0') << objectId << std::dec << " LPID: " << lpId
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printWarning("%s: %s call | %s | Owner: 0x%08x LPID: %lu\n",
|
sif::printWarning("%s: %s call | %s | Owner: 0x%08x LPID: %lu\n",
|
||||||
variableType, type, errMsg, objectId, lpId);
|
variableType, type, errMsg, objectId, lpId);
|
||||||
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
|
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
|
||||||
#endif /* FSFW_DISABLE_PRINTOUT == 0 */
|
#endif /* FSFW_DISABLE_PRINTOUT == 0 */
|
||||||
|
@ -101,7 +101,7 @@ inline T& LocalPoolVector<T, vectorSize>::operator [](size_t i) {
|
|||||||
sif::warning << "LocalPoolVector: Invalid index. Setting or returning"
|
sif::warning << "LocalPoolVector: Invalid index. Setting or returning"
|
||||||
" last value!" << std::endl;
|
" last value!" << std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printWarning("LocalPoolVector: Invalid index. Setting or returning"
|
sif::printWarning("LocalPoolVector: Invalid index. Setting or returning"
|
||||||
" last value!\n");
|
" last value!\n");
|
||||||
#endif
|
#endif
|
||||||
return value[vectorSize - 1];
|
return value[vectorSize - 1];
|
||||||
@ -118,7 +118,7 @@ inline const T& LocalPoolVector<T, vectorSize>::operator [](size_t i) const {
|
|||||||
sif::warning << "LocalPoolVector: Invalid index. Setting or returning"
|
sif::warning << "LocalPoolVector: Invalid index. Setting or returning"
|
||||||
" last value!" << std::endl;
|
" last value!" << std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printWarning("LocalPoolVector: Invalid index. Setting or returning"
|
sif::printWarning("LocalPoolVector: Invalid index. Setting or returning"
|
||||||
" last value!\n");
|
" last value!\n");
|
||||||
#endif
|
#endif
|
||||||
return value[vectorSize - 1];
|
return value[vectorSize - 1];
|
||||||
|
@ -36,7 +36,7 @@ DeviceHandlerBase::DeviceHandlerBase(object_id_t setObjectId,
|
|||||||
cookieInfo.state = COOKIE_UNUSED;
|
cookieInfo.state = COOKIE_UNUSED;
|
||||||
cookieInfo.pendingCommand = deviceCommandMap.end();
|
cookieInfo.pendingCommand = deviceCommandMap.end();
|
||||||
if (comCookie == nullptr) {
|
if (comCookie == nullptr) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_ERROR, "DeviceHandlerBase",
|
printWarningOrError(sif::OutputTypes::OUT_ERROR, "DeviceHandlerBase",
|
||||||
HasReturnvaluesIF::RETURN_FAILED, "Invalid cookie");
|
HasReturnvaluesIF::RETURN_FAILED, "Invalid cookie");
|
||||||
}
|
}
|
||||||
if (this->fdirInstance == nullptr) {
|
if (this->fdirInstance == nullptr) {
|
||||||
@ -124,7 +124,7 @@ ReturnValue_t DeviceHandlerBase::initialize() {
|
|||||||
communicationInterface = objectManager->get<DeviceCommunicationIF>(
|
communicationInterface = objectManager->get<DeviceCommunicationIF>(
|
||||||
deviceCommunicationId);
|
deviceCommunicationId);
|
||||||
if (communicationInterface == nullptr) {
|
if (communicationInterface == nullptr) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_ERROR, "initialize",
|
printWarningOrError(sif::OutputTypes::OUT_ERROR, "initialize",
|
||||||
ObjectManagerIF::CHILD_INIT_FAILED,
|
ObjectManagerIF::CHILD_INIT_FAILED,
|
||||||
"Passed communication IF invalid");
|
"Passed communication IF invalid");
|
||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
@ -132,7 +132,7 @@ ReturnValue_t DeviceHandlerBase::initialize() {
|
|||||||
|
|
||||||
result = communicationInterface->initializeInterface(comCookie);
|
result = communicationInterface->initializeInterface(comCookie);
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_ERROR, "initialize",
|
printWarningOrError(sif::OutputTypes::OUT_ERROR, "initialize",
|
||||||
ObjectManagerIF::CHILD_INIT_FAILED,
|
ObjectManagerIF::CHILD_INIT_FAILED,
|
||||||
"ComIF initialization failed");
|
"ComIF initialization failed");
|
||||||
return result;
|
return result;
|
||||||
@ -140,7 +140,7 @@ ReturnValue_t DeviceHandlerBase::initialize() {
|
|||||||
|
|
||||||
IPCStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
|
IPCStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
|
||||||
if (IPCStore == nullptr) {
|
if (IPCStore == nullptr) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_ERROR, "initialize",
|
printWarningOrError(sif::OutputTypes::OUT_ERROR, "initialize",
|
||||||
ObjectManagerIF::CHILD_INIT_FAILED, "IPC Store not set up");
|
ObjectManagerIF::CHILD_INIT_FAILED, "IPC Store not set up");
|
||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
}
|
}
|
||||||
@ -150,14 +150,14 @@ ReturnValue_t DeviceHandlerBase::initialize() {
|
|||||||
AcceptsDeviceResponsesIF>(rawDataReceiverId);
|
AcceptsDeviceResponsesIF>(rawDataReceiverId);
|
||||||
|
|
||||||
if (rawReceiver == nullptr) {
|
if (rawReceiver == nullptr) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_ERROR,
|
printWarningOrError(sif::OutputTypes::OUT_ERROR,
|
||||||
"initialize", ObjectManagerIF::CHILD_INIT_FAILED,
|
"initialize", ObjectManagerIF::CHILD_INIT_FAILED,
|
||||||
"Raw receiver object ID set but no valid object found.");
|
"Raw receiver object ID set but no valid object found.");
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "Make sure the raw receiver object is set up properly"
|
sif::error << "Make sure the raw receiver object is set up properly"
|
||||||
" and implements AcceptsDeviceResponsesIF" << std::endl;
|
" and implements AcceptsDeviceResponsesIF" << std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printError("Make sure the raw receiver object is set up "
|
sif::printError("Make sure the raw receiver object is set up "
|
||||||
"properly and implements AcceptsDeviceResponsesIF\n");
|
"properly and implements AcceptsDeviceResponsesIF\n");
|
||||||
#endif
|
#endif
|
||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
@ -168,14 +168,14 @@ ReturnValue_t DeviceHandlerBase::initialize() {
|
|||||||
if(powerSwitcherId != objects::NO_OBJECT) {
|
if(powerSwitcherId != objects::NO_OBJECT) {
|
||||||
powerSwitcher = objectManager->get<PowerSwitchIF>(powerSwitcherId);
|
powerSwitcher = objectManager->get<PowerSwitchIF>(powerSwitcherId);
|
||||||
if (powerSwitcher == nullptr) {
|
if (powerSwitcher == nullptr) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_ERROR,
|
printWarningOrError(sif::OutputTypes::OUT_ERROR,
|
||||||
"initialize", ObjectManagerIF::CHILD_INIT_FAILED,
|
"initialize", ObjectManagerIF::CHILD_INIT_FAILED,
|
||||||
"Power switcher set but no valid object found.");
|
"Power switcher set but no valid object found.");
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "Make sure the power switcher object is set up "
|
sif::error << "Make sure the power switcher object is set up "
|
||||||
<< "properly and implements PowerSwitchIF" << std::endl;
|
<< "properly and implements PowerSwitchIF" << std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printError("Make sure the power switcher object is set up "
|
sif::printError("Make sure the power switcher object is set up "
|
||||||
"properly and implements PowerSwitchIF\n");
|
"properly and implements PowerSwitchIF\n");
|
||||||
#endif
|
#endif
|
||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
@ -717,7 +717,7 @@ void DeviceHandlerBase::parseReply(const uint8_t* receivedData,
|
|||||||
case RETURN_OK:
|
case RETURN_OK:
|
||||||
handleReply(receivedData, foundId, foundLen);
|
handleReply(receivedData, foundId, foundLen);
|
||||||
if(foundLen == 0) {
|
if(foundLen == 0) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
|
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
||||||
"parseReply", ObjectManagerIF::CHILD_INIT_FAILED,
|
"parseReply", ObjectManagerIF::CHILD_INIT_FAILED,
|
||||||
"Found length is one, parsing might be stuck");
|
"Found length is one, parsing might be stuck");
|
||||||
}
|
}
|
||||||
@ -730,7 +730,7 @@ void DeviceHandlerBase::parseReply(const uint8_t* receivedData,
|
|||||||
foundId);
|
foundId);
|
||||||
}
|
}
|
||||||
if(foundLen == 0) {
|
if(foundLen == 0) {
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_ERROR,
|
printWarningOrError(sif::OutputTypes::OUT_ERROR,
|
||||||
"parseReply", ObjectManagerIF::CHILD_INIT_FAILED,
|
"parseReply", ObjectManagerIF::CHILD_INIT_FAILED,
|
||||||
"Power switcher set but no valid object found.");
|
"Power switcher set but no valid object found.");
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
@ -1292,7 +1292,7 @@ void DeviceHandlerBase::buildInternalCommand(void) {
|
|||||||
result = buildNormalDeviceCommand(&deviceCommandId);
|
result = buildNormalDeviceCommand(&deviceCommandId);
|
||||||
if (result == BUSY) {
|
if (result == BUSY) {
|
||||||
// so we can track misconfigurations
|
// so we can track misconfigurations
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
|
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
||||||
"buildInternalCommand",
|
"buildInternalCommand",
|
||||||
HasReturnvaluesIF::RETURN_FAILED,
|
HasReturnvaluesIF::RETURN_FAILED,
|
||||||
"Busy.");
|
"Busy.");
|
||||||
@ -1324,7 +1324,7 @@ void DeviceHandlerBase::buildInternalCommand(void) {
|
|||||||
sprintf(output, "Command 0x%08x is executing",
|
sprintf(output, "Command 0x%08x is executing",
|
||||||
static_cast<unsigned int>(deviceCommandId));
|
static_cast<unsigned int>(deviceCommandId));
|
||||||
// so we can track misconfigurations
|
// so we can track misconfigurations
|
||||||
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
|
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
||||||
"buildInternalCommand",
|
"buildInternalCommand",
|
||||||
HasReturnvaluesIF::RETURN_FAILED,
|
HasReturnvaluesIF::RETURN_FAILED,
|
||||||
output);
|
output);
|
||||||
@ -1488,7 +1488,7 @@ void DeviceHandlerBase::setNormalDatapoolEntriesInvalid() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceHandlerBase::printWarningOrError(fsfw::OutputTypes errorType,
|
void DeviceHandlerBase::printWarningOrError(sif::OutputTypes errorType,
|
||||||
const char *functionName, ReturnValue_t errorCode,
|
const char *functionName, ReturnValue_t errorCode,
|
||||||
const char *errorPrint) {
|
const char *errorPrint) {
|
||||||
if(errorPrint == nullptr) {
|
if(errorPrint == nullptr) {
|
||||||
@ -1496,7 +1496,7 @@ void DeviceHandlerBase::printWarningOrError(fsfw::OutputTypes errorType,
|
|||||||
errorPrint = "Initialization error";
|
errorPrint = "Initialization error";
|
||||||
}
|
}
|
||||||
if(errorCode == HasReturnvaluesIF::RETURN_FAILED) {
|
if(errorCode == HasReturnvaluesIF::RETURN_FAILED) {
|
||||||
if(errorType == fsfw::OutputTypes::OUT_WARNING) {
|
if(errorType == sif::OutputTypes::OUT_WARNING) {
|
||||||
errorPrint = "Generic Warning";
|
errorPrint = "Generic Warning";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1508,25 +1508,25 @@ void DeviceHandlerBase::printWarningOrError(fsfw::OutputTypes errorType,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(errorType == fsfw::OutputTypes::OUT_WARNING) {
|
if(errorType == sif::OutputTypes::OUT_WARNING) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::warning << "DeviceHandlerBase::" << functionName << ": Object ID "
|
sif::warning << "DeviceHandlerBase::" << functionName << ": Object ID "
|
||||||
<< std::hex << std::setw(8) << std::setfill('0')
|
<< std::hex << std::setw(8) << std::setfill('0')
|
||||||
<< this->getObjectId() << " | " << errorPrint << std::dec
|
<< this->getObjectId() << " | " << errorPrint << std::dec
|
||||||
<< std::setfill(' ') << std::endl;
|
<< std::setfill(' ') << std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printWarning("DeviceHandlerBase::%s: Object ID 0x%08x | %s\n",
|
sif::printWarning("DeviceHandlerBase::%s: Object ID 0x%08x | %s\n",
|
||||||
this->getObjectId(), errorPrint);
|
this->getObjectId(), errorPrint);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if(errorType == fsfw::OutputTypes::OUT_ERROR) {
|
else if(errorType == sif::OutputTypes::OUT_ERROR) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "DeviceHandlerBase::" << functionName << ": Object ID "
|
sif::error << "DeviceHandlerBase::" << functionName << ": Object ID "
|
||||||
<< std::hex << std::setw(8) << std::setfill('0')
|
<< std::hex << std::setw(8) << std::setfill('0')
|
||||||
<< this->getObjectId() << " | " << errorPrint << std::dec
|
<< this->getObjectId() << " | " << errorPrint << std::dec
|
||||||
<< std::setfill(' ') << std::endl;
|
<< std::setfill(' ') << std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printError("DeviceHandlerBase::%s: Object ID 0x%08x | %s\n",
|
sif::printError("DeviceHandlerBase::%s: Object ID 0x%08x | %s\n",
|
||||||
this->getObjectId(), errorPrint);
|
this->getObjectId(), errorPrint);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -1251,7 +1251,7 @@ private:
|
|||||||
void handleTransitionToOnMode(Mode_t commandedMode,
|
void handleTransitionToOnMode(Mode_t commandedMode,
|
||||||
Submode_t commandedSubmode);
|
Submode_t commandedSubmode);
|
||||||
|
|
||||||
void printWarningOrError(fsfw::OutputTypes errorType,
|
void printWarningOrError(sif::OutputTypes errorType,
|
||||||
const char* functionName,
|
const char* functionName,
|
||||||
ReturnValue_t errorCode = HasReturnvaluesIF::RETURN_FAILED,
|
ReturnValue_t errorCode = HasReturnvaluesIF::RETURN_FAILED,
|
||||||
const char* errorPrint = nullptr);
|
const char* errorPrint = nullptr);
|
||||||
|
@ -10,7 +10,7 @@ void arrayprinter::print(const uint8_t *data, size_t size, OutputType type,
|
|||||||
}
|
}
|
||||||
sif::info << "[";
|
sif::info << "[";
|
||||||
#else
|
#else
|
||||||
fsfw::printInfo("Printing data with size %zu: [", size);
|
sif::printInfo("Printing data with size %zu: [", size);
|
||||||
#endif
|
#endif
|
||||||
if(type == OutputType::HEX) {
|
if(type == OutputType::HEX) {
|
||||||
arrayprinter::printHex(data, size, maxCharPerLine);
|
arrayprinter::printHex(data, size, maxCharPerLine);
|
||||||
|
@ -114,7 +114,7 @@ uint8_t BinarySemaphore::getSemaphoreCounter(sem_t *handle) {
|
|||||||
}
|
}
|
||||||
else if(result != 0 and errno == EINVAL) {
|
else if(result != 0 and errno == EINVAL) {
|
||||||
// Could be called from interrupt, use lightweight printf
|
// Could be called from interrupt, use lightweight printf
|
||||||
fsfw::printError("BinarySemaphore::getSemaphoreCounter: "
|
sif::printError("BinarySemaphore::getSemaphoreCounter: "
|
||||||
"Invalid semaphore\n");
|
"Invalid semaphore\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -136,7 +136,7 @@ void BinarySemaphore::initSemaphore(uint8_t initCount) {
|
|||||||
sif::error << "BinarySemaphore: Init failed with "
|
sif::error << "BinarySemaphore: Init failed with "
|
||||||
<< strerror(errno) << std::endl;
|
<< strerror(errno) << std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printError("BinarySemaphore: Init failed with %s\n",
|
sif::printError("BinarySemaphore: Init failed with %s\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ ReturnValue_t MessageQueue::handleError(mq_attr* attributes,
|
|||||||
sif::error << "MessageQueue::MessageQueue: Creating Queue " << name
|
sif::error << "MessageQueue::MessageQueue: Creating Queue " << name
|
||||||
<< " failed with status: " << strerror(errno) << std::endl;
|
<< " failed with status: " << strerror(errno) << std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printError("MessageQueue::MessageQueue: Creating Queue %s"
|
sif::printError("MessageQueue::MessageQueue: Creating Queue %s"
|
||||||
" failed with status: %s\n", name, strerror(errno));
|
" failed with status: %s\n", name, strerror(errno));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) {
|
|||||||
sif::error << "PosixThread::createTask: Insufficient memory for"
|
sif::error << "PosixThread::createTask: Insufficient memory for"
|
||||||
" the requested " << stackMb << " MB" << std::endl;
|
" the requested " << stackMb << " MB" << std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printError("PosixThread::createTask: Insufficient memory for "
|
sif::printError("PosixThread::createTask: Insufficient memory for "
|
||||||
"the requested %zu MB\n", stackMb);
|
"the requested %zu MB\n", stackMb);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -160,7 +160,7 @@ void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) {
|
|||||||
sif::error << "PosixThread::createTask: Wrong alignment argument!"
|
sif::error << "PosixThread::createTask: Wrong alignment argument!"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printError("PosixThread::createTask: "
|
sif::printError("PosixThread::createTask: "
|
||||||
"Wrong alignment argument!\n");
|
"Wrong alignment argument!\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -193,7 +193,7 @@ void TmTcUnixUdpBridge::handleSendError() {
|
|||||||
sif::error << "TmTcUnixBridge::handleSendError: "
|
sif::error << "TmTcUnixBridge::handleSendError: "
|
||||||
<< strerror(errno) << std::endl;
|
<< strerror(errno) << std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printError("TmTcUnixBridge::handleSendError: %s\n",
|
sif::printError("TmTcUnixBridge::handleSendError: %s\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -29,19 +29,19 @@ ServiceInterfaceBuffer::ServiceInterfaceBuffer(std::string setMessage,
|
|||||||
|
|
||||||
#if FSFW_COLORED_OUTPUT == 1
|
#if FSFW_COLORED_OUTPUT == 1
|
||||||
if(setMessage.find("DEBUG") != std::string::npos) {
|
if(setMessage.find("DEBUG") != std::string::npos) {
|
||||||
colorPrefix = fsfw::ANSI_COLOR_MAGENTA;
|
colorPrefix = sif::ANSI_COLOR_MAGENTA;
|
||||||
}
|
}
|
||||||
else if(setMessage.find("INFO") != std::string::npos) {
|
else if(setMessage.find("INFO") != std::string::npos) {
|
||||||
colorPrefix = fsfw::ANSI_COLOR_GREEN;
|
colorPrefix = sif::ANSI_COLOR_GREEN;
|
||||||
}
|
}
|
||||||
else if(setMessage.find("WARNING") != std::string::npos) {
|
else if(setMessage.find("WARNING") != std::string::npos) {
|
||||||
colorPrefix = fsfw::ANSI_COLOR_YELLOW;
|
colorPrefix = sif::ANSI_COLOR_YELLOW;
|
||||||
}
|
}
|
||||||
else if(setMessage.find("ERROR") != std::string::npos) {
|
else if(setMessage.find("ERROR") != std::string::npos) {
|
||||||
colorPrefix = fsfw::ANSI_COLOR_RED;
|
colorPrefix = sif::ANSI_COLOR_RED;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
colorPrefix = fsfw::ANSI_COLOR_RESET;
|
colorPrefix = sif::ANSI_COLOR_RESET;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
sif::error << "Unit Tester error: Failed at test ID "
|
sif::error << "Unit Tester error: Failed at test ID "
|
||||||
<< errorId << std::endl;
|
<< errorId << std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printError("Unit Tester error: Failed at test ID 0x%08x", errorId);
|
sif::printError("Unit Tester error: Failed at test ID 0x%08x", errorId);
|
||||||
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
|
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ StorageManagerIF* tglob::getIpcStoreHandle() {
|
|||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "Global object manager uninitialized" << std::endl;
|
sif::error << "Global object manager uninitialized" << std::endl;
|
||||||
#else
|
#else
|
||||||
fsfw::printError("Global object manager uninitialized\n\r");
|
sif::printError("Global object manager uninitialized\n\r");
|
||||||
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
|
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user