CSB FIFO first steps to make configurable

This commit is contained in:
Robin Müller 2020-09-19 21:57:23 +02:00
parent 40db85e73f
commit 763c52cfca

View File

@ -39,7 +39,11 @@ class CommandingServiceBase: public SystemObject,
public HasReturnvaluesIF {
friend void (Factory::setStaticFrameworkObjectIds)();
public:
// We could make this configurable via preprocessor and the FSFWConfig file.
static constexpr uint8_t COMMAND_INFO_FIFO_DEPTH = 3;
static const uint8_t INTERFACE_ID = CLASS_ID::COMMAND_SERVICE_BASE;
static const ReturnValue_t EXECUTION_COMPLETE = MAKE_RETURN_CODE(1);
static const ReturnValue_t NO_STEP_MESSAGE = MAKE_RETURN_CODE(2);
static const ReturnValue_t OBJECT_BUSY = MAKE_RETURN_CODE(3);
@ -223,7 +227,7 @@ protected:
uint32_t state;
Command_t command;
object_id_t objectId;
FIFO<store_address_t, 3> fifo;
FIFO<store_address_t, COMMAND_INFO_FIFO_DEPTH> fifo;
virtual ReturnValue_t serialize(uint8_t **buffer, size_t *size,
size_t maxSize, Endianness streamEndianness) const override{
@ -235,7 +239,7 @@ protected:
};
virtual ReturnValue_t deSerialize(const uint8_t **buffer, size_t *size,
Endianness streamEndianness) override{
Endianness streamEndianness) override {
return HasReturnvaluesIF::RETURN_FAILED;
};
};