Merge pull request 'commanding service base hotfix' (#204) from KSat/fsfw:mueller/CSB-hotfix into master
Reviewed-on: fsfw/fsfw#204
This commit is contained in:
commit
0d8200e856
@ -384,7 +384,7 @@ void CommandingServiceBase::acceptPacket(uint8_t reportId,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CommandingServiceBase::checkAndExecuteFifo(CommandMapIter iter) {
|
void CommandingServiceBase::checkAndExecuteFifo(CommandMapIter& iter) {
|
||||||
store_address_t address;
|
store_address_t address;
|
||||||
if (iter->second.fifo.retrieve(&address) != RETURN_OK) {
|
if (iter->second.fifo.retrieve(&address) != RETURN_OK) {
|
||||||
commandMap.erase(&iter);
|
commandMap.erase(&iter);
|
||||||
|
@ -39,7 +39,11 @@ class CommandingServiceBase: public SystemObject,
|
|||||||
public HasReturnvaluesIF {
|
public HasReturnvaluesIF {
|
||||||
friend void (Factory::setStaticFrameworkObjectIds)();
|
friend void (Factory::setStaticFrameworkObjectIds)();
|
||||||
public:
|
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 uint8_t INTERFACE_ID = CLASS_ID::COMMAND_SERVICE_BASE;
|
||||||
|
|
||||||
static const ReturnValue_t EXECUTION_COMPLETE = MAKE_RETURN_CODE(1);
|
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 NO_STEP_MESSAGE = MAKE_RETURN_CODE(2);
|
||||||
static const ReturnValue_t OBJECT_BUSY = MAKE_RETURN_CODE(3);
|
static const ReturnValue_t OBJECT_BUSY = MAKE_RETURN_CODE(3);
|
||||||
@ -223,7 +227,7 @@ protected:
|
|||||||
uint32_t state;
|
uint32_t state;
|
||||||
Command_t command;
|
Command_t command;
|
||||||
object_id_t objectId;
|
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,
|
virtual ReturnValue_t serialize(uint8_t **buffer, size_t *size,
|
||||||
size_t maxSize, Endianness streamEndianness) const override{
|
size_t maxSize, Endianness streamEndianness) const override{
|
||||||
@ -235,7 +239,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
virtual ReturnValue_t deSerialize(const uint8_t **buffer, size_t *size,
|
virtual ReturnValue_t deSerialize(const uint8_t **buffer, size_t *size,
|
||||||
Endianness streamEndianness) override{
|
Endianness streamEndianness) override {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -312,7 +316,7 @@ protected:
|
|||||||
ReturnValue_t sendTmPacket(uint8_t subservice, SerializeIF* content,
|
ReturnValue_t sendTmPacket(uint8_t subservice, SerializeIF* content,
|
||||||
SerializeIF* header = nullptr);
|
SerializeIF* header = nullptr);
|
||||||
|
|
||||||
void checkAndExecuteFifo(CommandMapIter iter);
|
void checkAndExecuteFifo(CommandMapIter& iter);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user