Merge branch 'main' into persistent-tle-store
All checks were successful
EIVE/eive-obsw/pipeline/pr-dev-7.5.0 This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-dev-7.5.0 This commit looks good
This commit is contained in:
commit
3969d05476
4
.gitignore
vendored
4
.gitignore
vendored
@ -22,3 +22,7 @@ __pycache__
|
||||
!/.idea/cmake.xml
|
||||
|
||||
generators/*.db
|
||||
|
||||
# Clangd LSP
|
||||
/compile_commands.json
|
||||
/.cache
|
||||
|
31
CHANGELOG.md
31
CHANGELOG.md
@ -23,6 +23,30 @@ will consitute of a breaking change warranting a new major release:
|
||||
A filesystem change via `prefSD` on bootup, can lead to the TLE not being read, even
|
||||
though it is there.
|
||||
|
||||
## Changed
|
||||
|
||||
- Rewrote the PLOC Supervisor Handler, which is now based on a new device handler base class.
|
||||
Added ADC and Logging Counters telemetry set support.
|
||||
|
||||
## Fixed
|
||||
|
||||
- Increase allowed time for PTME writers to finish partial transfers. A duration of 200 ms was
|
||||
not sufficient for cases where 3 writers write concurrently.
|
||||
- Fixed state issue for PTME writer object where the writer was not reset properly after a timeout
|
||||
of a partial transfer. This was a major bug blocking the whole VC if it occured.
|
||||
- STR config path was previously hardcoded to `/mnt/sd0/startracker/flight-config.json`.
|
||||
A new abstraction was introduces which now uses the active SD card to build the correct
|
||||
config path when initializing the star tracker.
|
||||
|
||||
## Added
|
||||
|
||||
- PL PCDU: Add command to enable and disable channel order checks.
|
||||
- Added new PUS 15 subservice `DELETE_BY_TIME_RANGE` which allows to also specify a deletion
|
||||
start time when deleting packets from the persistent TM store.
|
||||
- Introduced a new `RELOAD_JSON_CFG_FILE` command for the STR to reload the JSON configuration
|
||||
data based on the current output of the config file path getter function. A reboot of the
|
||||
device is still necessary to load the configuration to the STR.
|
||||
|
||||
# [v7.3.0] 2023-11-07
|
||||
|
||||
## Changed
|
||||
@ -30,6 +54,7 @@ will consitute of a breaking change warranting a new major release:
|
||||
- Changed PDEC addresses depending on which firmware version is used. It is suspected that
|
||||
the previous addresses were invalid and not properly covered by the Linux memory protection.
|
||||
The OBSW will use the old addresses for older FW versions.
|
||||
- Reverted some STR ComIF behaviour back to an older software version.
|
||||
|
||||
## Added
|
||||
|
||||
@ -703,7 +728,7 @@ This is the version which will fly on the satellite for the initial launch phase
|
||||
This gives other tasks some time to register the SD cards being unusable, and therefore provides
|
||||
a way for them to perform any re-initialization tasks necessary after SD card switches.
|
||||
- TCS controller now only has an OFF mode and an ON mode
|
||||
- The TCS controller pauses operations related to the TCS board assembly (reading sensors and
|
||||
- The TCS controller pauses operations related to the TCS board assembly (reading sensors and
|
||||
the primary control loop) while a TCS board recovery is on-going.
|
||||
- Allow specifying custom OBSW update filename. This allowed keeping a cleaner file structure
|
||||
where each update has a name including the version
|
||||
@ -1768,8 +1793,8 @@ Syrlinks PR: PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/353
|
||||
- Syrlinks Handler: Read RX frequency shift as 24 bit signed number now. Also include
|
||||
validity handling for datasets.
|
||||
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/350
|
||||
- `GyroADIS1650XHandler`: Changed calculation of angular rate to be sensitivity based instead of
|
||||
max. range based, as previous fix still left an margin of error between ADIS16505 sensors
|
||||
- `GyroADIS1650XHandler`: Changed calculation of angular rate to be sensitivity based instead of
|
||||
max. range based, as previous fix still left an margin of error between ADIS16505 sensors
|
||||
and L3GD20 sensors.
|
||||
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/346
|
||||
|
||||
|
@ -19,8 +19,6 @@
|
||||
using namespace supv;
|
||||
using namespace returnvalue;
|
||||
|
||||
std::atomic_bool supv::SUPV_ON = false;
|
||||
|
||||
PlocSupervisorHandler::PlocSupervisorHandler(object_id_t objectId, CookieIF* comCookie,
|
||||
Gpio uartIsolatorSwitch, power::Switch_t powerSwitch,
|
||||
PlocSupvUartManager& supvHelper)
|
||||
@ -29,7 +27,7 @@ PlocSupervisorHandler::PlocSupervisorHandler(object_id_t objectId, CookieIF* com
|
||||
hkset(this),
|
||||
bootStatusReport(this),
|
||||
latchupStatusReport(this),
|
||||
loggingReport(this),
|
||||
countersReport(this),
|
||||
adcReport(this),
|
||||
powerSwitch(powerSwitch),
|
||||
uartManager(supvHelper) {
|
||||
@ -61,6 +59,19 @@ ReturnValue_t PlocSupervisorHandler::initialize() {
|
||||
}
|
||||
|
||||
void PlocSupervisorHandler::performOperationHook() {
|
||||
if (normalCommandIsPending and normalCmdCd.hasTimedOut()) {
|
||||
// Event, FDIR, printout? Leads to spam though and normally should not happen..
|
||||
normalCommandIsPending = false;
|
||||
}
|
||||
if (commandIsPending and cmdCd.hasTimedOut()) {
|
||||
// Event, FDIR, printout? Leads to spam though and normally should not happen..
|
||||
commandIsPending = false;
|
||||
|
||||
// if(iter->second.sendReplyTo != NO_COMMANDER) {
|
||||
// actionHelper.finish(true, iter->second.sendReplyTo, iter->first, returnvalue::OK);
|
||||
// }
|
||||
disableAllReplies();
|
||||
}
|
||||
EventMessage event;
|
||||
for (ReturnValue_t result = eventQueue->receiveMessage(&event); result == returnvalue::OK;
|
||||
result = eventQueue->receiveMessage(&event)) {
|
||||
@ -172,13 +183,16 @@ void PlocSupervisorHandler::doShutDown() {
|
||||
nextReplyId = supv::NONE;
|
||||
uartManager.stop();
|
||||
uartIsolatorSwitch.pullLow();
|
||||
disableAllReplies();
|
||||
supv::SUPV_ON = false;
|
||||
startupState = StartupState::OFF;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocSupervisorHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
|
||||
if (not commandIsExecuting(GET_HK_REPORT)) {
|
||||
if (not normalCommandIsPending) {
|
||||
*id = GET_HK_REPORT;
|
||||
normalCommandIsPending = true;
|
||||
normalCmdCd.resetTimer();
|
||||
return buildCommandFromCommand(*id, nullptr, 0);
|
||||
}
|
||||
return NOTHING_TO_SEND;
|
||||
@ -274,8 +288,7 @@ ReturnValue_t PlocSupervisorHandler::buildCommandFromCommand(DeviceCommandId_t d
|
||||
break;
|
||||
}
|
||||
case SET_GPIO: {
|
||||
prepareSetGpioCmd(commandData);
|
||||
result = returnvalue::OK;
|
||||
result = prepareSetGpioCmd(commandData, commandDataLen);
|
||||
break;
|
||||
}
|
||||
case FACTORY_RESET: {
|
||||
@ -283,8 +296,7 @@ ReturnValue_t PlocSupervisorHandler::buildCommandFromCommand(DeviceCommandId_t d
|
||||
break;
|
||||
}
|
||||
case READ_GPIO: {
|
||||
prepareReadGpioCmd(commandData);
|
||||
result = returnvalue::OK;
|
||||
result = prepareReadGpioCmd(commandData, commandDataLen);
|
||||
break;
|
||||
}
|
||||
case SET_SHUTDOWN_TIMEOUT: {
|
||||
@ -321,12 +333,25 @@ ReturnValue_t PlocSupervisorHandler::buildCommandFromCommand(DeviceCommandId_t d
|
||||
result = prepareWipeMramCmd(commandData);
|
||||
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:
|
||||
sif::debug << "PlocSupervisorHandler::buildCommandFromCommand: Command not implemented"
|
||||
<< std::endl;
|
||||
result = DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
|
||||
break;
|
||||
}
|
||||
commandIsPending = true;
|
||||
cmdCd.resetTimer();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -358,6 +383,8 @@ void PlocSupervisorHandler::fillCommandAndReplyMap() {
|
||||
insertInCommandMap(SET_ADC_THRESHOLD);
|
||||
insertInCommandMap(SET_ADC_WINDOW_AND_STRIDE);
|
||||
insertInCommandMap(RESET_PL);
|
||||
insertInCommandMap(REQUEST_ADC_REPORT);
|
||||
insertInCommandMap(REQUEST_LOGGING_COUNTERS);
|
||||
|
||||
// ACK replies, use countdown for them
|
||||
insertInReplyMap(ACK_REPORT, 0, nullptr, SIZE_ACK_REPORT, false, &acknowledgementReportTimeout);
|
||||
@ -368,7 +395,7 @@ void PlocSupervisorHandler::fillCommandAndReplyMap() {
|
||||
insertInReplyMap(HK_REPORT, 3, &hkset);
|
||||
insertInReplyMap(BOOT_STATUS_REPORT, 3, &bootStatusReport, SIZE_BOOT_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);
|
||||
}
|
||||
|
||||
@ -410,13 +437,13 @@ ReturnValue_t PlocSupervisorHandler::enableReplyInReplyMap(DeviceCommandMap::ite
|
||||
}
|
||||
break;
|
||||
}
|
||||
case LOGGING_REQUEST_COUNTERS: {
|
||||
case REQUEST_LOGGING_COUNTERS: {
|
||||
enabledReplies = 3;
|
||||
result =
|
||||
DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true, LOGGING_REPORT);
|
||||
DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true, COUNTERS_REPORT);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::debug << "PlocSupervisorHandler::enableReplyInReplyMap: Reply with id "
|
||||
<< LOGGING_REPORT << " not in replyMap" << std::endl;
|
||||
<< COUNTERS_REPORT << " not in replyMap" << std::endl;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -541,6 +568,9 @@ ReturnValue_t PlocSupervisorHandler::scanForReply(const uint8_t* start, size_t r
|
||||
}
|
||||
case (Apid::HK): {
|
||||
if (tmReader.getServiceId() == static_cast<uint8_t>(supv::tm::HkId::REPORT)) {
|
||||
normalCommandIsPending = false;
|
||||
// Yeah apparently this is needed??
|
||||
disableCommand(GET_HK_REPORT);
|
||||
*foundLen = tmReader.getFullPacketLen();
|
||||
*foundId = ReplyId::HK_REPORT;
|
||||
return OK;
|
||||
@ -559,6 +589,14 @@ ReturnValue_t PlocSupervisorHandler::scanForReply(const uint8_t* start, size_t r
|
||||
}
|
||||
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): {
|
||||
if (tmReader.getServiceId() ==
|
||||
static_cast<uint8_t>(supv::tm::MemManId::UPDATE_STATUS_REPORT)) {
|
||||
@ -566,6 +604,15 @@ ReturnValue_t PlocSupervisorHandler::scanForReply(const uint8_t* start, size_t r
|
||||
*foundId = ReplyId::UPDATE_STATUS_REPORT;
|
||||
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());
|
||||
@ -578,6 +625,14 @@ void PlocSupervisorHandler::handlePacketPrint() {
|
||||
if ((tmReader.getServiceId() == static_cast<uint8_t>(supv::tm::TmtcId::ACK)) or
|
||||
(tmReader.getServiceId() == static_cast<uint8_t>(supv::tm::TmtcId::NAK))) {
|
||||
AcknowledgmentReport ack(tmReader);
|
||||
ReturnValue_t result = ack.parse();
|
||||
if (result != returnvalue::OK) {
|
||||
sif::warning << "PlocSupervisorHandler: Parsing ACK failed" << std::endl;
|
||||
}
|
||||
if (REDUCE_NORMAL_MODE_PRINTOUT and ack.getRefModuleApid() == (uint8_t)supv::Apid::HK and
|
||||
ack.getRefServiceId() == (uint8_t)supv::tc::HkId::GET_REPORT) {
|
||||
return;
|
||||
}
|
||||
const char* printStr = "???";
|
||||
if (tmReader.getServiceId() == static_cast<uint8_t>(supv::tm::TmtcId::ACK)) {
|
||||
printStr = "ACK";
|
||||
@ -592,7 +647,15 @@ void PlocSupervisorHandler::handlePacketPrint() {
|
||||
} else if ((tmReader.getServiceId() == static_cast<uint8_t>(supv::tm::TmtcId::EXEC_ACK)) or
|
||||
(tmReader.getServiceId() == static_cast<uint8_t>(supv::tm::TmtcId::EXEC_NAK))) {
|
||||
ExecutionReport exe(tmReader);
|
||||
ReturnValue_t result = exe.parse();
|
||||
if (result != returnvalue::OK) {
|
||||
sif::warning << "PlocSupervisorHandler: Parsing EXE failed" << std::endl;
|
||||
}
|
||||
const char* printStr = "???";
|
||||
if (REDUCE_NORMAL_MODE_PRINTOUT and exe.getRefModuleApid() == (uint8_t)supv::Apid::HK and
|
||||
exe.getRefServiceId() == (uint8_t)supv::tc::HkId::GET_REPORT) {
|
||||
return;
|
||||
}
|
||||
if (tmReader.getServiceId() == static_cast<uint8_t>(supv::tm::TmtcId::EXEC_ACK)) {
|
||||
printStr = "ACK EXE";
|
||||
|
||||
@ -627,12 +690,22 @@ ReturnValue_t PlocSupervisorHandler::interpretDeviceReply(DeviceCommandId_t id,
|
||||
result = handleBootStatusReport(packet);
|
||||
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): {
|
||||
result = handleLatchupStatusReport(packet);
|
||||
break;
|
||||
}
|
||||
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;
|
||||
}
|
||||
case (EXE_REPORT): {
|
||||
@ -697,13 +770,8 @@ ReturnValue_t PlocSupervisorHandler::initializeLocalDataPool(localpool::DataPool
|
||||
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_HAPPENED_CNT_0, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(supv::LATCHUP_HAPPENED_CNT_1, new PoolEntry<uint32_t>({0}));
|
||||
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::SIGNATURE, new PoolEntry<uint32_t>());
|
||||
localDataPoolMap.emplace(supv::LATCHUP_HAPPENED_CNTS, &latchupCounters);
|
||||
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::TM_AVAILABLE_CNT, new PoolEntry<uint32_t>({0}));
|
||||
@ -712,41 +780,22 @@ ReturnValue_t PlocSupervisorHandler::initializeLocalDataPool(localpool::DataPool
|
||||
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_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_1, new PoolEntry<uint16_t>({0}));
|
||||
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}));
|
||||
localDataPoolMap.emplace(supv::ADC_RAW, &adcRawEntry);
|
||||
localDataPoolMap.emplace(supv::ADC_ENG, &adcEngEntry);
|
||||
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(hkset.getSid(), false, 10.0));
|
||||
@ -871,6 +920,7 @@ ReturnValue_t PlocSupervisorHandler::handleExecutionReport(const uint8_t* data)
|
||||
} else if (tmReader.getServiceId() == static_cast<uint8_t>(supv::tm::TmtcId::EXEC_NAK)) {
|
||||
handleExecutionFailureReport(report);
|
||||
}
|
||||
commandIsPending = false;
|
||||
nextReplyId = supv::NONE;
|
||||
return result;
|
||||
}
|
||||
@ -1105,37 +1155,31 @@ ReturnValue_t PlocSupervisorHandler::handleLatchupStatusReport(const uint8_t* da
|
||||
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;
|
||||
|
||||
result = verifyPacket(data, supv::SIZE_ADC_REPORT);
|
||||
result = verifyPacket(data, tmReader.getFullPacketLen());
|
||||
|
||||
if (result == result::CRC_FAILURE) {
|
||||
sif::error << "PlocSupervisorHandler::handleAdcReport: ADC report has "
|
||||
<< "invalid crc" << std::endl;
|
||||
sif::warning << "PlocSupervisorHandler: " << contextString << " report has "
|
||||
<< "invalid CRC" << std::endl;
|
||||
return result;
|
||||
}
|
||||
|
||||
const uint8_t* dataField = data + supv::PAYLOAD_OFFSET;
|
||||
result = adcReport.read();
|
||||
if (result != returnvalue::OK) {
|
||||
PoolReadGuard pg(&set);
|
||||
if (pg.getReadResult() != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
adcReport.setValidityBufferGeneration(false);
|
||||
size_t size = adcReport.getSerializedSize();
|
||||
result = adcReport.deSerialize(&dataField, &size, SerializeIF::Endianness::BIG);
|
||||
set.setValidityBufferGeneration(false);
|
||||
size_t size = set.getSerializedSize();
|
||||
result = set.deSerialize(&dataField, &size, SerializeIF::Endianness::BIG);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::warning << "PlocSupervisorHandler::handleAdcReport: Deserialization failed" << std::endl;
|
||||
sif::warning << "PlocSupervisorHandler: Deserialization failed" << std::endl;
|
||||
}
|
||||
adcReport.setValidityBufferGeneration(true);
|
||||
adcReport.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
|
||||
set.setValidityBufferGeneration(true);
|
||||
set.setValidity(true, true);
|
||||
nextReplyId = supv::EXE_REPORT;
|
||||
return result;
|
||||
}
|
||||
@ -1157,8 +1201,8 @@ void PlocSupervisorHandler::setNextReplyId() {
|
||||
case supv::CONSECUTIVE_MRAM_DUMP:
|
||||
nextReplyId = supv::CONSECUTIVE_MRAM_DUMP;
|
||||
break;
|
||||
case supv::LOGGING_REQUEST_COUNTERS:
|
||||
nextReplyId = supv::LOGGING_REPORT;
|
||||
case supv::REQUEST_LOGGING_COUNTERS:
|
||||
nextReplyId = supv::COUNTERS_REPORT;
|
||||
break;
|
||||
case supv::REQUEST_ADC_REPORT:
|
||||
nextReplyId = supv::ADC_REPORT;
|
||||
@ -1407,7 +1451,11 @@ ReturnValue_t PlocSupervisorHandler::prepareRunAutoEmTest(const uint8_t* command
|
||||
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 pin = *(commandData + 1);
|
||||
uint8_t val = *(commandData + 2);
|
||||
@ -1420,7 +1468,11 @@ ReturnValue_t PlocSupervisorHandler::prepareSetGpioCmd(const uint8_t* commandDat
|
||||
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 pin = *(commandData + 1);
|
||||
supv::ReadGpio packet(spParams);
|
||||
@ -1466,6 +1518,7 @@ ReturnValue_t PlocSupervisorHandler::prepareSetShutdownTimeoutCmd(const uint8_t*
|
||||
sif::warning
|
||||
<< "PlocSupervisorHandler::prepareSetShutdownTimeoutCmd: Failed to deserialize timeout"
|
||||
<< std::endl;
|
||||
return result;
|
||||
}
|
||||
supv::SetShutdownTimeout packet(spParams);
|
||||
result = packet.buildPacket(timeout);
|
||||
@ -1517,8 +1570,8 @@ void PlocSupervisorHandler::disableAllReplies() {
|
||||
disableReply(LATCHUP_REPORT);
|
||||
break;
|
||||
}
|
||||
case LOGGING_REQUEST_COUNTERS: {
|
||||
disableReply(LOGGING_REPORT);
|
||||
case REQUEST_LOGGING_COUNTERS: {
|
||||
disableReply(COUNTERS_REPORT);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
@ -1532,6 +1585,9 @@ void PlocSupervisorHandler::disableAllReplies() {
|
||||
|
||||
void PlocSupervisorHandler::disableReply(DeviceCommandId_t replyId) {
|
||||
DeviceReplyMap::iterator iter = deviceReplyMap.find(replyId);
|
||||
if (iter == deviceReplyMap.end()) {
|
||||
return;
|
||||
}
|
||||
DeviceReplyInfo* info = &(iter->second);
|
||||
info->delayCycles = 0;
|
||||
info->active = false;
|
||||
@ -1562,6 +1618,9 @@ void PlocSupervisorHandler::sendFailureReport(DeviceCommandId_t replyId, ReturnV
|
||||
|
||||
void PlocSupervisorHandler::disableExeReportReply() {
|
||||
DeviceReplyIter iter = deviceReplyMap.find(supv::EXE_REPORT);
|
||||
if (iter == deviceReplyMap.end()) {
|
||||
return;
|
||||
}
|
||||
DeviceReplyInfo* info = &(iter->second);
|
||||
info->delayCycles = 0;
|
||||
info->command = deviceCommandMap.end();
|
||||
@ -1584,7 +1643,9 @@ ReturnValue_t PlocSupervisorHandler::handleMramDumpPacket(DeviceCommandId_t id)
|
||||
result = handleMramDumpFile(id);
|
||||
if (result != returnvalue::OK) {
|
||||
DeviceCommandMap::iterator iter = deviceCommandMap.find(id);
|
||||
actionHelper.finish(false, iter->second.sendReplyTo, id, result);
|
||||
if (iter != deviceCommandMap.end()) {
|
||||
actionHelper.finish(false, iter->second.sendReplyTo, id, result);
|
||||
}
|
||||
disableAllReplies();
|
||||
nextReplyId = supv::NONE;
|
||||
return result;
|
||||
@ -1851,7 +1912,12 @@ ReturnValue_t PlocSupervisorHandler::eventSubscription() {
|
||||
|
||||
ReturnValue_t PlocSupervisorHandler::handleExecutionSuccessReport(ExecutionReport& report) {
|
||||
DeviceCommandId_t commandId = getPendingCommand();
|
||||
ReturnValue_t result = OK;
|
||||
DeviceCommandMap::iterator iter = deviceCommandMap.find(commandId);
|
||||
if (iter != deviceCommandMap.end() and iter->second.sendReplyTo != NO_COMMANDER) {
|
||||
actionHelper.finish(true, iter->second.sendReplyTo, iter->first, returnvalue::OK);
|
||||
iter->second.isExecuting = false;
|
||||
}
|
||||
commandIsPending = false;
|
||||
switch (commandId) {
|
||||
case supv::READ_GPIO: {
|
||||
// TODO: Fix
|
||||
@ -1859,14 +1925,13 @@ ReturnValue_t PlocSupervisorHandler::handleExecutionSuccessReport(ExecutionRepor
|
||||
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
||||
sif::info << "PlocSupervisorHandler: Read GPIO TM, State: " << gpioState << std::endl;
|
||||
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
||||
DeviceCommandMap::iterator iter = deviceCommandMap.find(commandId);
|
||||
if (iter->second.sendReplyTo == NO_COMMAND_ID) {
|
||||
if (iter != deviceCommandMap.end() and iter->second.sendReplyTo == NO_COMMAND_ID) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
uint8_t data[sizeof(gpioState)];
|
||||
size_t size = 0;
|
||||
result = SerializeAdapter::serialize(&gpioState, data, &size, sizeof(gpioState),
|
||||
SerializeIF::Endianness::BIG);
|
||||
ReturnValue_t result = SerializeAdapter::serialize(&gpioState, data, &size, sizeof(gpioState),
|
||||
SerializeIF::Endianness::BIG);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::debug << "PlocSupervisorHandler: Failed to deserialize GPIO state" << std::endl;
|
||||
}
|
||||
@ -1942,6 +2007,11 @@ uint32_t PlocSupervisorHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t mod
|
||||
return 7000;
|
||||
}
|
||||
|
||||
void PlocSupervisorHandler::disableCommand(DeviceCommandId_t cmd) {
|
||||
auto commandIter = deviceCommandMap.find(GET_HK_REPORT);
|
||||
commandIter->second.isExecuting = false;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocSupervisorHandler::checkModeCommand(Mode_t commandedMode,
|
||||
Submode_t commandedSubmode,
|
||||
uint32_t* msToReachTheMode) {
|
@ -20,7 +20,8 @@
|
||||
using supv::ExecutionReport;
|
||||
using supv::TcBase;
|
||||
|
||||
static constexpr bool DEBUG_PLOC_SUPV = false;
|
||||
static constexpr bool DEBUG_PLOC_SUPV = true;
|
||||
static constexpr bool REDUCE_NORMAL_MODE_PRINTOUT = true;
|
||||
|
||||
/**
|
||||
* @brief This is the device handler for the supervisor of the PLOC which is programmed by
|
||||
@ -67,26 +68,6 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
||||
void doOffActivity() override;
|
||||
|
||||
private:
|
||||
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_SUPERVISOR_HANDLER;
|
||||
|
||||
//! [EXPORT] : [COMMENT] PLOC supervisor crc failure in telemetry packet
|
||||
static const Event SUPV_MEMORY_READ_RPT_CRC_FAILURE = MAKE_EVENT(1, severity::LOW);
|
||||
//! [EXPORT] : [COMMENT] Unhandled event. P1: APID, P2: Service ID
|
||||
static constexpr Event SUPV_UNKNOWN_TM = MAKE_EVENT(2, severity::LOW);
|
||||
static constexpr Event SUPV_UNINIMPLEMENTED_TM = MAKE_EVENT(3, severity::LOW);
|
||||
//! [EXPORT] : [COMMENT] PLOC supervisor received acknowledgment failure report
|
||||
static const Event SUPV_ACK_FAILURE = MAKE_EVENT(4, severity::LOW);
|
||||
//! [EXPORT] : [COMMENT] PLOC received execution failure report
|
||||
//! P1: ID of command for which the execution failed
|
||||
//! P2: Status code sent by the supervisor handler
|
||||
static const Event SUPV_EXE_FAILURE = MAKE_EVENT(5, severity::LOW);
|
||||
//! [EXPORT] : [COMMENT] PLOC supervisor reply has invalid crc
|
||||
static const Event SUPV_CRC_FAILURE_EVENT = MAKE_EVENT(6, severity::LOW);
|
||||
//! [EXPORT] : [COMMENT] Supervisor helper currently executing a command
|
||||
static const Event SUPV_HELPER_EXECUTING = MAKE_EVENT(7, severity::LOW);
|
||||
//! [EXPORT] : [COMMENT] Failed to build the command to shutdown the MPSoC
|
||||
static const Event SUPV_MPSOC_SHUTDOWN_BUILD_FAILED = MAKE_EVENT(8, severity::LOW);
|
||||
|
||||
static const uint16_t APID_MASK = 0x7FF;
|
||||
static const uint16_t PACKET_SEQUENCE_COUNT_MASK = 0x3FFF;
|
||||
static const uint8_t EXE_STATUS_OFFSET = 10;
|
||||
@ -94,15 +75,14 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
||||
// 5 s
|
||||
static const uint32_t EXECUTION_DEFAULT_TIMEOUT = 5000;
|
||||
// 70 S
|
||||
static const uint32_t ACKNOWLEDGE_DEFAULT_TIMEOUT = 70000;
|
||||
static const uint32_t ACKNOWLEDGE_DEFAULT_TIMEOUT = 5000;
|
||||
// 60 s
|
||||
static const uint32_t MRAM_DUMP_EXECUTION_TIMEOUT = 60000;
|
||||
// 70 s
|
||||
static const uint32_t COPY_ADC_TO_MRAM_TIMEOUT = 70000;
|
||||
// 60 s
|
||||
static const uint32_t MRAM_DUMP_TIMEOUT = 60000;
|
||||
// 4 s
|
||||
static const uint32_t BOOT_TIMEOUT = 4000;
|
||||
|
||||
enum class StartupState : uint8_t {
|
||||
OFF,
|
||||
BOOTING,
|
||||
@ -131,11 +111,18 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
||||
LinuxLibgpioIF* gpioComIF = nullptr;
|
||||
Gpio uartIsolatorSwitch;
|
||||
bool shutdownCmdSent = false;
|
||||
// Yeah, I am using an extra variable because I once again don't know
|
||||
// what the hell the base class is doing and I don't care anymore.
|
||||
bool normalCommandIsPending = false;
|
||||
// True men implement their reply timeout handling themselves!
|
||||
Countdown normalCmdCd = Countdown(2000);
|
||||
bool commandIsPending = false;
|
||||
Countdown cmdCd = Countdown(2000);
|
||||
|
||||
supv::HkSet hkset;
|
||||
supv::BootStatusReport bootStatusReport;
|
||||
supv::LatchupStatusReport latchupStatusReport;
|
||||
supv::LoggingReport loggingReport;
|
||||
supv::CountersReport countersReport;
|
||||
supv::AdcReport adcReport;
|
||||
|
||||
const power::Switch_t powerSwitch = power::NO_SWITCH;
|
||||
@ -164,9 +151,12 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
||||
Countdown executionReportTimeout = Countdown(EXECUTION_DEFAULT_TIMEOUT, false);
|
||||
Countdown acknowledgementReportTimeout = Countdown(ACKNOWLEDGE_DEFAULT_TIMEOUT, false);
|
||||
// Vorago nees some time to boot properly
|
||||
Countdown bootTimeout = Countdown(BOOT_TIMEOUT);
|
||||
Countdown bootTimeout = Countdown(supv::BOOT_TIMEOUT_MS);
|
||||
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> bootStateEntry = PoolEntry<uint8_t>(1);
|
||||
PoolEntry<uint8_t> bootCyclesEntry = PoolEntry<uint8_t>(1);
|
||||
@ -231,8 +221,13 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
||||
ReturnValue_t handleBootStatusReport(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);
|
||||
ReturnValue_t handleAdcReport(const uint8_t* data);
|
||||
ReturnValue_t genericHandleTm(const char* contextString, const uint8_t* data,
|
||||
LocalPoolDataSetBase& set);
|
||||
|
||||
void disableCommand(DeviceCommandId_t cmd);
|
||||
|
||||
/**
|
||||
* @brief Depending on the current active command, this function sets the reply id of the
|
||||
@ -301,8 +296,8 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
||||
ReturnValue_t prepareSetAdcThresholdCmd(const uint8_t* commandData);
|
||||
ReturnValue_t prepareRunAutoEmTest(const uint8_t* commandData);
|
||||
ReturnValue_t prepareWipeMramCmd(const uint8_t* commandData);
|
||||
ReturnValue_t prepareSetGpioCmd(const uint8_t* commandData);
|
||||
ReturnValue_t prepareReadGpioCmd(const uint8_t* commandData);
|
||||
ReturnValue_t prepareSetGpioCmd(const uint8_t* commandData, size_t commandDataLen);
|
||||
ReturnValue_t prepareReadGpioCmd(const uint8_t* commandData, size_t commandDataLen);
|
||||
|
||||
/**
|
||||
* @brief Copies the content of a space packet to the command buffer.
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 315 translations.
|
||||
* @brief Auto-generated event translation file. Contains 317 translations.
|
||||
* @details
|
||||
* Generated on: 2023-10-27 14:24:05
|
||||
* Generated on: 2023-11-29 15:14:46
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -157,6 +157,8 @@ const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
|
||||
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
|
||||
const char *SUPV_HELPER_EXECUTING_STRING = "SUPV_HELPER_EXECUTING";
|
||||
const char *SUPV_MPSOC_SHUTDOWN_BUILD_FAILED_STRING = "SUPV_MPSOC_SHUTDOWN_BUILD_FAILED";
|
||||
const char *SUPV_ACK_UNKNOWN_COMMAND_STRING = "SUPV_ACK_UNKNOWN_COMMAND";
|
||||
const char *SUPV_EXE_ACK_UNKNOWN_COMMAND_STRING = "SUPV_EXE_ACK_UNKNOWN_COMMAND";
|
||||
const char *SANITIZATION_FAILED_STRING = "SANITIZATION_FAILED";
|
||||
const char *MOUNTED_SD_CARD_STRING = "MOUNTED_SD_CARD";
|
||||
const char *SEND_MRAM_DUMP_FAILED_STRING = "SEND_MRAM_DUMP_FAILED";
|
||||
@ -627,6 +629,10 @@ const char *translateEvents(Event event) {
|
||||
return SUPV_HELPER_EXECUTING_STRING;
|
||||
case (12008):
|
||||
return SUPV_MPSOC_SHUTDOWN_BUILD_FAILED_STRING;
|
||||
case (12009):
|
||||
return SUPV_ACK_UNKNOWN_COMMAND_STRING;
|
||||
case (12010):
|
||||
return SUPV_EXE_ACK_UNKNOWN_COMMAND_STRING;
|
||||
case (12100):
|
||||
return SANITIZATION_FAILED_STRING;
|
||||
case (12101):
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 175 translations.
|
||||
* Generated on: 2023-10-27 14:24:05
|
||||
* Generated on: 2023-11-29 15:14:46
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
|
@ -38,9 +38,9 @@
|
||||
|
||||
#include "devices/gpioIds.h"
|
||||
#include "fsfw_hal/linux/gpio/Gpio.h"
|
||||
#include "linux/payload/FreshSupvHandler.h"
|
||||
#include "linux/payload/PlocMpsocHandler.h"
|
||||
#include "linux/payload/PlocMpsocSpecialComHelper.h"
|
||||
#include "linux/payload/PlocSupervisorHandler.h"
|
||||
#include "linux/payload/PlocSupvUartMan.h"
|
||||
#include "test/gpio/DummyGpioIF.h"
|
||||
#endif
|
||||
@ -97,10 +97,11 @@ void ObjectFactory::produce(void* args) {
|
||||
new SerialCookie(objects::PLOC_SUPERVISOR_HANDLER, plocSupvString, uart::PLOC_SUPV_BAUD,
|
||||
supv::MAX_PACKET_SIZE * 20, UartModes::NON_CANONICAL);
|
||||
supervisorCookie->setNoFixedSizeReply();
|
||||
auto supvHelper = new PlocSupvUartManager(objects::PLOC_SUPERVISOR_HELPER);
|
||||
new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, supervisorCookie,
|
||||
Gpio(gpioIds::ENABLE_SUPV_UART, dummyGpioIF), pcdu::PDU1_CH6_PLOC_12V,
|
||||
*supvHelper);
|
||||
new PlocSupvUartManager(objects::PLOC_SUPERVISOR_HELPER);
|
||||
DhbConfig dhbConf(objects::PLOC_SUPERVISOR_HANDLER);
|
||||
auto* supvHandler =
|
||||
new FreshSupvHandler(dhbConf, supervisorCookie, Gpio(gpioIds::ENABLE_SUPV_UART, dummyGpioIF),
|
||||
dummySwitcher, power::PDU1_CH6_PLOC_12V);
|
||||
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
||||
#endif
|
||||
|
||||
|
@ -25,3 +25,4 @@ add_subdirectory(memory)
|
||||
add_subdirectory(callbacks)
|
||||
add_subdirectory(xadc)
|
||||
add_subdirectory(fs)
|
||||
add_subdirectory(acs)
|
||||
|
1
bsp_q7s/acs/CMakeLists.txt
Normal file
1
bsp_q7s/acs/CMakeLists.txt
Normal file
@ -0,0 +1 @@
|
||||
# target_sources(${OBSW_NAME} PUBLIC <Source File List>)
|
23
bsp_q7s/acs/StrConfigPathGetter.h
Normal file
23
bsp_q7s/acs/StrConfigPathGetter.h
Normal file
@ -0,0 +1,23 @@
|
||||
#include <optional>
|
||||
|
||||
#include "bsp_q7s/fs/SdCardManager.h"
|
||||
#include "mission/acs/str/strHelpers.h"
|
||||
|
||||
class StrConfigPathGetter : public startracker::SdCardConfigPathGetter {
|
||||
public:
|
||||
StrConfigPathGetter(SdCardManager& sdcMan) : sdcMan(sdcMan) {}
|
||||
|
||||
std::optional<std::string> getCfgPath() override {
|
||||
if (!sdcMan.isSdCardUsable(std::nullopt)) {
|
||||
return std::nullopt;
|
||||
}
|
||||
if (sdcMan.getActiveSdCard() == sd::SdCard::SLOT_1) {
|
||||
return std::string("/mnt/sd1/startracker/flight-config.json");
|
||||
} else {
|
||||
return std::string("/mnt/sd0/startracker/flight-config.json");
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
SdCardManager& sdcMan;
|
||||
};
|
@ -152,7 +152,7 @@ void ObjectFactory::produce(void* args) {
|
||||
#endif
|
||||
|
||||
#if OBSW_ADD_STAR_TRACKER == 1
|
||||
createStrComponents(pwrSwitcher);
|
||||
createStrComponents(pwrSwitcher, *SdCardManager::instance());
|
||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||
|
||||
#if OBSW_ADD_PL_PCDU == 1
|
||||
|
@ -109,7 +109,7 @@ void ObjectFactory::produce(void* args) {
|
||||
createPayloadComponents(gpioComIF, *pwrSwitcher);
|
||||
|
||||
#if OBSW_ADD_STAR_TRACKER == 1
|
||||
createStrComponents(pwrSwitcher);
|
||||
createStrComponents(pwrSwitcher, *SdCardManager::instance());
|
||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||
|
||||
#if OBSW_ADD_CCSDS_IP_CORES == 1
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include <linux/payload/PlocMemoryDumper.h>
|
||||
#include <linux/payload/PlocMpsocHandler.h>
|
||||
#include <linux/payload/PlocMpsocSpecialComHelper.h>
|
||||
#include <linux/payload/PlocSupervisorHandler.h>
|
||||
#include <linux/payload/ScexUartReader.h>
|
||||
#include <linux/payload/plocMpsocHelpers.h>
|
||||
#include <linux/power/CspComIF.h>
|
||||
@ -37,6 +36,7 @@
|
||||
#include <cstring>
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
#include "bsp_q7s/acs/StrConfigPathGetter.h"
|
||||
#include "bsp_q7s/boardtest/Q7STestTask.h"
|
||||
#include "bsp_q7s/callbacks/gnssCallback.h"
|
||||
#include "bsp_q7s/callbacks/pcduSwitchCb.h"
|
||||
@ -60,6 +60,7 @@
|
||||
#include "linux/ipcore/PdecHandler.h"
|
||||
#include "linux/ipcore/Ptme.h"
|
||||
#include "linux/ipcore/PtmeConfig.h"
|
||||
#include "linux/payload/FreshSupvHandler.h"
|
||||
#include "mission/config/configfile.h"
|
||||
#include "mission/system/acs/AcsBoardFdir.h"
|
||||
#include "mission/system/acs/AcsSubsystem.h"
|
||||
@ -612,11 +613,11 @@ void ObjectFactory::createSyrlinksComponents(PowerSwitchIF* pwrSwitcher) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF& pwrSwitch) {
|
||||
void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF& pwrSwitcher) {
|
||||
using namespace gpio;
|
||||
std::stringstream consumer;
|
||||
auto* camSwitcher =
|
||||
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, power::PDU2_CH8_PAYLOAD_CAMERA);
|
||||
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitcher, power::PDU2_CH8_PAYLOAD_CAMERA);
|
||||
camSwitcher->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
||||
#if OBSW_ADD_PLOC_MPSOC == 1
|
||||
consumer << "0x" << std::hex << objects::PLOC_MPSOC_HANDLER;
|
||||
@ -650,11 +651,11 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwit
|
||||
new SerialCookie(objects::PLOC_SUPERVISOR_HANDLER, plocSupvDev, serial::PLOC_SUPV_BAUD,
|
||||
supv::MAX_PACKET_SIZE * 20, UartModes::NON_CANONICAL);
|
||||
supervisorCookie->setNoFixedSizeReply();
|
||||
auto supvHelper = new PlocSupvUartManager(objects::PLOC_SUPERVISOR_HELPER);
|
||||
auto* supvHandler = new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, supervisorCookie,
|
||||
Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF),
|
||||
power::PDU1_CH6_PLOC_12V, *supvHelper);
|
||||
supvHandler->setPowerSwitcher(&pwrSwitch);
|
||||
new PlocSupvUartManager(objects::PLOC_SUPERVISOR_HELPER);
|
||||
DhbConfig dhbConf(objects::PLOC_SUPERVISOR_HANDLER);
|
||||
auto* supvHandler =
|
||||
new FreshSupvHandler(dhbConf, supervisorCookie, Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF),
|
||||
pwrSwitcher, power::PDU1_CH6_PLOC_12V);
|
||||
supvHandler->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
||||
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
||||
static_cast<void>(consumer);
|
||||
@ -935,7 +936,7 @@ void ObjectFactory::createTestComponents(LinuxLibgpioIF* gpioComIF) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void ObjectFactory::createStrComponents(PowerSwitchIF* pwrSwitcher) {
|
||||
void ObjectFactory::createStrComponents(PowerSwitchIF* pwrSwitcher, SdCardManager& sdcMan) {
|
||||
auto* strAssy = new StrAssembly(objects::STR_ASSY);
|
||||
strAssy->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
|
||||
auto* starTrackerCookie =
|
||||
@ -949,9 +950,10 @@ void ObjectFactory::createStrComponents(PowerSwitchIF* pwrSwitcher) {
|
||||
sif::error << "No valid Star Tracker parameter JSON file" << std::endl;
|
||||
}
|
||||
auto strFdir = new StrFdir(objects::STAR_TRACKER);
|
||||
auto cfgGetter = new StrConfigPathGetter(sdcMan);
|
||||
auto starTracker =
|
||||
new StarTrackerHandler(objects::STAR_TRACKER, objects::STR_COM_IF, starTrackerCookie,
|
||||
paramJsonFile, strComIF, power::PDU1_CH2_STAR_TRACKER_5V);
|
||||
strComIF, power::PDU1_CH2_STAR_TRACKER_5V, *cfgGetter);
|
||||
starTracker->setPowerSwitcher(pwrSwitcher);
|
||||
starTracker->connectModeTreeParent(*strAssy);
|
||||
starTracker->setCustomFdir(strFdir);
|
||||
|
@ -15,6 +15,8 @@
|
||||
#include <atomic>
|
||||
#include <string>
|
||||
|
||||
#include "bsp_q7s/fs/SdCardManager.h"
|
||||
|
||||
class LinuxLibgpioIF;
|
||||
class SerialComIF;
|
||||
class SpiComIF;
|
||||
@ -75,7 +77,7 @@ void createHeaterComponents(GpioIF* gpioIF, PowerSwitchIF* pwrSwitcher, HealthTa
|
||||
HeaterHandler*& heaterHandler);
|
||||
void createImtqComponents(PowerSwitchIF* pwrSwitcher, bool enableHkSets, const char* i2cDev);
|
||||
void createBpxBatteryComponent(bool enableHkSets, const char* i2cDev);
|
||||
void createStrComponents(PowerSwitchIF* pwrSwitcher);
|
||||
void createStrComponents(PowerSwitchIF* pwrSwitcher, SdCardManager& sdcMan);
|
||||
void createSolarArrayDeploymentComponents(PowerSwitchIF& pwrSwitcher, GpioIF& gpioIF);
|
||||
void createSyrlinksComponents(PowerSwitchIF* pwrSwitcher);
|
||||
void createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF& pwrSwitcher);
|
||||
|
@ -383,11 +383,9 @@ void scheduling::initTasks() {
|
||||
}
|
||||
#endif /* OBSW_ADD_PLOC_SUPERVISOR */
|
||||
|
||||
PeriodicTaskIF* plTask = factory->createPeriodicTask(
|
||||
"PL_TASK", 25, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.5, missedDeadlineFunc, &RR_SCHEDULING);
|
||||
plTask->addComponent(objects::CAM_SWITCHER);
|
||||
scheduling::addMpsocSupvHandlers(plTask);
|
||||
scheduling::scheduleScexDev(plTask);
|
||||
FixedTimeslotTaskIF* plTask = factory->createFixedTimeslotTask(
|
||||
"PL_TASK", 25, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.5, missedDeadlineFunc);
|
||||
pst::pstPayload(plTask);
|
||||
|
||||
#if OBSW_ADD_SCEX_DEVICE == 1
|
||||
PeriodicTaskIF* scexReaderTask;
|
||||
|
@ -24,6 +24,8 @@ if [ ! -z "${EIVE_Q7S_EM}" ]; then
|
||||
build_defs="EIVE_Q7S_EM=ON"
|
||||
fi
|
||||
|
||||
build_defs="${build_defs} CMAKE_EXPORT_COMPILE_COMMANDS=ON"
|
||||
|
||||
os_fsfw="linux"
|
||||
tgt_bsp="arm/q7s"
|
||||
build_dir="cmake-build-debug-q7s"
|
||||
|
@ -24,6 +24,8 @@ if [ ! -z "${EIVE_Q7S_EM}" ]; then
|
||||
build_defs="EIVE_Q7S_EM=ON"
|
||||
fi
|
||||
|
||||
build_defs="${build_defs} CMAKE_EXPORT_COMPILE_COMMANDS=ON"
|
||||
|
||||
os_fsfw="linux"
|
||||
tgt_bsp="arm/q7s"
|
||||
build_dir="cmake-build-release-q7s"
|
||||
|
@ -143,14 +143,16 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
11901;0x2e7d;BOOTING_FIRMWARE_FAILED_EVENT;LOW;Failed to boot firmware;mission/acs/str/StarTrackerHandler.h
|
||||
11902;0x2e7e;BOOTING_BOOTLOADER_FAILED_EVENT;LOW;Failed to boot star tracker into bootloader mode;mission/acs/str/StarTrackerHandler.h
|
||||
11903;0x2e7f;COM_ERROR_REPLY_RECEIVED;LOW;Received COM error. P1: Communication Error ID (datasheet p32);mission/acs/str/StarTrackerHandler.h
|
||||
12001;0x2ee1;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;linux/payload/PlocSupervisorHandler.h
|
||||
12002;0x2ee2;SUPV_UNKNOWN_TM;LOW;Unhandled event. P1: APID, P2: Service ID;linux/payload/PlocSupervisorHandler.h
|
||||
12003;0x2ee3;SUPV_UNINIMPLEMENTED_TM;LOW;No description;linux/payload/PlocSupervisorHandler.h
|
||||
12004;0x2ee4;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;linux/payload/PlocSupervisorHandler.h
|
||||
12005;0x2ee5;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report P1: ID of command for which the execution failed P2: Status code sent by the supervisor handler;linux/payload/PlocSupervisorHandler.h
|
||||
12006;0x2ee6;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;linux/payload/PlocSupervisorHandler.h
|
||||
12007;0x2ee7;SUPV_HELPER_EXECUTING;LOW;Supervisor helper currently executing a command;linux/payload/PlocSupervisorHandler.h
|
||||
12008;0x2ee8;SUPV_MPSOC_SHUTDOWN_BUILD_FAILED;LOW;Failed to build the command to shutdown the MPSoC;linux/payload/PlocSupervisorHandler.h
|
||||
12001;0x2ee1;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;linux/payload/plocSupvDefs.h
|
||||
12002;0x2ee2;SUPV_UNKNOWN_TM;LOW;Unhandled event. P1: APID, P2: Service ID;linux/payload/plocSupvDefs.h
|
||||
12003;0x2ee3;SUPV_UNINIMPLEMENTED_TM;LOW;No description;linux/payload/plocSupvDefs.h
|
||||
12004;0x2ee4;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;linux/payload/plocSupvDefs.h
|
||||
12005;0x2ee5;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report P1: ID of command for which the execution failed P2: Status code sent by the supervisor handler;linux/payload/plocSupvDefs.h
|
||||
12006;0x2ee6;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;linux/payload/plocSupvDefs.h
|
||||
12007;0x2ee7;SUPV_HELPER_EXECUTING;LOW;Supervisor helper currently executing a command;linux/payload/plocSupvDefs.h
|
||||
12008;0x2ee8;SUPV_MPSOC_SHUTDOWN_BUILD_FAILED;LOW;Failed to build the command to shutdown the MPSoC;linux/payload/plocSupvDefs.h
|
||||
12009;0x2ee9;SUPV_ACK_UNKNOWN_COMMAND;LOW;Received ACK, but no related command is unknown or has not been sent by this software instance. P1: Module APID. P2: Service ID.;linux/payload/plocSupvDefs.h
|
||||
12010;0x2eea;SUPV_EXE_ACK_UNKNOWN_COMMAND;LOW;Received ACK EXE, but no related command is unknown or has not been sent by this software instance. P1: Module APID. P2: Service ID.;linux/payload/plocSupvDefs.h
|
||||
12100;0x2f44;SANITIZATION_FAILED;LOW;No description;bsp_q7s/fs/SdCardManager.h
|
||||
12101;0x2f45;MOUNTED_SD_CARD;INFO;No description;bsp_q7s/fs/SdCardManager.h
|
||||
12300;0x300c;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;linux/payload/PlocMemoryDumper.h
|
||||
|
|
@ -522,4 +522,5 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x6f00;TMS_IsBusy;No description;0;TM_SINK;mission/tmtc/DirectTmSinkIF.h
|
||||
0x6f01;TMS_PartiallyWritten;No description;1;TM_SINK;mission/tmtc/DirectTmSinkIF.h
|
||||
0x6f02;TMS_NoWriteActive;No description;2;TM_SINK;mission/tmtc/DirectTmSinkIF.h
|
||||
0x6f03;TMS_Timeout;No description;3;TM_SINK;mission/tmtc/DirectTmSinkIF.h
|
||||
0x7000;VCS_ChannelDoesNotExist;No description;0;VIRTUAL_CHANNEL;mission/com/VirtualChannel.h
|
||||
|
|
@ -143,14 +143,16 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
11901;0x2e7d;BOOTING_FIRMWARE_FAILED_EVENT;LOW;Failed to boot firmware;mission/acs/str/StarTrackerHandler.h
|
||||
11902;0x2e7e;BOOTING_BOOTLOADER_FAILED_EVENT;LOW;Failed to boot star tracker into bootloader mode;mission/acs/str/StarTrackerHandler.h
|
||||
11903;0x2e7f;COM_ERROR_REPLY_RECEIVED;LOW;Received COM error. P1: Communication Error ID (datasheet p32);mission/acs/str/StarTrackerHandler.h
|
||||
12001;0x2ee1;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;linux/payload/PlocSupervisorHandler.h
|
||||
12002;0x2ee2;SUPV_UNKNOWN_TM;LOW;Unhandled event. P1: APID, P2: Service ID;linux/payload/PlocSupervisorHandler.h
|
||||
12003;0x2ee3;SUPV_UNINIMPLEMENTED_TM;LOW;No description;linux/payload/PlocSupervisorHandler.h
|
||||
12004;0x2ee4;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;linux/payload/PlocSupervisorHandler.h
|
||||
12005;0x2ee5;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report P1: ID of command for which the execution failed P2: Status code sent by the supervisor handler;linux/payload/PlocSupervisorHandler.h
|
||||
12006;0x2ee6;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;linux/payload/PlocSupervisorHandler.h
|
||||
12007;0x2ee7;SUPV_HELPER_EXECUTING;LOW;Supervisor helper currently executing a command;linux/payload/PlocSupervisorHandler.h
|
||||
12008;0x2ee8;SUPV_MPSOC_SHUTDOWN_BUILD_FAILED;LOW;Failed to build the command to shutdown the MPSoC;linux/payload/PlocSupervisorHandler.h
|
||||
12001;0x2ee1;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;linux/payload/plocSupvDefs.h
|
||||
12002;0x2ee2;SUPV_UNKNOWN_TM;LOW;Unhandled event. P1: APID, P2: Service ID;linux/payload/plocSupvDefs.h
|
||||
12003;0x2ee3;SUPV_UNINIMPLEMENTED_TM;LOW;No description;linux/payload/plocSupvDefs.h
|
||||
12004;0x2ee4;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;linux/payload/plocSupvDefs.h
|
||||
12005;0x2ee5;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report P1: ID of command for which the execution failed P2: Status code sent by the supervisor handler;linux/payload/plocSupvDefs.h
|
||||
12006;0x2ee6;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;linux/payload/plocSupvDefs.h
|
||||
12007;0x2ee7;SUPV_HELPER_EXECUTING;LOW;Supervisor helper currently executing a command;linux/payload/plocSupvDefs.h
|
||||
12008;0x2ee8;SUPV_MPSOC_SHUTDOWN_BUILD_FAILED;LOW;Failed to build the command to shutdown the MPSoC;linux/payload/plocSupvDefs.h
|
||||
12009;0x2ee9;SUPV_ACK_UNKNOWN_COMMAND;LOW;Received ACK, but no related command is unknown or has not been sent by this software instance. P1: Module APID. P2: Service ID.;linux/payload/plocSupvDefs.h
|
||||
12010;0x2eea;SUPV_EXE_ACK_UNKNOWN_COMMAND;LOW;Received ACK EXE, but no related command is unknown or has not been sent by this software instance. P1: Module APID. P2: Service ID.;linux/payload/plocSupvDefs.h
|
||||
12100;0x2f44;SANITIZATION_FAILED;LOW;No description;bsp_q7s/fs/SdCardManager.h
|
||||
12101;0x2f45;MOUNTED_SD_CARD;INFO;No description;bsp_q7s/fs/SdCardManager.h
|
||||
12300;0x300c;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;linux/payload/PlocMemoryDumper.h
|
||||
|
|
@ -617,5 +617,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x6f00;TMS_IsBusy;No description;0;TM_SINK;mission/tmtc/DirectTmSinkIF.h
|
||||
0x6f01;TMS_PartiallyWritten;No description;1;TM_SINK;mission/tmtc/DirectTmSinkIF.h
|
||||
0x6f02;TMS_NoWriteActive;No description;2;TM_SINK;mission/tmtc/DirectTmSinkIF.h
|
||||
0x6f03;TMS_Timeout;No description;3;TM_SINK;mission/tmtc/DirectTmSinkIF.h
|
||||
0x7000;VCS_ChannelDoesNotExist;No description;0;VIRTUAL_CHANNEL;mission/com/VirtualChannel.h
|
||||
0x7200;SCBU_KeyNotFound;No description;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h
|
||||
|
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 315 translations.
|
||||
* @brief Auto-generated event translation file. Contains 317 translations.
|
||||
* @details
|
||||
* Generated on: 2023-10-27 14:24:05
|
||||
* Generated on: 2023-11-29 15:14:46
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -157,6 +157,8 @@ const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
|
||||
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
|
||||
const char *SUPV_HELPER_EXECUTING_STRING = "SUPV_HELPER_EXECUTING";
|
||||
const char *SUPV_MPSOC_SHUTDOWN_BUILD_FAILED_STRING = "SUPV_MPSOC_SHUTDOWN_BUILD_FAILED";
|
||||
const char *SUPV_ACK_UNKNOWN_COMMAND_STRING = "SUPV_ACK_UNKNOWN_COMMAND";
|
||||
const char *SUPV_EXE_ACK_UNKNOWN_COMMAND_STRING = "SUPV_EXE_ACK_UNKNOWN_COMMAND";
|
||||
const char *SANITIZATION_FAILED_STRING = "SANITIZATION_FAILED";
|
||||
const char *MOUNTED_SD_CARD_STRING = "MOUNTED_SD_CARD";
|
||||
const char *SEND_MRAM_DUMP_FAILED_STRING = "SEND_MRAM_DUMP_FAILED";
|
||||
@ -627,6 +629,10 @@ const char *translateEvents(Event event) {
|
||||
return SUPV_HELPER_EXECUTING_STRING;
|
||||
case (12008):
|
||||
return SUPV_MPSOC_SHUTDOWN_BUILD_FAILED_STRING;
|
||||
case (12009):
|
||||
return SUPV_ACK_UNKNOWN_COMMAND_STRING;
|
||||
case (12010):
|
||||
return SUPV_EXE_ACK_UNKNOWN_COMMAND_STRING;
|
||||
case (12100):
|
||||
return SANITIZATION_FAILED_STRING;
|
||||
case (12101):
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 179 translations.
|
||||
* Generated on: 2023-10-27 14:24:05
|
||||
* Generated on: 2023-11-29 15:14:46
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
|
@ -54,7 +54,7 @@ ReturnValue_t StrComHandler::performOperation(uint8_t operationCode) {
|
||||
switch (state) {
|
||||
case InternalState::POLL_ONE_REPLY: {
|
||||
// Stopwatch watch;
|
||||
replyTimeout.setTimeout(200);
|
||||
replyTimeout.setTimeout(400);
|
||||
readOneReply(static_cast<uint32_t>(state));
|
||||
{
|
||||
MutexGuard mg(lock);
|
||||
@ -720,7 +720,7 @@ ReturnValue_t StrComHandler::readReceivedMessage(CookieIF* cookie, uint8_t** buf
|
||||
{
|
||||
MutexGuard mg(lock);
|
||||
if (state != InternalState::SLEEPING) {
|
||||
return returnvalue::OK;
|
||||
return BUSY;
|
||||
}
|
||||
replyWasReceived = this->replyWasReceived;
|
||||
}
|
||||
@ -733,7 +733,7 @@ ReturnValue_t StrComHandler::readReceivedMessage(CookieIF* cookie, uint8_t** buf
|
||||
*size = replyLen;
|
||||
}
|
||||
replyLen = 0;
|
||||
return returnvalue::OK;
|
||||
return replyResult;
|
||||
}
|
||||
|
||||
ReturnValue_t StrComHandler::unlockAndEraseRegions(uint32_t from, uint32_t to) {
|
||||