correct preprocessor define now used
This commit is contained in:
@ -23,7 +23,7 @@ ReturnValue_t TmTcBridge::setNumberOfSentPacketsPerCycle(
|
||||
return RETURN_OK;
|
||||
}
|
||||
else {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::warning << "TmTcBridge::setNumberOfSentPacketsPerCycle: Number of "
|
||||
<< "packets sent per cycle exceeds limits. "
|
||||
<< "Keeping default value." << std::endl;
|
||||
@ -39,7 +39,7 @@ ReturnValue_t TmTcBridge::setMaxNumberOfPacketsStored(
|
||||
return RETURN_OK;
|
||||
}
|
||||
else {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::warning << "TmTcBridge::setMaxNumberOfPacketsStored: Number of "
|
||||
<< "packets stored exceeds limits. "
|
||||
<< "Keeping default value." << std::endl;
|
||||
@ -51,7 +51,7 @@ ReturnValue_t TmTcBridge::setMaxNumberOfPacketsStored(
|
||||
ReturnValue_t TmTcBridge::initialize() {
|
||||
tcStore = objectManager->get<StorageManagerIF>(tcStoreId);
|
||||
if (tcStore == nullptr) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "TmTcBridge::initialize: TC store invalid. Make sure"
|
||||
"it is created and set up properly." << std::endl;
|
||||
#endif
|
||||
@ -59,7 +59,7 @@ ReturnValue_t TmTcBridge::initialize() {
|
||||
}
|
||||
tmStore = objectManager->get<StorageManagerIF>(tmStoreId);
|
||||
if (tmStore == nullptr) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "TmTcBridge::initialize: TM store invalid. Make sure"
|
||||
"it is created and set up properly." << std::endl;
|
||||
#endif
|
||||
@ -68,7 +68,7 @@ ReturnValue_t TmTcBridge::initialize() {
|
||||
AcceptsTelecommandsIF* tcDistributor =
|
||||
objectManager->get<AcceptsTelecommandsIF>(tcDestination);
|
||||
if (tcDistributor == nullptr) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "TmTcBridge::initialize: TC Distributor invalid"
|
||||
<< std::endl;
|
||||
#endif
|
||||
@ -85,14 +85,14 @@ ReturnValue_t TmTcBridge::performOperation(uint8_t operationCode) {
|
||||
ReturnValue_t result;
|
||||
result = handleTc();
|
||||
if(result != RETURN_OK) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::debug << "TmTcBridge::performOperation: "
|
||||
<< "Error handling TCs" << std::endl;
|
||||
#endif
|
||||
}
|
||||
result = handleTm();
|
||||
if (result != RETURN_OK) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::debug << "TmTcBridge::performOperation: "
|
||||
<< "Error handling TMs" << std::endl;
|
||||
#endif
|
||||
@ -108,7 +108,7 @@ ReturnValue_t TmTcBridge::handleTm() {
|
||||
ReturnValue_t status = HasReturnvaluesIF::RETURN_OK;
|
||||
ReturnValue_t result = handleTmQueue();
|
||||
if(result != RETURN_OK) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "TmTcBridge::handleTm: Error handling TM queue with "
|
||||
<< "error code 0x" << std::hex << result << std::dec
|
||||
<< "!" << std::endl;
|
||||
@ -120,7 +120,7 @@ ReturnValue_t TmTcBridge::handleTm() {
|
||||
(packetSentCounter < sentPacketsPerCycle)) {
|
||||
result = handleStoredTm();
|
||||
if(result != RETURN_OK) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "TmTcBridge::handleTm: Error handling stored TMs!"
|
||||
<< std::endl;
|
||||
#endif
|
||||
@ -140,7 +140,7 @@ ReturnValue_t TmTcBridge::handleTmQueue() {
|
||||
result == HasReturnvaluesIF::RETURN_OK;
|
||||
result = tmTcReceptionQueue->receiveMessage(&message))
|
||||
{
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
//sif::info << (int) packetSentCounter << std::endl;
|
||||
#endif
|
||||
if(communicationLinkUp == false or
|
||||
@ -171,7 +171,7 @@ ReturnValue_t TmTcBridge::storeDownlinkData(TmTcMessage *message) {
|
||||
store_address_t storeId = 0;
|
||||
|
||||
if(tmFifo->full()) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::debug << "TmTcBridge::storeDownlinkData: TM downlink max. number "
|
||||
<< "of stored packet IDs reached! " << std::endl;
|
||||
#endif
|
||||
@ -193,7 +193,7 @@ ReturnValue_t TmTcBridge::storeDownlinkData(TmTcMessage *message) {
|
||||
ReturnValue_t TmTcBridge::handleStoredTm() {
|
||||
ReturnValue_t status = RETURN_OK;
|
||||
while(not tmFifo->empty() and packetSentCounter < sentPacketsPerCycle) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
//sif::info << "TMTC Bridge: Sending stored TM data. There are "
|
||||
// << (int) tmFifo->size() << " left to send\r\n" << std::flush;
|
||||
#endif
|
||||
@ -209,7 +209,7 @@ ReturnValue_t TmTcBridge::handleStoredTm() {
|
||||
|
||||
result = sendTm(data,size);
|
||||
if(result != RETURN_OK) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "TMTC Bridge: Could not send stored downlink data"
|
||||
<< std::endl;
|
||||
#endif
|
||||
@ -227,7 +227,7 @@ ReturnValue_t TmTcBridge::handleStoredTm() {
|
||||
|
||||
void TmTcBridge::registerCommConnect() {
|
||||
if(not communicationLinkUp) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
//sif::info << "TMTC Bridge: Registered Comm Link Connect" << std::endl;
|
||||
#endif
|
||||
communicationLinkUp = true;
|
||||
@ -235,7 +235,7 @@ void TmTcBridge::registerCommConnect() {
|
||||
}
|
||||
|
||||
void TmTcBridge::registerCommDisconnect() {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
//sif::info << "TMTC Bridge: Registered Comm Link Disconnect" << std::endl;
|
||||
#endif
|
||||
if(communicationLinkUp) {
|
||||
|
Reference in New Issue
Block a user