separate messages for success/failure

This commit is contained in:
Robin Müller 2020-09-19 21:36:12 +02:00
parent cad08e1ea9
commit 40db85e73f
2 changed files with 9 additions and 4 deletions

View File

@ -50,8 +50,12 @@ store_address_t FileSystemMessage::getStoreId(const CommandMessage* message) {
return temp; return temp;
} }
void FileSystemMessage::setCompletionReply(CommandMessage* message, void FileSystemMessage::setSuccessReply(CommandMessage *message) {
Command_t completionStatus) { message->setCommand(COMPLETION_SUCCESS);
message->setCommand(completionStatus);
} }
void FileSystemMessage::setFailureReply(CommandMessage *message,
ReturnValue_t errorCode) {
message->setCommand(COMPLETION_SUCCESS);
message->setParameter(errorCode);
}

View File

@ -30,7 +30,8 @@ public:
static ReturnValue_t setReadCommand(CommandMessage* message, store_address_t storageID); static ReturnValue_t setReadCommand(CommandMessage* message, store_address_t storageID);
static ReturnValue_t setReadReply(CommandMessage* message, store_address_t storageID); static ReturnValue_t setReadReply(CommandMessage* message, store_address_t storageID);
static store_address_t getStoreId( const CommandMessage* message ); static store_address_t getStoreId( const CommandMessage* message );
static void setCompletionReply(CommandMessage* message, Command_t completionStatus); static void setSuccessReply(CommandMessage* message);
static void setFailureReply(CommandMessage* message, ReturnValue_t errorCode);
}; };
#endif /* FSFW_MEMORY_FILESYSTEMMESSAGE_H_ */ #endif /* FSFW_MEMORY_FILESYSTEMMESSAGE_H_ */