From e4431d20c4842e1c94c5dcf2475c9202572d02ba Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 3 May 2023 19:54:30 +0200 Subject: [PATCH] driving code almost done as well --- linux/payload/PlocMpsocHandler.cpp | 8 +++++++- linux/payload/plocMpscoDefs.h | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/linux/payload/PlocMpsocHandler.cpp b/linux/payload/PlocMpsocHandler.cpp index 7583be76..2cbc66af 100644 --- a/linux/payload/PlocMpsocHandler.cpp +++ b/linux/payload/PlocMpsocHandler.cpp @@ -124,7 +124,7 @@ ReturnValue_t PlocMPSoCHandler::executeAction(ActionId_t actionId, MessageQueueI } switch (actionId) { - case mpsoc::TC_FLASHWRITE: { + case mpsoc::TC_FLASH_WRITE_FULL_FILE: { if (size > config::MAX_PATH_SIZE + config::MAX_FILENAME_SIZE) { return MPSoCReturnValuesIF::FILENAME_TOO_LONG; } @@ -141,6 +141,10 @@ ReturnValue_t PlocMPSoCHandler::executeAction(ActionId_t actionId, MessageQueueI plocMPSoCHelperExecuting = true; return EXECUTION_FINISHED; } + case mpsoc::TC_FLASH_READ_FULL_FILE: { + // TODO: Finsh this. + break; + } case (mpsoc::OBSW_RESET_SEQ_COUNT): { sequenceCount = 0; return EXECUTION_FINISHED; @@ -307,6 +311,8 @@ void PlocMPSoCHandler::fillCommandAndReplyMap() { this->insertInCommandMap(mpsoc::TC_MEM_WRITE); this->insertInCommandMap(mpsoc::TC_MEM_READ); this->insertInCommandMap(mpsoc::TC_FLASHDELETE); + insertInCommandMap(mpsoc::TC_FLASH_WRITE_FULL_FILE); + insertInCommandMap(mpsoc::TC_FLASH_READ_FULL_FILE); this->insertInCommandMap(mpsoc::TC_REPLAY_START); this->insertInCommandMap(mpsoc::TC_REPLAY_STOP); this->insertInCommandMap(mpsoc::TC_DOWNLINK_PWR_ON); diff --git a/linux/payload/plocMpscoDefs.h b/linux/payload/plocMpscoDefs.h index 4c98e6e1..cbb4f1f8 100644 --- a/linux/payload/plocMpscoDefs.h +++ b/linux/payload/plocMpscoDefs.h @@ -62,7 +62,7 @@ static const DeviceCommandId_t EXE_REPORT = 5; static const DeviceCommandId_t TM_MEMORY_READ_REPORT = 6; static const DeviceCommandId_t TC_FLASHFOPEN = 7; static const DeviceCommandId_t TC_FLASHFCLOSE = 8; -static const DeviceCommandId_t TC_FLASHWRITE = 9; +static const DeviceCommandId_t TC_FLASH_WRITE_FULL_FILE = 9; static const DeviceCommandId_t TC_FLASHDELETE = 10; static const DeviceCommandId_t TC_REPLAY_START = 11; static const DeviceCommandId_t TC_REPLAY_STOP = 12; @@ -81,6 +81,7 @@ static const DeviceCommandId_t TC_DOWNLINK_DATA_MODULATE = 24; static const DeviceCommandId_t TC_MODE_SNAPSHOT = 25; static const DeviceCommandId_t TC_GET_HK_REPORT = 26; static const DeviceCommandId_t TM_GET_HK_REPORT = 27; +static constexpr DeviceCommandId_t TC_FLASH_READ_FULL_FILE = 30; // Will reset the sequence count of the OBSW static const DeviceCommandId_t OBSW_RESET_SEQ_COUNT = 50;