PLOC commands #462

Merged
muellerr merged 11 commits from meier/ploc-commands into develop 2023-03-14 13:08:47 +01:00
3 changed files with 31 additions and 2 deletions
Showing only changes of commit 90b4b7c0f4 - Show all commits

View File

@ -689,7 +689,7 @@ class TcCamTakePic : public TcBase {
private:
static const size_t MAX_DATA_LENGTH = 286;
static const size_t PARAMETER_SIZE = 35;
static const size_t PARAMETER_SIZE = 28;
};
/**

View File

@ -1,5 +1,7 @@
#include "PlocMPSoCHandler.h"
#include <sstream>
#include "OBSWConfig.h"
#include "fsfw/datapool/PoolReadGuard.h"
#include "fsfw/globalfunctions/CRC.h"
@ -269,6 +271,10 @@ ReturnValue_t PlocMPSoCHandler::buildCommandFromCommand(DeviceCommandId_t device
result = prepareTcDownlinkDataModulate(commandData, commandDataLen);
break;
}
case (mpsoc::TC_MODE_SNAPSHOT): {
result = prepareTcModeSnapshot();
break;
}
default:
sif::debug << "PlocMPSoCHandler::buildCommandFromCommand: Command not implemented"
<< std::endl;
@ -300,6 +306,10 @@ void PlocMPSoCHandler::fillCommandAndReplyMap() {
this->insertInCommandMap(mpsoc::TC_CAM_CMD_SEND);
this->insertInCommandMap(mpsoc::RELEASE_UART_TX);
this->insertInCommandMap(mpsoc::SET_UART_TX_TRISTATE);
this->insertInCommandMap(mpsoc::TC_CAM_TAKE_PIC);
this->insertInCommandMap(mpsoc::TC_SIMPLEX_SEND_FILE);
this->insertInCommandMap(mpsoc::TC_DOWNLINK_DATA_MODULATE);
this->insertInCommandMap(mpsoc::TC_MODE_SNAPSHOT);
this->insertInReplyMap(mpsoc::ACK_REPORT, 3, nullptr, mpsoc::SIZE_ACK_REPORT);
this->insertInReplyMap(mpsoc::EXE_REPORT, 3, nullptr, mpsoc::SIZE_EXE_REPORT);
this->insertInReplyMap(mpsoc::TM_MEMORY_READ_REPORT, 2, nullptr, mpsoc::SIZE_TM_MEM_READ_REPORT);
@ -753,6 +763,10 @@ ReturnValue_t PlocMPSoCHandler::enableReplyInReplyMap(DeviceCommandMap::iterator
case mpsoc::TC_REPLAY_WRITE_SEQUENCE:
case mpsoc::TC_MODE_REPLAY:
case mpsoc::TC_MODE_IDLE:
case mpsoc::TC_CAM_TAKE_PIC:
case mpsoc::TC_SIMPLEX_SEND_FILE:
case mpsoc::TC_DOWNLINK_DATA_MODULATE:
case mpsoc::TC_MODE_SNAPSHOT:
enabledReplies = 2;
break;
case mpsoc::TC_MEM_READ: {
@ -976,6 +990,18 @@ void PlocMPSoCHandler::disableAllReplies() {
/* If the command expects a telemetry packet the appropriate tm reply will be disabled here */
switch (commandId) {
case TC_MEM_WRITE:
case TC_FLASHDELETE:
case TC_REPLAY_START:
case TC_REPLAY_STOP:
case TC_DOWNLINK_PWR_ON:
case TC_DOWNLINK_PWR_OFF:
case TC_REPLAY_WRITE_SEQUENCE:
case TC_MODE_REPLAY:
case TC_MODE_IDLE:
case TC_CAM_TAKE_PIC:
case TC_SIMPLEX_SEND_FILE:
case TC_DOWNLINK_DATA_MODULATE:
case TC_MODE_SNAPSHOT:
break;
case TC_MEM_READ: {
iter = deviceReplyMap.find(TM_MEMORY_READ_REPORT);
@ -1144,6 +1170,9 @@ std::string PlocMPSoCHandler::getStatusString(uint16_t status) {
break;
}
default:
std::stringstream ss;
ss << "0x" << std::hex << status;
return ss.str();
break;
}
return "";

2
tmtc

@ -1 +1 @@
Subproject commit 9720fcddecb04b228dc5eb0d064f15a12ef8daca
Subproject commit 56630b05c2d49651823892876c80d0885b25b9b4