Merge branch 'master' into mueller/SimpleRingBufferUpdate2

This commit is contained in:
Steffen Gaisser 2020-09-22 14:20:51 +02:00
commit 447b69bf03
2 changed files with 8 additions and 4 deletions

View File

@ -384,7 +384,7 @@ void CommandingServiceBase::acceptPacket(uint8_t reportId,
}
void CommandingServiceBase::checkAndExecuteFifo(CommandMapIter iter) {
void CommandingServiceBase::checkAndExecuteFifo(CommandMapIter& iter) {
store_address_t address;
if (iter->second.fifo.retrieve(&address) != RETURN_OK) {
commandMap.erase(&iter);

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{
@ -312,7 +316,7 @@ protected:
ReturnValue_t sendTmPacket(uint8_t subservice, SerializeIF* content,
SerializeIF* header = nullptr);
void checkAndExecuteFifo(CommandMapIter iter);
void checkAndExecuteFifo(CommandMapIter& iter);
private:
/**