Add CCSDS handler modes #352

Merged
muellerr merged 6 commits from add_ccsds_handler_modes into develop 2023-01-26 17:04:09 +01:00
2 changed files with 10 additions and 2 deletions
Showing only changes of commit 1128d355bb - Show all commits

View File

@ -82,6 +82,11 @@ ReturnValue_t CcsdsIpCoreHandler::initialize() {
return result; return result;
} }
result = modeHelper.initialize();
if (result != returnvalue::OK) {
return result;
}
VirtualChannelMapIter iter; VirtualChannelMapIter iter;
for (iter = virtualChannelMap.begin(); iter != virtualChannelMap.end(); iter++) { for (iter = virtualChannelMap.begin(); iter != virtualChannelMap.end(); iter++) {
result = iter->second->initialize(); result = iter->second->initialize();
@ -364,9 +369,11 @@ ReturnValue_t CcsdsIpCoreHandler::checkModeCommand(Mode_t mode, Submode_t submod
submode != static_cast<Submode_t>(Submode::DATARATE_LOW)) { submode != static_cast<Submode_t>(Submode::DATARATE_LOW)) {
return HasModesIF::INVALID_SUBMODE; return HasModesIF::INVALID_SUBMODE;
} }
} else if (mode != HasModesIF::MODE_OFF) {
return returnvalue::FAILED;
} }
*msToReachTheMode = 2000; *msToReachTheMode = 2000;
return returnvalue::FAILED; return returnvalue::OK;
} }
void CcsdsIpCoreHandler::startTransition(Mode_t mode, Submode_t submode) { void CcsdsIpCoreHandler::startTransition(Mode_t mode, Submode_t submode) {
@ -387,6 +394,7 @@ void CcsdsIpCoreHandler::startTransition(Mode_t mode, Submode_t submode) {
disableTransmit(); disableTransmit();
mode = HasModesIF::MODE_OFF; mode = HasModesIF::MODE_OFF;
} }
modeHelper.modeChanged(mode, submode);
} }
void CcsdsIpCoreHandler::announceMode(bool recursive) { triggerEvent(MODE_INFO, mode, submode); } void CcsdsIpCoreHandler::announceMode(bool recursive) { triggerEvent(MODE_INFO, mode, submode); }

2
tmtc

@ -1 +1 @@
Subproject commit 49ccb4be8d42d6916be00ff9d8462a1f65481a6c Subproject commit c36c7ca5bbe12b74f096414383eedfc16576a9d2