Merge branch 'meier/ploc' into meier/plocSupv
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Jakob Meier
2022-05-06 19:36:03 +02:00
7 changed files with 140 additions and 60 deletions

View File

@ -56,7 +56,8 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
uint8_t expectedReplies = 1, bool useAlternateId = false,
DeviceCommandId_t alternateReplyID = 0) override;
size_t getNextReplyLength(DeviceCommandId_t deviceCommand) override;
virtual ReturnValue_t doSendReadHook() override;
ReturnValue_t doSendReadHook() override;
void doOffActivity() override;
private:
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_SUPERVISOR_HANDLER;
@ -86,6 +87,8 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
static const uint32_t MRAM_DUMP_EXECUTION_TIMEOUT = 60000;
// 70 s
static const uint32_t COPY_ADC_TO_MRAM_TIMEOUT = 70000;
// 60 s
static const uint32_t MRAM_DUMP_TIMEOUT = 60000;
// 2 s
static const uint32_t BOOT_TIMEOUT = 2000;
enum class StartupState: uint8_t {
@ -141,15 +144,13 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
std::string supervisorFilePath = "ploc/supervisor";
std::string activeMramFile;
// Setting this variable to true will enable direct downlink of MRAM packets
bool downlinkMramDump = false;
// Supervisor helper class currently executing a command
bool plocSupvHelperExecuting = false;
Countdown executionTimeout = Countdown(EXECUTION_DEFAULT_TIMEOUT, false);
// Vorago nees some time to boot properly
Countdown bootTimeout = Countdown(BOOT_TIMEOUT);
Countdown mramDumpTimeout = Countdown(MRAM_DUMP_TIMEOUT);
/**
* @brief Adjusts the timeout of the execution report dependent on command
@ -280,6 +281,7 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
void prepareSetGpioCmd(const uint8_t* commandData);
void prepareReadGpioCmd(const uint8_t* commandData);
ReturnValue_t prepareLoggingRequest(const uint8_t* commandData, size_t commandDataLen);
ReturnValue_t prepareEnableNvmsCommand(const uint8_t* commandData);
/**
* @brief Copies the content of a space packet to the command buffer.
@ -293,6 +295,8 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
*/
void disableAllReplies();
void disableReply(DeviceCommandId_t replyId);
/**
* @brief This function sends a failure report if the active action was commanded by an other
* object.