v1.14.0 #304
@ -52,36 +52,57 @@ ReturnValue_t ScexDeviceHandler::buildCommandFromCommand(DeviceCommandId_t devic
|
||||
|
||||
switch (deviceCommand) {
|
||||
case (PING): {
|
||||
finishCountdown.setTimeout(SHORT_CD);
|
||||
// countdown starten
|
||||
finishCountdown.resetTimer();
|
||||
prepareScexCmd(cmdTyped, {cmdBuf.data(), cmdBuf.size()}, rawPacketLen, {nullptr, 0},
|
||||
tempCheck);
|
||||
break;
|
||||
}
|
||||
case (EXP_STATUS_CMD): {
|
||||
finishCountdown.setTimeout(SHORT_CD);
|
||||
// countdown starten
|
||||
finishCountdown.resetTimer();
|
||||
prepareScexCmd(cmdTyped, {cmdBuf.data(), cmdBuf.size()}, rawPacketLen, {nullptr, 0},
|
||||
tempCheck);
|
||||
break;
|
||||
}
|
||||
case (ION_CMD): {
|
||||
finishCountdown.setTimeout(SHORT_CD);
|
||||
// countdown starten
|
||||
finishCountdown.resetTimer();
|
||||
prepareScexCmd(cmdTyped, {cmdBuf.data(), cmdBuf.size()}, rawPacketLen, {nullptr, 0},
|
||||
tempCheck);
|
||||
break;
|
||||
}
|
||||
case (TEMP_CMD): {
|
||||
finishCountdown.setTimeout(SHORT_CD);
|
||||
// countdown starten
|
||||
finishCountdown.resetTimer();
|
||||
prepareScexCmd(cmdTyped, {cmdBuf.data(), cmdBuf.size()}, rawPacketLen, {nullptr, 0},
|
||||
tempCheck);
|
||||
break;
|
||||
}
|
||||
case (FRAM): {
|
||||
finishCountdown.setTimeout(SHORT_CD);
|
||||
// countdown starten
|
||||
finishCountdown.resetTimer();
|
||||
prepareScexCmd(cmdTyped, {cmdBuf.data(), cmdBuf.size()}, rawPacketLen,
|
||||
{commandData + 1, commandDataLen - 1}, tempCheck);
|
||||
break;
|
||||
}
|
||||
case (ONE_CELL): {
|
||||
finishCountdown.setTimeout(LONG_CD);
|
||||
// countdown starts
|
||||
finishCountdown.resetTimer();
|
||||
prepareScexCmd(cmdTyped, {cmdBuf.data(), cmdBuf.size()}, rawPacketLen,
|
||||
{commandData + 1, commandDataLen - 1}, tempCheck);
|
||||
break;
|
||||
}
|
||||
case (ALL_CELLS_CMD): {
|
||||
finishCountdown.setTimeout(LONG_CD);
|
||||
// countdown starts
|
||||
finishCountdown.resetTimer();
|
||||
prepareScexCmd(cmdTyped, {cmdBuf.data(), cmdBuf.size()}, rawPacketLen,
|
||||
{commandData + 1, commandDataLen - 1}, tempCheck);
|
||||
break;
|
||||
@ -130,9 +151,6 @@ ReturnValue_t ScexDeviceHandler::interpretDeviceReply(DeviceCommandId_t id, cons
|
||||
ReturnValue_t status = RETURN_OK;
|
||||
auto oneFileHandler = [&](std::string cmdName) {
|
||||
fileId = random_string(6);
|
||||
finishCountdown.setTimeout(SHORT_CD);
|
||||
// countdown starten
|
||||
finishCountdown.resetTimer();
|
||||
std::ostringstream oss("/tmp/scex-");
|
||||
oss << cmdName << fileId << ".bin";
|
||||
fileName = oss.str();
|
||||
@ -149,9 +167,6 @@ ReturnValue_t ScexDeviceHandler::interpretDeviceReply(DeviceCommandId_t id, cons
|
||||
};
|
||||
auto multiFileHandler = [&](std::string cmdName) {
|
||||
if ((helper.getPacketCounter() == 1) or (not fileNameSet)) {
|
||||
finishCountdown.setTimeout(LONG_CD);
|
||||
// countdown starts
|
||||
finishCountdown.resetTimer();
|
||||
|
||||
fileId = random_string(6);
|
||||
std::ostringstream oss("/tmp/scex-");
|
||||
|
Loading…
Reference in New Issue
Block a user