driving code almost done as well

This commit is contained in:
Robin Müller 2023-05-03 19:54:30 +02:00
parent 119afe6148
commit e4431d20c4
2 changed files with 9 additions and 2 deletions

View File

@ -124,7 +124,7 @@ ReturnValue_t PlocMPSoCHandler::executeAction(ActionId_t actionId, MessageQueueI
} }
switch (actionId) { switch (actionId) {
case mpsoc::TC_FLASHWRITE: { case mpsoc::TC_FLASH_WRITE_FULL_FILE: {
if (size > config::MAX_PATH_SIZE + config::MAX_FILENAME_SIZE) { if (size > config::MAX_PATH_SIZE + config::MAX_FILENAME_SIZE) {
return MPSoCReturnValuesIF::FILENAME_TOO_LONG; return MPSoCReturnValuesIF::FILENAME_TOO_LONG;
} }
@ -141,6 +141,10 @@ ReturnValue_t PlocMPSoCHandler::executeAction(ActionId_t actionId, MessageQueueI
plocMPSoCHelperExecuting = true; plocMPSoCHelperExecuting = true;
return EXECUTION_FINISHED; return EXECUTION_FINISHED;
} }
case mpsoc::TC_FLASH_READ_FULL_FILE: {
// TODO: Finsh this.
break;
}
case (mpsoc::OBSW_RESET_SEQ_COUNT): { case (mpsoc::OBSW_RESET_SEQ_COUNT): {
sequenceCount = 0; sequenceCount = 0;
return EXECUTION_FINISHED; return EXECUTION_FINISHED;
@ -307,6 +311,8 @@ void PlocMPSoCHandler::fillCommandAndReplyMap() {
this->insertInCommandMap(mpsoc::TC_MEM_WRITE); this->insertInCommandMap(mpsoc::TC_MEM_WRITE);
this->insertInCommandMap(mpsoc::TC_MEM_READ); this->insertInCommandMap(mpsoc::TC_MEM_READ);
this->insertInCommandMap(mpsoc::TC_FLASHDELETE); 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_START);
this->insertInCommandMap(mpsoc::TC_REPLAY_STOP); this->insertInCommandMap(mpsoc::TC_REPLAY_STOP);
this->insertInCommandMap(mpsoc::TC_DOWNLINK_PWR_ON); this->insertInCommandMap(mpsoc::TC_DOWNLINK_PWR_ON);

View File

@ -62,7 +62,7 @@ static const DeviceCommandId_t EXE_REPORT = 5;
static const DeviceCommandId_t TM_MEMORY_READ_REPORT = 6; static const DeviceCommandId_t TM_MEMORY_READ_REPORT = 6;
static const DeviceCommandId_t TC_FLASHFOPEN = 7; static const DeviceCommandId_t TC_FLASHFOPEN = 7;
static const DeviceCommandId_t TC_FLASHFCLOSE = 8; 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_FLASHDELETE = 10;
static const DeviceCommandId_t TC_REPLAY_START = 11; static const DeviceCommandId_t TC_REPLAY_START = 11;
static const DeviceCommandId_t TC_REPLAY_STOP = 12; 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_MODE_SNAPSHOT = 25;
static const DeviceCommandId_t TC_GET_HK_REPORT = 26; static const DeviceCommandId_t TC_GET_HK_REPORT = 26;
static const DeviceCommandId_t TM_GET_HK_REPORT = 27; 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 // Will reset the sequence count of the OBSW
static const DeviceCommandId_t OBSW_RESET_SEQ_COUNT = 50; static const DeviceCommandId_t OBSW_RESET_SEQ_COUNT = 50;