all cstdout uses wrapped in preprocessor defines
This commit is contained in:
@ -22,7 +22,9 @@ ReturnValue_t CService201HealthCommanding::isValidSubservice(uint8_t subservice)
|
||||
case(Subservice::COMMAND_ANNOUNCE_HEALTH_ALL):
|
||||
return RETURN_OK;
|
||||
default:
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "Invalid Subservice" << std::endl;
|
||||
#endif
|
||||
return AcceptsTelecommandsIF::INVALID_SUBSERVICE;
|
||||
}
|
||||
}
|
||||
|
@ -51,8 +51,10 @@ ReturnValue_t Service1TelecommandVerification::sendVerificationReport(
|
||||
result = generateSuccessReport(message);
|
||||
}
|
||||
if(result != HasReturnvaluesIF::RETURN_OK){
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "Service1TelecommandVerification::sendVerificationReport: "
|
||||
"Sending verification packet failed !" << std::endl;
|
||||
#endif
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -88,9 +90,11 @@ ReturnValue_t Service1TelecommandVerification::initialize() {
|
||||
AcceptsTelemetryIF* funnel = objectManager->
|
||||
get<AcceptsTelemetryIF>(targetDestination);
|
||||
if(funnel == nullptr){
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "Service1TelecommandVerification::initialize: Specified"
|
||||
" TM funnel invalid. Make sure it is set up and implements"
|
||||
" AcceptsTelemetryIF." << std::endl;
|
||||
#endif
|
||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||
}
|
||||
tmQueue->setDefaultDestination(funnel->getReportReceptionQueue());
|
||||
|
@ -25,7 +25,9 @@ ReturnValue_t Service2DeviceAccess::isValidSubservice(uint8_t subservice) {
|
||||
case Subservice::COMMAND_TOGGLE_WIRETAPPING:
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
default:
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "Invalid Subservice" << std::endl;
|
||||
#endif
|
||||
return AcceptsTelecommandsIF::INVALID_SUBSERVICE;
|
||||
}
|
||||
}
|
||||
@ -125,9 +127,11 @@ void Service2DeviceAccess::handleUnrequestedReply(CommandMessage* reply) {
|
||||
static_cast<uint8_t>(Subservice::REPLY_RAW));
|
||||
break;
|
||||
default:
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "Unknown message in Service2DeviceAccess::"
|
||||
"handleUnrequestedReply with command ID " <<
|
||||
reply->getCommand() << std::endl;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
//Must be reached by all cases to clear message
|
||||
@ -143,9 +147,11 @@ void Service2DeviceAccess::sendWiretappingTm(CommandMessage *reply,
|
||||
size_t size = 0;
|
||||
ReturnValue_t result = IPCStore->getData(storeAddress, &data, &size);
|
||||
if(result != HasReturnvaluesIF::RETURN_OK){
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "Service2DeviceAccess::sendWiretappingTm: Data Lost in "
|
||||
"handleUnrequestedReply with failure ID "<< result
|
||||
<< std::endl;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -222,8 +222,10 @@ ReturnValue_t Service3Housekeeping::handleReply(const CommandMessage* reply,
|
||||
}
|
||||
|
||||
default:
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "Service3Housekeeping::handleReply: Invalid reply with "
|
||||
<< "reply command " << command << "!" << std::endl;
|
||||
#endif
|
||||
return CommandingServiceBase::INVALID_REPLY;
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
@ -249,16 +251,20 @@ void Service3Housekeeping::handleUnrequestedReply(
|
||||
}
|
||||
|
||||
default:
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "Service3Housekeeping::handleUnrequestedReply: Invalid "
|
||||
<< "reply with " << "reply command " << command << "!"
|
||||
<< std::endl;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
// Configuration error
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::debug << "Service3Housekeeping::handleUnrequestedReply:"
|
||||
<< "Could not generate reply!" << std::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,8 +37,10 @@ ReturnValue_t Service5EventReporting::performService() {
|
||||
}
|
||||
}
|
||||
}
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::debug << "Service5EventReporting::generateEventReport:"
|
||||
" Too many events" << std::endl;
|
||||
#endif
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
@ -53,8 +55,10 @@ ReturnValue_t Service5EventReporting::generateEventReport(
|
||||
ReturnValue_t result = tmPacket.sendPacket(
|
||||
requestQueue->getDefaultDestination(),requestQueue->getId());
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::debug << "Service5EventReporting::generateEventReport:"
|
||||
" Could not send TM packet" << std::endl;
|
||||
#endif
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -60,9 +60,11 @@ ReturnValue_t Service8FunctionManagement::prepareCommand(
|
||||
ReturnValue_t Service8FunctionManagement::prepareDirectCommand(
|
||||
CommandMessage *message, const uint8_t *tcData, size_t tcDataLen) {
|
||||
if(tcDataLen < sizeof(object_id_t) + sizeof(ActionId_t)) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::debug << "Service8FunctionManagement::prepareDirectCommand:"
|
||||
<< " TC size smaller thant minimum size of direct command."
|
||||
<< std::endl;
|
||||
#endif
|
||||
return CommandingServiceBase::INVALID_TC;
|
||||
}
|
||||
|
||||
@ -125,8 +127,10 @@ ReturnValue_t Service8FunctionManagement::handleDataReply(
|
||||
const uint8_t * buffer = nullptr;
|
||||
ReturnValue_t result = IPCStore->getData(storeId, &buffer, &size);
|
||||
if(result != RETURN_OK) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "Service 8: Could not retrieve data for data reply"
|
||||
<< std::endl;
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
DataReply dataReply(objectId, actionId, buffer, size);
|
||||
@ -135,8 +139,10 @@ ReturnValue_t Service8FunctionManagement::handleDataReply(
|
||||
|
||||
auto deletionResult = IPCStore->deleteData(storeId);
|
||||
if(deletionResult != HasReturnvaluesIF::RETURN_OK) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::warning << "Service8FunctionManagement::handleReply: Deletion"
|
||||
<< " of data in pool failed." << std::endl;
|
||||
#endif
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user