some more sif replacements

This commit is contained in:
Robin Müller 2020-04-23 21:59:24 +02:00
parent 0ea692a5ea
commit a5d2cbd7db
6 changed files with 19 additions and 19 deletions

View File

@ -67,7 +67,7 @@ ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId,
return HasReturnvaluesIF::RETURN_OK;
}
error << "Component " << std::hex << componentId
sif::error << "Component " << std::hex << componentId
<< " not found, not adding it to pst" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED;
}

View File

@ -7,7 +7,7 @@ const uint32_t MutexIF::NO_TIMEOUT = 0;
Mutex::Mutex() {
handle = xSemaphoreCreateMutex();
if(handle == NULL) {
error << "Mutex creation failure" << std::endl;
sif::error << "Mutex creation failure" << std::endl;
}
}

View File

@ -100,7 +100,7 @@ ReturnValue_t SerialBufferAdapter<count_t>::deSerialize(const uint8_t** buffer,
template<typename count_t>
uint8_t * SerialBufferAdapter<count_t>::getBuffer() {
if(m_buffer == nullptr) {
error << "Wrong access function for stored type !"
sif::error << "Wrong access function for stored type !"
" Use getConstBuffer()" << std::endl;
return nullptr;
}
@ -110,7 +110,7 @@ uint8_t * SerialBufferAdapter<count_t>::getBuffer() {
template<typename count_t>
const uint8_t * SerialBufferAdapter<count_t>::getConstBuffer() {
if(constBuffer == nullptr) {
error << "Wrong access function for stored type !"
sif::error << "Wrong access function for stored type !"
" Use getBuffer()" << std::endl;
return nullptr;
}

View File

@ -295,7 +295,7 @@ inline ReturnValue_t LocalPool<NUMBER_OF_POOLS>::reserveSpace(
if (!ignoreFault) {
internalErrorReporter->storeFull();
}
error << "LocalPool( " << std::hex << getObjectId() << std::dec
sif::error << "LocalPool( " << std::hex << getObjectId() << std::dec
<< " )::reserveSpace: Packet store is full." << std::endl;
}
return status;

View File

@ -31,11 +31,11 @@ seconds_t Stopwatch::stopSeconds() {
void Stopwatch::display() {
if(displayMode == StopwatchDisplayMode::MILLIS) {
info << "Stopwatch: Operation took " << (elapsedTime.tv_sec * 1000 +
sif::info << "Stopwatch: Operation took " << (elapsedTime.tv_sec * 1000 +
elapsedTime.tv_usec / 1000) << " milliseconds" << std::endl;
}
else if(displayMode == StopwatchDisplayMode::SECONDS) {
info <<"Stopwatch: Operation took " << std::setprecision(3)
sif::info <<"Stopwatch: Operation took " << std::setprecision(3)
<< std::fixed << timevalOperations::toDouble(elapsedTime)
<< " seconds" << std::endl;
}

View File

@ -21,7 +21,7 @@ ReturnValue_t TmTcBridge::setNumberOfSentPacketsPerCycle(
return RETURN_OK;
}
else {
warning << "TmTcBridge: Number of packets sent per cycle "
sif::warning << "TmTcBridge: Number of packets sent per cycle "
"exceeds limits. Keeping default value." << std::endl;
return RETURN_FAILED;
}
@ -34,7 +34,7 @@ ReturnValue_t TmTcBridge::setMaxNumberOfPacketsStored(
return RETURN_OK;
}
else {
warning << "TmTcBridge: Number of packets stored "
sif::warning << "TmTcBridge: Number of packets stored "
"exceeds limits. Keeping default value." << std::endl;
return RETURN_FAILED;
}
@ -62,11 +62,11 @@ ReturnValue_t TmTcBridge::performOperation(uint8_t operationCode) {
ReturnValue_t result;
result = handleTc();
if(result != RETURN_OK) {
error << "TMTC Bridge: Error handling TCs" << std::endl;
sif::error << "TMTC Bridge: Error handling TCs" << std::endl;
}
result = handleTm();
if (result != RETURN_OK) {
error << "TMTC Bridge: Error handling TMs" << std::endl;
sif::error << "TMTC Bridge: Error handling TMs" << std::endl;
}
return result;
}
@ -81,7 +81,7 @@ ReturnValue_t TmTcBridge::handleTc() {
ReturnValue_t TmTcBridge::handleTm() {
ReturnValue_t result = handleTmQueue();
if(result != RETURN_OK) {
error << "TMTC Bridge: Reading TM Queue failed" << std::endl;
sif::error << "TMTC Bridge: Reading TM Queue failed" << std::endl;
return RETURN_FAILED;
}
@ -111,7 +111,7 @@ ReturnValue_t TmTcBridge::handleTmQueue() {
result = sendTm(data, size);
if (result != RETURN_OK) {
error << "TMTC Bridge: Could not send TM packet"<< std::endl;
sif::error << "TMTC Bridge: Could not send TM packet"<< std::endl;
tmStore->deleteData(message.getStorageId());
return result;
@ -127,7 +127,7 @@ ReturnValue_t TmTcBridge::storeDownlinkData(TmTcMessage *message) {
store_address_t storeId = 0;
if(tmFifo.full()) {
error << "TMTC Bridge: TM downlink max. number of stored packet IDs "
sif::error << "TMTC Bridge: TM downlink max. number of stored packet IDs "
"reached! Overwriting old data" << std::endl;
tmFifo.retrieve(&storeId);
tmStore->deleteData(storeId);
@ -153,7 +153,7 @@ ReturnValue_t TmTcBridge::handleStoredTm() {
sendTm(data,size);
if(result != RETURN_OK) {
error << "TMTC Bridge: Could not send stored downlink data"
sif::error << "TMTC Bridge: Could not send stored downlink data"
<< std::endl;
result = RETURN_FAILED;
}
@ -188,12 +188,12 @@ MessageQueueId_t TmTcBridge::getReportReceptionQueue(uint8_t virtualChannel) {
void TmTcBridge::printData(uint8_t * data, size_t dataLen) {
info << "TMTC Bridge: Printing data: [";
sif::info << "TMTC Bridge: Printing data: [";
for(uint32_t i = 0; i < dataLen; i++) {
info << std::hex << (int)data[i];
sif::info << std::hex << (int)data[i];
if(i < dataLen-1){
info << " , ";
sif::info << " , ";
}
}
info << " ] " << std::endl;
sif::info << " ] " << std::endl;
}