1
0
forked from fsfw/fsfw

MessageQueue refactoring complete

This commit is contained in:
2020-06-09 02:18:39 +02:00
parent b1f91439c6
commit 8ff6506ad9
34 changed files with 293 additions and 191 deletions

View File

@ -66,7 +66,8 @@ ReturnValue_t DataPoolAdmin::getParameter(uint8_t domainId,
}
void DataPoolAdmin::handleCommand() {
CommandMessage command;
MessageQueueMessage message;
CommandMessage command(&message);
ReturnValue_t result = commandQueue->receiveMessage(&command);
if (result != RETURN_OK) {
return;
@ -282,7 +283,8 @@ ReturnValue_t DataPoolAdmin::sendParameter(MessageQueueId_t to, uint32_t id,
return result;
}
CommandMessage reply;
MessageQueueMessage message;
CommandMessage reply(&message);
ParameterMessage::setParameterDumpReply(&reply, id, address);
@ -294,7 +296,8 @@ ReturnValue_t DataPoolAdmin::sendParameter(MessageQueueId_t to, uint32_t id,
//identical to ParameterHelper::rejectCommand()
void DataPoolAdmin::rejectCommand(MessageQueueId_t to, ReturnValue_t reason,
Command_t initialCommand) {
CommandMessage reply;
MessageQueueMessage message;
CommandMessage reply(&message);
reply.setReplyRejected(reason, initialCommand);
commandQueue->sendMessage(to, &reply);
}