Merge remote-tracking branch 'origin/develop' into mueller/pl-ss
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
@ -28,6 +28,7 @@ void ScexDeviceHandler::doStartUp() { setMode(MODE_ON); }
|
||||
void ScexDeviceHandler::doShutDown() {
|
||||
reader.reset();
|
||||
commandActive = false;
|
||||
multiFileFinishOutstanding = false;
|
||||
setMode(_MODE_POWER_DOWN);
|
||||
}
|
||||
|
||||
@ -96,6 +97,7 @@ ReturnValue_t ScexDeviceHandler::buildCommandFromCommand(DeviceCommandId_t devic
|
||||
<< remainingMillis << std::endl;
|
||||
}
|
||||
|
||||
multiFileFinishOutstanding = true;
|
||||
prepareScexCmd(cmdTyped, {cmdBuf.data(), cmdBuf.size()}, rawPacketLen,
|
||||
{commandData + 1, commandDataLen - 1}, tempCheck);
|
||||
updatePeriodicReply(true, deviceCommand);
|
||||
@ -105,6 +107,7 @@ ReturnValue_t ScexDeviceHandler::buildCommandFromCommand(DeviceCommandId_t devic
|
||||
finishCountdown.setTimeout(LONG_CD);
|
||||
// countdown starts
|
||||
finishCountdown.resetTimer();
|
||||
multiFileFinishOutstanding = true;
|
||||
prepareScexCmd(cmdTyped, {cmdBuf.data(), cmdBuf.size()}, rawPacketLen,
|
||||
{commandData + 1, commandDataLen - 1}, tempCheck);
|
||||
updatePeriodicReply(true, deviceCommand);
|
||||
@ -114,6 +117,7 @@ ReturnValue_t ScexDeviceHandler::buildCommandFromCommand(DeviceCommandId_t devic
|
||||
finishCountdown.setTimeout(LONG_CD);
|
||||
// countdown starts
|
||||
finishCountdown.resetTimer();
|
||||
multiFileFinishOutstanding = true;
|
||||
prepareScexCmd(cmdTyped, {cmdBuf.data(), cmdBuf.size()}, rawPacketLen,
|
||||
{commandData + 1, commandDataLen - 1}, tempCheck);
|
||||
updatePeriodicReply(true, deviceCommand);
|
||||
@ -173,17 +177,14 @@ ReturnValue_t ScexDeviceHandler::handleValidReply(size_t remSize, DeviceCommandI
|
||||
sif::info << "ScexDeviceHandler::handleValidReply: RemMillis: " << remainingMillis
|
||||
<< std::endl;
|
||||
}
|
||||
finishAction(true, helper.getCmd(), OK);
|
||||
result = APERIODIC_REPLY;
|
||||
break;
|
||||
}
|
||||
case (ONE_CELL): {
|
||||
finishAction(true, helper.getCmd(), OK);
|
||||
result = APERIODIC_REPLY;
|
||||
break;
|
||||
}
|
||||
case (ALL_CELLS_CMD): {
|
||||
finishAction(true, helper.getCmd(), OK);
|
||||
result = APERIODIC_REPLY;
|
||||
break;
|
||||
}
|
||||
@ -191,6 +192,11 @@ ReturnValue_t ScexDeviceHandler::handleValidReply(size_t remSize, DeviceCommandI
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (result == APERIODIC_REPLY and multiFileFinishOutstanding) {
|
||||
finishAction(true, helper.getCmd(), OK);
|
||||
multiFileFinishOutstanding = false;
|
||||
}
|
||||
|
||||
*foundId = helper.getCmd();
|
||||
*foundLen = remSize;
|
||||
return result;
|
||||
@ -250,6 +256,7 @@ ReturnValue_t ScexDeviceHandler::interpretDeviceReply(DeviceCommandId_t id, cons
|
||||
}
|
||||
return OK;
|
||||
};
|
||||
id = helper.getCmd();
|
||||
switch (id) {
|
||||
case (PING): {
|
||||
status = oneFileHandler("ping_");
|
||||
|
@ -28,6 +28,7 @@ class ScexDeviceHandler : public DeviceHandlerBase {
|
||||
std::string fileName = "";
|
||||
bool fileNameSet = false;
|
||||
bool commandActive = false;
|
||||
bool multiFileFinishOutstanding = false;
|
||||
bool debugMode = false;
|
||||
|
||||
scex::Cmds currCmd = scex::Cmds::PING;
|
||||
|
Reference in New Issue
Block a user