From a7fe23c3004d8c933b36d3c5a23f0b8322eaa022 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Mon, 5 Oct 2020 00:12:52 +0200 Subject: [PATCH] small stuff --- memory/FileSystemMessage.cpp | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/memory/FileSystemMessage.cpp b/memory/FileSystemMessage.cpp index b9c426a8..839268a0 100644 --- a/memory/FileSystemMessage.cpp +++ b/memory/FileSystemMessage.cpp @@ -1,35 +1,40 @@ #include "FileSystemMessage.h" #include "../objectmanager/ObjectManagerIF.h" +void FileSystemMessage::setCreateFileCommand(CommandMessage* message, + store_address_t storeId) { + message->setCommand(CREATE_FILE); + message->setParameter2(storeId.raw); +} void FileSystemMessage::setDeleteFileCommand( - CommandMessage* message, store_address_t storageID) { - message->setCommand(DELETE_FILE); - message->setParameter2(storageID.raw); + CommandMessage* message, store_address_t storeId) { + message->setCommand(DELETE_FILE); + message->setParameter2(storeId.raw); } void FileSystemMessage::setCreateDirectoryCommand( - CommandMessage* message, store_address_t storageID) { + CommandMessage* message, store_address_t storeId) { message->setCommand(CREATE_DIRECTORY); - message->setParameter2(storageID.raw); + message->setParameter2(storeId.raw); } void FileSystemMessage::setDeleteDirectoryCommand( - CommandMessage* message, store_address_t storageID) { + CommandMessage* message, store_address_t storeId) { message->setCommand(DELETE_DIRECTORY); - message->setParameter2(storageID.raw); + message->setParameter2(storeId.raw); } void FileSystemMessage::setWriteCommand(CommandMessage* message, - store_address_t storageID) { + store_address_t storeId) { message->setCommand(APPEND_TO_FILE); - message->setParameter2(storageID.raw); + message->setParameter2(storeId.raw); } void FileSystemMessage::setReadCommand(CommandMessage* message, - store_address_t storageID) { + store_address_t storeId) { message->setCommand(READ_FROM_FILE); - message->setParameter2(storageID.raw); + message->setParameter2(storeId.raw); } void FileSystemMessage::setReadReply(CommandMessage* message, @@ -38,12 +43,6 @@ void FileSystemMessage::setReadReply(CommandMessage* message, message->setParameter2(storageID.raw); } -void FileSystemMessage::setCreateFileCommand(CommandMessage *message, - store_address_t storeId) { - message->setCommand(CREATE_FILE); - message->setParameter2(storeId.raw); -} - store_address_t FileSystemMessage::getStoreId(const CommandMessage* message) { store_address_t temp; temp.raw = message->getParameter2();