Release v5.0.0 #657
@ -66,6 +66,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/559
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/559
|
||||||
- Added ETL dependency and improved library dependency management
|
- Added ETL dependency and improved library dependency management
|
||||||
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/592
|
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/592
|
||||||
|
- `Subsystem`: New API to add table and sequence entries
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
|
@ -307,6 +307,11 @@ void Subsystem::replyToCommand(ReturnValue_t status, uint32_t parameter) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReturnValue_t Subsystem::addSequence(SequenceEntry sequence) {
|
||||||
|
return addSequence(sequence.table, sequence.mode, sequence.fallbackMode, sequence.inStore,
|
||||||
|
sequence.preInit);
|
||||||
|
}
|
||||||
|
|
||||||
ReturnValue_t Subsystem::addSequence(ArrayList<ModeListEntry> *sequence, Mode_t id,
|
ReturnValue_t Subsystem::addSequence(ArrayList<ModeListEntry> *sequence, Mode_t id,
|
||||||
Mode_t fallbackSequence, bool inStore, bool preInit) {
|
Mode_t fallbackSequence, bool inStore, bool preInit) {
|
||||||
ReturnValue_t result;
|
ReturnValue_t result;
|
||||||
@ -350,6 +355,10 @@ ReturnValue_t Subsystem::addSequence(ArrayList<ModeListEntry> *sequence, Mode_t
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReturnValue_t Subsystem::addTable(TableEntry table) {
|
||||||
|
return addTable(table.table, table.mode, table.inStore, table.preInit);
|
||||||
|
}
|
||||||
|
|
||||||
ReturnValue_t Subsystem::addTable(ArrayList<ModeListEntry> *table, Mode_t id, bool inStore,
|
ReturnValue_t Subsystem::addTable(ArrayList<ModeListEntry> *table, Mode_t id, bool inStore,
|
||||||
bool preInit) {
|
bool preInit) {
|
||||||
ReturnValue_t result;
|
ReturnValue_t result;
|
||||||
@ -458,6 +467,7 @@ ReturnValue_t Subsystem::initialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mode = initialMode;
|
mode = initialMode;
|
||||||
|
submode = initSubmode;
|
||||||
|
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
@ -595,7 +605,10 @@ ReturnValue_t Subsystem::checkObjectConnections() {
|
|||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Subsystem::setInitialMode(Mode_t mode) { initialMode = mode; }
|
void Subsystem::setInitialMode(Mode_t mode, Submode_t submode) {
|
||||||
|
this->initialMode = mode;
|
||||||
|
this->initSubmode = submode;
|
||||||
|
}
|
||||||
|
|
||||||
void Subsystem::cantKeepMode() {
|
void Subsystem::cantKeepMode() {
|
||||||
ReturnValue_t result;
|
ReturnValue_t result;
|
||||||
|
@ -10,6 +10,28 @@
|
|||||||
#include "fsfw/FSFW.h"
|
#include "fsfw/FSFW.h"
|
||||||
#include "modes/ModeDefinitions.h"
|
#include "modes/ModeDefinitions.h"
|
||||||
|
|
||||||
|
struct TableSequenceBase {
|
||||||
|
public:
|
||||||
|
TableSequenceBase(Mode_t mode, ArrayList<ModeListEntry> *table) : mode(mode), table(table){};
|
||||||
|
Mode_t mode;
|
||||||
|
ArrayList<ModeListEntry> *table;
|
||||||
|
bool inStore = false;
|
||||||
|
bool preInit = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct TableEntry : public TableSequenceBase {
|
||||||
|
public:
|
||||||
|
TableEntry(Mode_t mode, ArrayList<ModeListEntry> *table) : TableSequenceBase(mode, table){};
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SequenceEntry : public TableSequenceBase {
|
||||||
|
public:
|
||||||
|
SequenceEntry(Mode_t mode, ArrayList<ModeListEntry> *table, Mode_t fallbackMode)
|
||||||
|
: TableSequenceBase(mode, table), fallbackMode(fallbackMode) {}
|
||||||
|
|
||||||
|
Mode_t fallbackMode;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief TODO: documentation missing
|
* @brief TODO: documentation missing
|
||||||
* @details
|
* @details
|
||||||
@ -44,13 +66,15 @@ class Subsystem : public SubsystemBase, public HasModeSequenceIF {
|
|||||||
uint32_t maxNumberOfTables);
|
uint32_t maxNumberOfTables);
|
||||||
virtual ~Subsystem();
|
virtual ~Subsystem();
|
||||||
|
|
||||||
|
ReturnValue_t addSequence(SequenceEntry sequence);
|
||||||
ReturnValue_t addSequence(ArrayList<ModeListEntry> *sequence, Mode_t id, Mode_t fallbackSequence,
|
ReturnValue_t addSequence(ArrayList<ModeListEntry> *sequence, Mode_t id, Mode_t fallbackSequence,
|
||||||
bool inStore = true, bool preInit = true);
|
bool inStore = true, bool preInit = true);
|
||||||
|
|
||||||
|
ReturnValue_t addTable(TableEntry table);
|
||||||
ReturnValue_t addTable(ArrayList<ModeListEntry> *table, Mode_t id, bool inStore = true,
|
ReturnValue_t addTable(ArrayList<ModeListEntry> *table, Mode_t id, bool inStore = true,
|
||||||
bool preInit = true);
|
bool preInit = true);
|
||||||
|
|
||||||
void setInitialMode(Mode_t mode);
|
void setInitialMode(Mode_t mode, Submode_t submode = SUBMODE_NONE);
|
||||||
|
|
||||||
virtual ReturnValue_t initialize() override;
|
virtual ReturnValue_t initialize() override;
|
||||||
|
|
||||||
@ -89,6 +113,7 @@ class Subsystem : public SubsystemBase, public HasModeSequenceIF {
|
|||||||
Submode_t targetSubmode;
|
Submode_t targetSubmode;
|
||||||
|
|
||||||
Mode_t initialMode = 0;
|
Mode_t initialMode = 0;
|
||||||
|
Submode_t initSubmode = SUBMODE_NONE;
|
||||||
|
|
||||||
HybridIterator<ModeListEntry> currentSequenceIterator;
|
HybridIterator<ModeListEntry> currentSequenceIterator;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user