fsfw/src/fsfw/subsystem/modes/ModeStoreIF.h

35 lines
983 B
C
Raw Normal View History

#ifndef MODESTOREIF_H_
#define MODESTOREIF_H_
2020-12-14 11:34:54 +01:00
#include <FSFWConfig.h>
#if FSFW_USE_MODESTORE == 1
2020-08-13 20:53:35 +02:00
#include "../../container/ArrayList.h"
#include "../../container/SinglyLinkedList.h"
2022-08-16 12:48:22 +02:00
#include "../../returnvalues/returnvalue.h"
2022-02-02 10:29:30 +01:00
#include "ModeDefinitions.h"
class ModeStoreIF {
2022-02-02 10:29:30 +01:00
public:
static const uint8_t INTERFACE_ID = CLASS_ID::MODE_STORE_IF;
static const ReturnValue_t INVALID_ENTRY = MAKE_RETURN_CODE(0x02);
static const ReturnValue_t TOO_MANY_ELEMENTS = MAKE_RETURN_CODE(0x03);
static const ReturnValue_t CANT_STORE_EMPTY = MAKE_RETURN_CODE(0x04);
2022-02-02 10:29:30 +01:00
virtual ~ModeStoreIF() {}
2022-02-02 10:29:30 +01:00
virtual ReturnValue_t storeArray(ArrayList<ModeListEntry> *sequence,
ModeListEntry **storedFirstEntry) = 0;
2022-02-02 10:29:30 +01:00
virtual ReturnValue_t deleteList(ModeListEntry *sequence) = 0;
2022-02-02 10:29:30 +01:00
virtual ReturnValue_t readList(ModeListEntry *sequence, ArrayList<ModeListEntry> *into) = 0;
2022-02-02 10:29:30 +01:00
virtual uint32_t getFreeSlots() = 0;
};
#endif
#endif /* MODESTOREIF_H_ */