update SCEX code
This commit is contained in:
parent
74d4741380
commit
839851914a
@ -215,4 +215,6 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
13701;0x3585;REBOOT_SW;MEDIUM; Software reboot occurred. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
13701;0x3585;REBOOT_SW;MEDIUM; Software reboot occurred. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
||||||
13702;0x3586;REBOOT_MECHANISM_TRIGGERED;MEDIUM;The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots;bsp_q7s/core/CoreController.h
|
13702;0x3586;REBOOT_MECHANISM_TRIGGERED;MEDIUM;The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots;bsp_q7s/core/CoreController.h
|
||||||
13703;0x3587;REBOOT_HW;MEDIUM;;bsp_q7s/core/CoreController.h
|
13703;0x3587;REBOOT_HW;MEDIUM;;bsp_q7s/core/CoreController.h
|
||||||
13800;0x35e8;EXPERIMENT_TIMEDOUT;LOW;;mission/devices/devicedefinitions/ScexDefinitions.h
|
13800;0x35e8;MISSING_PACKET;LOW;;mission/devices/devicedefinitions/ScexDefinitions.h
|
||||||
|
13801;0x35e9;EXPERIMENT_TIMEDOUT;LOW;;mission/devices/devicedefinitions/ScexDefinitions.h
|
||||||
|
13802;0x35ea;MULTI_PACKET_COMMAND_DONE;INFO;;mission/devices/devicedefinitions/ScexDefinitions.h
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||||
0x0000;OK;System-wide code for ok.;0;HasReturnvaluesIF;fsfw/returnvalues/HasReturnvaluesIF.h
|
0x0000;OK;System-wide code for ok.;0;HasReturnvaluesIF;fsfw/returnvalues/returnvalue.h
|
||||||
0x0001;Failed;Unspecified system-wide code for failed.;1;HasReturnvaluesIF;fsfw/returnvalues/HasReturnvaluesIF.h
|
0x0001;Failed;Unspecified system-wide code for failed.;1;HasReturnvaluesIF;fsfw/returnvalues/returnvalue.h
|
||||||
0x63a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NVMParameterBase.h
|
0x63a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NVMParameterBase.h
|
||||||
0x58a0;SUSS_ErrorUnlockMutex;;160;SUS_HANDLER;mission/devices/SusHandler.h
|
0x58a0;SUSS_ErrorUnlockMutex;;160;SUS_HANDLER;mission/devices/SusHandler.h
|
||||||
0x58a1;SUSS_ErrorLockMutex;;161;SUS_HANDLER;mission/devices/SusHandler.h
|
0x58a1;SUSS_ErrorLockMutex;;161;SUS_HANDLER;mission/devices/SusHandler.h
|
||||||
@ -361,8 +361,9 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x2cd2;CCS_TooShortBlockedPacket;;210;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2cd2;CCS_TooShortBlockedPacket;;210;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x2cd3;CCS_TooShortMapExtraction;;211;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2cd3;CCS_TooShortMapExtraction;;211;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x4201;PUS11_InvalidTypeTimeWindow;;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
0x4201;PUS11_InvalidTypeTimeWindow;;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||||
0x4202;PUS11_TimeshiftingNotPossible;;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
0x4202;PUS11_InvalidTimeWindow;;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||||
0x4203;PUS11_InvalidRelativeTime;;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
0x4203;PUS11_TimeshiftingNotPossible;;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||||
|
0x4204;PUS11_InvalidRelativeTime;;4;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||||
0x3401;DC_NoReplyReceived;;1;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
0x3401;DC_NoReplyReceived;;1;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||||
0x3402;DC_ProtocolError;;2;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
0x3402;DC_ProtocolError;;2;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||||
0x3403;DC_Nullpointer;;3;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
0x3403;DC_Nullpointer;;3;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 217 translations.
|
* @brief Auto-generated event translation file. Contains 219 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2022-08-24 16:53:50
|
* Generated on: 2022-08-31 16:07:07
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -217,7 +217,9 @@ const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
|
|||||||
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
||||||
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
|
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
|
||||||
const char *REBOOT_HW_STRING = "REBOOT_HW";
|
const char *REBOOT_HW_STRING = "REBOOT_HW";
|
||||||
|
const char *MISSING_PACKET_STRING = "MISSING_PACKET";
|
||||||
const char *EXPERIMENT_TIMEDOUT_STRING = "EXPERIMENT_TIMEDOUT";
|
const char *EXPERIMENT_TIMEDOUT_STRING = "EXPERIMENT_TIMEDOUT";
|
||||||
|
const char *MULTI_PACKET_COMMAND_DONE_STRING = "MULTI_PACKET_COMMAND_DONE";
|
||||||
|
|
||||||
const char *translateEvents(Event event) {
|
const char *translateEvents(Event event) {
|
||||||
switch ((event & 0xFFFF)) {
|
switch ((event & 0xFFFF)) {
|
||||||
@ -646,7 +648,11 @@ const char *translateEvents(Event event) {
|
|||||||
case (13703):
|
case (13703):
|
||||||
return REBOOT_HW_STRING;
|
return REBOOT_HW_STRING;
|
||||||
case (13800):
|
case (13800):
|
||||||
|
return MISSING_PACKET_STRING;
|
||||||
|
case (13801):
|
||||||
return EXPERIMENT_TIMEDOUT_STRING;
|
return EXPERIMENT_TIMEDOUT_STRING;
|
||||||
|
case (13802):
|
||||||
|
return MULTI_PACKET_COMMAND_DONE_STRING;
|
||||||
default:
|
default:
|
||||||
return "UNKNOWN_EVENT";
|
return "UNKNOWN_EVENT";
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 135 translations.
|
* Contains 135 translations.
|
||||||
* Generated on: 2022-08-24 16:53:50
|
* Generated on: 2022-08-31 16:07:07
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
|
@ -34,7 +34,6 @@ ReturnValue_t ScexUartReader::performOperation(uint8_t operationCode) {
|
|||||||
lock->unlockMutex();
|
lock->unlockMutex();
|
||||||
while (true) {
|
while (true) {
|
||||||
semaphore->acquire();
|
semaphore->acquire();
|
||||||
sif::info << "ScexUartReader::performOperation:task was started" << std::endl;
|
|
||||||
int bytesRead = 0;
|
int bytesRead = 0;
|
||||||
while (true) {
|
while (true) {
|
||||||
bytesRead = read(serialPort, reinterpret_cast<void *>(recBuf.data()),
|
bytesRead = read(serialPort, reinterpret_cast<void *>(recBuf.data()),
|
||||||
@ -66,8 +65,6 @@ ReturnValue_t ScexUartReader::performOperation(uint8_t operationCode) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// task block comes here
|
|
||||||
sif::info << "ScexUartReader::performOperation: task was stopped" << std::endl;
|
|
||||||
}
|
}
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 217 translations.
|
* @brief Auto-generated event translation file. Contains 219 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2022-08-24 16:53:50
|
* Generated on: 2022-08-31 16:07:07
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -217,7 +217,9 @@ const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
|
|||||||
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
||||||
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
|
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
|
||||||
const char *REBOOT_HW_STRING = "REBOOT_HW";
|
const char *REBOOT_HW_STRING = "REBOOT_HW";
|
||||||
|
const char *MISSING_PACKET_STRING = "MISSING_PACKET";
|
||||||
const char *EXPERIMENT_TIMEDOUT_STRING = "EXPERIMENT_TIMEDOUT";
|
const char *EXPERIMENT_TIMEDOUT_STRING = "EXPERIMENT_TIMEDOUT";
|
||||||
|
const char *MULTI_PACKET_COMMAND_DONE_STRING = "MULTI_PACKET_COMMAND_DONE";
|
||||||
|
|
||||||
const char *translateEvents(Event event) {
|
const char *translateEvents(Event event) {
|
||||||
switch ((event & 0xFFFF)) {
|
switch ((event & 0xFFFF)) {
|
||||||
@ -646,7 +648,11 @@ const char *translateEvents(Event event) {
|
|||||||
case (13703):
|
case (13703):
|
||||||
return REBOOT_HW_STRING;
|
return REBOOT_HW_STRING;
|
||||||
case (13800):
|
case (13800):
|
||||||
|
return MISSING_PACKET_STRING;
|
||||||
|
case (13801):
|
||||||
return EXPERIMENT_TIMEDOUT_STRING;
|
return EXPERIMENT_TIMEDOUT_STRING;
|
||||||
|
case (13802):
|
||||||
|
return MULTI_PACKET_COMMAND_DONE_STRING;
|
||||||
default:
|
default:
|
||||||
return "UNKNOWN_EVENT";
|
return "UNKNOWN_EVENT";
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 135 translations.
|
* Contains 135 translations.
|
||||||
* Generated on: 2022-08-24 16:53:50
|
* Generated on: 2022-08-31 16:07:07
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
|
@ -94,9 +94,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);
|
||||||
// auto iter = deviceReplyMap.find(FRAM);
|
updatePeriodicReply(true, deviceCommand);
|
||||||
// auto& info = iter->second.command->second;
|
|
||||||
// actionHelper.finish(true,info.sendReplyTo, iter->first, OK);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (ONE_CELL): {
|
case (ONE_CELL): {
|
||||||
@ -105,6 +103,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);
|
||||||
|
updatePeriodicReply(true, deviceCommand);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (ALL_CELLS_CMD): {
|
case (ALL_CELLS_CMD): {
|
||||||
@ -113,6 +112,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);
|
||||||
|
updatePeriodicReply(true, deviceCommand);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
@ -130,11 +130,11 @@ void ScexDeviceHandler::fillCommandAndReplyMap() {
|
|||||||
insertInCommandAndReplyMap(scex::Cmds::TEMP_CMD, 3);
|
insertInCommandAndReplyMap(scex::Cmds::TEMP_CMD, 3);
|
||||||
insertInCommandAndReplyMap(scex::Cmds::EXP_STATUS_CMD, 3);
|
insertInCommandAndReplyMap(scex::Cmds::EXP_STATUS_CMD, 3);
|
||||||
|
|
||||||
insertInCommandAndReplyMap(scex::Cmds::ALL_CELLS_CMD, 0, nullptr, 0, false, false,
|
insertInCommandAndReplyMap(scex::Cmds::ALL_CELLS_CMD, 0, nullptr, 0, true, false,
|
||||||
scex::Cmds::ALL_CELLS_CMD, &finishCountdown);
|
scex::Cmds::ALL_CELLS_CMD, &finishCountdown);
|
||||||
insertInCommandAndReplyMap(scex::Cmds::ONE_CELL, 0, nullptr, 0, false, false,
|
insertInCommandAndReplyMap(scex::Cmds::ONE_CELL, 0, nullptr, 0, true, false,
|
||||||
scex::Cmds::ONE_CELL, &finishCountdown);
|
scex::Cmds::ONE_CELL, &finishCountdown);
|
||||||
insertInCommandAndReplyMap(scex::Cmds::FRAM, 0, nullptr, 0, false, false, scex::Cmds::FRAM,
|
insertInCommandAndReplyMap(scex::Cmds::FRAM, 0, nullptr, 0, true, false, scex::Cmds::FRAM,
|
||||||
&finishCountdown);
|
&finishCountdown);
|
||||||
|
|
||||||
insertInReplyMap(scex::Cmds::ERROR_REPLY, 3);
|
insertInReplyMap(scex::Cmds::ERROR_REPLY, 3);
|
||||||
@ -167,6 +167,56 @@ ReturnValue_t ScexDeviceHandler::handleValidReply(size_t remSize, DeviceCommandI
|
|||||||
size_t* foundLen) {
|
size_t* foundLen) {
|
||||||
using namespace scex;
|
using namespace scex;
|
||||||
ReturnValue_t result = OK;
|
ReturnValue_t result = OK;
|
||||||
|
|
||||||
|
switch (helper.getCmd()) {
|
||||||
|
case (FRAM): {
|
||||||
|
if (debugMode) {
|
||||||
|
uint32_t remainingMillis = finishCountdown.getRemainingMillis();
|
||||||
|
|
||||||
|
sif::info << "ScexDeviceHandler::handleValidReply: RemMillis: " << remainingMillis
|
||||||
|
<< std::endl;
|
||||||
|
}
|
||||||
|
actionHelper.finish(true, getCommanderQueueId(FRAM), FRAM, result);
|
||||||
|
result = APERIODIC_REPLY;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (ONE_CELL): {
|
||||||
|
actionHelper.finish(true, getCommanderQueueId(ONE_CELL), ONE_CELL, result);
|
||||||
|
result = APERIODIC_REPLY;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (ALL_CELLS_CMD): {
|
||||||
|
actionHelper.finish(true, getCommanderQueueId(ALL_CELLS_CMD), ALL_CELLS_CMD, result);
|
||||||
|
result = APERIODIC_REPLY;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*foundId = helper.getCmd();
|
||||||
|
*foundLen = remSize;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t ScexDeviceHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) {
|
||||||
|
using namespace scex;
|
||||||
|
|
||||||
|
ReturnValue_t status = OK;
|
||||||
|
auto oneFileHandler = [&](std::string cmdName) {
|
||||||
|
fileId = date_time_string();
|
||||||
|
std::ostringstream oss("/tmp/scex-", std::ostringstream::ate);
|
||||||
|
oss << cmdName << fileId << ".bin";
|
||||||
|
fileName = oss.str();
|
||||||
|
ofstream out(fileName, ofstream::binary);
|
||||||
|
if (out.bad()) {
|
||||||
|
sif::error << "ScexDeviceHandler::interpretDeviceReply: Could not open file " << fileName
|
||||||
|
<< std::endl;
|
||||||
|
return FAILED;
|
||||||
|
}
|
||||||
|
out << helper;
|
||||||
|
return OK;
|
||||||
|
};
|
||||||
auto multiFileHandler = [&](std::string cmdName) {
|
auto multiFileHandler = [&](std::string cmdName) {
|
||||||
if ((helper.getPacketCounter() == 1) or (not fileNameSet)) {
|
if ((helper.getPacketCounter() == 1) or (not fileNameSet)) {
|
||||||
fileId = date_time_string();
|
fileId = date_time_string();
|
||||||
@ -191,59 +241,8 @@ ReturnValue_t ScexDeviceHandler::handleValidReply(size_t remSize, DeviceCommandI
|
|||||||
}
|
}
|
||||||
out << helper;
|
out << helper;
|
||||||
}
|
}
|
||||||
if (helper.getPacketCounter() == helper.getTotalPacketCounter()) {
|
|
||||||
*foundId = helper.getCmd();
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
return IGNORE_FULL_PACKET;
|
|
||||||
};
|
|
||||||
switch (helper.getCmd()) {
|
|
||||||
case (FRAM): {
|
|
||||||
if (debugMode) {
|
|
||||||
uint32_t remainingMillis = finishCountdown.getRemainingMillis();
|
|
||||||
|
|
||||||
sif::info << "ScexDeviceHandler::handleValidReply: RemMillis: " << remainingMillis
|
|
||||||
<< std::endl;
|
|
||||||
}
|
|
||||||
result = multiFileHandler("fram_");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (ONE_CELL): {
|
|
||||||
result = multiFileHandler("one_cell_");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (ALL_CELLS_CMD): {
|
|
||||||
result = multiFileHandler("all_cell_");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
*foundId = helper.getCmd();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*foundLen = remSize;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t ScexDeviceHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) {
|
|
||||||
using namespace scex;
|
|
||||||
|
|
||||||
ReturnValue_t status = OK;
|
|
||||||
auto oneFileHandler = [&](std::string cmdName) {
|
|
||||||
fileId = date_time_string();
|
|
||||||
std::ostringstream oss("/tmp/scex-", std::ostringstream::ate);
|
|
||||||
oss << cmdName << fileId << ".bin";
|
|
||||||
fileName = oss.str();
|
|
||||||
ofstream out(fileName, ofstream::binary);
|
|
||||||
if (out.bad()) {
|
|
||||||
sif::error << "ScexDeviceHandler::interpretDeviceReply: Could not open file " << fileName
|
|
||||||
<< std::endl;
|
|
||||||
return FAILED;
|
|
||||||
}
|
|
||||||
out << helper;
|
|
||||||
return OK;
|
return OK;
|
||||||
};
|
};
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case (PING): {
|
case (PING): {
|
||||||
status = oneFileHandler("ping_");
|
status = oneFileHandler("ping_");
|
||||||
@ -261,12 +260,20 @@ ReturnValue_t ScexDeviceHandler::interpretDeviceReply(DeviceCommandId_t id, cons
|
|||||||
status = oneFileHandler("exp_status_");
|
status = oneFileHandler("exp_status_");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case(FRAM): {
|
||||||
|
status = multiFileHandler("fram_");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case(ONE_CELL): {
|
||||||
|
status = multiFileHandler("one_cell_");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case(ALL_CELLS_CMD): {
|
||||||
|
status = multiFileHandler("multi_cell_");
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
// Unknown DeviceCommand
|
// Unknown DeviceCommand
|
||||||
if (id == FRAM or id == ONE_CELL or id == ALL_CELLS_CMD) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
|
return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
if (helper.getPacketCounter() == helper.getTotalPacketCounter()) {
|
if (helper.getPacketCounter() == helper.getTotalPacketCounter()) {
|
||||||
@ -276,6 +283,10 @@ ReturnValue_t ScexDeviceHandler::interpretDeviceReply(DeviceCommandId_t id, cons
|
|||||||
sif::info << "ScexDeviceHandler::interpretDeviceReply:Reader is finished" << std::endl;
|
sif::info << "ScexDeviceHandler::interpretDeviceReply:Reader is finished" << std::endl;
|
||||||
fileNameSet = false;
|
fileNameSet = false;
|
||||||
}
|
}
|
||||||
|
if(id == FRAM or id == ALL_CELLS_CMD or id == ONE_CELL) {
|
||||||
|
triggerEvent(MULTI_PACKET_COMMAND_DONE, id);
|
||||||
|
updatePeriodicReply(false, id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (debugMode) {
|
if (debugMode) {
|
||||||
uint32_t remainingMillis = finishCountdown.getRemainingMillis();
|
uint32_t remainingMillis = finishCountdown.getRemainingMillis();
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||||
#include <linux/devices/ScexHelper.h>
|
#include <linux/devices/ScexHelper.h>
|
||||||
#include <linux/devices/ScexUartReader.h>
|
#include <linux/devices/ScexUartReader.h>
|
||||||
|
#include "commonSubsystemIds.h"
|
||||||
|
|
||||||
class SdCardMountedIF;
|
class SdCardMountedIF;
|
||||||
|
|
||||||
|
@ -14,8 +14,9 @@ namespace scex {
|
|||||||
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::SCEX_HANDLER;
|
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::SCEX_HANDLER;
|
||||||
|
|
||||||
static constexpr Event MISSING_PACKET = event::makeEvent(SUBSYSTEM_ID, 0, severity::LOW);
|
static constexpr Event MISSING_PACKET = event::makeEvent(SUBSYSTEM_ID, 0, severity::LOW);
|
||||||
|
static constexpr Event EXPERIMENT_TIMEDOUT = event::makeEvent(SUBSYSTEM_ID, 1, severity::LOW);
|
||||||
static constexpr Event EXPERIMENT_TIMEDOUT = event::makeEvent(SUBSYSTEM_ID, 0, severity::LOW);
|
//! FRAM, One Cell or All cells command finished. P1: Command ID
|
||||||
|
static constexpr Event MULTI_PACKET_COMMAND_DONE = event::makeEvent(SUBSYSTEM_ID, 2, severity::INFO);
|
||||||
|
|
||||||
enum Cmds : DeviceCommandId_t {
|
enum Cmds : DeviceCommandId_t {
|
||||||
PING = 0b00111,
|
PING = 0b00111,
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit b4d4a51164af69a22eedd645775061dbb51702b1
|
Subproject commit e1d84c5b99e99ea9a9687dcd298d815dc4d8d2b6
|
Loading…
x
Reference in New Issue
Block a user