new RTD reader module handling all RTD SPI Communication
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
2022-05-09 21:29:54 +02:00
parent 9f9fa9b41b
commit 50c363fb6f
11 changed files with 510 additions and 96 deletions

View File

@ -10,7 +10,7 @@ TcsBoardAssembly::TcsBoardAssembly(object_id_t objectId, object_id_t parentId,
eventQueue = QueueFactory::instance()->createMessageQueue(24);
ModeListEntry entry;
for (uint8_t idx = 0; idx < NUMBER_RTDS; idx++) {
entry.setObject(helper.rtdIds[idx]);
entry.setObject(helper.rtdInfos[idx].first);
entry.setMode(MODE_OFF);
entry.setSubmode(SUBMODE_NONE);
entry.setInheritSubmode(false);
@ -57,7 +57,7 @@ ReturnValue_t TcsBoardAssembly::checkChildrenStateOn(Mode_t wantedMode, Submode_
int devsInWrongMode = 0;
try {
for (uint8_t idx = 0; idx < NUMBER_RTDS; idx++) {
if (childrenMap.at(helper.rtdIds[idx]).mode != wantedMode) {
if (childrenMap.at(helper.rtdInfos[idx].first).mode != wantedMode) {
devsInWrongMode++;
}
}
@ -93,8 +93,8 @@ ReturnValue_t TcsBoardAssembly::isModeCombinationValid(Mode_t mode, Submode_t su
ReturnValue_t TcsBoardAssembly::initialize() {
ReturnValue_t result = RETURN_OK;
for (const auto& obj : helper.rtdIds) {
result = registerChild(obj);
for (const auto& obj : helper.rtdInfos) {
result = registerChild(obj.first);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
@ -126,8 +126,8 @@ ReturnValue_t TcsBoardAssembly::handleNormalOrOnModeCmd(Mode_t mode, Submode_t s
object_id_t objId = 0;
try {
for (uint8_t idx = 0; idx < NUMBER_RTDS; idx++) {
devMode = childrenMap.at(helper.rtdIds[idx]).mode;
objId = helper.rtdIds[idx];
devMode = childrenMap.at(helper.rtdInfos[idx].first).mode;
objId = helper.rtdInfos[idx].first;
if (mode == devMode) {
modeTable[idx].setMode(mode);
} else if (mode == DeviceHandlerIF::MODE_NORMAL) {