PLOC SUPV extensions
This commit is contained in:
parent
49a87224e7
commit
b623f01bea
@ -29,7 +29,7 @@ PlocSupervisorHandler::PlocSupervisorHandler(object_id_t objectId, CookieIF* com
|
|||||||
hkset(this),
|
hkset(this),
|
||||||
bootStatusReport(this),
|
bootStatusReport(this),
|
||||||
latchupStatusReport(this),
|
latchupStatusReport(this),
|
||||||
loggingReport(this),
|
countersReport(this),
|
||||||
adcReport(this),
|
adcReport(this),
|
||||||
powerSwitch(powerSwitch),
|
powerSwitch(powerSwitch),
|
||||||
uartManager(supvHelper) {
|
uartManager(supvHelper) {
|
||||||
@ -274,8 +274,7 @@ ReturnValue_t PlocSupervisorHandler::buildCommandFromCommand(DeviceCommandId_t d
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SET_GPIO: {
|
case SET_GPIO: {
|
||||||
prepareSetGpioCmd(commandData);
|
result = prepareSetGpioCmd(commandData, commandDataLen);
|
||||||
result = returnvalue::OK;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case FACTORY_RESET: {
|
case FACTORY_RESET: {
|
||||||
@ -283,8 +282,7 @@ ReturnValue_t PlocSupervisorHandler::buildCommandFromCommand(DeviceCommandId_t d
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case READ_GPIO: {
|
case READ_GPIO: {
|
||||||
prepareReadGpioCmd(commandData);
|
result = prepareReadGpioCmd(commandData, commandDataLen);
|
||||||
result = returnvalue::OK;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SET_SHUTDOWN_TIMEOUT: {
|
case SET_SHUTDOWN_TIMEOUT: {
|
||||||
@ -321,6 +319,17 @@ ReturnValue_t PlocSupervisorHandler::buildCommandFromCommand(DeviceCommandId_t d
|
|||||||
result = prepareWipeMramCmd(commandData);
|
result = prepareWipeMramCmd(commandData);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case REQUEST_ADC_REPORT: {
|
||||||
|
prepareEmptyCmd(Apid::ADC_MON, static_cast<uint8_t>(tc::AdcMonId::REQUEST_ADC_SAMPLE));
|
||||||
|
result = returnvalue::OK;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case REQUEST_LOGGING_COUNTERS: {
|
||||||
|
prepareEmptyCmd(Apid::DATA_LOGGER,
|
||||||
|
static_cast<uint8_t>(tc::DataLoggerServiceId::REQUEST_COUNTERS));
|
||||||
|
result = returnvalue::OK;
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
sif::debug << "PlocSupervisorHandler::buildCommandFromCommand: Command not implemented"
|
sif::debug << "PlocSupervisorHandler::buildCommandFromCommand: Command not implemented"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
@ -358,6 +367,8 @@ void PlocSupervisorHandler::fillCommandAndReplyMap() {
|
|||||||
insertInCommandMap(SET_ADC_THRESHOLD);
|
insertInCommandMap(SET_ADC_THRESHOLD);
|
||||||
insertInCommandMap(SET_ADC_WINDOW_AND_STRIDE);
|
insertInCommandMap(SET_ADC_WINDOW_AND_STRIDE);
|
||||||
insertInCommandMap(RESET_PL);
|
insertInCommandMap(RESET_PL);
|
||||||
|
insertInCommandMap(REQUEST_ADC_REPORT);
|
||||||
|
insertInCommandMap(REQUEST_LOGGING_COUNTERS);
|
||||||
|
|
||||||
// ACK replies, use countdown for them
|
// ACK replies, use countdown for them
|
||||||
insertInReplyMap(ACK_REPORT, 0, nullptr, SIZE_ACK_REPORT, false, &acknowledgementReportTimeout);
|
insertInReplyMap(ACK_REPORT, 0, nullptr, SIZE_ACK_REPORT, false, &acknowledgementReportTimeout);
|
||||||
@ -368,7 +379,7 @@ void PlocSupervisorHandler::fillCommandAndReplyMap() {
|
|||||||
insertInReplyMap(HK_REPORT, 3, &hkset);
|
insertInReplyMap(HK_REPORT, 3, &hkset);
|
||||||
insertInReplyMap(BOOT_STATUS_REPORT, 3, &bootStatusReport, SIZE_BOOT_STATUS_REPORT);
|
insertInReplyMap(BOOT_STATUS_REPORT, 3, &bootStatusReport, SIZE_BOOT_STATUS_REPORT);
|
||||||
insertInReplyMap(LATCHUP_REPORT, 3, &latchupStatusReport, SIZE_LATCHUP_STATUS_REPORT);
|
insertInReplyMap(LATCHUP_REPORT, 3, &latchupStatusReport, SIZE_LATCHUP_STATUS_REPORT);
|
||||||
insertInReplyMap(LOGGING_REPORT, 3, &loggingReport, SIZE_LOGGING_REPORT);
|
insertInReplyMap(COUNTERS_REPORT, 3, &countersReport, SIZE_COUNTERS_REPORT);
|
||||||
insertInReplyMap(ADC_REPORT, 3, &adcReport, SIZE_ADC_REPORT);
|
insertInReplyMap(ADC_REPORT, 3, &adcReport, SIZE_ADC_REPORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -410,13 +421,13 @@ ReturnValue_t PlocSupervisorHandler::enableReplyInReplyMap(DeviceCommandMap::ite
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LOGGING_REQUEST_COUNTERS: {
|
case REQUEST_LOGGING_COUNTERS: {
|
||||||
enabledReplies = 3;
|
enabledReplies = 3;
|
||||||
result =
|
result =
|
||||||
DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true, LOGGING_REPORT);
|
DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true, COUNTERS_REPORT);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "PlocSupervisorHandler::enableReplyInReplyMap: Reply with id "
|
sif::debug << "PlocSupervisorHandler::enableReplyInReplyMap: Reply with id "
|
||||||
<< LOGGING_REPORT << " not in replyMap" << std::endl;
|
<< COUNTERS_REPORT << " not in replyMap" << std::endl;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -559,6 +570,14 @@ ReturnValue_t PlocSupervisorHandler::scanForReply(const uint8_t* start, size_t r
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case (Apid::ADC_MON): {
|
||||||
|
if (tmReader.getServiceId() == static_cast<uint8_t>(supv::tm::AdcMonId::ADC_REPORT)) {
|
||||||
|
*foundLen = tmReader.getFullPacketLen();
|
||||||
|
*foundId = ReplyId::ADC_REPORT;
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case (Apid::MEM_MAN): {
|
case (Apid::MEM_MAN): {
|
||||||
if (tmReader.getServiceId() ==
|
if (tmReader.getServiceId() ==
|
||||||
static_cast<uint8_t>(supv::tm::MemManId::UPDATE_STATUS_REPORT)) {
|
static_cast<uint8_t>(supv::tm::MemManId::UPDATE_STATUS_REPORT)) {
|
||||||
@ -566,6 +585,15 @@ ReturnValue_t PlocSupervisorHandler::scanForReply(const uint8_t* start, size_t r
|
|||||||
*foundId = ReplyId::UPDATE_STATUS_REPORT;
|
*foundId = ReplyId::UPDATE_STATUS_REPORT;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (Apid::DATA_LOGGER): {
|
||||||
|
if (tmReader.getServiceId() ==
|
||||||
|
static_cast<uint8_t>(supv::tm::DataLoggerId::COUNTERS_REPORT)) {
|
||||||
|
*foundLen = tmReader.getFullPacketLen();
|
||||||
|
*foundId = ReplyId::COUNTERS_REPORT;
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
handleBadApidServiceCombination(SUPV_UNKNOWN_TM, apid, tmReader.getServiceId());
|
handleBadApidServiceCombination(SUPV_UNKNOWN_TM, apid, tmReader.getServiceId());
|
||||||
@ -627,12 +655,22 @@ ReturnValue_t PlocSupervisorHandler::interpretDeviceReply(DeviceCommandId_t id,
|
|||||||
result = handleBootStatusReport(packet);
|
result = handleBootStatusReport(packet);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case (COUNTERS_REPORT): {
|
||||||
|
result = genericHandleTm("COUNTERS", packet, countersReport);
|
||||||
|
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
||||||
|
countersReport.printSet();
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
}
|
||||||
case (LATCHUP_REPORT): {
|
case (LATCHUP_REPORT): {
|
||||||
result = handleLatchupStatusReport(packet);
|
result = handleLatchupStatusReport(packet);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (ADC_REPORT): {
|
case (ADC_REPORT): {
|
||||||
result = handleAdcReport(packet);
|
result = genericHandleTm("ADC", packet, adcReport);
|
||||||
|
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
||||||
|
adcReport.printSet();
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (EXE_REPORT): {
|
case (EXE_REPORT): {
|
||||||
@ -697,13 +735,8 @@ ReturnValue_t PlocSupervisorHandler::initializeLocalDataPool(localpool::DataPool
|
|||||||
localDataPoolMap.emplace(supv::LATCHUP_RPT_TIME_YEAR, 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}));
|
localDataPoolMap.emplace(supv::LATCHUP_RPT_IS_SET, new PoolEntry<uint8_t>({0}));
|
||||||
|
|
||||||
localDataPoolMap.emplace(supv::LATCHUP_HAPPENED_CNT_0, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(supv::SIGNATURE, new PoolEntry<uint32_t>());
|
||||||
localDataPoolMap.emplace(supv::LATCHUP_HAPPENED_CNT_1, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(supv::LATCHUP_HAPPENED_CNTS, &latchupCounters);
|
||||||
localDataPoolMap.emplace(supv::LATCHUP_HAPPENED_CNT_2, new PoolEntry<uint32_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::LATCHUP_HAPPENED_CNT_3, new PoolEntry<uint32_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::LATCHUP_HAPPENED_CNT_4, new PoolEntry<uint32_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::LATCHUP_HAPPENED_CNT_5, new PoolEntry<uint32_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::LATCHUP_HAPPENED_CNT_6, new PoolEntry<uint32_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_DEVIATION_TRIGGERS_CNT, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(supv::ADC_DEVIATION_TRIGGERS_CNT, new PoolEntry<uint32_t>({0}));
|
||||||
localDataPoolMap.emplace(supv::TC_RECEIVED_CNT, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(supv::TC_RECEIVED_CNT, new PoolEntry<uint32_t>({0}));
|
||||||
localDataPoolMap.emplace(supv::TM_AVAILABLE_CNT, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(supv::TM_AVAILABLE_CNT, new PoolEntry<uint32_t>({0}));
|
||||||
@ -712,41 +745,22 @@ ReturnValue_t PlocSupervisorHandler::initializeLocalDataPool(localpool::DataPool
|
|||||||
localDataPoolMap.emplace(supv::MPSOC_BOOT_FAILED_ATTEMPTS, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(supv::MPSOC_BOOT_FAILED_ATTEMPTS, new PoolEntry<uint32_t>({0}));
|
||||||
localDataPoolMap.emplace(supv::MPSOC_POWER_UP, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(supv::MPSOC_POWER_UP, new PoolEntry<uint32_t>({0}));
|
||||||
localDataPoolMap.emplace(supv::MPSOC_UPDATES, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(supv::MPSOC_UPDATES, new PoolEntry<uint32_t>({0}));
|
||||||
localDataPoolMap.emplace(supv::LAST_RECVD_TC, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(supv::MPSOC_HEARTBEAT_RESETS, new PoolEntry<uint32_t>({0}));
|
||||||
|
localDataPoolMap.emplace(supv::CPU_WDT_RESETS, new PoolEntry<uint32_t>({0}));
|
||||||
|
localDataPoolMap.emplace(supv::PS_HEARTBEATS_LOST, new PoolEntry<uint32_t>({0}));
|
||||||
|
localDataPoolMap.emplace(supv::PL_HEARTBEATS_LOST, new PoolEntry<uint32_t>({0}));
|
||||||
|
localDataPoolMap.emplace(supv::EB_TASK_LOST, new PoolEntry<uint32_t>({0}));
|
||||||
|
localDataPoolMap.emplace(supv::BM_TASK_LOST, new PoolEntry<uint32_t>({0}));
|
||||||
|
localDataPoolMap.emplace(supv::LM_TASK_LOST, new PoolEntry<uint32_t>({0}));
|
||||||
|
localDataPoolMap.emplace(supv::AM_TASK_LOST, new PoolEntry<uint32_t>({0}));
|
||||||
|
localDataPoolMap.emplace(supv::TCTMM_TASK_LOST, new PoolEntry<uint32_t>({0}));
|
||||||
|
localDataPoolMap.emplace(supv::MM_TASK_LOST, new PoolEntry<uint32_t>({0}));
|
||||||
|
localDataPoolMap.emplace(supv::HK_TASK_LOST, new PoolEntry<uint32_t>({0}));
|
||||||
|
localDataPoolMap.emplace(supv::DL_TASK_LOST, new PoolEntry<uint32_t>({0}));
|
||||||
|
localDataPoolMap.emplace(supv::RWS_TASKS_LOST, new PoolEntry<uint32_t>(3));
|
||||||
|
|
||||||
localDataPoolMap.emplace(supv::ADC_RAW_0, new PoolEntry<uint16_t>({0}));
|
localDataPoolMap.emplace(supv::ADC_RAW, &adcRawEntry);
|
||||||
localDataPoolMap.emplace(supv::ADC_RAW_1, new PoolEntry<uint16_t>({0}));
|
localDataPoolMap.emplace(supv::ADC_ENG, &adcEngEntry);
|
||||||
localDataPoolMap.emplace(supv::ADC_RAW_2, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_RAW_3, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_RAW_4, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_RAW_5, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_RAW_6, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_RAW_7, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_RAW_8, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_RAW_9, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_RAW_10, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_RAW_11, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_RAW_12, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_RAW_13, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_RAW_14, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_RAW_15, new PoolEntry<uint16_t>({0}));
|
|
||||||
|
|
||||||
localDataPoolMap.emplace(supv::ADC_ENG_0, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_ENG_1, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_ENG_2, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_ENG_3, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_ENG_4, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_ENG_5, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_ENG_6, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_ENG_7, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_ENG_8, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_ENG_9, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_ENG_10, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_ENG_11, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_ENG_12, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_ENG_13, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_ENG_14, new PoolEntry<uint16_t>({0}));
|
|
||||||
localDataPoolMap.emplace(supv::ADC_ENG_15, new PoolEntry<uint16_t>({0}));
|
|
||||||
|
|
||||||
poolManager.subscribeForRegularPeriodicPacket(
|
poolManager.subscribeForRegularPeriodicPacket(
|
||||||
subdp::RegularHkPeriodicParams(hkset.getSid(), false, 10.0));
|
subdp::RegularHkPeriodicParams(hkset.getSid(), false, 10.0));
|
||||||
@ -1105,37 +1119,31 @@ ReturnValue_t PlocSupervisorHandler::handleLatchupStatusReport(const uint8_t* da
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocSupervisorHandler::handleAdcReport(const uint8_t* data) {
|
ReturnValue_t PlocSupervisorHandler::genericHandleTm(const char* contextString, const uint8_t* data,
|
||||||
|
LocalPoolDataSetBase& set) {
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
|
||||||
result = verifyPacket(data, supv::SIZE_ADC_REPORT);
|
result = verifyPacket(data, tmReader.getFullPacketLen());
|
||||||
|
|
||||||
if (result == result::CRC_FAILURE) {
|
if (result == result::CRC_FAILURE) {
|
||||||
sif::error << "PlocSupervisorHandler::handleAdcReport: ADC report has "
|
sif::warning << "PlocSupervisorHandler: " << contextString << " report has "
|
||||||
<< "invalid crc" << std::endl;
|
<< "invalid CRC" << std::endl;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint8_t* dataField = data + supv::PAYLOAD_OFFSET;
|
const uint8_t* dataField = data + supv::PAYLOAD_OFFSET;
|
||||||
result = adcReport.read();
|
PoolReadGuard pg(&set);
|
||||||
if (result != returnvalue::OK) {
|
if (pg.getReadResult() != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
adcReport.setValidityBufferGeneration(false);
|
set.setValidityBufferGeneration(false);
|
||||||
size_t size = adcReport.getSerializedSize();
|
size_t size = set.getSerializedSize();
|
||||||
result = adcReport.deSerialize(&dataField, &size, SerializeIF::Endianness::BIG);
|
result = set.deSerialize(&dataField, &size, SerializeIF::Endianness::BIG);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "PlocSupervisorHandler::handleAdcReport: Deserialization failed" << std::endl;
|
sif::warning << "PlocSupervisorHandler: Deserialization failed" << std::endl;
|
||||||
}
|
}
|
||||||
adcReport.setValidityBufferGeneration(true);
|
set.setValidityBufferGeneration(true);
|
||||||
adcReport.setValidity(true, true);
|
set.setValidity(true, true);
|
||||||
result = adcReport.commit();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
|
||||||
adcReport.printSet();
|
|
||||||
#endif
|
|
||||||
nextReplyId = supv::EXE_REPORT;
|
nextReplyId = supv::EXE_REPORT;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1157,8 +1165,8 @@ void PlocSupervisorHandler::setNextReplyId() {
|
|||||||
case supv::CONSECUTIVE_MRAM_DUMP:
|
case supv::CONSECUTIVE_MRAM_DUMP:
|
||||||
nextReplyId = supv::CONSECUTIVE_MRAM_DUMP;
|
nextReplyId = supv::CONSECUTIVE_MRAM_DUMP;
|
||||||
break;
|
break;
|
||||||
case supv::LOGGING_REQUEST_COUNTERS:
|
case supv::REQUEST_LOGGING_COUNTERS:
|
||||||
nextReplyId = supv::LOGGING_REPORT;
|
nextReplyId = supv::COUNTERS_REPORT;
|
||||||
break;
|
break;
|
||||||
case supv::REQUEST_ADC_REPORT:
|
case supv::REQUEST_ADC_REPORT:
|
||||||
nextReplyId = supv::ADC_REPORT;
|
nextReplyId = supv::ADC_REPORT;
|
||||||
@ -1407,7 +1415,11 @@ ReturnValue_t PlocSupervisorHandler::prepareRunAutoEmTest(const uint8_t* command
|
|||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocSupervisorHandler::prepareSetGpioCmd(const uint8_t* commandData) {
|
ReturnValue_t PlocSupervisorHandler::prepareSetGpioCmd(const uint8_t* commandData,
|
||||||
|
size_t commandDataLen) {
|
||||||
|
if (commandDataLen < 3) {
|
||||||
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
|
}
|
||||||
uint8_t port = *commandData;
|
uint8_t port = *commandData;
|
||||||
uint8_t pin = *(commandData + 1);
|
uint8_t pin = *(commandData + 1);
|
||||||
uint8_t val = *(commandData + 2);
|
uint8_t val = *(commandData + 2);
|
||||||
@ -1420,7 +1432,11 @@ ReturnValue_t PlocSupervisorHandler::prepareSetGpioCmd(const uint8_t* commandDat
|
|||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocSupervisorHandler::prepareReadGpioCmd(const uint8_t* commandData) {
|
ReturnValue_t PlocSupervisorHandler::prepareReadGpioCmd(const uint8_t* commandData,
|
||||||
|
size_t commandDataLen) {
|
||||||
|
if (commandDataLen < 2) {
|
||||||
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
|
}
|
||||||
uint8_t port = *commandData;
|
uint8_t port = *commandData;
|
||||||
uint8_t pin = *(commandData + 1);
|
uint8_t pin = *(commandData + 1);
|
||||||
supv::ReadGpio packet(spParams);
|
supv::ReadGpio packet(spParams);
|
||||||
@ -1517,8 +1533,8 @@ void PlocSupervisorHandler::disableAllReplies() {
|
|||||||
disableReply(LATCHUP_REPORT);
|
disableReply(LATCHUP_REPORT);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LOGGING_REQUEST_COUNTERS: {
|
case REQUEST_LOGGING_COUNTERS: {
|
||||||
disableReply(LOGGING_REPORT);
|
disableReply(COUNTERS_REPORT);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
@ -135,7 +135,7 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
supv::HkSet hkset;
|
supv::HkSet hkset;
|
||||||
supv::BootStatusReport bootStatusReport;
|
supv::BootStatusReport bootStatusReport;
|
||||||
supv::LatchupStatusReport latchupStatusReport;
|
supv::LatchupStatusReport latchupStatusReport;
|
||||||
supv::LoggingReport loggingReport;
|
supv::CountersReport countersReport;
|
||||||
supv::AdcReport adcReport;
|
supv::AdcReport adcReport;
|
||||||
|
|
||||||
const power::Switch_t powerSwitch = power::NO_SWITCH;
|
const power::Switch_t powerSwitch = power::NO_SWITCH;
|
||||||
@ -167,6 +167,9 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
Countdown bootTimeout = Countdown(BOOT_TIMEOUT);
|
Countdown bootTimeout = Countdown(BOOT_TIMEOUT);
|
||||||
Countdown mramDumpTimeout = Countdown(MRAM_DUMP_TIMEOUT);
|
Countdown mramDumpTimeout = Countdown(MRAM_DUMP_TIMEOUT);
|
||||||
|
|
||||||
|
PoolEntry<uint16_t> adcRawEntry = PoolEntry<uint16_t>(16);
|
||||||
|
PoolEntry<uint16_t> adcEngEntry = PoolEntry<uint16_t>(16);
|
||||||
|
PoolEntry<uint32_t> latchupCounters = PoolEntry<uint32_t>(7);
|
||||||
PoolEntry<uint8_t> fmcStateEntry = PoolEntry<uint8_t>(1);
|
PoolEntry<uint8_t> fmcStateEntry = PoolEntry<uint8_t>(1);
|
||||||
PoolEntry<uint8_t> bootStateEntry = PoolEntry<uint8_t>(1);
|
PoolEntry<uint8_t> bootStateEntry = PoolEntry<uint8_t>(1);
|
||||||
PoolEntry<uint8_t> bootCyclesEntry = PoolEntry<uint8_t>(1);
|
PoolEntry<uint8_t> bootCyclesEntry = PoolEntry<uint8_t>(1);
|
||||||
@ -231,8 +234,11 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
ReturnValue_t handleBootStatusReport(const uint8_t* data);
|
ReturnValue_t handleBootStatusReport(const uint8_t* data);
|
||||||
|
|
||||||
ReturnValue_t handleLatchupStatusReport(const uint8_t* data);
|
ReturnValue_t handleLatchupStatusReport(const uint8_t* data);
|
||||||
|
ReturnValue_t handleCounterReport(const uint8_t* data);
|
||||||
void handleBadApidServiceCombination(Event result, unsigned int apid, unsigned int serviceId);
|
void handleBadApidServiceCombination(Event result, unsigned int apid, unsigned int serviceId);
|
||||||
ReturnValue_t handleAdcReport(const uint8_t* data);
|
ReturnValue_t handleAdcReport(const uint8_t* data);
|
||||||
|
ReturnValue_t genericHandleTm(const char* contextString, const uint8_t* data,
|
||||||
|
LocalPoolDataSetBase& set);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Depending on the current active command, this function sets the reply id of the
|
* @brief Depending on the current active command, this function sets the reply id of the
|
||||||
@ -301,8 +307,8 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
ReturnValue_t prepareSetAdcThresholdCmd(const uint8_t* commandData);
|
ReturnValue_t prepareSetAdcThresholdCmd(const uint8_t* commandData);
|
||||||
ReturnValue_t prepareRunAutoEmTest(const uint8_t* commandData);
|
ReturnValue_t prepareRunAutoEmTest(const uint8_t* commandData);
|
||||||
ReturnValue_t prepareWipeMramCmd(const uint8_t* commandData);
|
ReturnValue_t prepareWipeMramCmd(const uint8_t* commandData);
|
||||||
ReturnValue_t prepareSetGpioCmd(const uint8_t* commandData);
|
ReturnValue_t prepareSetGpioCmd(const uint8_t* commandData, size_t commandDataLen);
|
||||||
ReturnValue_t prepareReadGpioCmd(const uint8_t* commandData);
|
ReturnValue_t prepareReadGpioCmd(const uint8_t* commandData, size_t commandDataLen);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Copies the content of a space packet to the command buffer.
|
* @brief Copies the content of a space packet to the command buffer.
|
||||||
|
@ -107,7 +107,7 @@ static const DeviceCommandId_t FIRST_MRAM_DUMP = 30;
|
|||||||
static const DeviceCommandId_t SET_GPIO = 34;
|
static const DeviceCommandId_t SET_GPIO = 34;
|
||||||
static const DeviceCommandId_t READ_GPIO = 35;
|
static const DeviceCommandId_t READ_GPIO = 35;
|
||||||
static const DeviceCommandId_t RESTART_SUPERVISOR = 36;
|
static const DeviceCommandId_t RESTART_SUPERVISOR = 36;
|
||||||
static const DeviceCommandId_t LOGGING_REQUEST_COUNTERS = 38;
|
static const DeviceCommandId_t REQUEST_LOGGING_COUNTERS = 38;
|
||||||
static constexpr DeviceCommandId_t FACTORY_RESET = 39;
|
static constexpr DeviceCommandId_t FACTORY_RESET = 39;
|
||||||
static const DeviceCommandId_t CONSECUTIVE_MRAM_DUMP = 43;
|
static const DeviceCommandId_t CONSECUTIVE_MRAM_DUMP = 43;
|
||||||
static const DeviceCommandId_t START_MPSOC_QUIET = 45;
|
static const DeviceCommandId_t START_MPSOC_QUIET = 45;
|
||||||
@ -120,7 +120,7 @@ static const DeviceCommandId_t DISABLE_AUTO_TM = 51;
|
|||||||
static const DeviceCommandId_t LOGGING_REQUEST_EVENT_BUFFERS = 54;
|
static const DeviceCommandId_t LOGGING_REQUEST_EVENT_BUFFERS = 54;
|
||||||
static const DeviceCommandId_t LOGGING_CLEAR_COUNTERS = 55;
|
static const DeviceCommandId_t LOGGING_CLEAR_COUNTERS = 55;
|
||||||
static const DeviceCommandId_t LOGGING_SET_TOPIC = 56;
|
static const DeviceCommandId_t LOGGING_SET_TOPIC = 56;
|
||||||
static const DeviceCommandId_t REQUEST_ADC_REPORT = 57;
|
static constexpr DeviceCommandId_t REQUEST_ADC_REPORT = 57;
|
||||||
static const DeviceCommandId_t RESET_PL = 58;
|
static const DeviceCommandId_t RESET_PL = 58;
|
||||||
static const DeviceCommandId_t ENABLE_NVMS = 59;
|
static const DeviceCommandId_t ENABLE_NVMS = 59;
|
||||||
static const DeviceCommandId_t CONTINUE_UPDATE = 60;
|
static const DeviceCommandId_t CONTINUE_UPDATE = 60;
|
||||||
@ -134,7 +134,7 @@ enum ReplyId : DeviceCommandId_t {
|
|||||||
HK_REPORT = 102,
|
HK_REPORT = 102,
|
||||||
BOOT_STATUS_REPORT = 103,
|
BOOT_STATUS_REPORT = 103,
|
||||||
LATCHUP_REPORT = 104,
|
LATCHUP_REPORT = 104,
|
||||||
LOGGING_REPORT = 105,
|
COUNTERS_REPORT = 105,
|
||||||
ADC_REPORT = 106,
|
ADC_REPORT = 106,
|
||||||
UPDATE_STATUS_REPORT = 107,
|
UPDATE_STATUS_REPORT = 107,
|
||||||
};
|
};
|
||||||
@ -144,7 +144,7 @@ static const uint16_t SIZE_ACK_REPORT = 14;
|
|||||||
static const uint16_t SIZE_EXE_REPORT = 14;
|
static const uint16_t SIZE_EXE_REPORT = 14;
|
||||||
static const uint16_t SIZE_BOOT_STATUS_REPORT = 24;
|
static const uint16_t SIZE_BOOT_STATUS_REPORT = 24;
|
||||||
static const uint16_t SIZE_LATCHUP_STATUS_REPORT = 31;
|
static const uint16_t SIZE_LATCHUP_STATUS_REPORT = 31;
|
||||||
static const uint16_t SIZE_LOGGING_REPORT = 73;
|
static const uint16_t SIZE_COUNTERS_REPORT = 120;
|
||||||
static const uint16_t SIZE_ADC_REPORT = 72;
|
static const uint16_t SIZE_ADC_REPORT = 72;
|
||||||
|
|
||||||
// 2 bits APID SRC, 00 for OBC, 2 bits APID DEST, 01 for SUPV, 7 bits CMD ID -> Mask 0x080
|
// 2 bits APID SRC, 00 for OBC, 2 bits APID DEST, 01 for SUPV, 7 bits CMD ID -> Mask 0x080
|
||||||
@ -207,12 +207,18 @@ enum class AdcMonId : uint8_t {
|
|||||||
SET_ENABLED_CHANNELS = 0x02,
|
SET_ENABLED_CHANNELS = 0x02,
|
||||||
SET_WINDOW_STRIDE = 0x03,
|
SET_WINDOW_STRIDE = 0x03,
|
||||||
SET_ADC_THRESHOLD = 0x04,
|
SET_ADC_THRESHOLD = 0x04,
|
||||||
COPY_ADC_DATA_TO_MRAM = 0x05
|
COPY_ADC_DATA_TO_MRAM = 0x05,
|
||||||
|
REQUEST_ADC_SAMPLE = 0x06
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class MemManId : uint8_t { ERASE = 0x01, WRITE = 0x02, CHECK = 0x03 };
|
enum class MemManId : uint8_t { ERASE = 0x01, WRITE = 0x02, CHECK = 0x03 };
|
||||||
|
|
||||||
enum class DataLoggerServiceId : uint8_t {
|
enum class DataLoggerServiceId : uint8_t {
|
||||||
|
// Not implemented.
|
||||||
|
READ_MRAM_CFG_DATA_LOGGER = 0x00,
|
||||||
|
REQUEST_COUNTERS = 0x01,
|
||||||
|
// Not implemented.
|
||||||
|
EVENT_BUFFER_DOWNLOAD = 0x02,
|
||||||
WIPE_MRAM = 0x05,
|
WIPE_MRAM = 0x05,
|
||||||
DUMP_MRAM = 0x06,
|
DUMP_MRAM = 0x06,
|
||||||
FACTORY_RESET = 0x07
|
FACTORY_RESET = 0x07
|
||||||
@ -231,10 +237,12 @@ enum class TmtcId : uint8_t { ACK = 0x01, NAK = 0x02, EXEC_ACK = 0x03, EXEC_NAK
|
|||||||
enum class HkId : uint8_t { REPORT = 0x01, HARDFAULTS = 0x02 };
|
enum class HkId : uint8_t { REPORT = 0x01, HARDFAULTS = 0x02 };
|
||||||
|
|
||||||
enum class BootManId : uint8_t { BOOT_STATUS_REPORT = 0x01 };
|
enum class BootManId : uint8_t { BOOT_STATUS_REPORT = 0x01 };
|
||||||
|
enum class AdcMonId : uint8_t { ADC_REPORT = 0x01 };
|
||||||
|
|
||||||
enum class MemManId : uint8_t { UPDATE_STATUS_REPORT = 0x01 };
|
enum class MemManId : uint8_t { UPDATE_STATUS_REPORT = 0x01 };
|
||||||
|
|
||||||
enum class LatchupMonId : uint8_t { LATCHUP_STATUS_REPORT = 0x01 };
|
enum class LatchupMonId : uint8_t { LATCHUP_STATUS_REPORT = 0x01 };
|
||||||
|
enum class DataLoggerId : uint8_t { COUNTERS_REPORT = 0x01 };
|
||||||
|
|
||||||
} // namespace tm
|
} // namespace tm
|
||||||
|
|
||||||
@ -327,7 +335,7 @@ static const uint8_t ADC_RPT_SET_ENTRIES = 32;
|
|||||||
static const uint32_t HK_SET_ID = HK_REPORT;
|
static const uint32_t HK_SET_ID = HK_REPORT;
|
||||||
static const uint32_t BOOT_REPORT_SET_ID = BOOT_STATUS_REPORT;
|
static const uint32_t BOOT_REPORT_SET_ID = BOOT_STATUS_REPORT;
|
||||||
static const uint32_t LATCHUP_RPT_ID = LATCHUP_REPORT;
|
static const uint32_t LATCHUP_RPT_ID = LATCHUP_REPORT;
|
||||||
static const uint32_t LOGGING_RPT_ID = LOGGING_REPORT;
|
static const uint32_t LOGGING_RPT_ID = COUNTERS_REPORT;
|
||||||
static const uint32_t ADC_REPORT_SET_ID = ADC_REPORT;
|
static const uint32_t ADC_REPORT_SET_ID = ADC_REPORT;
|
||||||
|
|
||||||
namespace timeout {
|
namespace timeout {
|
||||||
@ -417,13 +425,8 @@ enum PoolIds : lp_id_t {
|
|||||||
LATCHUP_RPT_TIME_MSEC,
|
LATCHUP_RPT_TIME_MSEC,
|
||||||
LATCHUP_RPT_IS_SET,
|
LATCHUP_RPT_IS_SET,
|
||||||
|
|
||||||
LATCHUP_HAPPENED_CNT_0,
|
SIGNATURE,
|
||||||
LATCHUP_HAPPENED_CNT_1,
|
LATCHUP_HAPPENED_CNTS,
|
||||||
LATCHUP_HAPPENED_CNT_2,
|
|
||||||
LATCHUP_HAPPENED_CNT_3,
|
|
||||||
LATCHUP_HAPPENED_CNT_4,
|
|
||||||
LATCHUP_HAPPENED_CNT_5,
|
|
||||||
LATCHUP_HAPPENED_CNT_6,
|
|
||||||
ADC_DEVIATION_TRIGGERS_CNT,
|
ADC_DEVIATION_TRIGGERS_CNT,
|
||||||
TC_RECEIVED_CNT,
|
TC_RECEIVED_CNT,
|
||||||
TM_AVAILABLE_CNT,
|
TM_AVAILABLE_CNT,
|
||||||
@ -432,40 +435,22 @@ enum PoolIds : lp_id_t {
|
|||||||
MPSOC_BOOT_FAILED_ATTEMPTS,
|
MPSOC_BOOT_FAILED_ATTEMPTS,
|
||||||
MPSOC_POWER_UP,
|
MPSOC_POWER_UP,
|
||||||
MPSOC_UPDATES,
|
MPSOC_UPDATES,
|
||||||
LAST_RECVD_TC,
|
MPSOC_HEARTBEAT_RESETS,
|
||||||
|
CPU_WDT_RESETS,
|
||||||
|
PS_HEARTBEATS_LOST,
|
||||||
|
PL_HEARTBEATS_LOST,
|
||||||
|
EB_TASK_LOST,
|
||||||
|
BM_TASK_LOST,
|
||||||
|
LM_TASK_LOST,
|
||||||
|
AM_TASK_LOST,
|
||||||
|
TCTMM_TASK_LOST,
|
||||||
|
MM_TASK_LOST,
|
||||||
|
HK_TASK_LOST,
|
||||||
|
DL_TASK_LOST,
|
||||||
|
RWS_TASKS_LOST,
|
||||||
|
|
||||||
ADC_RAW_0,
|
ADC_RAW,
|
||||||
ADC_RAW_1,
|
ADC_ENG,
|
||||||
ADC_RAW_2,
|
|
||||||
ADC_RAW_3,
|
|
||||||
ADC_RAW_4,
|
|
||||||
ADC_RAW_5,
|
|
||||||
ADC_RAW_6,
|
|
||||||
ADC_RAW_7,
|
|
||||||
ADC_RAW_8,
|
|
||||||
ADC_RAW_9,
|
|
||||||
ADC_RAW_10,
|
|
||||||
ADC_RAW_11,
|
|
||||||
ADC_RAW_12,
|
|
||||||
ADC_RAW_13,
|
|
||||||
ADC_RAW_14,
|
|
||||||
ADC_RAW_15,
|
|
||||||
ADC_ENG_0,
|
|
||||||
ADC_ENG_1,
|
|
||||||
ADC_ENG_2,
|
|
||||||
ADC_ENG_3,
|
|
||||||
ADC_ENG_4,
|
|
||||||
ADC_ENG_5,
|
|
||||||
ADC_ENG_6,
|
|
||||||
ADC_ENG_7,
|
|
||||||
ADC_ENG_8,
|
|
||||||
ADC_ENG_9,
|
|
||||||
ADC_ENG_10,
|
|
||||||
ADC_ENG_11,
|
|
||||||
ADC_ENG_12,
|
|
||||||
ADC_ENG_13,
|
|
||||||
ADC_ENG_14,
|
|
||||||
ADC_ENG_15
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TcParams : public ploc::SpTcParams {
|
struct TcParams : public ploc::SpTcParams {
|
||||||
@ -1814,26 +1799,16 @@ class LatchupStatusReport : public StaticLocalDataSet<LATCHUP_RPT_SET_ENTRIES> {
|
|||||||
/**
|
/**
|
||||||
* @brief This dataset stores the logging report.
|
* @brief This dataset stores the logging report.
|
||||||
*/
|
*/
|
||||||
class LoggingReport : public StaticLocalDataSet<LOGGING_RPT_SET_ENTRIES> {
|
class CountersReport : public StaticLocalDataSet<LOGGING_RPT_SET_ENTRIES> {
|
||||||
public:
|
public:
|
||||||
LoggingReport(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, LOGGING_RPT_ID) {}
|
CountersReport(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, LOGGING_RPT_ID) {}
|
||||||
|
|
||||||
LoggingReport(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, LOGGING_RPT_ID)) {}
|
CountersReport(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, LOGGING_RPT_ID)) {}
|
||||||
|
|
||||||
lp_var_t<uint32_t> latchupHappenCnt0 =
|
lp_var_t<uint32_t> signature =
|
||||||
lp_var_t<uint32_t>(sid.objectId, PoolIds::LATCHUP_HAPPENED_CNT_0, this);
|
lp_var_t<uint32_t>(sid.objectId, PoolIds::LATCHUP_HAPPENED_CNTS, this);
|
||||||
lp_var_t<uint32_t> latchupHappenCnt1 =
|
lp_vec_t<uint32_t, 7> latchupHappenCnts =
|
||||||
lp_var_t<uint32_t>(sid.objectId, PoolIds::LATCHUP_HAPPENED_CNT_1, this);
|
lp_vec_t<uint32_t, 7>(sid.objectId, PoolIds::LATCHUP_HAPPENED_CNTS, this);
|
||||||
lp_var_t<uint32_t> latchupHappenCnt2 =
|
|
||||||
lp_var_t<uint32_t>(sid.objectId, PoolIds::LATCHUP_HAPPENED_CNT_2, this);
|
|
||||||
lp_var_t<uint32_t> latchupHappenCnt3 =
|
|
||||||
lp_var_t<uint32_t>(sid.objectId, PoolIds::LATCHUP_HAPPENED_CNT_3, this);
|
|
||||||
lp_var_t<uint32_t> latchupHappenCnt4 =
|
|
||||||
lp_var_t<uint32_t>(sid.objectId, PoolIds::LATCHUP_HAPPENED_CNT_4, this);
|
|
||||||
lp_var_t<uint32_t> latchupHappenCnt5 =
|
|
||||||
lp_var_t<uint32_t>(sid.objectId, PoolIds::LATCHUP_HAPPENED_CNT_5, this);
|
|
||||||
lp_var_t<uint32_t> latchupHappenCnt6 =
|
|
||||||
lp_var_t<uint32_t>(sid.objectId, PoolIds::LATCHUP_HAPPENED_CNT_6, this);
|
|
||||||
lp_var_t<uint32_t> adcDeviationTriggersCnt =
|
lp_var_t<uint32_t> adcDeviationTriggersCnt =
|
||||||
lp_var_t<uint32_t>(sid.objectId, PoolIds::ADC_DEVIATION_TRIGGERS_CNT, this);
|
lp_var_t<uint32_t>(sid.objectId, PoolIds::ADC_DEVIATION_TRIGGERS_CNT, this);
|
||||||
lp_var_t<uint32_t> tcReceivedCnt =
|
lp_var_t<uint32_t> tcReceivedCnt =
|
||||||
@ -1847,23 +1822,31 @@ class LoggingReport : public StaticLocalDataSet<LOGGING_RPT_SET_ENTRIES> {
|
|||||||
lp_var_t<uint32_t>(sid.objectId, PoolIds::MPSOC_BOOT_FAILED_ATTEMPTS, this);
|
lp_var_t<uint32_t>(sid.objectId, PoolIds::MPSOC_BOOT_FAILED_ATTEMPTS, this);
|
||||||
lp_var_t<uint32_t> mpsocPowerup = lp_var_t<uint32_t>(sid.objectId, PoolIds::MPSOC_POWER_UP, this);
|
lp_var_t<uint32_t> mpsocPowerup = lp_var_t<uint32_t>(sid.objectId, PoolIds::MPSOC_POWER_UP, this);
|
||||||
lp_var_t<uint32_t> mpsocUpdates = lp_var_t<uint32_t>(sid.objectId, PoolIds::MPSOC_UPDATES, this);
|
lp_var_t<uint32_t> mpsocUpdates = lp_var_t<uint32_t>(sid.objectId, PoolIds::MPSOC_UPDATES, this);
|
||||||
lp_var_t<uint32_t> lastRecvdTc = lp_var_t<uint32_t>(sid.objectId, PoolIds::LAST_RECVD_TC, this);
|
lp_var_t<uint32_t> mpsocHeartbeatResets =
|
||||||
|
lp_var_t<uint32_t>(sid.objectId, PoolIds::MPSOC_HEARTBEAT_RESETS, this);
|
||||||
|
lp_var_t<uint32_t> cpuWdtResets =
|
||||||
|
lp_var_t<uint32_t>(sid.objectId, PoolIds::MPSOC_HEARTBEAT_RESETS, this);
|
||||||
|
lp_var_t<uint32_t> psHeartbeatsLost =
|
||||||
|
lp_var_t<uint32_t>(sid.objectId, PoolIds::PS_HEARTBEATS_LOST, this);
|
||||||
|
lp_var_t<uint32_t> plHeartbeatsLost =
|
||||||
|
lp_var_t<uint32_t>(sid.objectId, PoolIds::PL_HEARTBEATS_LOST, this);
|
||||||
|
lp_var_t<uint32_t> ebTaskLost = lp_var_t<uint32_t>(sid.objectId, PoolIds::EB_TASK_LOST, this);
|
||||||
|
lp_var_t<uint32_t> bmTaskLost = lp_var_t<uint32_t>(sid.objectId, PoolIds::BM_TASK_LOST, this);
|
||||||
|
lp_var_t<uint32_t> lmTaskLost = lp_var_t<uint32_t>(sid.objectId, PoolIds::LM_TASK_LOST, this);
|
||||||
|
lp_var_t<uint32_t> amTaskLost = lp_var_t<uint32_t>(sid.objectId, PoolIds::AM_TASK_LOST, this);
|
||||||
|
lp_var_t<uint32_t> tctmmTaskLost =
|
||||||
|
lp_var_t<uint32_t>(sid.objectId, PoolIds::TCTMM_TASK_LOST, this);
|
||||||
|
lp_var_t<uint32_t> mmTaskLost = lp_var_t<uint32_t>(sid.objectId, PoolIds::MM_TASK_LOST, this);
|
||||||
|
lp_var_t<uint32_t> hkTaskLost = lp_var_t<uint32_t>(sid.objectId, PoolIds::HK_TASK_LOST, this);
|
||||||
|
lp_var_t<uint32_t> dlTaskLost = lp_var_t<uint32_t>(sid.objectId, PoolIds::DL_TASK_LOST, this);
|
||||||
|
lp_vec_t<uint32_t, 3> rwsTasksLost =
|
||||||
|
lp_vec_t<uint32_t, 3>(sid.objectId, PoolIds::RWS_TASKS_LOST, this);
|
||||||
|
|
||||||
void printSet() {
|
void printSet() {
|
||||||
sif::info << "LoggingReport: Latchup happened count 0: " << this->latchupHappenCnt0
|
for (unsigned i = 0; i < 7; i++) {
|
||||||
<< std::endl;
|
sif::info << "LoggingReport: Latchup happened count " << i << ": "
|
||||||
sif::info << "LoggingReport: Latchup happened count 1: " << this->latchupHappenCnt1
|
<< this->latchupHappenCnts[i] << std::endl;
|
||||||
<< std::endl;
|
}
|
||||||
sif::info << "LoggingReport: Latchup happened count 2: " << this->latchupHappenCnt2
|
|
||||||
<< std::endl;
|
|
||||||
sif::info << "LoggingReport: Latchup happened count 3: " << this->latchupHappenCnt3
|
|
||||||
<< std::endl;
|
|
||||||
sif::info << "LoggingReport: Latchup happened count 4: " << this->latchupHappenCnt4
|
|
||||||
<< std::endl;
|
|
||||||
sif::info << "LoggingReport: Latchup happened count 5: " << this->latchupHappenCnt5
|
|
||||||
<< std::endl;
|
|
||||||
sif::info << "LoggingReport: Latchup happened count 6: " << this->latchupHappenCnt6
|
|
||||||
<< std::endl;
|
|
||||||
sif::info << "LoggingReport: ADC deviation triggers count: " << this->adcDeviationTriggersCnt
|
sif::info << "LoggingReport: ADC deviation triggers count: " << this->adcDeviationTriggersCnt
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
sif::info << "LoggingReport: TC received count: " << this->tcReceivedCnt << std::endl;
|
sif::info << "LoggingReport: TC received count: " << this->tcReceivedCnt << std::endl;
|
||||||
@ -1874,88 +1857,29 @@ class LoggingReport : public StaticLocalDataSet<LOGGING_RPT_SET_ENTRIES> {
|
|||||||
<< std::endl;
|
<< std::endl;
|
||||||
sif::info << "LoggingReport: MPSoC power up: " << this->mpsocPowerup << std::endl;
|
sif::info << "LoggingReport: MPSoC power up: " << this->mpsocPowerup << std::endl;
|
||||||
sif::info << "LoggingReport: MPSoC updates: " << this->mpsocUpdates << std::endl;
|
sif::info << "LoggingReport: MPSoC updates: " << this->mpsocUpdates << std::endl;
|
||||||
sif::info << "LoggingReport: APID of last received TC: 0x" << std::hex << this->lastRecvdTc
|
|
||||||
<< std::endl;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This dataset stores the ADC report.
|
* @brief This dataset stores the ADC report.
|
||||||
*/
|
*/
|
||||||
class AdcReport : public StaticLocalDataSet<ADC_RPT_SET_ENTRIES> {
|
class AdcReport : public StaticLocalDataSet<3> {
|
||||||
public:
|
public:
|
||||||
AdcReport(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, ADC_REPORT_SET_ID) {}
|
AdcReport(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, ADC_REPORT_SET_ID) {}
|
||||||
|
|
||||||
AdcReport(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, ADC_REPORT_SET_ID)) {}
|
AdcReport(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, ADC_REPORT_SET_ID)) {}
|
||||||
|
|
||||||
lp_var_t<uint16_t> adcRaw0 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_RAW_0, this);
|
lp_vec_t<uint16_t, 16> adcRaw = lp_vec_t<uint16_t, 16>(sid.objectId, PoolIds::ADC_RAW, this);
|
||||||
lp_var_t<uint16_t> adcRaw1 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_RAW_1, this);
|
lp_vec_t<uint16_t, 16> adcEng = lp_vec_t<uint16_t, 16>(sid.objectId, PoolIds::ADC_ENG, this);
|
||||||
lp_var_t<uint16_t> adcRaw2 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_RAW_2, this);
|
|
||||||
lp_var_t<uint16_t> adcRaw3 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_RAW_3, this);
|
|
||||||
lp_var_t<uint16_t> adcRaw4 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_RAW_4, this);
|
|
||||||
lp_var_t<uint16_t> adcRaw5 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_RAW_5, this);
|
|
||||||
lp_var_t<uint16_t> adcRaw6 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_RAW_6, this);
|
|
||||||
lp_var_t<uint16_t> adcRaw7 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_RAW_7, this);
|
|
||||||
lp_var_t<uint16_t> adcRaw8 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_RAW_8, this);
|
|
||||||
lp_var_t<uint16_t> adcRaw9 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_RAW_9, this);
|
|
||||||
lp_var_t<uint16_t> adcRaw10 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_RAW_10, this);
|
|
||||||
lp_var_t<uint16_t> adcRaw11 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_RAW_11, this);
|
|
||||||
lp_var_t<uint16_t> adcRaw12 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_RAW_12, this);
|
|
||||||
lp_var_t<uint16_t> adcRaw13 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_RAW_13, this);
|
|
||||||
lp_var_t<uint16_t> adcRaw14 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_RAW_14, this);
|
|
||||||
lp_var_t<uint16_t> adcRaw15 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_RAW_15, this);
|
|
||||||
lp_var_t<uint16_t> adcEng0 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_ENG_0, this);
|
|
||||||
lp_var_t<uint16_t> adcEng1 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_ENG_1, this);
|
|
||||||
lp_var_t<uint16_t> adcEng2 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_ENG_2, this);
|
|
||||||
lp_var_t<uint16_t> adcEng3 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_ENG_3, this);
|
|
||||||
lp_var_t<uint16_t> adcEng4 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_ENG_4, this);
|
|
||||||
lp_var_t<uint16_t> adcEng5 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_ENG_5, this);
|
|
||||||
lp_var_t<uint16_t> adcEng6 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_ENG_6, this);
|
|
||||||
lp_var_t<uint16_t> adcEng7 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_ENG_7, this);
|
|
||||||
lp_var_t<uint16_t> adcEng8 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_ENG_8, this);
|
|
||||||
lp_var_t<uint16_t> adcEng9 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_ENG_9, this);
|
|
||||||
lp_var_t<uint16_t> adcEng10 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_ENG_10, this);
|
|
||||||
lp_var_t<uint16_t> adcEng11 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_ENG_11, this);
|
|
||||||
lp_var_t<uint16_t> adcEng12 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_ENG_12, this);
|
|
||||||
lp_var_t<uint16_t> adcEng13 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_ENG_13, this);
|
|
||||||
lp_var_t<uint16_t> adcEng14 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_ENG_14, this);
|
|
||||||
lp_var_t<uint16_t> adcEng15 = lp_var_t<uint16_t>(sid.objectId, PoolIds::ADC_ENG_15, this);
|
|
||||||
|
|
||||||
void printSet() {
|
void printSet() {
|
||||||
sif::info << "---- Adc Report: Raw values ----" << std::endl;
|
sif::info << "---- Adc Report: Raw values ----" << std::endl;
|
||||||
sif::info << "AdcReport: ADC raw 0: " << std::dec << this->adcRaw0 << std::endl;
|
for (unsigned i = 0; i < 16; i++) {
|
||||||
sif::info << "AdcReport: ADC raw 1: " << this->adcRaw1 << std::endl;
|
sif::info << "AdcReport: ADC raw " << i << ": " << std::dec << this->adcRaw[i] << std::endl;
|
||||||
sif::info << "AdcReport: ADC raw 2: " << this->adcRaw2 << std::endl;
|
}
|
||||||
sif::info << "AdcReport: ADC raw 3: " << this->adcRaw3 << std::endl;
|
for (unsigned i = 0; i < 16; i++) {
|
||||||
sif::info << "AdcReport: ADC raw 4: " << this->adcRaw4 << std::endl;
|
sif::info << "AdcReport: ADC eng " << i << ": " << std::dec << this->adcEng[i] << std::endl;
|
||||||
sif::info << "AdcReport: ADC raw 5: " << this->adcRaw5 << std::endl;
|
}
|
||||||
sif::info << "AdcReport: ADC raw 6: " << this->adcRaw6 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC raw 7: " << this->adcRaw7 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC raw 8: " << this->adcRaw8 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC raw 9: " << this->adcRaw9 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC raw 10: " << this->adcRaw10 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC raw 11: " << this->adcRaw11 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC raw 12: " << this->adcRaw12 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC raw 13: " << this->adcRaw13 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC raw 14: " << this->adcRaw14 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC raw 15: " << this->adcRaw15 << std::endl;
|
|
||||||
sif::info << "---- Adc Report: Engineering values ----" << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC eng 0: " << this->adcEng0 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC eng 1: " << this->adcEng1 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC eng 2: " << this->adcEng2 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC eng 3: " << this->adcEng3 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC eng 4: " << this->adcEng4 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC eng 5: " << this->adcEng5 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC eng 6: " << this->adcEng6 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC eng 7: " << this->adcEng7 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC eng 8: " << this->adcEng8 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC eng 9: " << this->adcEng9 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC eng 10: " << this->adcEng10 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC eng 11: " << this->adcEng11 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC eng 12: " << this->adcEng12 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC eng 13: " << this->adcEng13 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC eng 14: " << this->adcEng14 << std::endl;
|
|
||||||
sif::info << "AdcReport: ADC eng 15: " << this->adcEng15 << std::endl;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2045,11 +1969,7 @@ class EnableNvms : public TcBase {
|
|||||||
*/
|
*/
|
||||||
class EnableAutoTm : public TcBase {
|
class EnableAutoTm : public TcBase {
|
||||||
public:
|
public:
|
||||||
EnableAutoTm(TcParams params) : TcBase(params) {
|
EnableAutoTm(TcParams params) : TcBase(params) { spParams.setFullPayloadLen(PAYLOAD_LENGTH + 2); }
|
||||||
spParams.setFullPayloadLen(PAYLOAD_LENGTH + 2);
|
|
||||||
// spParams.creator.setApid(APID_AUTO_TM);
|
|
||||||
// spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t buildPacket() {
|
ReturnValue_t buildPacket() {
|
||||||
auto res = checkSizeAndSerializeHeader();
|
auto res = checkSizeAndSerializeHeader();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user