diff --git a/memory/FileSystemMessage.cpp b/memory/FileSystemMessage.cpp index 416f646c..b01e1fc6 100644 --- a/memory/FileSystemMessage.cpp +++ b/memory/FileSystemMessage.cpp @@ -2,46 +2,40 @@ #include "../objectmanager/ObjectManagerIF.h" -ReturnValue_t FileSystemMessage::setDeleteFileCommand( +void FileSystemMessage::setDeleteFileCommand( CommandMessage* message, store_address_t storageID) { message->setCommand(DELETE_FILE); message->setParameter2(storageID.raw); - return HasReturnvaluesIF::RETURN_OK; } -ReturnValue_t FileSystemMessage::setCreateDirectoryCommand( +void FileSystemMessage::setCreateDirectoryCommand( CommandMessage* message, store_address_t storageID) { message->setCommand(CREATE_DIRECTORY); message->setParameter2(storageID.raw); - return HasReturnvaluesIF::RETURN_OK; } -ReturnValue_t FileSystemMessage::setDeleteDirectoryCommand( +void FileSystemMessage::setDeleteDirectoryCommand( CommandMessage* message, store_address_t storageID) { message->setCommand(DELETE_DIRECTORY); message->setParameter2(storageID.raw); - return HasReturnvaluesIF::RETURN_OK; } -ReturnValue_t FileSystemMessage::setWriteCommand(CommandMessage* message, +void FileSystemMessage::setWriteCommand(CommandMessage* message, store_address_t storageID) { message->setCommand(WRITE); message->setParameter2(storageID.raw); - return HasReturnvaluesIF::RETURN_OK; } -ReturnValue_t FileSystemMessage::setReadCommand(CommandMessage* message, +void FileSystemMessage::setReadCommand(CommandMessage* message, store_address_t storageID) { message->setCommand(READ); message->setParameter2(storageID.raw); - return HasReturnvaluesIF::RETURN_OK; } -ReturnValue_t FileSystemMessage::setReadReply(CommandMessage* message, +void FileSystemMessage::setReadReply(CommandMessage* message, store_address_t storageID) { message->setCommand(READ_REPLY); message->setParameter2(storageID.raw); - return HasReturnvaluesIF::RETURN_OK; } store_address_t FileSystemMessage::getStoreId(const CommandMessage* message) { diff --git a/memory/FileSystemMessage.h b/memory/FileSystemMessage.h index d3dbd83c..a56abb9c 100644 --- a/memory/FileSystemMessage.h +++ b/memory/FileSystemMessage.h @@ -13,26 +13,32 @@ private: FileSystemMessage(); //A private ctor inhibits instantiation public: static const uint8_t MESSAGE_ID = messagetypes::FILE_SYSTEM_MESSAGE; - static const Command_t CREATE_FILE = MAKE_COMMAND_ID( 0x01 ); - static const Command_t DELETE_FILE = MAKE_COMMAND_ID( 0x02 ); - static const Command_t CREATE_DIRECTORY = MAKE_COMMAND_ID( 0x09 ); - static const Command_t DELETE_DIRECTORY = MAKE_COMMAND_ID( 0x0A ); - static const Command_t WRITE = MAKE_COMMAND_ID( 0x80 ); - static const Command_t READ = MAKE_COMMAND_ID( 0x81 ); - static const Command_t READ_REPLY = MAKE_COMMAND_ID( 0x82 ); + static const Command_t CREATE_FILE = MAKE_COMMAND_ID(1); + static const Command_t DELETE_FILE = MAKE_COMMAND_ID(2); + static const Command_t CREATE_DIRECTORY = MAKE_COMMAND_ID(9); + static const Command_t DELETE_DIRECTORY = MAKE_COMMAND_ID(10); + static const Command_t WRITE = MAKE_COMMAND_ID(128); + static const Command_t READ = MAKE_COMMAND_ID(129); + static const Command_t READ_REPLY = MAKE_COMMAND_ID(130); static const Command_t COMPLETION_SUCCESS = MAKE_COMMAND_ID(5); static const Command_t COMPLETION_FAILED = MAKE_COMMAND_ID(6); - static ReturnValue_t setDeleteFileCommand(CommandMessage* message, store_address_t storageID); - static ReturnValue_t setCreateDirectoryCommand(CommandMessage* message, store_address_t storageID); - static ReturnValue_t setDeleteDirectoryCommand(CommandMessage* message, store_address_t storageID); - static ReturnValue_t setWriteCommand(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 store_address_t getStoreId( const CommandMessage* message ); - static void setSuccessReply(CommandMessage* message); - static void setFailureReply(CommandMessage* message, ReturnValue_t errorCode); + static void setDeleteFileCommand(CommandMessage* message, + store_address_t storeId); + static void setCreateDirectoryCommand(CommandMessage* message, + store_address_t storeId); + static void setDeleteDirectoryCommand(CommandMessage* message, + store_address_t storeId); + static void setWriteCommand(CommandMessage* message, + store_address_t storeId); + static void setReadCommand(CommandMessage* message, + store_address_t storeId); + static void setReadReply(CommandMessage* message, store_address_t storeId); + static void setSuccessReply(CommandMessage* message); + static void setFailureReply(CommandMessage* message, + ReturnValue_t errorCode); + static store_address_t getStoreId(const CommandMessage* message); static ReturnValue_t getFailureReply(const CommandMessage* message); };