eive-obsw/bsp_q7s/memory/FileSystemHandler.h

40 lines
1.3 KiB
C++

#ifndef BSP_Q7S_MEMORY_FILESYSTEMHANDLER_H_
#define BSP_Q7S_MEMORY_FILESYSTEMHANDLER_H_
#include "fsfw/ipc/MessageQueueIF.h"
#include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/memory/HasFileSystemIF.h"
class FileSystemHandler: public SystemObject,
public ExecutableObjectIF,
public HasFileSystemIF {
public:
FileSystemHandler(object_id_t fileSystemHandler);
virtual~ FileSystemHandler();
ReturnValue_t performOperation(uint8_t) override;
/**
* Function to get the MessageQueueId_t of the implementing object
* @return MessageQueueId_t of the object
*/
MessageQueueId_t getCommandQueue() const override;
private:
MessageQueueIF* mq = nullptr;
ReturnValue_t appendToFile(const char* repositoryPath,
const char* filename, const uint8_t* data, size_t size,
uint16_t packetNumber, void* args = nullptr) override;
ReturnValue_t createFile(const char* repositoryPath,
const char* filename, const uint8_t* data = nullptr,
size_t size = 0, void* args = nullptr) override;
ReturnValue_t deleteFile(const char* repositoryPath,
const char* filename, void* args = nullptr) override;
};
#endif /* BSP_Q7S_MEMORY_FILESYSTEMMANAGER_H_ */