perform finish in command builder
All checks were successful
EIVE/eive-obsw/pipeline/pr-irini This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-irini This commit looks good
This commit is contained in:
parent
c3fb285f35
commit
da7cedc910
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit 2fa76d366325372e92a2188f71f143a485e652fc
|
Subproject commit cfca27542a3cabf58f9b7cab238c89ab9ad9beea
|
@ -95,6 +95,7 @@ ReturnValue_t ScexDeviceHandler::buildCommandFromCommand(DeviceCommandId_t devic
|
|||||||
prepareScexCmd(cmdTyped, {cmdBuf.data(), cmdBuf.size()}, rawPacketLen,
|
prepareScexCmd(cmdTyped, {cmdBuf.data(), cmdBuf.size()}, rawPacketLen,
|
||||||
{commandData + 1, commandDataLen - 1}, tempCheck);
|
{commandData + 1, commandDataLen - 1}, tempCheck);
|
||||||
updatePeriodicReply(true, deviceCommand);
|
updatePeriodicReply(true, deviceCommand);
|
||||||
|
actionHelper.finish(true, getCommanderQueueId(deviceCommand), deviceCommand, OK);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (ONE_CELL): {
|
case (ONE_CELL): {
|
||||||
@ -104,6 +105,7 @@ ReturnValue_t ScexDeviceHandler::buildCommandFromCommand(DeviceCommandId_t devic
|
|||||||
prepareScexCmd(cmdTyped, {cmdBuf.data(), cmdBuf.size()}, rawPacketLen,
|
prepareScexCmd(cmdTyped, {cmdBuf.data(), cmdBuf.size()}, rawPacketLen,
|
||||||
{commandData + 1, commandDataLen - 1}, tempCheck);
|
{commandData + 1, commandDataLen - 1}, tempCheck);
|
||||||
updatePeriodicReply(true, deviceCommand);
|
updatePeriodicReply(true, deviceCommand);
|
||||||
|
actionHelper.finish(true, getCommanderQueueId(deviceCommand), deviceCommand, OK);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (ALL_CELLS_CMD): {
|
case (ALL_CELLS_CMD): {
|
||||||
@ -112,6 +114,7 @@ ReturnValue_t ScexDeviceHandler::buildCommandFromCommand(DeviceCommandId_t devic
|
|||||||
finishCountdown.resetTimer();
|
finishCountdown.resetTimer();
|
||||||
prepareScexCmd(cmdTyped, {cmdBuf.data(), cmdBuf.size()}, rawPacketLen,
|
prepareScexCmd(cmdTyped, {cmdBuf.data(), cmdBuf.size()}, rawPacketLen,
|
||||||
{commandData + 1, commandDataLen - 1}, tempCheck);
|
{commandData + 1, commandDataLen - 1}, tempCheck);
|
||||||
|
actionHelper.finish(true, getCommanderQueueId(deviceCommand), deviceCommand, OK);
|
||||||
updatePeriodicReply(true, deviceCommand);
|
updatePeriodicReply(true, deviceCommand);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -151,15 +154,6 @@ ReturnValue_t ScexDeviceHandler::scanForReply(const uint8_t* start, size_t remai
|
|||||||
} else {
|
} else {
|
||||||
result = handleValidReply(remainingSize, foundId, foundLen);
|
result = handleValidReply(remainingSize, foundId, foundLen);
|
||||||
}
|
}
|
||||||
uint32_t remainingMillis = finishCountdown.getRemainingMillis();
|
|
||||||
if (commandActive and finishCountdown.hasTimedOut()) {
|
|
||||||
triggerEvent(scex::EXPERIMENT_TIMEDOUT, currCmd, 0);
|
|
||||||
reader.finish();
|
|
||||||
sif::warning << "ScexDeviceHandler::scanForReply: Reader timeout; RemMillis: "
|
|
||||||
<< remainingMillis << std::endl;
|
|
||||||
fileNameSet = false;
|
|
||||||
commandActive = false;
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,17 +170,14 @@ ReturnValue_t ScexDeviceHandler::handleValidReply(size_t remSize, DeviceCommandI
|
|||||||
sif::info << "ScexDeviceHandler::handleValidReply: RemMillis: " << remainingMillis
|
sif::info << "ScexDeviceHandler::handleValidReply: RemMillis: " << remainingMillis
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
actionHelper.finish(true, getCommanderQueueId(FRAM), FRAM, result);
|
|
||||||
result = APERIODIC_REPLY;
|
result = APERIODIC_REPLY;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (ONE_CELL): {
|
case (ONE_CELL): {
|
||||||
actionHelper.finish(true, getCommanderQueueId(ONE_CELL), ONE_CELL, result);
|
|
||||||
result = APERIODIC_REPLY;
|
result = APERIODIC_REPLY;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (ALL_CELLS_CMD): {
|
case (ALL_CELLS_CMD): {
|
||||||
actionHelper.finish(true, getCommanderQueueId(ALL_CELLS_CMD), ALL_CELLS_CMD, result);
|
|
||||||
result = APERIODIC_REPLY;
|
result = APERIODIC_REPLY;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -295,7 +286,17 @@ ReturnValue_t ScexDeviceHandler::interpretDeviceReply(DeviceCommandId_t id, cons
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScexDeviceHandler::performOperationHook() {}
|
void ScexDeviceHandler::performOperationHook() {
|
||||||
|
uint32_t remainingMillis = finishCountdown.getRemainingMillis();
|
||||||
|
if (commandActive and finishCountdown.hasTimedOut()) {
|
||||||
|
triggerEvent(scex::EXPERIMENT_TIMEDOUT, currCmd, 0);
|
||||||
|
reader.finish();
|
||||||
|
sif::warning << "ScexDeviceHandler::scanForReply: Reader timeout; RemMillis: "
|
||||||
|
<< remainingMillis << std::endl;
|
||||||
|
fileNameSet = false;
|
||||||
|
commandActive = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t ScexDeviceHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return OK; }
|
uint32_t ScexDeviceHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return OK; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user