1
0
forked from fsfw/fsfw

all cstdout uses wrapped in preprocessor defines

This commit is contained in:
2021-01-03 13:58:18 +01:00
parent 61fc6cac97
commit c19e628d79
96 changed files with 715 additions and 14 deletions

View File

@ -63,7 +63,9 @@ uint8_t TcPacketBase::getPusVersionNumber() {
}
void TcPacketBase::print() {
#if CPP_OSTREAM_ENABLED == 1
sif::debug << "TcPacketBase::print: " << std::endl;
#endif
arrayprinter::print(getWholeData(), getFullSize());
}

View File

@ -23,8 +23,10 @@ TcPacketStored::TcPacketStored(uint16_t apid, uint8_t service,
ReturnValue_t returnValue = this->store->getFreeElement(&this->storeAddress,
(TC_PACKET_MIN_SIZE + size), &pData);
if (returnValue != this->store->RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1
sif::warning << "TcPacketStored: Could not get free element from store!"
<< std::endl;
#endif
return;
}
this->setData(pData);
@ -39,7 +41,9 @@ ReturnValue_t TcPacketStored::getData(const uint8_t ** dataPtr,
size_t* dataSize) {
auto result = this->store->getData(storeAddress, dataPtr, dataSize);
if(result != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1
sif::warning << "TcPacketStored: Could not get data!" << std::endl;
#endif
}
return result;
}
@ -61,8 +65,10 @@ bool TcPacketStored::checkAndSetStore() {
if (this->store == nullptr) {
this->store = objectManager->get<StorageManagerIF>(objects::TC_STORE);
if (this->store == nullptr) {
#if CPP_OSTREAM_ENABLED == 1
sif::error << "TcPacketStored::TcPacketStored: TC Store not found!"
<< std::endl;
#endif
return false;
}
}

View File

@ -57,7 +57,9 @@ void TmPacketBase::setData(const uint8_t* p_Data) {
}
void TmPacketBase::print() {
#if CPP_OSTREAM_ENABLED == 1
sif::debug << "TmPacketBase::print: " << std::endl;
#endif
arrayprinter::print(getWholeData(), getFullSize());
}
@ -65,8 +67,10 @@ bool TmPacketBase::checkAndSetStamper() {
if (timeStamper == NULL) {
timeStamper = objectManager->get<TimeStamperIF>(timeStamperId);
if (timeStamper == NULL) {
#if CPP_OSTREAM_ENABLED == 1
sif::error << "TmPacketBase::checkAndSetStamper: Stamper not found!"
<< std::endl;
#endif
return false;
}
}

View File

@ -105,8 +105,10 @@ bool TmPacketStored::checkAndSetStore() {
if (store == nullptr) {
store = objectManager->get<StorageManagerIF>(objects::TM_STORE);
if (store == nullptr) {
#if CPP_OSTREAM_ENABLED == 1
sif::error << "TmPacketStored::TmPacketStored: TM Store not found!"
<< std::endl;
#endif
return false;
}
}