implemeted ICD changes
This commit is contained in:
@ -326,11 +326,6 @@ ReturnValue_t PlocSupervisorHandler::buildCommandFromCommand(DeviceCommandId_t d
|
||||
result = RETURN_OK;
|
||||
break;
|
||||
}
|
||||
case (supv::PREPARE_UPDATE): {
|
||||
prepareEmptyCmd(supv::APID_PREPARE_UPDATE);
|
||||
result = RETURN_OK;
|
||||
break;
|
||||
}
|
||||
case (supv::START_MPSOC_QUIET): {
|
||||
prepareEmptyCmd(supv::APID_START_MPSOC_QUIET);
|
||||
result = RETURN_OK;
|
||||
@ -346,6 +341,18 @@ ReturnValue_t PlocSupervisorHandler::buildCommandFromCommand(DeviceCommandId_t d
|
||||
result = RETURN_OK;
|
||||
break;
|
||||
}
|
||||
case (supv::ENABLE_AUTO_TM): {
|
||||
supv::EnableAutoTm packet;
|
||||
packetToOutBuffer(packet.getWholeData(), packet.getFullSize());
|
||||
result = RETURN_OK;
|
||||
break;
|
||||
}
|
||||
case (supv::DISABLE_AUTO_TM): {
|
||||
supv::DisableAutoTm packet;
|
||||
packetToOutBuffer(packet.getWholeData(), packet.getFullSize());
|
||||
result = RETURN_OK;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
sif::debug << "PlocSupervisorHandler::buildCommandFromCommand: Command not implemented"
|
||||
<< std::endl;
|
||||
@ -401,10 +408,11 @@ void PlocSupervisorHandler::fillCommandAndReplyMap() {
|
||||
this->insertInCommandMap(supv::FACTORY_RESET_CLEAR_MIRROR);
|
||||
this->insertInCommandMap(supv::FACTORY_RESET_CLEAR_CIRCULAR);
|
||||
this->insertInCommandMap(supv::CAN_LOOPBACK_TEST);
|
||||
this->insertInCommandMap(supv::PREPARE_UPDATE);
|
||||
this->insertInCommandMap(supv::START_MPSOC_QUIET);
|
||||
this->insertInCommandMap(supv::SET_SHUTDOWN_TIMEOUT);
|
||||
this->insertInCommandMap(supv::FACTORY_FLASH);
|
||||
this->insertInCommandMap(supv::ENABLE_AUTO_TM);
|
||||
this->insertInCommandMap(supv::DISABLE_AUTO_TM);
|
||||
this->insertInCommandAndReplyMap(supv::FIRST_MRAM_DUMP, 3);
|
||||
this->insertInCommandAndReplyMap(supv::CONSECUTIVE_MRAM_DUMP, 3);
|
||||
this->insertInReplyMap(supv::ACK_REPORT, 3, nullptr, supv::SIZE_ACK_REPORT);
|
||||
@ -527,7 +535,7 @@ ReturnValue_t PlocSupervisorHandler::initializeLocalDataPool(localpool::DataPool
|
||||
localDataPoolMap.emplace(supv::NUM_TMS, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(supv::TEMP_PS, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(supv::TEMP_PL, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(supv::SOC_STATE, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(supv::HK_SOC_STATE, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(supv::NVM0_1_STATE, new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(supv::NVM3_STATE, new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(supv::MISSION_IO_STATE, new PoolEntry<uint8_t>({0}));
|
||||
@ -537,8 +545,8 @@ ReturnValue_t PlocSupervisorHandler::initializeLocalDataPool(localpool::DataPool
|
||||
localDataPoolMap.emplace(supv::CPULOAD, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(supv::AVAILABLEHEAP, new PoolEntry<uint32_t>({0}));
|
||||
|
||||
localDataPoolMap.emplace(supv::BOOT_SIGNAL, new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(supv::RESET_COUNTER, new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(supv::BR_SOC_STATE, new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(supv::POWER_CYCLES, new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(supv::BOOT_AFTER_MS, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(supv::BOOT_TIMEOUT_MS, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(supv::ACTIVE_NVM, new PoolEntry<uint8_t>({0}));
|
||||
@ -561,6 +569,7 @@ ReturnValue_t PlocSupervisorHandler::initializeLocalDataPool(localpool::DataPool
|
||||
localDataPoolMap.emplace(supv::LATCHUP_RPT_TIME_DAY, new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(supv::LATCHUP_RPT_TIME_MON, new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(supv::LATCHUP_RPT_TIME_YEAR, new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(supv::LATCHUP_RPT_IS_SET, new PoolEntry<uint8_t>({0}));
|
||||
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
@ -672,10 +681,11 @@ ReturnValue_t PlocSupervisorHandler::enableReplyInReplyMap(DeviceCommandMap::ite
|
||||
case supv::FACTORY_RESET_CLEAR_CIRCULAR:
|
||||
case supv::REQUEST_LOGGING_DATA:
|
||||
case supv::DISABLE_PERIOIC_HK_TRANSMISSION:
|
||||
case supv::PREPARE_UPDATE:
|
||||
case supv::START_MPSOC_QUIET:
|
||||
case supv::SET_SHUTDOWN_TIMEOUT:
|
||||
case supv::FACTORY_FLASH:
|
||||
case supv::ENABLE_AUTO_TM:
|
||||
case supv::DISABLE_AUTO_TM:
|
||||
enabledReplies = 2;
|
||||
break;
|
||||
default:
|
||||
@ -893,9 +903,9 @@ ReturnValue_t PlocSupervisorHandler::handleBootStatusReport(const uint8_t* data)
|
||||
}
|
||||
|
||||
uint16_t offset = supv::DATA_FIELD_OFFSET;
|
||||
bootStatusReport.bootSignal = *(data + offset);
|
||||
bootStatusReport.socState = *(data + offset);
|
||||
offset += 1;
|
||||
bootStatusReport.resetCounter = *(data + offset);
|
||||
bootStatusReport.powerCycles = *(data + offset);
|
||||
offset += 1;
|
||||
bootStatusReport.bootAfterMs = *(data + offset) << 24 | *(data + offset + 1) << 16 |
|
||||
*(data + offset + 2) << 8 | *(data + offset + 3);
|
||||
@ -918,10 +928,10 @@ ReturnValue_t PlocSupervisorHandler::handleBootStatusReport(const uint8_t* data)
|
||||
nextReplyId = supv::EXE_REPORT;
|
||||
|
||||
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
||||
sif::info << "PlocSupervisorHandler::handleBootStatusReport: Boot signal: "
|
||||
<< static_cast<unsigned int>(bootStatusReport.bootSignal.value) << std::endl;
|
||||
sif::info << "PlocSupervisorHandler::handleBootStatusReport: Reset counter: "
|
||||
<< static_cast<unsigned int>(bootStatusReport.resetCounter.value) << std::endl;
|
||||
sif::info << "PlocSupervisorHandler::handleBootStatusReport: SoC State: "
|
||||
<< static_cast<unsigned int>(bootStatusReport.socState.value) << std::endl;
|
||||
sif::info << "PlocSupervisorHandler::handleBootStatusReport: Power Cycles: "
|
||||
<< static_cast<unsigned int>(bootStatusReport.powerCycles.value) << std::endl;
|
||||
sif::info << "PlocSupervisorHandler::handleBootStatusReport: BootAfterMs: "
|
||||
<< bootStatusReport.bootAfterMs << " ms" << std::endl;
|
||||
sif::info << "PlocSupervisorHandler::handleBootStatusReport: BootTimeoutMs: " << std::dec
|
||||
@ -971,7 +981,9 @@ ReturnValue_t PlocSupervisorHandler::handleLatchupStatusReport(const uint8_t* da
|
||||
offset += 2;
|
||||
latchupStatusReport.cnt6 = *(data + offset) << 8 | *(data + offset + 1);
|
||||
offset += 2;
|
||||
latchupStatusReport.timeMsec = (*(data + offset) << 8 | *(data + offset + 1)) & 0x7FFF;
|
||||
uint16_t msec = *(data + offset) << 8 | *(data + offset + 1);
|
||||
latchupStatusReport.isSet = msec >> supv::LatchupStatusReport::IS_SET_BIT_POS;
|
||||
latchupStatusReport.timeMsec = msec & (~(1 << latchupStatusReport.IS_SET_BIT_POS));
|
||||
offset += 2;
|
||||
latchupStatusReport.timeSec = *(data + offset);
|
||||
offset += 1;
|
||||
@ -1018,8 +1030,8 @@ ReturnValue_t PlocSupervisorHandler::handleLatchupStatusReport(const uint8_t* da
|
||||
<< static_cast<unsigned int>(latchupStatusReport.timeYear.value) << std::endl;
|
||||
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: Msec: "
|
||||
<< static_cast<unsigned int>(latchupStatusReport.timeMsec.value) << std::endl;
|
||||
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: isSet: 0x" << std::hex
|
||||
<< latchupStatusReport.timeMsec << std::dec << std::endl;
|
||||
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: isSet: "
|
||||
<< static_cast<unsigned int>(latchupStatusReport.isSet.value) << std::endl;
|
||||
#endif
|
||||
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user