From 2bca40c527de985495220ee9ed734cb1f7bf6d2c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 3 Feb 2021 18:04:55 +0100 Subject: [PATCH] printout improvements --- datapoollocal/LocalPoolDataSetBase.cpp | 2 +- pus/Service3Housekeeping.cpp | 27 +++++++++++++++++--------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/datapoollocal/LocalPoolDataSetBase.cpp b/datapoollocal/LocalPoolDataSetBase.cpp index 035ba694..d5c0556c 100644 --- a/datapoollocal/LocalPoolDataSetBase.cpp +++ b/datapoollocal/LocalPoolDataSetBase.cpp @@ -83,7 +83,7 @@ ReturnValue_t LocalPoolDataSetBase::lockDataPool( ReturnValue_t LocalPoolDataSetBase::serializeWithValidityBuffer(uint8_t **buffer, size_t *size, size_t maxSize, SerializeIF::Endianness streamEndianness) const { - ReturnValue_t result = HasReturnvaluesIF::RETURN_FAILED; + ReturnValue_t result = HasReturnvaluesIF::RETURN_OK; uint8_t validityMaskSize = std::ceil(static_cast(fillCount)/8.0); uint8_t validityMask[validityMaskSize]; uint8_t validBufferIndex = 0; diff --git a/pus/Service3Housekeeping.cpp b/pus/Service3Housekeeping.cpp index ba7ff6ee..16116ee6 100644 --- a/pus/Service3Housekeeping.cpp +++ b/pus/Service3Housekeeping.cpp @@ -223,8 +223,11 @@ ReturnValue_t Service3Housekeeping::handleReply(const CommandMessage* reply, default: #if FSFW_CPP_OSTREAM_ENABLED == 1 - sif::error << "Service3Housekeeping::handleReply: Invalid reply with " + sif::warning << "Service3Housekeeping::handleReply: Invalid reply with " << "reply command " << command << "!" << std::endl; +#else + sif::printWarning("Service3Housekeeping::handleReply: Invalid reply with " + "reply command %hu!\n", command); #endif return CommandingServiceBase::INVALID_REPLY; } @@ -250,20 +253,26 @@ void Service3Housekeeping::handleUnrequestedReply( break; } - default: + default: { #if FSFW_CPP_OSTREAM_ENABLED == 1 - sif::error << "Service3Housekeeping::handleUnrequestedReply: Invalid " - << "reply with " << "reply command " << command << "!" - << std::endl; + sif::warning << "Service3Housekeeping::handleUnrequestedReply: Invalid reply with reply " + "command " << command << "!" << std::endl; +#else + sif::printWarning("Service3Housekeeping::handleUnrequestedReply: Invalid reply with " + "reply command %hu!\n", command); #endif - return; + return; + } } if(result != HasReturnvaluesIF::RETURN_OK) { - // Configuration error + /* Configuration error */ #if FSFW_CPP_OSTREAM_ENABLED == 1 - sif::debug << "Service3Housekeeping::handleUnrequestedReply:" - << "Could not generate reply!" << std::endl; + sif::warning << "Service3Housekeeping::handleUnrequestedReply: Could not generate reply!" << + std::endl; +#else + sif::printWarning("Service3Housekeeping::handleUnrequestedReply: " + "Could not generate reply!\n"); #endif } }