com subsystem infastructure
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
parent
4cea1badf3
commit
5a71a400be
@ -14,9 +14,58 @@ static const auto OFF = HasModesIF::MODE_OFF;
|
||||
static const auto ON = HasModesIF::MODE_ON;
|
||||
static const auto NML = DeviceHandlerIF::MODE_NORMAL;
|
||||
|
||||
namespace {}
|
||||
namespace {
|
||||
void buildTxOffSequence(Subsystem* ss, ModeListEntry& eh);
|
||||
void buildTxOnSequence(Subsystem* ss, ModeListEntry& eh);
|
||||
}
|
||||
|
||||
void satsystem::com::init() {
|
||||
ModeListEntry entry;
|
||||
Subsystem* comSubsystem = new Subsystem(objects::COM_SUBSYSTEM, objects::EIVE_SYSTEM, 12, 24);
|
||||
buildTxOffSequence(comSubsystem, entry);
|
||||
buildTxOnSequence(comSubsystem, entry);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
void buildTxOffSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
std::string context = "satsystem::com::buildTxOffSequence";
|
||||
auto ctxc = context.c_str();
|
||||
// Insert Helper Table
|
||||
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode, ArrayList<ModeListEntry>& table) {
|
||||
eh.setObject(obj);
|
||||
eh.setMode(mode);
|
||||
eh.setSubmode(submode);
|
||||
check(table.insert(eh), ctxc);
|
||||
};
|
||||
// Insert Helper Sequence
|
||||
auto ihs = [&](ArrayList<ModeListEntry>& sequence, Mode_t tableId, uint32_t waitSeconds,
|
||||
bool checkSuccess) {
|
||||
eh.setTableId(tableId);
|
||||
eh.setWaitSeconds(waitSeconds);
|
||||
eh.setCheckSuccess(checkSuccess);
|
||||
check(sequence.insert(eh), ctxc);
|
||||
};
|
||||
}
|
||||
|
||||
void buildTxOnSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
std::string context = "satsystem::com::buildTxOnSequence";
|
||||
auto ctxc = context.c_str();
|
||||
// Insert Helper Table
|
||||
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode, ArrayList<ModeListEntry>& table) {
|
||||
eh.setObject(obj);
|
||||
eh.setMode(mode);
|
||||
eh.setSubmode(submode);
|
||||
check(table.insert(eh), ctxc);
|
||||
};
|
||||
// Insert Helper Sequence
|
||||
auto ihs = [&](ArrayList<ModeListEntry>& sequence, Mode_t tableId, uint32_t waitSeconds,
|
||||
bool checkSuccess) {
|
||||
eh.setTableId(tableId);
|
||||
eh.setWaitSeconds(waitSeconds);
|
||||
eh.setCheckSuccess(checkSuccess);
|
||||
check(sequence.insert(eh), ctxc);
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,9 +4,6 @@
|
||||
|
||||
namespace com {
|
||||
|
||||
enum Submodes: uint8_t {
|
||||
NONE = 0,
|
||||
TX_ON = 1
|
||||
};
|
||||
enum Submodes : uint8_t { NONE = 0, TX_ON = 1 };
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user