fsfw/memory/HasFileSystemIF.h

39 lines
1.2 KiB
C
Raw Normal View History

2020-09-19 20:08:25 +02:00
#ifndef FSFW_MEMORY_HASFILESYSTEMIF_H_
#define FSFW_MEMORY_HASFILESYSTEMIF_H_
2020-08-28 18:33:29 +02:00
#include "../returnvalues/HasReturnvaluesIF.h"
2020-09-19 20:08:25 +02:00
/**
* @author Jakob Meier
*/
2020-08-28 18:33:29 +02:00
class HasFileSystemIF {
public:
virtual ~HasFileSystemIF() {}
/**
* Function to get the MessageQueueId_t of the implementing object
* @return MessageQueueId_t of the object
*/
virtual MessageQueueId_t getCommandQueue() const = 0;
2020-09-19 20:08:25 +02:00
2020-08-28 18:33:29 +02:00
/**
* Function to write to a file
* @param dirname Directory of the file
* @param filename The filename of the file
* @param data The data to write to the file
* @param size The size of the data to write
2020-09-19 20:08:25 +02:00
* @param packetNumber Counts the number of packets.
* For large files the write procedure must be split in multiple calls
* to writeToFile
2020-08-28 18:33:29 +02:00
*/
2020-09-19 20:08:25 +02:00
virtual ReturnValue_t writeToFile(const char* dirname, const char* filename,
const uint8_t* data, size_t size, uint16_t packetNumber) = 0;
virtual ReturnValue_t createFile(const char* dirname, const char* filename,
const uint8_t* data, size_t size) = 0;
virtual ReturnValue_t deleteFile(const char* dirname,
const char* filename) = 0;
2020-08-28 18:33:29 +02:00
};
2020-09-19 20:08:25 +02:00
#endif /* FSFW_MEMORY_HASFILESYSTEMIF_H_ */