update status code handling
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2022-11-11 11:06:08 +01:00
parent a07a55eac1
commit 4c5515c05c
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
2 changed files with 318 additions and 338 deletions

View File

@ -235,6 +235,81 @@ enum class LatchupMonId : uint8_t { LATCHUP_STATUS_REPORT = 0x01 };
} // namespace tm } // namespace tm
enum class GeneralStatusCode : uint32_t {
OK = 0x000,
NAK = 0x001,
INIT_ERROR = 0x002,
BAD_PARAM = 0x003,
NOT_INITIALIZED = 0x004,
BAD_PERIPH_ID = 0x005,
TIMEOUT = 0x006,
RX_ERROR = 0x007,
TX_ERROR = 0x008,
ARB_LOST = 0x009,
BUSY = 0x00A,
NOT_IMPL = 0x00B,
ALIGNMENT_ERROR = 0x00C,
PERIPH_ERROR = 0x00D,
FAILED_LATCH = 0x00E,
GPIO_HIGH = 0x00F,
GPIO_LOW = 0x010,
TEST_PASSED = 0x011,
TEST_FAILED = 0x012,
BAD_NOF_PARAMS = 0x013,
NULL_POINTER = 0x014,
TASK_CREATION_ERROR = 0x015,
CORRUPTED_MRAM_VAL = 0x016,
BUF_EMPTY = 0x017
};
enum class BootManStatusCode : uint32_t {
NOTHING_TODO = 0x100,
POWER_FAULT = 0x101,
INVALID_LENGTH = 0x102,
OUT_OF_RANGE = 0x103,
OUT_OF_HEAP_MEMORY = 0x104,
INVALID_STATE_TRANSITION = 0x105,
MPSOC_ALREADY_BOOTING = 0x106,
MPSOC_ALREADY_OPERATIONAL = 0x107,
MPSOC_BOOT_FAILED = 0x108,
};
enum class MemManStatusCode : uint32_t {
SP_NOT_AVAILABLE = 0x200,
SP_DATA_INSUFFICIENT = 0x201,
SP_MEMORY_ID_INVALID = 0x202,
MPSOC_NOT_IN_RESET = 0x203,
FLASH_INIT_FAILED = 0x204,
FLASH_ERASE_FAILED = 0x205,
FLASH_WRITE_FAILED = 0x206,
FLASH_VERIFY_FAILED = 0x207,
CANNOT_ACCESS_TM = 0x208,
CANNOT_SEND_TM = 0x209,
};
enum class PowerManStatusCode : uint32_t {
PG_LOW = 0x300,
PG_5V_LOW = 0x301,
PG_0V85_LOW = 0x302,
PG_1V8_LOW = 0x303,
PG_MISC_LOW = 0x304,
PG_3V3_LOW = 0x305,
PG_MB_VAIO_LOW = 0x306,
PG_MB_MPSOCIO_LOW = 0x307
};
enum class TmtcManStatusCode : uint32_t {
BUF_FULL = 0x600,
WRONG_APID = 0x601,
WRONG_SERVICE_ID = 0x602,
TC_DELIVERY_ACCEPTED = 0x603,
TC_DELIVERY_REJECTED = 0x0604,
TC_PACKET_LEN_INCORRECT = 0x605,
BAD_CRC = 0x606,
BAD_DEST = 0x607,
BAD_SP_HEADER = 0x608
};
static const uint16_t APID_MASK = 0x3FF; static const uint16_t APID_MASK = 0x3FF;
static const uint16_t SEQUENCE_COUNT_MASK = 0xFFF; static const uint16_t SEQUENCE_COUNT_MASK = 0xFFF;
@ -1265,6 +1340,236 @@ class VerificationReport {
uint32_t getStatusCode() const { return statusCode; } uint32_t getStatusCode() const { return statusCode; }
virtual void printStatusInformation(const char* prefix) {
bool codeHandled = true;
if (statusCode < 0x100) {
GeneralStatusCode code = static_cast<GeneralStatusCode>(getStatusCode());
switch (code) {
case GeneralStatusCode::OK: {
sif::warning << prefix << "Ok" << std::endl;
break;
}
case GeneralStatusCode::INIT_ERROR: {
sif::warning << prefix << "Init error" << std::endl;
break;
}
case GeneralStatusCode::BAD_PARAM: {
sif::warning << prefix << "Bad param" << std::endl;
break;
}
case GeneralStatusCode::NOT_INITIALIZED: {
sif::warning << prefix << "Not initialized" << std::endl;
break;
}
case GeneralStatusCode::BAD_PERIPH_ID: {
sif::warning << prefix << "Bad periph ID" << std::endl;
break;
}
case GeneralStatusCode::TIMEOUT: {
sif::warning << prefix << "Timeout" << std::endl;
break;
}
case GeneralStatusCode::RX_ERROR: {
sif::warning << prefix << "RX error" << std::endl;
break;
}
case GeneralStatusCode::TX_ERROR: {
sif::warning << prefix << "TX error" << std::endl;
break;
}
case GeneralStatusCode::BUF_EMPTY: {
sif::warning << prefix << "Buf empty" << std::endl;
break;
}
case GeneralStatusCode::NAK: {
sif::warning << prefix << "Nak, default error code" << std::endl;
break;
}
case GeneralStatusCode::ARB_LOST: {
sif::warning << prefix << "Arb lost" << std::endl;
break;
}
case GeneralStatusCode::BUSY: {
sif::warning << prefix << "Busy" << std::endl;
break;
}
case GeneralStatusCode::NOT_IMPL: {
sif::warning << prefix << "Not implemented" << std::endl;
break;
}
case GeneralStatusCode::ALIGNMENT_ERROR: {
sif::warning << prefix << "Alignment error" << std::endl;
break;
}
case GeneralStatusCode::PERIPH_ERROR: {
sif::warning << prefix << "Periph error" << std::endl;
break;
}
case GeneralStatusCode::FAILED_LATCH: {
sif::warning << prefix << "Failed latch" << std::endl;
break;
}
case GeneralStatusCode::GPIO_HIGH: {
sif::warning << prefix << "GPIO high" << std::endl;
break;
}
case GeneralStatusCode::GPIO_LOW: {
sif::warning << prefix << "GPIO low" << std::endl;
break;
}
case GeneralStatusCode::TEST_PASSED: {
sif::warning << prefix << "Test passed" << std::endl;
break;
}
case GeneralStatusCode::TEST_FAILED: {
sif::warning << prefix << "Test failed" << std::endl;
break;
}
default: {
codeHandled = false;
break;
}
}
} else if (statusCode < 0x200 and statusCode > 0x100) {
BootManStatusCode code = static_cast<BootManStatusCode>(statusCode);
switch (code) {
case BootManStatusCode::NOTHING_TODO: {
sif::warning << prefix << "Nothing to do" << std::endl;
break;
}
case BootManStatusCode::POWER_FAULT: {
sif::warning << prefix << "Power fault" << std::endl;
break;
}
case BootManStatusCode::INVALID_LENGTH: {
sif::warning << prefix << "Invalid length" << std::endl;
break;
}
case BootManStatusCode::OUT_OF_RANGE: {
sif::warning << prefix << "Out of range, lenght check of parameter failed" << std::endl;
break;
}
case BootManStatusCode::OUT_OF_HEAP_MEMORY: {
sif::warning << prefix << "Out of heap memory" << std::endl;
break;
}
case BootManStatusCode::INVALID_STATE_TRANSITION: {
sif::warning << prefix << "Invalid state transition" << std::endl;
break;
}
case BootManStatusCode::MPSOC_ALREADY_BOOTING: {
sif::warning << prefix << "MPSoC already booting" << std::endl;
break;
}
case BootManStatusCode::MPSOC_ALREADY_OPERATIONAL: {
sif::warning << prefix << "MPSoC already operational" << std::endl;
break;
}
case BootManStatusCode::MPSOC_BOOT_FAILED: {
sif::warning << prefix << "MPSoC boot failed" << std::endl;
break;
}
default: {
codeHandled = true;
break;
}
}
} else if (statusCode < 0x300 and statusCode > 0x200) {
MemManStatusCode code = static_cast<MemManStatusCode>(statusCode);
switch (code) {
case MemManStatusCode::SP_NOT_AVAILABLE: {
sif::warning << prefix << "SP not available" << std::endl;
break;
}
case MemManStatusCode::SP_DATA_INSUFFICIENT: {
sif::warning << prefix << "SP data insufficient" << std::endl;
break;
}
case MemManStatusCode::SP_MEMORY_ID_INVALID: {
sif::warning << prefix << "SP data insufficient" << std::endl;
break;
}
case MemManStatusCode::MPSOC_NOT_IN_RESET: {
sif::warning << prefix << "MPSoC not in reset" << std::endl;
break;
}
case MemManStatusCode::FLASH_INIT_FAILED: {
sif::warning << prefix << "Flash init failed" << std::endl;
break;
}
case MemManStatusCode::FLASH_ERASE_FAILED: {
sif::warning << prefix << "Flash erase failed" << std::endl;
break;
}
case MemManStatusCode::FLASH_WRITE_FAILED: {
sif::warning << prefix << "Flash write failed" << std::endl;
break;
}
case MemManStatusCode::FLASH_VERIFY_FAILED: {
sif::warning << prefix << "Flash verify failed" << std::endl;
break;
}
case MemManStatusCode::CANNOT_ACCESS_TM: {
sif::warning << prefix << "Can not access tm" << std::endl;
break;
}
case MemManStatusCode::CANNOT_SEND_TM: {
sif::warning << prefix << "Can not access tm" << std::endl;
break;
}
default: {
codeHandled = true;
break;
}
}
} else if (statusCode < 0x400 and statusCode > 0x300) {
PowerManStatusCode code = static_cast<PowerManStatusCode>(statusCode);
switch (code) {
case PowerManStatusCode::PG_LOW: {
sif::warning << prefix << "PG low" << std::endl;
break;
}
case PowerManStatusCode::PG_5V_LOW: {
sif::warning << prefix << "PG 5V low" << std::endl;
break;
}
case PowerManStatusCode::PG_0V85_LOW: {
sif::warning << prefix << "PG 0V85 low" << std::endl;
break;
}
case PowerManStatusCode::PG_1V8_LOW: {
sif::warning << prefix << "PG 1V8 low" << std::endl;
break;
}
case PowerManStatusCode::PG_MISC_LOW: {
sif::warning << prefix << "PG misc low" << std::endl;
break;
}
case PowerManStatusCode::PG_3V3_LOW: {
sif::warning << prefix << "PG 3V3 low" << std::endl;
break;
}
case PowerManStatusCode::PG_MB_VAIO_LOW: {
sif::warning << prefix << "PG mb vaio low" << std::endl;
break;
}
case PowerManStatusCode::PG_MB_MPSOCIO_LOW: {
sif::warning << prefix << "PG mb mpsocio low" << std::endl;
break;
}
default: {
codeHandled = true;
break;
}
}
}
if (not codeHandled) {
sif::warning << prefix << "Invalid or unimplemented status code: 0x" << std::hex
<< std::setfill('0') << std::setw(4) << static_cast<uint16_t>(statusCode)
<< std::dec << std::endl;
}
}
protected: protected:
TmBase& readerBase; TmBase& readerBase;
uint8_t refApid = 0; uint8_t refApid = 0;
@ -1287,59 +1592,11 @@ class AcknowledgmentReport : public VerificationReport {
} }
void printStatusInformation() { void printStatusInformation() {
StatusCode statusCode = static_cast<StatusCode>(getStatusCode()); VerificationReport::printStatusInformation(STATUS_PRINTOUT_PREFIX);
const char* prefix = "Supervisor acknowledgment report status: ";
switch (statusCode) {
case StatusCode::OK: {
sif::warning << prefix << "Ok" << std::endl;
break;
}
case StatusCode::BAD_PARAM: {
sif::warning << prefix << "Bad param" << std::endl;
break;
}
case StatusCode::TIMEOUT: {
sif::warning << prefix << "Timeout" << std::endl;
break;
}
case StatusCode::RX_ERROR: {
sif::warning << prefix << "RX error" << std::endl;
break;
}
case StatusCode::TX_ERROR: {
sif::warning << prefix << "TX error" << std::endl;
break;
}
case StatusCode::HEADER_EMPTY: {
sif::warning << prefix << "Header empty" << std::endl;
break;
}
case StatusCode::DEFAULT_NAK: {
sif::warning << prefix << "Default code for NAK" << std::endl;
break;
}
case StatusCode::ROUTE_PACKET: {
sif::warning << prefix << "Route packet error" << std::endl;
break;
}
default:
sif::warning << "AcknowledgmentReport::printStatusInformation: Invalid status code: 0x"
<< std::hex << static_cast<uint16_t>(statusCode) << std::endl;
break;
}
} }
private: private:
enum class StatusCode : uint16_t { static constexpr char STATUS_PRINTOUT_PREFIX[] = "SUPV NAK Status: ";
OK = 0x0,
BAD_PARAM = 0x1,
TIMEOUT = 0x2,
RX_ERROR = 0x3,
TX_ERROR = 0x4,
HEADER_EMPTY = 0x5,
DEFAULT_NAK = 0x6,
ROUTE_PACKET = 0x7
};
}; };
class ExecutionReport : public VerificationReport { class ExecutionReport : public VerificationReport {
@ -1355,264 +1612,13 @@ class ExecutionReport : public VerificationReport {
} }
return VerificationReport::parse(); return VerificationReport::parse();
} }
void printStatusInformation() { void printStatusInformation() {
StatusCode statusCode = static_cast<StatusCode>(getStatusCode()); VerificationReport::printStatusInformation(STATUS_PRINTOUT_PREFIX);
switch (statusCode) {
case StatusCode::OK: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Ok" << std::endl;
break;
}
case StatusCode::INIT_ERROR: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Init error" << std::endl;
break;
}
case StatusCode::BAD_PARAM: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Bad param" << std::endl;
break;
}
case StatusCode::NOT_INITIALIZED: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Not initialized" << std::endl;
break;
}
case StatusCode::BAD_PERIPH_ID: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Bad periph ID" << std::endl;
break;
}
case StatusCode::TIMEOUT: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Timeout" << std::endl;
break;
}
case StatusCode::RX_ERROR: {
sif::warning << STATUS_PRINTOUT_PREFIX << "RX error" << std::endl;
break;
}
case StatusCode::TX_ERROR: {
sif::warning << STATUS_PRINTOUT_PREFIX << "TX error" << std::endl;
break;
}
case StatusCode::BUF_EMPTY: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Buf empty" << std::endl;
break;
}
case StatusCode::BUF_FULL: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Buf full" << std::endl;
break;
}
case StatusCode::NAK: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Nak, default error code" << std::endl;
break;
}
case StatusCode::ARB_LOST: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Arb lost" << std::endl;
break;
}
case StatusCode::BUSY: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Busy" << std::endl;
break;
}
case StatusCode::NOT_IMPLEMENTED: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Not implemented" << std::endl;
break;
}
case StatusCode::ALIGNEMENT_ERROR: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Alignment error" << std::endl;
break;
}
case StatusCode::PERIPH_ERR: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Periph error" << std::endl;
break;
}
case StatusCode::FAILED_LATCH: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Failed latch" << std::endl;
break;
}
case StatusCode::GPIO_HIGH: {
sif::warning << STATUS_PRINTOUT_PREFIX << "GPIO high" << std::endl;
break;
}
case StatusCode::GPIO_LOW: {
sif::warning << STATUS_PRINTOUT_PREFIX << "GPIO low" << std::endl;
break;
}
case StatusCode::TEST_PASSED: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Test passed" << std::endl;
break;
}
case StatusCode::TEST_FAILED: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Test failed" << std::endl;
break;
}
case StatusCode::NOTHING_TODO: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Nothing todo, not an error but a warning"
<< std::endl;
break;
}
case StatusCode::POWER_FAULT: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Power fault" << std::endl;
break;
}
case StatusCode::INVALID_LENGTH: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Invalid length" << std::endl;
break;
}
case StatusCode::OUT_OF_RANGE: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Out of range, lenght check of parameter failed"
<< std::endl;
break;
}
case StatusCode::OUT_OF_HEAP_MEMORY: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Out of heap memory" << std::endl;
break;
}
case StatusCode::INVALID_STATE_TRANSITION: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Invalid state transition" << std::endl;
break;
}
case StatusCode::MPSOC_ALREADY_BOOTING: {
sif::warning << STATUS_PRINTOUT_PREFIX << "MPSoC already booting" << std::endl;
break;
}
case StatusCode::MPSOC_ALREADY_OPERATIONAL: {
sif::warning << STATUS_PRINTOUT_PREFIX << "MPSoC already operational" << std::endl;
break;
}
case StatusCode::MPSOC_BOOT_FAILED: {
sif::warning << STATUS_PRINTOUT_PREFIX << "MPSoC boot failed" << std::endl;
break;
}
case StatusCode::SP_NOT_AVAILABLE: {
sif::warning << STATUS_PRINTOUT_PREFIX << "SP not available" << std::endl;
break;
}
case StatusCode::SP_DATA_INSUFFICIENT: {
sif::warning << STATUS_PRINTOUT_PREFIX << "SP data insufficient" << std::endl;
break;
}
case StatusCode::SP_MEMORY_ID_INVALID: {
sif::warning << STATUS_PRINTOUT_PREFIX << "SP data insufficient" << std::endl;
break;
}
case StatusCode::MPSOC_NOT_IN_RESET: {
sif::warning << STATUS_PRINTOUT_PREFIX << "MPSoC not in reset" << std::endl;
break;
}
case StatusCode::FLASH_INIT_FAILED: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Flash init failed" << std::endl;
break;
}
case StatusCode::FLASH_ERASE_FAILED: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Flash erase failed" << std::endl;
break;
}
case StatusCode::FLASH_WRITE_FAILED: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Flash write failed" << std::endl;
break;
}
case StatusCode::FLASH_VERIFY_FAILED: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Flash verify failed" << std::endl;
break;
}
case StatusCode::CANNOT_ACCESS_TM: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Can not access tm" << std::endl;
break;
}
case StatusCode::CANNOT_SEND_TM: {
sif::warning << STATUS_PRINTOUT_PREFIX << "Can not access tm" << std::endl;
break;
}
case StatusCode::PG_LOW: {
sif::warning << STATUS_PRINTOUT_PREFIX << "PG low" << std::endl;
break;
}
case StatusCode::PG_5V_LOW: {
sif::warning << STATUS_PRINTOUT_PREFIX << "PG 5V low" << std::endl;
break;
}
case StatusCode::PG_0V85_LOW: {
sif::warning << STATUS_PRINTOUT_PREFIX << "PG 0V85 low" << std::endl;
break;
}
case StatusCode::PG_1V8_LOW: {
sif::warning << STATUS_PRINTOUT_PREFIX << "PG 1V8 low" << std::endl;
break;
}
case StatusCode::PG_MISC_LOW: {
sif::warning << STATUS_PRINTOUT_PREFIX << "PG misc low" << std::endl;
break;
}
case StatusCode::PG_3V3_LOW: {
sif::warning << STATUS_PRINTOUT_PREFIX << "PG 3V3 low" << std::endl;
break;
}
case StatusCode::PG_MB_VAIO_LOW: {
sif::warning << STATUS_PRINTOUT_PREFIX << "PG mb vaio low" << std::endl;
break;
}
case StatusCode::PG_MB_MPSOCIO_LOW: {
sif::warning << STATUS_PRINTOUT_PREFIX << "PG mb mpsocio low" << std::endl;
break;
}
default:
sif::warning << "ExecutionReport::printStatusInformation: Invalid status code: 0x"
<< std::hex << std::setfill('0') << std::setw(4)
<< static_cast<uint16_t>(statusCode) << std::dec << std::endl;
break;
}
} }
private: private:
static constexpr char STATUS_PRINTOUT_PREFIX[] = "Supervisor execution failure report status: "; static constexpr char STATUS_PRINTOUT_PREFIX[] = "SUPV EXE NAK Status: ";
enum class StatusCode : uint16_t {
OK = 0x0,
INIT_ERROR = 0x1,
BAD_PARAM = 0x2,
NOT_INITIALIZED = 0x3,
BAD_PERIPH_ID = 0x4,
TIMEOUT = 0x5,
RX_ERROR = 0x6,
TX_ERROR = 0x7,
BUF_EMPTY = 0x8,
BUF_FULL = 0x9,
NAK = 0xA,
ARB_LOST = 0xB,
BUSY = 0xC,
NOT_IMPLEMENTED = 0xD,
ALIGNEMENT_ERROR = 0xE,
PERIPH_ERR = 0xF,
FAILED_LATCH = 0x10,
GPIO_HIGH = 0x11,
GPIO_LOW = 0x12,
TEST_PASSED = 0x13,
TEST_FAILED = 0x14,
NOTHING_TODO = 0x100,
POWER_FAULT = 0x101,
INVALID_LENGTH = 0x102,
OUT_OF_RANGE = 0x103,
OUT_OF_HEAP_MEMORY = 0x104,
INVALID_STATE_TRANSITION = 0x105,
MPSOC_ALREADY_BOOTING = 0x106,
MPSOC_ALREADY_OPERATIONAL = 0x107,
MPSOC_BOOT_FAILED = 0x108,
SP_NOT_AVAILABLE = 0x200,
SP_DATA_INSUFFICIENT = 0x201,
SP_MEMORY_ID_INVALID = 0x202,
MPSOC_NOT_IN_RESET = 0x203,
FLASH_INIT_FAILED = 0x204,
FLASH_ERASE_FAILED = 0x205,
FLASH_WRITE_FAILED = 0x206,
FLASH_VERIFY_FAILED = 0x207,
CANNOT_ACCESS_TM = 0x208,
CANNOT_SEND_TM = 0x209,
PG_LOW = 0x300,
PG_5V_LOW = 0x301,
PG_0V85_LOW = 0x302,
PG_1V8_LOW = 0x303,
PG_MISC_LOW = 0x304,
PG_3V3_LOW = 0x305,
PG_MB_VAIO_LOW = 0x306,
PG_MB_MPSOCIO_LOW = 0x307
};
}; };
class UpdateStatusReport { class UpdateStatusReport {

View File

@ -314,6 +314,10 @@ ReturnValue_t PlocSupervisorHandler::buildCommandFromCommand(DeviceCommandId_t d
prepareSetAdcThresholdCmd(commandData); prepareSetAdcThresholdCmd(commandData);
result = returnvalue::OK; result = returnvalue::OK;
break; break;
}
case WIPE_MRAM: {
result = prepareWipeMramCmd(commandData);
break;
} }
// case ENABLE_NVMS: { // case ENABLE_NVMS: {
// result = prepareEnableNvmsCommand(commandData); // result = prepareEnableNvmsCommand(commandData);
@ -324,33 +328,6 @@ ReturnValue_t PlocSupervisorHandler::buildCommandFromCommand(DeviceCommandId_t d
// result = returnvalue::OK; // result = returnvalue::OK;
// break; // break;
// } // }
/* case FACTORY_RESET_CLEAR_ALL: {
FactoryReset packet(spParams);
result = packet.buildPacket(FactoryReset::Op::CLEAR_ALL);
if (result != returnvalue::OK) {
break;
}
finishTcPrep(packet.getFullPacketLen());
break;
}
case FACTORY_RESET_CLEAR_MIRROR: {
FactoryReset packet(spParams);
result = packet.buildPacket(FactoryReset::Op::MIRROR_ENTRIES);
if (result != returnvalue::OK) {
break;
}
finishTcPrep(packet.getFullPacketLen());
break;
}
case FACTORY_RESET_CLEAR_CIRCULAR: {
FactoryReset packet(spParams);
result = packet.buildPacket(FactoryReset::Op::CIRCULAR_ENTRIES);
if (result != returnvalue::OK) {
break;
}
finishTcPrep(packet.getFullPacketLen());
break;
}*/
// Removed command // Removed command
// case START_MPSOC_QUIET: { // case START_MPSOC_QUIET: {
// prepareEmptyCmd(APID_START_MPSOC_QUIET); // prepareEmptyCmd(APID_START_MPSOC_QUIET);
@ -417,10 +394,6 @@ ReturnValue_t PlocSupervisorHandler::buildCommandFromCommand(DeviceCommandId_t d
// result = returnvalue::OK; // result = returnvalue::OK;
// break; // break;
// } // }
case WIPE_MRAM: {
result = prepareWipeMramCmd(commandData);
break;
}
// case FIRST_MRAM_DUMP: // case FIRST_MRAM_DUMP:
// case CONSECUTIVE_MRAM_DUMP: // case CONSECUTIVE_MRAM_DUMP:
// result = prepareDumpMramCmd(commandData); // result = prepareDumpMramCmd(commandData);
@ -443,6 +416,7 @@ void PlocSupervisorHandler::fillCommandAndReplyMap() {
insertInCommandMap(SET_BOOT_TIMEOUT); insertInCommandMap(SET_BOOT_TIMEOUT);
insertInCommandMap(SET_MAX_RESTART_TRIES); insertInCommandMap(SET_MAX_RESTART_TRIES);
insertInCommandMap(RESET_MPSOC); insertInCommandMap(RESET_MPSOC);
insertInCommandMap(WIPE_MRAM);
insertInCommandMap(SET_TIME_REF); insertInCommandMap(SET_TIME_REF);
insertInCommandMap(DISABLE_PERIOIC_HK_TRANSMISSION); insertInCommandMap(DISABLE_PERIOIC_HK_TRANSMISSION);
insertInCommandMap(GET_BOOT_STATUS_REPORT); insertInCommandMap(GET_BOOT_STATUS_REPORT);
@ -456,6 +430,9 @@ void PlocSupervisorHandler::fillCommandAndReplyMap() {
insertInCommandMap(FACTORY_RESET); insertInCommandMap(FACTORY_RESET);
insertInCommandMap(SET_SHUTDOWN_TIMEOUT); insertInCommandMap(SET_SHUTDOWN_TIMEOUT);
insertInCommandMap(FACTORY_FLASH); insertInCommandMap(FACTORY_FLASH);
insertInCommandMap(SET_ADC_ENABLED_CHANNELS);
insertInCommandMap(SET_ADC_THRESHOLD);
insertInCommandMap(SET_ADC_WINDOW_AND_STRIDE);
insertInCommandMap(RESET_PL); insertInCommandMap(RESET_PL);
// ACK replies, use countdown for them // ACK replies, use countdown for them
@ -567,9 +544,6 @@ ReturnValue_t PlocSupervisorHandler::enableReplyInReplyMap(DeviceCommandMap::ite
case FACTORY_RESET: case FACTORY_RESET:
case READ_GPIO: case READ_GPIO:
// case RESTART_SUPERVISOR: // case RESTART_SUPERVISOR:
// case FACTORY_RESET_CLEAR_ALL:
// case FACTORY_RESET_CLEAR_MIRROR:
// case FACTORY_RESET_CLEAR_CIRCULAR:
case DISABLE_PERIOIC_HK_TRANSMISSION: case DISABLE_PERIOIC_HK_TRANSMISSION:
// case START_MPSOC_QUIET: // case START_MPSOC_QUIET:
case SET_SHUTDOWN_TIMEOUT: case SET_SHUTDOWN_TIMEOUT: