EIVE upstream #29
@ -577,6 +577,9 @@ ReturnValue_t LocalDataPoolManager::handleHousekeepingMessage(CommandMessage* me
|
|||||||
|
|
||||||
CommandMessage reply;
|
CommandMessage reply;
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
|
if(result == WRONG_HK_PACKET_TYPE) {
|
||||||
|
printWarningOrError(sif::OutputTypes::OUT_WARNING, "handleHousekeepingMessage", WRONG_HK_PACKET_TYPE);
|
||||||
|
}
|
||||||
HousekeepingMessage::setHkRequestFailureReply(&reply, sid, result);
|
HousekeepingMessage::setHkRequestFailureReply(&reply, sid, result);
|
||||||
} else {
|
} else {
|
||||||
HousekeepingMessage::setHkRequestSuccessReply(&reply, sid);
|
HousekeepingMessage::setHkRequestSuccessReply(&reply, sid);
|
||||||
@ -834,6 +837,8 @@ void LocalDataPoolManager::printWarningOrError(sif::OutputTypes outputType,
|
|||||||
errorPrint = "Dataset not found";
|
errorPrint = "Dataset not found";
|
||||||
} else if (error == POOLOBJECT_NOT_FOUND) {
|
} else if (error == POOLOBJECT_NOT_FOUND) {
|
||||||
errorPrint = "Pool Object not found";
|
errorPrint = "Pool Object not found";
|
||||||
|
} else if (error == WRONG_HK_PACKET_TYPE) {
|
||||||
|
errorPrint = "Wrong Packet Type";
|
||||||
} else if (error == HasReturnvaluesIF::RETURN_FAILED) {
|
} else if (error == HasReturnvaluesIF::RETURN_FAILED) {
|
||||||
if (outputType == sif::OutputTypes::OUT_WARNING) {
|
if (outputType == sif::OutputTypes::OUT_WARNING) {
|
||||||
errorPrint = "Generic Warning";
|
errorPrint = "Generic Warning";
|
||||||
|
@ -34,7 +34,7 @@ class CommandMessageIF {
|
|||||||
static const Command_t CMD_NONE = MAKE_COMMAND_ID(0);
|
static const Command_t CMD_NONE = MAKE_COMMAND_ID(0);
|
||||||
static const Command_t REPLY_COMMAND_OK = MAKE_COMMAND_ID(1);
|
static const Command_t REPLY_COMMAND_OK = MAKE_COMMAND_ID(1);
|
||||||
//! Reply indicating that the current command was rejected,
|
//! Reply indicating that the current command was rejected,
|
||||||
//! par1 should contain the error code
|
//! Parameter 1 should contain the error code
|
||||||
static const Command_t REPLY_REJECTED = MAKE_COMMAND_ID(2);
|
static const Command_t REPLY_REJECTED = MAKE_COMMAND_ID(2);
|
||||||
|
|
||||||
virtual ~CommandMessageIF(){};
|
virtual ~CommandMessageIF(){};
|
||||||
|
@ -208,7 +208,7 @@ ReturnValue_t Service3Housekeeping::handleReply(const CommandMessage* reply,
|
|||||||
ReturnValue_t error = HasReturnvaluesIF::RETURN_FAILED;
|
ReturnValue_t error = HasReturnvaluesIF::RETURN_FAILED;
|
||||||
HousekeepingMessage::getHkRequestFailureReply(reply, &error);
|
HousekeepingMessage::getHkRequestFailureReply(reply, &error);
|
||||||
failureParameter2 = error;
|
failureParameter2 = error;
|
||||||
return CommandingServiceBase::EXECUTION_COMPLETE;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -248,19 +248,23 @@ void Service3Housekeeping::handleUnrequestedReply(CommandMessage* reply) {
|
|||||||
case (HousekeepingMessage::HK_REQUEST_FAILURE): {
|
case (HousekeepingMessage::HK_REQUEST_FAILURE): {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case(CommandMessage::REPLY_REJECTED): {
|
||||||
|
sif::warning << "Service3Housekeeping::handleUnrequestedReply: Unexpected reply "
|
||||||
|
"rejected with error code" << reply->getParameter() << std::endl;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::warning << "Service3Housekeeping::handleUnrequestedReply: Invalid reply with reply "
|
sif::warning << "Service3Housekeeping::handleUnrequestedReply: Invalid reply with reply "
|
||||||
"command "
|
"command " << command << "" << std::endl;
|
||||||
<< command << "!" << std::endl;
|
|
||||||
#else
|
#else
|
||||||
sif::printWarning(
|
sif::printWarning(
|
||||||
"Service3Housekeeping::handleUnrequestedReply: Invalid reply with "
|
"Service3Housekeeping::handleUnrequestedReply: Invalid reply with "
|
||||||
"reply command %hu!\n",
|
"reply command %hu\n",
|
||||||
command);
|
command);
|
||||||
#endif
|
#endif
|
||||||
return;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -275,6 +279,7 @@ void Service3Housekeeping::handleUnrequestedReply(CommandMessage* reply) {
|
|||||||
"Could not generate reply!\n");
|
"Could not generate reply!\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
CommandingServiceBase::handleUnrequestedReply(reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageQueueId_t Service3Housekeeping::getHkQueue() const { return commandQueue->getId(); }
|
MessageQueueId_t Service3Housekeeping::getHkQueue() const { return commandQueue->getId(); }
|
||||||
|
Loading…
Reference in New Issue
Block a user