replaced all fsfw:: by sif:: for printouts

This commit is contained in:
Robin Müller 2021-01-12 13:18:18 +01:00
parent 071ce21f09
commit 7e394ea15f
17 changed files with 72 additions and 72 deletions

View File

@ -73,8 +73,8 @@ void PoolEntry<T>::print() {
sif::info << "PoolEntry information." << std::endl;
sif::info << "PoolEntry validity: " << validString << std::endl;
#else
fsfw::printInfo("PoolEntry information.\n");
fsfw::printInfo("PoolEntry validity: %s\n", validString);
sif::printInfo("PoolEntry information.\n");
sif::printInfo("PoolEntry validity: %s\n", validString);
#endif
arrayprinter::print(reinterpret_cast<uint8_t*>(address), getByteSize());
}

View File

@ -94,7 +94,7 @@ public:
sif::warning << "HasLocalDataPoolIF::getPoolObjectHandle: Not overriden"
<< ". Returning nullptr!" << std::endl;
#else
fsfw::printWarning("HasLocalDataPoolIF::getPoolObjectHandle: "
sif::printWarning("HasLocalDataPoolIF::getPoolObjectHandle: "
"Not overriden. Returning nullptr!\n");
#endif
return nullptr;

View File

@ -20,7 +20,7 @@ LocalDataPoolManager::LocalDataPoolManager(HasLocalDataPoolIF* owner,
MessageQueueIF* queueToUse, bool appendValidityBuffer):
appendValidityBuffer(appendValidityBuffer) {
if(owner == nullptr) {
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
printWarningOrError(sif::OutputTypes::OUT_WARNING,
"LocalDataPoolManager", HasReturnvaluesIF::RETURN_FAILED,
"Invalid supplied owner");
return;
@ -28,7 +28,7 @@ LocalDataPoolManager::LocalDataPoolManager(HasLocalDataPoolIF* owner,
this->owner = owner;
mutex = MutexFactory::instance()->createMutex();
if(mutex == nullptr) {
printWarningOrError(fsfw::OutputTypes::OUT_ERROR,
printWarningOrError(sif::OutputTypes::OUT_ERROR,
"LocalDataPoolManager", HasReturnvaluesIF::RETURN_FAILED,
"Could not create mutex");
}
@ -41,7 +41,7 @@ LocalDataPoolManager::~LocalDataPoolManager() {}
ReturnValue_t LocalDataPoolManager::initialize(MessageQueueIF* queueToUse) {
if(queueToUse == nullptr) {
// error, all destinations invalid
printWarningOrError(fsfw::OutputTypes::OUT_ERROR,
printWarningOrError(sif::OutputTypes::OUT_ERROR,
"initialize", QUEUE_OR_DESTINATION_INVALID);
}
hkQueue = queueToUse;
@ -49,7 +49,7 @@ ReturnValue_t LocalDataPoolManager::initialize(MessageQueueIF* queueToUse) {
ipcStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
if(ipcStore == nullptr) {
// error, all destinations invalid
printWarningOrError(fsfw::OutputTypes::OUT_ERROR,
printWarningOrError(sif::OutputTypes::OUT_ERROR,
"initialize", HasReturnvaluesIF::RETURN_FAILED,
"Could not set IPC store.");
return HasReturnvaluesIF::RETURN_FAILED;
@ -63,7 +63,7 @@ ReturnValue_t LocalDataPoolManager::initialize(MessageQueueIF* queueToUse) {
hkDestinationId = hkPacketReceiver->getHkQueue();
}
else {
printWarningOrError(fsfw::OutputTypes::OUT_ERROR,
printWarningOrError(sif::OutputTypes::OUT_ERROR,
"initialize", QUEUE_OR_DESTINATION_INVALID);
return QUEUE_OR_DESTINATION_INVALID;
}
@ -88,7 +88,7 @@ ReturnValue_t LocalDataPoolManager::initializeHousekeepingPoolEntriesOnce() {
return result;
}
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
printWarningOrError(sif::OutputTypes::OUT_WARNING,
"initialize", HasReturnvaluesIF::RETURN_FAILED,
"The map should only be initialized once");
return HasReturnvaluesIF::RETURN_OK;
@ -155,7 +155,7 @@ ReturnValue_t LocalDataPoolManager::handleNotificationUpdate(
LocalPoolObjectBase* poolObj = owner->getPoolObjectHandle(
receiver.dataId.localPoolId);
if(poolObj == nullptr) {
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
printWarningOrError(sif::OutputTypes::OUT_WARNING,
"handleNotificationUpdate", POOLOBJECT_NOT_FOUND);
return POOLOBJECT_NOT_FOUND;
}
@ -177,7 +177,7 @@ ReturnValue_t LocalDataPoolManager::handleNotificationUpdate(
LocalPoolDataSetBase* dataSet = owner->getDataSetHandle(
receiver.dataId.sid);
if(dataSet == nullptr) {
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
printWarningOrError(sif::OutputTypes::OUT_WARNING,
"handleNotificationUpdate", DATASET_NOT_FOUND);
return DATASET_NOT_FOUND;
}
@ -209,7 +209,7 @@ ReturnValue_t LocalDataPoolManager::handleNotificationSnapshot(
LocalPoolObjectBase* poolObj = owner->getPoolObjectHandle(
receiver.dataId.localPoolId);
if(poolObj == nullptr) {
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
printWarningOrError(sif::OutputTypes::OUT_WARNING,
"handleNotificationSnapshot", POOLOBJECT_NOT_FOUND);
return POOLOBJECT_NOT_FOUND;
}
@ -247,7 +247,7 @@ ReturnValue_t LocalDataPoolManager::handleNotificationSnapshot(
LocalPoolDataSetBase* dataSet = owner->getDataSetHandle(
receiver.dataId.sid);
if(dataSet == nullptr) {
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
printWarningOrError(sif::OutputTypes::OUT_WARNING,
"handleNotificationSnapshot", DATASET_NOT_FOUND);
return DATASET_NOT_FOUND;
}
@ -355,7 +355,7 @@ ReturnValue_t LocalDataPoolManager::subscribeForPeriodicPacket(sid_t sid,
AcceptsHkPacketsIF* hkReceiverObject =
objectManager->get<AcceptsHkPacketsIF>(packetDestination);
if(hkReceiverObject == nullptr) {
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
printWarningOrError(sif::OutputTypes::OUT_WARNING,
"subscribeForPeriodicPacket", QUEUE_OR_DESTINATION_INVALID);
return QUEUE_OR_DESTINATION_INVALID;
}
@ -385,7 +385,7 @@ ReturnValue_t LocalDataPoolManager::subscribeForUpdatePackets(sid_t sid,
AcceptsHkPacketsIF* hkReceiverObject =
objectManager->get<AcceptsHkPacketsIF>(packetDestination);
if(hkReceiverObject == nullptr) {
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
printWarningOrError(sif::OutputTypes::OUT_WARNING,
"subscribeForPeriodicPacket", QUEUE_OR_DESTINATION_INVALID);
return QUEUE_OR_DESTINATION_INVALID;
}
@ -594,7 +594,7 @@ ReturnValue_t LocalDataPoolManager::printPoolEntry(
lp_id_t localPoolId) {
auto poolIter = localPoolMap.find(localPoolId);
if (poolIter == localPoolMap.end()) {
printWarningOrError(fsfw::OutputTypes::OUT_WARNING, "printPoolEntry",
printWarningOrError(sif::OutputTypes::OUT_WARNING, "printPoolEntry",
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) {
if(dataSet == nullptr) {
// Configuration error.
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
printWarningOrError(sif::OutputTypes::OUT_WARNING,
"generateHousekeepingPacket",
DATASET_NOT_FOUND);
return DATASET_NOT_FOUND;
@ -641,7 +641,7 @@ ReturnValue_t LocalDataPoolManager::generateHousekeepingPacket(sid_t sid,
if(hkQueue == nullptr) {
// error, no queue available to send packet with.
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
printWarningOrError(sif::OutputTypes::OUT_WARNING,
"generateHousekeepingPacket",
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(hkDestinationId == MessageQueueIF::NO_QUEUE) {
// error, all destinations invalid
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
printWarningOrError(sif::OutputTypes::OUT_WARNING,
"generateHousekeepingPacket",
QUEUE_OR_DESTINATION_INVALID);
}
@ -688,7 +688,7 @@ void LocalDataPoolManager::performPeriodicHkGeneration(HkReceiver& receiver) {
sid_t sid = receiver.dataId.sid;
LocalPoolDataSetBase* dataSet = owner->getDataSetHandle(sid);
if(dataSet == nullptr) {
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
printWarningOrError(sif::OutputTypes::OUT_WARNING,
"performPeriodicHkGeneration",
DATASET_NOT_FOUND);
return;
@ -715,7 +715,7 @@ void LocalDataPoolManager::performPeriodicHkGeneration(HkReceiver& receiver) {
sif::warning << "LocalDataPoolManager::performHkOperation: "
<< "HK generation failed." << std::endl;
#else
fsfw::printWarning("LocalDataPoolManager::performHkOperation: "
sif::printWarning("LocalDataPoolManager::performHkOperation: "
"HK generation failed.\n");
#endif
}
@ -762,7 +762,7 @@ ReturnValue_t LocalDataPoolManager::generateSetStructurePacket(sid_t sid,
// Get and check dataset first.
LocalPoolDataSetBase* dataSet = owner->getDataSetHandle(sid);
if(dataSet == nullptr) {
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
printWarningOrError(sif::OutputTypes::OUT_WARNING,
"performPeriodicHkGeneration",
DATASET_NOT_FOUND);
return DATASET_NOT_FOUND;
@ -789,7 +789,7 @@ ReturnValue_t LocalDataPoolManager::generateSetStructurePacket(sid_t sid,
ReturnValue_t result = ipcStore->getFreeElement(&storeId,
expectedSize,&storePtr);
if(result != HasReturnvaluesIF::RETURN_OK) {
printWarningOrError(fsfw::OutputTypes::OUT_ERROR,
printWarningOrError(sif::OutputTypes::OUT_ERROR,
"generateSetStructurePacket", HasReturnvaluesIF::RETURN_FAILED,
"Could not get free element from IPC store.");
return result;
@ -800,7 +800,7 @@ ReturnValue_t LocalDataPoolManager::generateSetStructurePacket(sid_t sid,
result = setPacket.serialize(&storePtr, &size, expectedSize,
SerializeIF::Endianness::BIG);
if(expectedSize != size) {
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
printWarningOrError(sif::OutputTypes::OUT_WARNING,
"generateSetStructurePacket", HasReturnvaluesIF::RETURN_FAILED,
"Expected size is not equal to serialized size");
}
@ -825,7 +825,7 @@ void LocalDataPoolManager::clearReceiversList() {
HkReceivers().swap(hkReceiversMap);
}
void LocalDataPoolManager::printWarningOrError(fsfw::OutputTypes outputType,
void LocalDataPoolManager::printWarningOrError(sif::OutputTypes outputType,
const char* functionName, ReturnValue_t error, const char* errorPrint) {
if(errorPrint == nullptr) {
if(error == DATASET_NOT_FOUND) {
@ -835,7 +835,7 @@ void LocalDataPoolManager::printWarningOrError(fsfw::OutputTypes outputType,
errorPrint = "Pool Object not found";
}
else if(error == HasReturnvaluesIF::RETURN_FAILED) {
if(outputType == fsfw::OutputTypes::OUT_WARNING) {
if(outputType == sif::OutputTypes::OUT_WARNING) {
errorPrint = "Generic Warning";
}
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
sif::warning << "LocalDataPoolManager::" << functionName
<< ": Object ID " << std::setw(8) << std::setfill('0')
<< std::hex << owner->getObjectId() << " | " << errorPrint
<< std::dec << std::setfill(' ') << std::endl;
#else
fsfw::printWarning("LocalDataPoolManager::%s: Object ID 0x%08x | %s\n",
sif::printWarning("LocalDataPoolManager::%s: Object ID 0x%08x | %s\n",
owner->getObjectId(), errorPrint);
#endif
}
else if(outputType == fsfw::OutputTypes::OUT_ERROR) {
else if(outputType == sif::OutputTypes::OUT_ERROR) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalDataPoolManager::" << functionName
<< ": Object ID " << std::setw(8) << std::setfill('0')
<< std::hex << owner->getObjectId() << " | " << errorPrint
<< std::dec << std::setfill(' ') << std::endl;
#else
fsfw::printError("LocalDataPoolManager::%s: Object ID 0x%08x | %s\n",
sif::printError("LocalDataPoolManager::%s: Object ID 0x%08x | %s\n",
owner->getObjectId(), errorPrint);
#endif
}

View File

@ -377,7 +377,7 @@ private:
ReturnValue_t addUpdateToStore(HousekeepingPacketUpdate& updatePacket,
store_address_t& storeId);
void printWarningOrError(fsfw::OutputTypes outputType,
void printWarningOrError(sif::OutputTypes outputType,
const char* functionName,
ReturnValue_t errorCode = HasReturnvaluesIF::RETURN_FAILED,
const char* errorPrint = nullptr);
@ -389,14 +389,14 @@ ReturnValue_t LocalDataPoolManager::fetchPoolEntry(lp_id_t localPoolId,
PoolEntry<T> **poolEntry) {
auto poolIter = localPoolMap.find(localPoolId);
if (poolIter == localPoolMap.end()) {
printWarningOrError(fsfw::OutputTypes::OUT_ERROR, "fetchPoolEntry",
printWarningOrError(sif::OutputTypes::OUT_ERROR, "fetchPoolEntry",
HasLocalDataPoolIF::POOL_ENTRY_NOT_FOUND);
return HasLocalDataPoolIF::POOL_ENTRY_NOT_FOUND;
}
*poolEntry = dynamic_cast< PoolEntry<T>* >(poolIter->second);
if(*poolEntry == nullptr) {
printWarningOrError(fsfw::OutputTypes::OUT_ERROR, "fetchPoolEntry",
printWarningOrError(sif::OutputTypes::OUT_ERROR, "fetchPoolEntry",
HasLocalDataPoolIF::POOL_ENTRY_TYPE_CONFLICT);
return HasLocalDataPoolIF::POOL_ENTRY_TYPE_CONFLICT;
}

View File

@ -18,7 +18,7 @@ LocalPoolDataSetBase::LocalPoolDataSetBase(HasLocalDataPoolIF *hkOwner,
sif::error << "LocalPoolDataSetBase::LocalPoolDataSetBase: Owner "
<< "invalid!" << std::endl;
#else
fsfw::printError("LocalPoolDataSetBase::LocalPoolDataSetBase: Owner "
sif::printError("LocalPoolDataSetBase::LocalPoolDataSetBase: Owner "
"invalid!\n\r");
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
return;
@ -171,7 +171,7 @@ ReturnValue_t LocalPoolDataSetBase::serializeLocalPoolIds(uint8_t** buffer,
sif::warning << "LocalPoolDataSetBase::serializeLocalPoolIds: "
<< "Serialization error!" << std::endl;
#else
fsfw::printWarning("LocalPoolDataSetBase::serializeLocalPoolIds: "
sif::printWarning("LocalPoolDataSetBase::serializeLocalPoolIds: "
"Serialization error!\n\r");
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
return result;
@ -235,7 +235,7 @@ void LocalPoolDataSetBase::bitSetter(uint8_t* byte, uint8_t position) const {
sif::warning << "LocalPoolDataSetBase::bitSetter: Invalid position!"
<< std::endl;
#else
fsfw::printWarning("LocalPoolDataSetBase::bitSetter: "
sif::printWarning("LocalPoolDataSetBase::bitSetter: "
"Invalid position!\n\r");
#endif
return;

View File

@ -114,7 +114,7 @@ void LocalPoolObjectBase::reportReadCommitError(const char* variableType,
<< std::setfill('0') << objectId << std::dec << " LPID: " << lpId
<< std::endl;
#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);
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
#endif /* FSFW_DISABLE_PRINTOUT == 0 */

View File

@ -101,7 +101,7 @@ inline T& LocalPoolVector<T, vectorSize>::operator [](size_t i) {
sif::warning << "LocalPoolVector: Invalid index. Setting or returning"
" last value!" << std::endl;
#else
fsfw::printWarning("LocalPoolVector: Invalid index. Setting or returning"
sif::printWarning("LocalPoolVector: Invalid index. Setting or returning"
" last value!\n");
#endif
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"
" last value!" << std::endl;
#else
fsfw::printWarning("LocalPoolVector: Invalid index. Setting or returning"
sif::printWarning("LocalPoolVector: Invalid index. Setting or returning"
" last value!\n");
#endif
return value[vectorSize - 1];

View File

@ -36,7 +36,7 @@ DeviceHandlerBase::DeviceHandlerBase(object_id_t setObjectId,
cookieInfo.state = COOKIE_UNUSED;
cookieInfo.pendingCommand = deviceCommandMap.end();
if (comCookie == nullptr) {
printWarningOrError(fsfw::OutputTypes::OUT_ERROR, "DeviceHandlerBase",
printWarningOrError(sif::OutputTypes::OUT_ERROR, "DeviceHandlerBase",
HasReturnvaluesIF::RETURN_FAILED, "Invalid cookie");
}
if (this->fdirInstance == nullptr) {
@ -124,7 +124,7 @@ ReturnValue_t DeviceHandlerBase::initialize() {
communicationInterface = objectManager->get<DeviceCommunicationIF>(
deviceCommunicationId);
if (communicationInterface == nullptr) {
printWarningOrError(fsfw::OutputTypes::OUT_ERROR, "initialize",
printWarningOrError(sif::OutputTypes::OUT_ERROR, "initialize",
ObjectManagerIF::CHILD_INIT_FAILED,
"Passed communication IF invalid");
return ObjectManagerIF::CHILD_INIT_FAILED;
@ -132,7 +132,7 @@ ReturnValue_t DeviceHandlerBase::initialize() {
result = communicationInterface->initializeInterface(comCookie);
if (result != RETURN_OK) {
printWarningOrError(fsfw::OutputTypes::OUT_ERROR, "initialize",
printWarningOrError(sif::OutputTypes::OUT_ERROR, "initialize",
ObjectManagerIF::CHILD_INIT_FAILED,
"ComIF initialization failed");
return result;
@ -140,7 +140,7 @@ ReturnValue_t DeviceHandlerBase::initialize() {
IPCStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
if (IPCStore == nullptr) {
printWarningOrError(fsfw::OutputTypes::OUT_ERROR, "initialize",
printWarningOrError(sif::OutputTypes::OUT_ERROR, "initialize",
ObjectManagerIF::CHILD_INIT_FAILED, "IPC Store not set up");
return ObjectManagerIF::CHILD_INIT_FAILED;
}
@ -150,14 +150,14 @@ ReturnValue_t DeviceHandlerBase::initialize() {
AcceptsDeviceResponsesIF>(rawDataReceiverId);
if (rawReceiver == nullptr) {
printWarningOrError(fsfw::OutputTypes::OUT_ERROR,
printWarningOrError(sif::OutputTypes::OUT_ERROR,
"initialize", ObjectManagerIF::CHILD_INIT_FAILED,
"Raw receiver object ID set but no valid object found.");
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Make sure the raw receiver object is set up properly"
" and implements AcceptsDeviceResponsesIF" << std::endl;
#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");
#endif
return ObjectManagerIF::CHILD_INIT_FAILED;
@ -168,14 +168,14 @@ ReturnValue_t DeviceHandlerBase::initialize() {
if(powerSwitcherId != objects::NO_OBJECT) {
powerSwitcher = objectManager->get<PowerSwitchIF>(powerSwitcherId);
if (powerSwitcher == nullptr) {
printWarningOrError(fsfw::OutputTypes::OUT_ERROR,
printWarningOrError(sif::OutputTypes::OUT_ERROR,
"initialize", ObjectManagerIF::CHILD_INIT_FAILED,
"Power switcher set but no valid object found.");
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Make sure the power switcher object is set up "
<< "properly and implements PowerSwitchIF" << std::endl;
#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");
#endif
return ObjectManagerIF::CHILD_INIT_FAILED;
@ -717,7 +717,7 @@ void DeviceHandlerBase::parseReply(const uint8_t* receivedData,
case RETURN_OK:
handleReply(receivedData, foundId, foundLen);
if(foundLen == 0) {
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
printWarningOrError(sif::OutputTypes::OUT_WARNING,
"parseReply", ObjectManagerIF::CHILD_INIT_FAILED,
"Found length is one, parsing might be stuck");
}
@ -730,7 +730,7 @@ void DeviceHandlerBase::parseReply(const uint8_t* receivedData,
foundId);
}
if(foundLen == 0) {
printWarningOrError(fsfw::OutputTypes::OUT_ERROR,
printWarningOrError(sif::OutputTypes::OUT_ERROR,
"parseReply", ObjectManagerIF::CHILD_INIT_FAILED,
"Power switcher set but no valid object found.");
#if FSFW_CPP_OSTREAM_ENABLED == 1
@ -1292,7 +1292,7 @@ void DeviceHandlerBase::buildInternalCommand(void) {
result = buildNormalDeviceCommand(&deviceCommandId);
if (result == BUSY) {
// so we can track misconfigurations
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
printWarningOrError(sif::OutputTypes::OUT_WARNING,
"buildInternalCommand",
HasReturnvaluesIF::RETURN_FAILED,
"Busy.");
@ -1324,7 +1324,7 @@ void DeviceHandlerBase::buildInternalCommand(void) {
sprintf(output, "Command 0x%08x is executing",
static_cast<unsigned int>(deviceCommandId));
// so we can track misconfigurations
printWarningOrError(fsfw::OutputTypes::OUT_WARNING,
printWarningOrError(sif::OutputTypes::OUT_WARNING,
"buildInternalCommand",
HasReturnvaluesIF::RETURN_FAILED,
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 *errorPrint) {
if(errorPrint == nullptr) {
@ -1496,7 +1496,7 @@ void DeviceHandlerBase::printWarningOrError(fsfw::OutputTypes errorType,
errorPrint = "Initialization error";
}
if(errorCode == HasReturnvaluesIF::RETURN_FAILED) {
if(errorType == fsfw::OutputTypes::OUT_WARNING) {
if(errorType == sif::OutputTypes::OUT_WARNING) {
errorPrint = "Generic Warning";
}
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
sif::warning << "DeviceHandlerBase::" << functionName << ": Object ID "
<< std::hex << std::setw(8) << std::setfill('0')
<< this->getObjectId() << " | " << errorPrint << std::dec
<< std::setfill(' ') << std::endl;
#else
fsfw::printWarning("DeviceHandlerBase::%s: Object ID 0x%08x | %s\n",
sif::printWarning("DeviceHandlerBase::%s: Object ID 0x%08x | %s\n",
this->getObjectId(), errorPrint);
#endif
}
else if(errorType == fsfw::OutputTypes::OUT_ERROR) {
else if(errorType == sif::OutputTypes::OUT_ERROR) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DeviceHandlerBase::" << functionName << ": Object ID "
<< std::hex << std::setw(8) << std::setfill('0')
<< this->getObjectId() << " | " << errorPrint << std::dec
<< std::setfill(' ') << std::endl;
#else
fsfw::printError("DeviceHandlerBase::%s: Object ID 0x%08x | %s\n",
sif::printError("DeviceHandlerBase::%s: Object ID 0x%08x | %s\n",
this->getObjectId(), errorPrint);
#endif
}

View File

@ -1251,7 +1251,7 @@ private:
void handleTransitionToOnMode(Mode_t commandedMode,
Submode_t commandedSubmode);
void printWarningOrError(fsfw::OutputTypes errorType,
void printWarningOrError(sif::OutputTypes errorType,
const char* functionName,
ReturnValue_t errorCode = HasReturnvaluesIF::RETURN_FAILED,
const char* errorPrint = nullptr);

View File

@ -10,7 +10,7 @@ void arrayprinter::print(const uint8_t *data, size_t size, OutputType type,
}
sif::info << "[";
#else
fsfw::printInfo("Printing data with size %zu: [", size);
sif::printInfo("Printing data with size %zu: [", size);
#endif
if(type == OutputType::HEX) {
arrayprinter::printHex(data, size, maxCharPerLine);

View File

@ -114,7 +114,7 @@ uint8_t BinarySemaphore::getSemaphoreCounter(sem_t *handle) {
}
else if(result != 0 and errno == EINVAL) {
// Could be called from interrupt, use lightweight printf
fsfw::printError("BinarySemaphore::getSemaphoreCounter: "
sif::printError("BinarySemaphore::getSemaphoreCounter: "
"Invalid semaphore\n");
return 0;
}
@ -136,7 +136,7 @@ void BinarySemaphore::initSemaphore(uint8_t initCount) {
sif::error << "BinarySemaphore: Init failed with "
<< strerror(errno) << std::endl;
#else
fsfw::printError("BinarySemaphore: Init failed with %s\n",
sif::printError("BinarySemaphore: Init failed with %s\n",
strerror(errno));
#endif
}

View File

@ -127,7 +127,7 @@ ReturnValue_t MessageQueue::handleError(mq_attr* attributes,
sif::error << "MessageQueue::MessageQueue: Creating Queue " << name
<< " failed with status: " << strerror(errno) << std::endl;
#else
fsfw::printError("MessageQueue::MessageQueue: Creating Queue %s"
sif::printError("MessageQueue::MessageQueue: Creating Queue %s"
" failed with status: %s\n", name, strerror(errno));
#endif
}

View File

@ -151,7 +151,7 @@ void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) {
sif::error << "PosixThread::createTask: Insufficient memory for"
" the requested " << stackMb << " MB" << std::endl;
#else
fsfw::printError("PosixThread::createTask: Insufficient memory for "
sif::printError("PosixThread::createTask: Insufficient memory for "
"the requested %zu MB\n", stackMb);
#endif
}
@ -160,7 +160,7 @@ void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) {
sif::error << "PosixThread::createTask: Wrong alignment argument!"
<< std::endl;
#else
fsfw::printError("PosixThread::createTask: "
sif::printError("PosixThread::createTask: "
"Wrong alignment argument!\n");
#endif
}

View File

@ -193,7 +193,7 @@ void TmTcUnixUdpBridge::handleSendError() {
sif::error << "TmTcUnixBridge::handleSendError: "
<< strerror(errno) << std::endl;
#else
fsfw::printError("TmTcUnixBridge::handleSendError: %s\n",
sif::printError("TmTcUnixBridge::handleSendError: %s\n",
strerror(errno));
#endif
}

View File

@ -29,19 +29,19 @@ ServiceInterfaceBuffer::ServiceInterfaceBuffer(std::string setMessage,
#if FSFW_COLORED_OUTPUT == 1
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) {
colorPrefix = fsfw::ANSI_COLOR_GREEN;
colorPrefix = sif::ANSI_COLOR_GREEN;
}
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) {
colorPrefix = fsfw::ANSI_COLOR_RED;
colorPrefix = sif::ANSI_COLOR_RED;
}
else {
colorPrefix = fsfw::ANSI_COLOR_RESET;
colorPrefix = sif::ANSI_COLOR_RESET;
}
#ifdef WIN32

View File

@ -5,7 +5,7 @@
sif::error << "Unit Tester error: Failed at test ID "
<< errorId << std::endl;
#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 */
return HasReturnvaluesIF::RETURN_FAILED;
}

View File

@ -9,7 +9,7 @@ StorageManagerIF* tglob::getIpcStoreHandle() {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Global object manager uninitialized" << std::endl;
#else
fsfw::printError("Global object manager uninitialized\n\r");
sif::printError("Global object manager uninitialized\n\r");
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
return nullptr;
}