Compare commits
126 Commits
Author | SHA1 | Date | |
---|---|---|---|
b273729b10 | |||
67024ec933 | |||
3a20748ff6 | |||
516898b7b2 | |||
bd4e05c944 | |||
72ffa365d4 | |||
52f5b088bf | |||
73498ac9af | |||
1f18904810 | |||
239410e2dc | |||
dc89350ac7 | |||
5a642b7d2f
|
|||
6b9aa8eb7b | |||
3ee2e72652
|
|||
91106feb82 | |||
7a68188140 | |||
d88ffb1734
|
|||
c2b415bdd6
|
|||
facfad3367
|
|||
d95ecc3678
|
|||
966faf51b5
|
|||
5c9d7a43ab
|
|||
4465170747
|
|||
5420e322f7
|
|||
6040cd2d1e
|
|||
4e7b774d32
|
|||
7f36455857
|
|||
07df6eb95f | |||
88e8268c26 | |||
20bc31449a | |||
2901ebc15c
|
|||
e992f933ec | |||
a95ab49690 | |||
b261779ebf | |||
db5e7a535e | |||
4a8e111a18 | |||
f79acca1d6 | |||
4a9b6bc0c4 | |||
4dad1df13b | |||
f67d72a8dd | |||
da79f24b33 | |||
b2b7900720 | |||
de4562dd2f | |||
fb9303a8de | |||
9b2b087d08 | |||
1c27ba7261 | |||
3a59cd301b | |||
4c66d8fb5f | |||
b634543c5a | |||
ced812052d | |||
a0d559a5fd | |||
c7e554aebc | |||
e8bd3f447d | |||
d1086bc9aa | |||
98a2338dcb | |||
880b8620ba | |||
788fbb72f0 | |||
afcc0cc21d | |||
db3a4955c2 | |||
d0a9460676 | |||
add083135e | |||
3ae7dab8c7 | |||
0c394ad34d | |||
4de1932c8a | |||
1c74d39faf | |||
f40348904c | |||
2d4a3c0ee2 | |||
295da50bc7 | |||
3f9bf8e173 | |||
4893af07ae | |||
af8b4d5bc8 | |||
2ae89769af | |||
9c0744ae02 | |||
9544516cc4 | |||
3dd7530c3d | |||
931bb5ee28 | |||
d85a5975c0 | |||
456ee156c3 | |||
40eae48a1a | |||
8da5f4dd44 | |||
4bd3cf4d52 | |||
c5b2b5c56c | |||
55d6edcd66
|
|||
cf48a18733
|
|||
9e787a7e44
|
|||
b8064c4a39 | |||
5058b8905d | |||
aec383b974 | |||
caa2800a7a | |||
004a283163 | |||
a85b0a4a76 | |||
998110dea4 | |||
5c79d5e1f7 | |||
442b1c94a6 | |||
8113a71c79 | |||
cc60847bd0 | |||
0b06bc4c8b | |||
9711bb6300 | |||
68e4d9be07 | |||
ddcdc38310 | |||
9921522ce0 | |||
f3cc406495 | |||
9c78362ac5 | |||
016e9dd2df | |||
351ca1154b | |||
6cf488d0a6 | |||
15139d6944 | |||
50327fb614 | |||
7bd2fce86f | |||
7222475985 | |||
f5a7fd2ffe | |||
8efbdf8279 | |||
4763ec84fa | |||
e4fc6e3d2a | |||
2543cdf5b7 | |||
ea9f72b9c4 | |||
148a876fc9 | |||
9804898d05 | |||
e04f349e77 | |||
8cc4431e22 | |||
22dcf10207 | |||
8b467ec69e | |||
97a7087827 | |||
a615ed2d21 | |||
3d7d01d6ab | |||
7e6c25901b
|
71
CHANGELOG.md
71
CHANGELOG.md
@ -16,7 +16,76 @@ will consitute of a breaking change warranting a new major release:
|
||||
|
||||
# [unreleased]
|
||||
|
||||
# [v4.0.0] to be released
|
||||
# [v6.0.0] to be released
|
||||
|
||||
- Important bugfixes for PTME. See `q7s-package` CHANGELOG.
|
||||
|
||||
# [v5.1.0] to be released
|
||||
|
||||
# [v5.0.0] 2023-06-26
|
||||
|
||||
v3.3.1 and all following version will now be moved to v5.0.0 with the additional changes listed
|
||||
here. This was done because the firmware update (v4.0.0) is not working right now and it is not
|
||||
known when and how it will be fixed. Because of that, all updates to make the SW work with the new
|
||||
firmware, which are limited to a few files will be moved to a dev branch so regular development
|
||||
compatible to the old firmware can continue.
|
||||
|
||||
TLDR: This version is compatible to the old firmware and some changes which only work with the new
|
||||
firmware have been reverted.
|
||||
|
||||
## Changed
|
||||
|
||||
- Added `sync` syscall in graceful shutdown handler
|
||||
- Graceful shutdown is now performed by the reboot watchdog
|
||||
- There is now a separate file for the total reboot counter. The reboot watchdog has its own local
|
||||
counters to determine whether a reboot is necessary.
|
||||
|
||||
# [v4.0.1] 2023-06-24
|
||||
|
||||
## Fixed
|
||||
|
||||
- `PusLiveDemux` packet demultiplexing bugfix where the demultiplexing did not work when there was
|
||||
only one destination available.
|
||||
|
||||
# [v4.0.0] 2023-06-22
|
||||
|
||||
- `eive-tmtc` version v5.0.0
|
||||
- `q7s-package` version v3.1.1
|
||||
|
||||
## Fixed
|
||||
|
||||
- Important bugfixes for PTME. See `q7s-package` CHANGELOG.
|
||||
- TCS fixes: Set temperature values to invalid value for MAX31865 RTD handler, SUS handler
|
||||
and STR handler. Also set dataset to invakid for RTD handler.
|
||||
- Fixed H parameter in SUS converter from 1 mm to 2.5 mm.
|
||||
|
||||
## Changed
|
||||
|
||||
- Removed PTME busy/ready signals. Those were not used anyway because register reads are used now.
|
||||
- APB bus access busy checking is not done anymore as this is performed by the bus itself now.
|
||||
- Core controller will now announce version and image information event in addition to reboot
|
||||
event in the `inititalize` function.
|
||||
- Core controller will now try to request and announce the firmware version in addition to the
|
||||
OBSW version as well.
|
||||
- Added core controller action to read reboot mechansm information
|
||||
- GNSS reset pin will now only be asserted for 5 ms instead of 100 ms.
|
||||
|
||||
## Added
|
||||
|
||||
- Added PL I2C reset pin. It is not used/connected for now but could be used for FDIR procedures to
|
||||
restore the PL I2C.
|
||||
- Core controller now announces firmware version as well when requesting a version info event
|
||||
|
||||
# [v3.3.1] 2023-06-22
|
||||
|
||||
## Fixed
|
||||
|
||||
- `PusLiveDemux` packet demultiplexing bugfix where the demultiplexing did not work when there was
|
||||
only one destination available.
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fixed H parameter in SUS converter from 1 mm to 2.5 mm.
|
||||
|
||||
# [v3.3.0] 2023-06-21
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
||||
# ##############################################################################
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
set(OBSW_VERSION_MAJOR 3)
|
||||
set(OBSW_VERSION_MINOR 3)
|
||||
set(OBSW_VERSION_MAJOR 5)
|
||||
set(OBSW_VERSION_MINOR 0)
|
||||
set(OBSW_VERSION_REVISION 0)
|
||||
|
||||
# set(CMAKE_VERBOSE TRUE)
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 295 translations.
|
||||
* @brief Auto-generated event translation file. Contains 296 translations.
|
||||
* @details
|
||||
* Generated on: 2023-05-17 17:15:34
|
||||
* Generated on: 2023-06-21 19:01:02
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -277,6 +277,7 @@ const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
|
||||
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
|
||||
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
|
||||
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
|
||||
const char *FIRMWARE_INFO_STRING = "FIRMWARE_INFO";
|
||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||
@ -847,6 +848,8 @@ const char *translateEvents(Event event) {
|
||||
return I2C_REBOOT_STRING;
|
||||
case (14012):
|
||||
return PDEC_REBOOT_STRING;
|
||||
case (14013):
|
||||
return FIRMWARE_INFO_STRING;
|
||||
case (14100):
|
||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||
case (14101):
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 171 translations.
|
||||
* Generated on: 2023-05-17 17:15:34
|
||||
* Generated on: 2023-06-21 19:01:02
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
|
@ -23,6 +23,7 @@ static constexpr char UART_SCEX_DEV[] = "/dev/scex";
|
||||
static constexpr char UIO_PDEC_REGISTERS[] = "/dev/uio_pdec_regs";
|
||||
static constexpr char UIO_PTME[] = "/dev/uio_ptme";
|
||||
static constexpr char UIO_PDEC_CONFIG_MEMORY[] = "/dev/uio_pdec_cfg_mem";
|
||||
static constexpr char UIO_SYS_ROM[] = "/dev/uio_sys_rom";
|
||||
static constexpr char UIO_PDEC_RAM[] = "/dev/uio_pdec_ram";
|
||||
static constexpr char UIO_PDEC_IRQ[] = "/dev/uio_pdec_irq";
|
||||
static constexpr int MAP_ID_PTME_CONFIG = 3;
|
||||
@ -57,6 +58,7 @@ static constexpr char GYRO_0_ENABLE[] = "enable_gyro_0";
|
||||
static constexpr char GYRO_2_ENABLE[] = "enable_gyro_2";
|
||||
static constexpr char GNSS_SELECT[] = "gnss_mux_select";
|
||||
static constexpr char GNSS_MUX_SELECT[] = "gnss_mux_select";
|
||||
static constexpr char PL_I2C_ARESETN[] = "pl_i2c_aresetn";
|
||||
|
||||
static constexpr char HEATER_0[] = "heater0";
|
||||
static constexpr char HEATER_1[] = "heater1";
|
||||
@ -82,6 +84,7 @@ static constexpr char EN_RW_4[] = "enable_rw_4";
|
||||
|
||||
static constexpr char RAD_SENSOR_CHIP_SELECT[] = "rad_sensor_chip_select";
|
||||
static constexpr char ENABLE_RADFET[] = "enable_radfet";
|
||||
|
||||
static constexpr char PAPB_BUSY_SIGNAL_VC0[] = "papb_busy_signal_vc0";
|
||||
static constexpr char PAPB_EMPTY_SIGNAL_VC0[] = "papb_empty_signal_vc0";
|
||||
static constexpr char PAPB_BUSY_SIGNAL_VC1[] = "papb_busy_signal_vc1";
|
||||
@ -90,6 +93,7 @@ static constexpr char PAPB_BUSY_SIGNAL_VC2[] = "papb_busy_signal_vc2";
|
||||
static constexpr char PAPB_EMPTY_SIGNAL_VC2[] = "papb_empty_signal_vc2";
|
||||
static constexpr char PAPB_BUSY_SIGNAL_VC3[] = "papb_busy_signal_vc3";
|
||||
static constexpr char PAPB_EMPTY_SIGNAL_VC3[] = "papb_empty_signal_vc3";
|
||||
|
||||
static constexpr char PTME_RESETN[] = "ptme_resetn";
|
||||
|
||||
static constexpr char RS485_EN_TX_CLOCK[] = "tx_clock_enable_ltc2872";
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <fsfw/filesystem/HasFileSystemIF.h>
|
||||
#include <fsfw/ipc/QueueFactory.h>
|
||||
#include <fsfw/tasks/TaskFactory.h>
|
||||
#include <fsfw_hal/linux/uio/UioMapper.h>
|
||||
|
||||
#include "commonConfig.h"
|
||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||
@ -22,6 +23,7 @@
|
||||
#include <algorithm>
|
||||
#include <filesystem>
|
||||
|
||||
#include "bsp_q7s/boardconfig/busConf.h"
|
||||
#include "bsp_q7s/fs/SdCardManager.h"
|
||||
#include "bsp_q7s/memory/scratchApi.h"
|
||||
#include "bsp_q7s/xadc/Xadc.h"
|
||||
@ -169,6 +171,8 @@ ReturnValue_t CoreController::initialize() {
|
||||
sdStateMachine();
|
||||
|
||||
triggerEvent(core::REBOOT_SW, CURRENT_CHIP, CURRENT_COPY);
|
||||
announceCurrentImageInfo();
|
||||
announceVersionInfo();
|
||||
EventManagerIF *eventManager =
|
||||
ObjectManager::instance()->get<EventManagerIF>(objects::EVENT_MANAGER);
|
||||
if (eventManager == nullptr or eventQueue == nullptr) {
|
||||
@ -185,6 +189,16 @@ ReturnValue_t CoreController::initialize() {
|
||||
if (result != returnvalue::OK) {
|
||||
sif::warning << "Subscribing for GPS GPS_FIX_CHANGE event failed" << std::endl;
|
||||
}
|
||||
|
||||
if (common::OBSW_VERSION_MAJOR >= 6 or common::OBSW_VERSION_MAJOR == 4) {
|
||||
UioMapper sysRomMapper(q7s::UIO_SYS_ROM);
|
||||
result = sysRomMapper.getMappedAdress(&mappedSysRomAddr, UioMapper::Permissions::READ_ONLY);
|
||||
if (result != returnvalue::OK) {
|
||||
// TODO: This might be a reason to switch to another image..
|
||||
sif::error << "Getting mapped SYS ROM UIO address failed" << std::endl;
|
||||
return ObjectManager::CHILD_INIT_FAILED;
|
||||
}
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
@ -210,19 +224,7 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
||||
using namespace core;
|
||||
switch (actionId) {
|
||||
case (ANNOUNCE_VERSION): {
|
||||
uint32_t p1 = (common::OBSW_VERSION_MAJOR << 24) | (common::OBSW_VERSION_MINOR << 16) |
|
||||
(common::OBSW_VERSION_REVISION << 8);
|
||||
uint32_t p2 = 0;
|
||||
if (strcmp("", common::OBSW_VERSION_CST_GIT_SHA1) != 0) {
|
||||
p1 |= 1;
|
||||
auto shaAsStr = std::string(common::OBSW_VERSION_CST_GIT_SHA1);
|
||||
size_t posDash = shaAsStr.find("-");
|
||||
auto gitHash = shaAsStr.substr(posDash + 2, 4);
|
||||
// Only copy first 4 letters of git hash
|
||||
memcpy(&p2, gitHash.c_str(), 4);
|
||||
}
|
||||
|
||||
triggerEvent(VERSION_INFO, p1, p2);
|
||||
announceVersionInfo();
|
||||
return HasActionsIF::EXECUTION_FINISHED;
|
||||
}
|
||||
case (ANNOUNCE_BOOT_COUNTS): {
|
||||
@ -230,7 +232,7 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
||||
return HasActionsIF::EXECUTION_FINISHED;
|
||||
}
|
||||
case (ANNOUNCE_CURRENT_IMAGE): {
|
||||
triggerEvent(CURRENT_IMAGE_INFO, CURRENT_CHIP, CURRENT_COPY);
|
||||
announceCurrentImageInfo();
|
||||
return HasActionsIF::EXECUTION_FINISHED;
|
||||
}
|
||||
case (LIST_DIRECTORY_INTO_FILE): {
|
||||
@ -246,6 +248,9 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
||||
return result;
|
||||
}
|
||||
std::ostringstream oss("cp ", std::ostringstream::ate);
|
||||
if (parser.isForceOptSet()) {
|
||||
oss << "-f ";
|
||||
}
|
||||
if (parser.isRecursiveOptSet()) {
|
||||
oss << "-r ";
|
||||
}
|
||||
@ -318,28 +323,38 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
||||
if (size < 1) {
|
||||
return HasActionsIF::INVALID_PARAMETERS;
|
||||
}
|
||||
std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_FILE;
|
||||
// Disable the reboot file mechanism
|
||||
parseRebootFile(path, rebootFile);
|
||||
std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_WATCHDOG_FILE;
|
||||
parseRebootWatchdogFile(path, rebootWatchdogFile);
|
||||
if (data[0] == 0) {
|
||||
rebootFile.enabled = false;
|
||||
rewriteRebootFile(rebootFile);
|
||||
rebootWatchdogFile.enabled = false;
|
||||
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||
} else if (data[0] == 1) {
|
||||
rebootFile.enabled = true;
|
||||
rewriteRebootFile(rebootFile);
|
||||
rebootWatchdogFile.enabled = true;
|
||||
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||
} else {
|
||||
return HasActionsIF::INVALID_PARAMETERS;
|
||||
}
|
||||
return HasActionsIF::EXECUTION_FINISHED;
|
||||
}
|
||||
case (READ_REBOOT_MECHANISM_INFO): {
|
||||
std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_WATCHDOG_FILE;
|
||||
parseRebootWatchdogFile(path, rebootWatchdogFile);
|
||||
RebootWatchdogPacket packet(rebootWatchdogFile);
|
||||
ReturnValue_t result = actionHelper.reportData(commandedBy, actionId, &packet);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return HasActionsIF::EXECUTION_FINISHED;
|
||||
}
|
||||
case (RESET_REBOOT_COUNTERS): {
|
||||
if (size == 0) {
|
||||
resetRebootCount(xsc::ALL_CHIP, xsc::ALL_COPY);
|
||||
resetRebootWatchdogCounters(xsc::ALL_CHIP, xsc::ALL_COPY);
|
||||
} else if (size == 2) {
|
||||
if (data[0] > 1 or data[1] > 1) {
|
||||
return HasActionsIF::INVALID_PARAMETERS;
|
||||
}
|
||||
resetRebootCount(static_cast<xsc::Chip>(data[0]), static_cast<xsc::Copy>(data[1]));
|
||||
resetRebootWatchdogCounters(static_cast<xsc::Chip>(data[0]),
|
||||
static_cast<xsc::Copy>(data[1]));
|
||||
}
|
||||
return HasActionsIF::EXECUTION_FINISHED;
|
||||
}
|
||||
@ -434,11 +449,11 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
||||
if (size < 1) {
|
||||
return HasActionsIF::INVALID_PARAMETERS;
|
||||
}
|
||||
std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_FILE;
|
||||
std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_WATCHDOG_FILE;
|
||||
// Disable the reboot file mechanism
|
||||
parseRebootFile(path, rebootFile);
|
||||
rebootFile.maxCount = data[0];
|
||||
rewriteRebootFile(rebootFile);
|
||||
parseRebootWatchdogFile(path, rebootWatchdogFile);
|
||||
rebootWatchdogFile.maxCount = data[0];
|
||||
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||
return HasActionsIF::EXECUTION_FINISHED;
|
||||
}
|
||||
case (XSC_REBOOT_OBC): {
|
||||
@ -1196,45 +1211,7 @@ ReturnValue_t CoreController::actionXscReboot(const uint8_t *data, size_t size)
|
||||
auto tgtChip = static_cast<xsc::Chip>(data[1]);
|
||||
auto tgtCopy = static_cast<xsc::Copy>(data[2]);
|
||||
|
||||
// This function can not really fail
|
||||
gracefulShutdownTasks(tgtChip, tgtCopy, protOpPerformed);
|
||||
|
||||
switch (tgtChip) {
|
||||
case (xsc::Chip::CHIP_0): {
|
||||
switch (tgtCopy) {
|
||||
case (xsc::Copy::COPY_0): {
|
||||
xsc_boot_copy(XSC_LIBNOR_CHIP_0, XSC_LIBNOR_COPY_NOMINAL);
|
||||
break;
|
||||
}
|
||||
case (xsc::Copy::COPY_1): {
|
||||
xsc_boot_copy(XSC_LIBNOR_CHIP_0, XSC_LIBNOR_COPY_GOLD);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case (xsc::Chip::CHIP_1): {
|
||||
switch (tgtCopy) {
|
||||
case (xsc::Copy::COPY_0): {
|
||||
xsc_boot_copy(XSC_LIBNOR_CHIP_1, XSC_LIBNOR_COPY_NOMINAL);
|
||||
break;
|
||||
}
|
||||
case (xsc::Copy::COPY_1): {
|
||||
xsc_boot_copy(XSC_LIBNOR_CHIP_1, XSC_LIBNOR_COPY_GOLD);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
performGracefulShutdown(tgtChip, tgtCopy);
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
|
||||
@ -1251,10 +1228,15 @@ ReturnValue_t CoreController::gracefulShutdownTasks(xsc::Chip chip, xsc::Copy co
|
||||
sdcMan->markUnusable();
|
||||
// Wait two seconds to ensure no one uses the SD cards
|
||||
TaskFactory::delayTask(2000);
|
||||
|
||||
// Ensure that all writes/reads do finish.
|
||||
sync();
|
||||
|
||||
// Attempt graceful shutdown by unmounting and switching off SD cards
|
||||
sdcMan->switchOffSdCard(sd::SdCard::SLOT_0);
|
||||
sdcMan->switchOffSdCard(sd::SdCard::SLOT_1);
|
||||
// If any boot copies are unprotected
|
||||
// If any boot copies are unprotected.
|
||||
// Actually this function only ensures that reboots to the own image are protected..
|
||||
ReturnValue_t result = setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, true,
|
||||
protOpPerformed, false);
|
||||
if (result == returnvalue::OK and protOpPerformed) {
|
||||
@ -1543,7 +1525,8 @@ void CoreController::performMountedSdCardOperations() {
|
||||
if (not timeFileInitDone) {
|
||||
initClockFromTimeFile();
|
||||
}
|
||||
performRebootFileHandling(false);
|
||||
performRebootWatchdogHandling(false);
|
||||
performRebootCountersHandling(false);
|
||||
}
|
||||
backupTimeFileHandler();
|
||||
};
|
||||
@ -1615,118 +1598,127 @@ ReturnValue_t CoreController::performSdCardCheck() {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void CoreController::performRebootFileHandling(bool recreateFile) {
|
||||
void CoreController::performRebootWatchdogHandling(bool recreateFile) {
|
||||
using namespace std;
|
||||
std::string path = currMntPrefix + REBOOT_FILE;
|
||||
std::string path = currMntPrefix + REBOOT_WATCHDOG_FILE;
|
||||
std::string legacyPath = currMntPrefix + LEGACY_REBOOT_WATCHDOG_FILE;
|
||||
std::error_code e;
|
||||
// TODO: Remove at some point in the future.
|
||||
if (std::filesystem::exists(legacyPath, e)) {
|
||||
// Old file might still exist, so copy it to new path
|
||||
std::filesystem::copy(legacyPath, path, std::filesystem::copy_options::overwrite_existing, e);
|
||||
if (e) {
|
||||
sif::error << "File copy has failed: " << e.message() << std::endl;
|
||||
}
|
||||
}
|
||||
if (not std::filesystem::exists(path, e) or recreateFile) {
|
||||
#if OBSW_VERBOSE_LEVEL >= 1
|
||||
sif::info << "CoreController::performRebootFileHandling: Recreating reboot file" << std::endl;
|
||||
sif::info << "CoreController::performRebootFileHandling: Recreating reboot watchdog file"
|
||||
<< std::endl;
|
||||
#endif
|
||||
rebootFile.enabled = false;
|
||||
rebootFile.img00Cnt = 0;
|
||||
rebootFile.img01Cnt = 0;
|
||||
rebootFile.img10Cnt = 0;
|
||||
rebootFile.img11Cnt = 0;
|
||||
rebootFile.lastChip = xsc::Chip::CHIP_0;
|
||||
rebootFile.lastCopy = xsc::Copy::COPY_0;
|
||||
rebootFile.img00Lock = false;
|
||||
rebootFile.img01Lock = false;
|
||||
rebootFile.img10Lock = false;
|
||||
rebootFile.img11Lock = false;
|
||||
rebootFile.mechanismNextChip = xsc::Chip::NO_CHIP;
|
||||
rebootFile.mechanismNextCopy = xsc::Copy::NO_COPY;
|
||||
rebootFile.bootFlag = false;
|
||||
rewriteRebootFile(rebootFile);
|
||||
rebootWatchdogFile.enabled = false;
|
||||
rebootWatchdogFile.img00Cnt = 0;
|
||||
rebootWatchdogFile.img01Cnt = 0;
|
||||
rebootWatchdogFile.img10Cnt = 0;
|
||||
rebootWatchdogFile.img11Cnt = 0;
|
||||
rebootWatchdogFile.lastChip = xsc::Chip::CHIP_0;
|
||||
rebootWatchdogFile.lastCopy = xsc::Copy::COPY_0;
|
||||
rebootWatchdogFile.img00Lock = false;
|
||||
rebootWatchdogFile.img01Lock = false;
|
||||
rebootWatchdogFile.img10Lock = false;
|
||||
rebootWatchdogFile.img11Lock = false;
|
||||
rebootWatchdogFile.mechanismNextChip = xsc::Chip::NO_CHIP;
|
||||
rebootWatchdogFile.mechanismNextCopy = xsc::Copy::NO_COPY;
|
||||
rebootWatchdogFile.bootFlag = false;
|
||||
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||
} else {
|
||||
if (not parseRebootFile(path, rebootFile)) {
|
||||
performRebootFileHandling(true);
|
||||
if (not parseRebootWatchdogFile(path, rebootWatchdogFile)) {
|
||||
performRebootWatchdogHandling(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (CURRENT_CHIP == xsc::CHIP_0) {
|
||||
if (CURRENT_COPY == xsc::COPY_0) {
|
||||
rebootFile.img00Cnt++;
|
||||
rebootWatchdogFile.img00Cnt++;
|
||||
} else {
|
||||
rebootFile.img01Cnt++;
|
||||
rebootWatchdogFile.img01Cnt++;
|
||||
}
|
||||
} else {
|
||||
if (CURRENT_COPY == xsc::COPY_0) {
|
||||
rebootFile.img10Cnt++;
|
||||
rebootWatchdogFile.img10Cnt++;
|
||||
} else {
|
||||
rebootFile.img11Cnt++;
|
||||
rebootWatchdogFile.img11Cnt++;
|
||||
}
|
||||
}
|
||||
|
||||
if (rebootFile.bootFlag) {
|
||||
if (rebootWatchdogFile.bootFlag) {
|
||||
// Trigger event to inform ground that a reboot was triggered
|
||||
uint32_t p1 = rebootFile.lastChip << 16 | rebootFile.lastCopy;
|
||||
uint32_t p1 = rebootWatchdogFile.lastChip << 16 | rebootWatchdogFile.lastCopy;
|
||||
triggerEvent(core::REBOOT_MECHANISM_TRIGGERED, p1, 0);
|
||||
// Clear the boot flag
|
||||
rebootFile.bootFlag = false;
|
||||
rebootWatchdogFile.bootFlag = false;
|
||||
}
|
||||
|
||||
announceBootCounts();
|
||||
|
||||
if (rebootFile.mechanismNextChip != xsc::NO_CHIP and
|
||||
rebootFile.mechanismNextCopy != xsc::NO_COPY) {
|
||||
if (CURRENT_CHIP != rebootFile.mechanismNextChip or
|
||||
CURRENT_COPY != rebootFile.mechanismNextCopy) {
|
||||
std::string infoString = std::to_string(rebootFile.mechanismNextChip) + " " +
|
||||
std::to_string(rebootFile.mechanismNextCopy);
|
||||
if (rebootWatchdogFile.mechanismNextChip != xsc::NO_CHIP and
|
||||
rebootWatchdogFile.mechanismNextCopy != xsc::NO_COPY) {
|
||||
if (CURRENT_CHIP != rebootWatchdogFile.mechanismNextChip or
|
||||
CURRENT_COPY != rebootWatchdogFile.mechanismNextCopy) {
|
||||
std::string infoString = std::to_string(rebootWatchdogFile.mechanismNextChip) + " " +
|
||||
std::to_string(rebootWatchdogFile.mechanismNextCopy);
|
||||
sif::warning << "CoreController::performRebootFileHandling: Expected to be on image "
|
||||
<< infoString << " but currently on other image. Locking " << infoString
|
||||
<< std::endl;
|
||||
// Firmware or other component might be corrupt and we are on another image then the target
|
||||
// image specified by the mechanism. We can't really trust the target image anymore.
|
||||
// Lock it for now
|
||||
if (rebootFile.mechanismNextChip == xsc::CHIP_0) {
|
||||
if (rebootFile.mechanismNextCopy == xsc::COPY_0) {
|
||||
rebootFile.img00Lock = true;
|
||||
if (rebootWatchdogFile.mechanismNextChip == xsc::CHIP_0) {
|
||||
if (rebootWatchdogFile.mechanismNextCopy == xsc::COPY_0) {
|
||||
rebootWatchdogFile.img00Lock = true;
|
||||
} else {
|
||||
rebootFile.img01Lock = true;
|
||||
rebootWatchdogFile.img01Lock = true;
|
||||
}
|
||||
} else {
|
||||
if (rebootFile.mechanismNextCopy == xsc::COPY_0) {
|
||||
rebootFile.img10Lock = true;
|
||||
if (rebootWatchdogFile.mechanismNextCopy == xsc::COPY_0) {
|
||||
rebootWatchdogFile.img10Lock = true;
|
||||
} else {
|
||||
rebootFile.img11Lock = true;
|
||||
rebootWatchdogFile.img11Lock = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rebootFile.lastChip = CURRENT_CHIP;
|
||||
rebootFile.lastCopy = CURRENT_COPY;
|
||||
rebootWatchdogFile.lastChip = CURRENT_CHIP;
|
||||
rebootWatchdogFile.lastCopy = CURRENT_COPY;
|
||||
// Only reboot if the reboot functionality is enabled.
|
||||
// The handler will still increment the boot counts
|
||||
if (rebootFile.enabled and (*rebootFile.relevantBootCnt >= rebootFile.maxCount)) {
|
||||
if (rebootWatchdogFile.enabled and
|
||||
(*rebootWatchdogFile.relevantBootCnt >= rebootWatchdogFile.maxCount)) {
|
||||
// Reboot to other image
|
||||
bool doReboot = false;
|
||||
xsc::Chip tgtChip = xsc::NO_CHIP;
|
||||
xsc::Copy tgtCopy = xsc::NO_COPY;
|
||||
determineAndExecuteReboot(rebootFile, doReboot, tgtChip, tgtCopy);
|
||||
rebootWatchdogAlgorithm(rebootWatchdogFile, doReboot, tgtChip, tgtCopy);
|
||||
if (doReboot) {
|
||||
rebootFile.bootFlag = true;
|
||||
rebootWatchdogFile.bootFlag = true;
|
||||
#if OBSW_VERBOSE_LEVEL >= 1
|
||||
sif::info << "Boot counter for image " << CURRENT_CHIP << " " << CURRENT_COPY
|
||||
<< " too high. Rebooting to " << tgtChip << " " << tgtCopy << std::endl;
|
||||
#endif
|
||||
rebootFile.mechanismNextChip = tgtChip;
|
||||
rebootFile.mechanismNextCopy = tgtCopy;
|
||||
rewriteRebootFile(rebootFile);
|
||||
xsc_boot_copy(static_cast<xsc_libnor_chip_t>(tgtChip),
|
||||
static_cast<xsc_libnor_copy_t>(tgtCopy));
|
||||
rebootWatchdogFile.mechanismNextChip = tgtChip;
|
||||
rebootWatchdogFile.mechanismNextCopy = tgtCopy;
|
||||
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||
performGracefulShutdown(tgtChip, tgtCopy);
|
||||
}
|
||||
} else {
|
||||
rebootFile.mechanismNextChip = xsc::NO_CHIP;
|
||||
rebootFile.mechanismNextCopy = xsc::NO_COPY;
|
||||
rebootWatchdogFile.mechanismNextChip = xsc::NO_CHIP;
|
||||
rebootWatchdogFile.mechanismNextCopy = xsc::NO_COPY;
|
||||
}
|
||||
rewriteRebootFile(rebootFile);
|
||||
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||
}
|
||||
|
||||
void CoreController::determineAndExecuteReboot(RebootFile &rf, bool &needsReboot,
|
||||
xsc::Chip &tgtChip, xsc::Copy &tgtCopy) {
|
||||
void CoreController::rebootWatchdogAlgorithm(RebootWatchdogFile &rf, bool &needsReboot,
|
||||
xsc::Chip &tgtChip, xsc::Copy &tgtCopy) {
|
||||
tgtChip = xsc::CHIP_0;
|
||||
tgtCopy = xsc::COPY_0;
|
||||
needsReboot = false;
|
||||
@ -1814,7 +1806,7 @@ void CoreController::determineAndExecuteReboot(RebootFile &rf, bool &needsReboot
|
||||
}
|
||||
}
|
||||
|
||||
bool CoreController::parseRebootFile(std::string path, RebootFile &rf) {
|
||||
bool CoreController::parseRebootWatchdogFile(std::string path, RebootWatchdogFile &rf) {
|
||||
using namespace std;
|
||||
std::string selfMatch;
|
||||
if (CURRENT_CHIP == xsc::CHIP_0) {
|
||||
@ -1996,68 +1988,174 @@ bool CoreController::parseRebootFile(std::string path, RebootFile &rf) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void CoreController::resetRebootCount(xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
||||
std::string path = currMntPrefix + REBOOT_FILE;
|
||||
// Disable the reboot file mechanism
|
||||
parseRebootFile(path, rebootFile);
|
||||
bool CoreController::parseRebootCountersFile(std::string path, RebootCountersFile &rf) {
|
||||
using namespace std;
|
||||
ifstream file(path);
|
||||
string word;
|
||||
string line;
|
||||
uint8_t lineIdx = 0;
|
||||
while (std::getline(file, line)) {
|
||||
istringstream iss(line);
|
||||
switch (lineIdx) {
|
||||
case 0: {
|
||||
iss >> word;
|
||||
if (word.find("img00:") == string::npos) {
|
||||
return false;
|
||||
}
|
||||
iss >> rf.img00Cnt;
|
||||
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
iss >> word;
|
||||
if (word.find("img01:") == string::npos) {
|
||||
return false;
|
||||
}
|
||||
iss >> rf.img01Cnt;
|
||||
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
iss >> word;
|
||||
if (word.find("img10:") == string::npos) {
|
||||
return false;
|
||||
}
|
||||
iss >> rf.img10Cnt;
|
||||
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
iss >> word;
|
||||
if (word.find("img11:") == string::npos) {
|
||||
return false;
|
||||
}
|
||||
iss >> rf.img11Cnt;
|
||||
break;
|
||||
}
|
||||
}
|
||||
lineIdx++;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void CoreController::resetRebootWatchdogCounters(xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
||||
std::string path = currMntPrefix + REBOOT_WATCHDOG_FILE;
|
||||
parseRebootWatchdogFile(path, rebootWatchdogFile);
|
||||
if (tgtChip == xsc::ALL_CHIP and tgtCopy == xsc::ALL_COPY) {
|
||||
rebootFile.img00Cnt = 0;
|
||||
rebootFile.img01Cnt = 0;
|
||||
rebootFile.img10Cnt = 0;
|
||||
rebootFile.img11Cnt = 0;
|
||||
rebootWatchdogFile.img00Cnt = 0;
|
||||
rebootWatchdogFile.img01Cnt = 0;
|
||||
rebootWatchdogFile.img10Cnt = 0;
|
||||
rebootWatchdogFile.img11Cnt = 0;
|
||||
} else {
|
||||
if (tgtChip == xsc::CHIP_0) {
|
||||
if (tgtCopy == xsc::COPY_0) {
|
||||
rebootFile.img00Cnt = 0;
|
||||
rebootWatchdogFile.img00Cnt = 0;
|
||||
} else {
|
||||
rebootFile.img01Cnt = 0;
|
||||
rebootWatchdogFile.img01Cnt = 0;
|
||||
}
|
||||
} else {
|
||||
if (tgtCopy == xsc::COPY_0) {
|
||||
rebootFile.img10Cnt = 0;
|
||||
rebootWatchdogFile.img10Cnt = 0;
|
||||
} else {
|
||||
rebootFile.img11Cnt = 0;
|
||||
rebootWatchdogFile.img11Cnt = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
rewriteRebootFile(rebootFile);
|
||||
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||
}
|
||||
|
||||
void CoreController::rewriteRebootFile(RebootFile file) {
|
||||
std::string path = currMntPrefix + REBOOT_FILE;
|
||||
void CoreController::performRebootCountersHandling(bool recreateFile) {
|
||||
std::string path = currMntPrefix + REBOOT_COUNTERS_FILE;
|
||||
std::error_code e;
|
||||
if (not std::filesystem::exists(path, e) or recreateFile) {
|
||||
#if OBSW_VERBOSE_LEVEL >= 1
|
||||
sif::info << "CoreController::performRebootFileHandling: Recreating reboot counters file"
|
||||
<< std::endl;
|
||||
#endif
|
||||
rebootCountersFile.img00Cnt = 0;
|
||||
rebootCountersFile.img01Cnt = 0;
|
||||
rebootCountersFile.img10Cnt = 0;
|
||||
rebootCountersFile.img11Cnt = 0;
|
||||
rewriteRebootCountersFile(rebootCountersFile);
|
||||
} else {
|
||||
if (not parseRebootCountersFile(path, rebootCountersFile)) {
|
||||
performRebootCountersHandling(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (CURRENT_CHIP == xsc::CHIP_0) {
|
||||
if (CURRENT_COPY == xsc::COPY_0) {
|
||||
rebootCountersFile.img00Cnt++;
|
||||
} else {
|
||||
rebootCountersFile.img01Cnt++;
|
||||
}
|
||||
} else {
|
||||
if (CURRENT_COPY == xsc::COPY_0) {
|
||||
rebootCountersFile.img10Cnt++;
|
||||
} else {
|
||||
rebootCountersFile.img11Cnt++;
|
||||
}
|
||||
}
|
||||
announceBootCounts();
|
||||
rewriteRebootCountersFile(rebootCountersFile);
|
||||
}
|
||||
void CoreController::rewriteRebootWatchdogFile(RebootWatchdogFile file) {
|
||||
using namespace std::filesystem;
|
||||
std::string path = currMntPrefix + REBOOT_WATCHDOG_FILE;
|
||||
std::string legacyPath = currMntPrefix + LEGACY_REBOOT_WATCHDOG_FILE;
|
||||
{
|
||||
std::ofstream rebootFile(path);
|
||||
if (rebootFile.is_open()) {
|
||||
// Initiate reboot file first. Reboot handling will be on on initialization
|
||||
rebootFile << "on: " << file.enabled << "\nmaxcnt: " << file.maxCount
|
||||
<< "\nimg00: " << file.img00Cnt << "\nimg01: " << file.img01Cnt
|
||||
<< "\nimg10: " << file.img10Cnt << "\nimg11: " << file.img11Cnt
|
||||
<< "\nimg00lock: " << file.img00Lock << "\nimg01lock: " << file.img01Lock
|
||||
<< "\nimg10lock: " << file.img10Lock << "\nimg11lock: " << file.img11Lock
|
||||
<< "\nbootflag: " << file.bootFlag << "\nlast: " << static_cast<int>(file.lastChip)
|
||||
<< " " << static_cast<int>(file.lastCopy)
|
||||
<< "\nnext: " << static_cast<int>(file.mechanismNextChip) << " "
|
||||
<< static_cast<int>(file.mechanismNextCopy) << "\n";
|
||||
}
|
||||
}
|
||||
std::error_code e;
|
||||
// TODO: Remove at some point in the future when all images have been updated.
|
||||
if (std::filesystem::exists(legacyPath)) {
|
||||
// Keep those two files in sync
|
||||
std::filesystem::copy(path, legacyPath, std::filesystem::copy_options::overwrite_existing, e);
|
||||
if (e) {
|
||||
sif::error << "File copy has failed: " << e.message() << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CoreController::rewriteRebootCountersFile(RebootCountersFile file) {
|
||||
std::string path = currMntPrefix + REBOOT_COUNTERS_FILE;
|
||||
std::ofstream rebootFile(path);
|
||||
if (rebootFile.is_open()) {
|
||||
// Initiate reboot file first. Reboot handling will be on on initialization
|
||||
rebootFile << "on: " << file.enabled << "\nmaxcnt: " << file.maxCount
|
||||
<< "\nimg00: " << file.img00Cnt << "\nimg01: " << file.img01Cnt
|
||||
<< "\nimg10: " << file.img10Cnt << "\nimg11: " << file.img11Cnt
|
||||
<< "\nimg00lock: " << file.img00Lock << "\nimg01lock: " << file.img01Lock
|
||||
<< "\nimg10lock: " << file.img10Lock << "\nimg11lock: " << file.img11Lock
|
||||
<< "\nbootflag: " << file.bootFlag << "\nlast: " << static_cast<int>(file.lastChip)
|
||||
<< " " << static_cast<int>(file.lastCopy)
|
||||
<< "\nnext: " << static_cast<int>(file.mechanismNextChip) << " "
|
||||
<< static_cast<int>(file.mechanismNextCopy) << "\n";
|
||||
rebootFile << "img00: " << file.img00Cnt << "\nimg01: " << file.img01Cnt
|
||||
<< "\nimg10: " << file.img10Cnt << "\nimg11: " << file.img11Cnt << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
void CoreController::setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
||||
std::string path = currMntPrefix + REBOOT_FILE;
|
||||
// Disable the reboot file mechanism
|
||||
parseRebootFile(path, rebootFile);
|
||||
std::string path = currMntPrefix + REBOOT_WATCHDOG_FILE;
|
||||
parseRebootWatchdogFile(path, rebootWatchdogFile);
|
||||
if (tgtChip == xsc::CHIP_0) {
|
||||
if (tgtCopy == xsc::COPY_0) {
|
||||
rebootFile.img00Lock = lock;
|
||||
rebootWatchdogFile.img00Lock = lock;
|
||||
} else {
|
||||
rebootFile.img01Lock = lock;
|
||||
rebootWatchdogFile.img01Lock = lock;
|
||||
}
|
||||
} else {
|
||||
if (tgtCopy == xsc::COPY_0) {
|
||||
rebootFile.img10Lock = lock;
|
||||
rebootWatchdogFile.img10Lock = lock;
|
||||
} else {
|
||||
rebootFile.img11Lock = lock;
|
||||
rebootWatchdogFile.img11Lock = lock;
|
||||
}
|
||||
}
|
||||
rewriteRebootFile(rebootFile);
|
||||
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||
}
|
||||
|
||||
ReturnValue_t CoreController::backupTimeFileHandler() {
|
||||
@ -2344,10 +2442,12 @@ bool CoreController::startSdStateMachine(sd::SdCard targetActiveSd, SdCfgMode mo
|
||||
}
|
||||
|
||||
void CoreController::announceBootCounts() {
|
||||
uint64_t totalBootCount =
|
||||
rebootFile.img00Cnt + rebootFile.img01Cnt + rebootFile.img10Cnt + rebootFile.img11Cnt;
|
||||
uint32_t individualBootCountsP1 = (rebootFile.img00Cnt << 16) | rebootFile.img01Cnt;
|
||||
uint32_t individualBootCountsP2 = (rebootFile.img10Cnt << 16) | rebootFile.img11Cnt;
|
||||
uint64_t totalBootCount = rebootCountersFile.img00Cnt + rebootCountersFile.img01Cnt +
|
||||
rebootCountersFile.img10Cnt + rebootCountersFile.img11Cnt;
|
||||
uint32_t individualBootCountsP1 =
|
||||
(rebootCountersFile.img00Cnt << 16) | rebootCountersFile.img01Cnt;
|
||||
uint32_t individualBootCountsP2 =
|
||||
(rebootCountersFile.img10Cnt << 16) | rebootCountersFile.img11Cnt;
|
||||
triggerEvent(core::INDIVIDUAL_BOOT_COUNTS, individualBootCountsP1, individualBootCountsP2);
|
||||
triggerEvent(core::REBOOT_COUNTER, (totalBootCount >> 32) & 0xffffffff,
|
||||
totalBootCount & 0xffffffff);
|
||||
@ -2405,6 +2505,80 @@ void CoreController::dirListingDumpHandler() {
|
||||
}
|
||||
}
|
||||
|
||||
void CoreController::announceVersionInfo() {
|
||||
using namespace core;
|
||||
uint32_t p1 = (common::OBSW_VERSION_MAJOR << 24) | (common::OBSW_VERSION_MINOR << 16) |
|
||||
(common::OBSW_VERSION_REVISION << 8);
|
||||
uint32_t p2 = 0;
|
||||
if (strcmp("", common::OBSW_VERSION_CST_GIT_SHA1) != 0) {
|
||||
p1 |= 1;
|
||||
auto shaAsStr = std::string(common::OBSW_VERSION_CST_GIT_SHA1);
|
||||
size_t posDash = shaAsStr.find("-");
|
||||
auto gitHash = shaAsStr.substr(posDash + 2, 4);
|
||||
// Only copy first 4 letters of git hash
|
||||
memcpy(&p2, gitHash.c_str(), 4);
|
||||
}
|
||||
|
||||
triggerEvent(VERSION_INFO, p1, p2);
|
||||
|
||||
if (common::OBSW_VERSION_MAJOR >= 6 or common::OBSW_VERSION_MAJOR == 4) {
|
||||
if (mappedSysRomAddr != nullptr) {
|
||||
uint32_t p1Firmware = *(reinterpret_cast<uint32_t *>(mappedSysRomAddr));
|
||||
uint32_t p2Firmware = *(reinterpret_cast<uint32_t *>(mappedSysRomAddr) + 1);
|
||||
triggerEvent(FIRMWARE_INFO, p1Firmware, p2Firmware);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CoreController::announceCurrentImageInfo() {
|
||||
using namespace core;
|
||||
triggerEvent(CURRENT_IMAGE_INFO, CURRENT_CHIP, CURRENT_COPY);
|
||||
}
|
||||
|
||||
ReturnValue_t CoreController::performGracefulShutdown(xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
||||
bool protOpPerformed = false;
|
||||
// This function can not really fail
|
||||
gracefulShutdownTasks(tgtChip, tgtCopy, protOpPerformed);
|
||||
|
||||
switch (tgtChip) {
|
||||
case (xsc::Chip::CHIP_0): {
|
||||
switch (tgtCopy) {
|
||||
case (xsc::Copy::COPY_0): {
|
||||
xsc_boot_copy(XSC_LIBNOR_CHIP_0, XSC_LIBNOR_COPY_NOMINAL);
|
||||
break;
|
||||
}
|
||||
case (xsc::Copy::COPY_1): {
|
||||
xsc_boot_copy(XSC_LIBNOR_CHIP_0, XSC_LIBNOR_COPY_GOLD);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case (xsc::Chip::CHIP_1): {
|
||||
switch (tgtCopy) {
|
||||
case (xsc::Copy::COPY_0): {
|
||||
xsc_boot_copy(XSC_LIBNOR_CHIP_1, XSC_LIBNOR_COPY_NOMINAL);
|
||||
break;
|
||||
}
|
||||
case (xsc::Copy::COPY_1): {
|
||||
xsc_boot_copy(XSC_LIBNOR_CHIP_1, XSC_LIBNOR_COPY_GOLD);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
bool CoreController::isNumber(const std::string &s) {
|
||||
return !s.empty() && std::find_if(s.begin(), s.end(),
|
||||
[](unsigned char c) { return !std::isdigit(c); }) == s.end();
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
|
||||
#include <fsfw/parameters/ParameterHelper.h>
|
||||
#include <fsfw/parameters/ReceivesParameterMessagesIF.h>
|
||||
#include <fsfw_hal/linux/uio/UioMapper.h>
|
||||
#include <libxiphos.h>
|
||||
#include <mission/acs/archive/GPSDefinitions.h>
|
||||
#include <mission/utility/trace.h>
|
||||
@ -23,7 +24,7 @@
|
||||
class Timer;
|
||||
class SdCardManager;
|
||||
|
||||
struct RebootFile {
|
||||
struct RebootWatchdogFile {
|
||||
static constexpr uint8_t DEFAULT_MAX_BOOT_CNT = 10;
|
||||
|
||||
bool enabled = true;
|
||||
@ -44,6 +45,93 @@ struct RebootFile {
|
||||
xsc::Copy mechanismNextCopy = xsc::Copy::NO_COPY;
|
||||
};
|
||||
|
||||
class RebootWatchdogPacket : public SerialLinkedListAdapter<SerializeIF> {
|
||||
public:
|
||||
RebootWatchdogPacket(RebootWatchdogFile& rf) {
|
||||
enabled = rf.enabled;
|
||||
maxCount = rf.maxCount;
|
||||
img00Count = rf.img00Cnt;
|
||||
img01Count = rf.img01Cnt;
|
||||
img10Count = rf.img10Cnt;
|
||||
img11Count = rf.img11Cnt;
|
||||
img00Lock = rf.img00Lock;
|
||||
img01Lock = rf.img01Lock;
|
||||
img10Lock = rf.img10Lock;
|
||||
img11Lock = rf.img11Lock;
|
||||
lastChip = static_cast<uint8_t>(rf.lastChip);
|
||||
lastCopy = static_cast<uint8_t>(rf.lastCopy);
|
||||
nextChip = static_cast<uint8_t>(rf.mechanismNextChip);
|
||||
nextCopy = static_cast<uint8_t>(rf.mechanismNextCopy);
|
||||
setLinks();
|
||||
}
|
||||
|
||||
private:
|
||||
void setLinks() {
|
||||
setStart(&enabled);
|
||||
enabled.setNext(&maxCount);
|
||||
maxCount.setNext(&img00Count);
|
||||
img00Count.setNext(&img01Count);
|
||||
img01Count.setNext(&img10Count);
|
||||
img10Count.setNext(&img11Count);
|
||||
img11Count.setNext(&img00Lock);
|
||||
img00Lock.setNext(&img01Lock);
|
||||
img01Lock.setNext(&img10Lock);
|
||||
img10Lock.setNext(&img11Lock);
|
||||
img11Lock.setNext(&lastChip);
|
||||
lastChip.setNext(&lastCopy);
|
||||
lastCopy.setNext(&nextChip);
|
||||
nextChip.setNext(&nextCopy);
|
||||
setLast(&nextCopy);
|
||||
}
|
||||
|
||||
SerializeElement<uint8_t> enabled = false;
|
||||
SerializeElement<uint32_t> maxCount = 0;
|
||||
SerializeElement<uint32_t> img00Count = 0;
|
||||
SerializeElement<uint32_t> img01Count = 0;
|
||||
SerializeElement<uint32_t> img10Count = 0;
|
||||
SerializeElement<uint32_t> img11Count = 0;
|
||||
SerializeElement<uint8_t> img00Lock = false;
|
||||
SerializeElement<uint8_t> img01Lock = false;
|
||||
SerializeElement<uint8_t> img10Lock = false;
|
||||
SerializeElement<uint8_t> img11Lock = false;
|
||||
SerializeElement<uint8_t> lastChip = 0;
|
||||
SerializeElement<uint8_t> lastCopy = 0;
|
||||
SerializeElement<uint8_t> nextChip = 0;
|
||||
SerializeElement<uint8_t> nextCopy = 0;
|
||||
};
|
||||
|
||||
struct RebootCountersFile {
|
||||
// 16 bit values so all boot counters fit into one event.
|
||||
uint16_t img00Cnt = 0;
|
||||
uint16_t img01Cnt = 0;
|
||||
uint16_t img10Cnt = 0;
|
||||
uint16_t img11Cnt = 0;
|
||||
};
|
||||
|
||||
class RebootCountersPacket : public SerialLinkedListAdapter<SerializeIF> {
|
||||
RebootCountersPacket(RebootCountersFile& rf) {
|
||||
img00Count = rf.img00Cnt;
|
||||
img01Count = rf.img01Cnt;
|
||||
img10Count = rf.img10Cnt;
|
||||
img11Count = rf.img11Cnt;
|
||||
setLinks();
|
||||
}
|
||||
|
||||
private:
|
||||
void setLinks() {
|
||||
setStart(&img00Count);
|
||||
img00Count.setNext(&img01Count);
|
||||
img01Count.setNext(&img10Count);
|
||||
img10Count.setNext(&img11Count);
|
||||
setLast(&img11Count);
|
||||
}
|
||||
|
||||
SerializeElement<uint16_t> img00Count = 0;
|
||||
SerializeElement<uint16_t> img01Count = 0;
|
||||
SerializeElement<uint16_t> img10Count = 0;
|
||||
SerializeElement<uint16_t> img11Count = 0;
|
||||
};
|
||||
|
||||
class CoreController : public ExtendedControllerBase, public ReceivesParameterMessagesIF {
|
||||
public:
|
||||
enum ParamId : uint8_t { PREF_SD = 0, NUM_IDS };
|
||||
@ -57,10 +145,15 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
|
||||
|
||||
const std::string VERSION_FILE =
|
||||
"/" + std::string(core::CONF_FOLDER) + "/" + std::string(core::VERSION_FILE_NAME);
|
||||
const std::string REBOOT_FILE =
|
||||
"/" + std::string(core::CONF_FOLDER) + "/" + std::string(core::REBOOT_FILE_NAME);
|
||||
const std::string LEGACY_REBOOT_WATCHDOG_FILE =
|
||||
"/" + std::string(core::CONF_FOLDER) + "/" +
|
||||
std::string(core::LEGACY_REBOOT_WATCHDOG_FILE_NAME);
|
||||
const std::string REBOOT_WATCHDOG_FILE =
|
||||
"/" + std::string(core::CONF_FOLDER) + "/" + std::string(core::REBOOT_WATCHDOG_FILE_NAME);
|
||||
const std::string BACKUP_TIME_FILE =
|
||||
"/" + std::string(core::CONF_FOLDER) + "/" + std::string(core::TIME_FILE_NAME);
|
||||
const std::string REBOOT_COUNTERS_FILE =
|
||||
"/" + std::string(core::CONF_FOLDER) + "/" + std::string(core::REBOOT_COUNTER_FILE_NAME);
|
||||
|
||||
static constexpr char CHIP_0_COPY_0_MOUNT_DIR[] = "/tmp/mntupdate-xdi-qspi0-nom-rootfs";
|
||||
static constexpr char CHIP_0_COPY_1_MOUNT_DIR[] = "/tmp/mntupdate-xdi-qspi0-gold-rootfs";
|
||||
@ -142,6 +235,7 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
|
||||
|
||||
static constexpr bool BLOCKING_SD_INIT = false;
|
||||
|
||||
uint32_t* mappedSysRomAddr = nullptr;
|
||||
SdCardManager* sdcMan = nullptr;
|
||||
MessageQueueIF* eventQueue = nullptr;
|
||||
|
||||
@ -191,7 +285,8 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
|
||||
std::array<uint8_t, 1024> dirListingBuf{};
|
||||
DirListingDumpContext dumpContext{};
|
||||
|
||||
RebootFile rebootFile = {};
|
||||
RebootWatchdogFile rebootWatchdogFile = {};
|
||||
RebootCountersFile rebootCountersFile = {};
|
||||
|
||||
CommandExecutor cmdExecutor;
|
||||
SimpleRingBuffer cmdReplyBuf;
|
||||
@ -261,12 +356,14 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
|
||||
void currentStateSetter(sd::SdCard sdCard, sd::SdState newState);
|
||||
void executeNextExternalSdCommand();
|
||||
void checkExternalSdCommandStatus();
|
||||
void performRebootFileHandling(bool recreateFile);
|
||||
void performRebootWatchdogHandling(bool recreateFile);
|
||||
void performRebootCountersHandling(bool recreateFile);
|
||||
|
||||
ReturnValue_t actionListDirectoryIntoFile(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||
const uint8_t* data, size_t size);
|
||||
ReturnValue_t actionListDirectoryDumpDirectly(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||
const uint8_t* data, size_t size);
|
||||
ReturnValue_t performGracefulShutdown(xsc::Chip targetChip, xsc::Copy targetCopy);
|
||||
|
||||
ReturnValue_t actionListDirectoryCommonCommandCreator(const uint8_t* data, size_t size,
|
||||
std::ostringstream& oss);
|
||||
@ -280,13 +377,17 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
|
||||
int handleBootCopyProtAtIndex(xsc::Chip targetChip, xsc::Copy targetCopy, bool protect,
|
||||
bool& protOperationPerformed, bool selfChip, bool selfCopy,
|
||||
bool allChips, bool allCopies, uint8_t arrIdx);
|
||||
void determineAndExecuteReboot(RebootFile& rf, bool& needsReboot, xsc::Chip& tgtChip,
|
||||
xsc::Copy& tgtCopy);
|
||||
void resetRebootCount(xsc::Chip tgtChip, xsc::Copy tgtCopy);
|
||||
void rebootWatchdogAlgorithm(RebootWatchdogFile& rf, bool& needsReboot, xsc::Chip& tgtChip,
|
||||
xsc::Copy& tgtCopy);
|
||||
void resetRebootWatchdogCounters(xsc::Chip tgtChip, xsc::Copy tgtCopy);
|
||||
void setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::Copy tgtCopy);
|
||||
bool parseRebootFile(std::string path, RebootFile& file);
|
||||
void rewriteRebootFile(RebootFile file);
|
||||
bool parseRebootWatchdogFile(std::string path, RebootWatchdogFile& file);
|
||||
bool parseRebootCountersFile(std::string path, RebootCountersFile& file);
|
||||
void rewriteRebootWatchdogFile(RebootWatchdogFile file);
|
||||
void rewriteRebootCountersFile(RebootCountersFile file);
|
||||
void announceBootCounts();
|
||||
void announceVersionInfo();
|
||||
void announceCurrentImageInfo();
|
||||
void readHkData();
|
||||
void dirListingDumpHandler();
|
||||
bool isNumber(const std::string& s);
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include <fsfw/devicehandlers/HealthDevice.h>
|
||||
#include <fsfw/subsystem/Subsystem.h>
|
||||
#include <fsfw/tasks/TaskFactory.h>
|
||||
#include <linux/acs/AcsBoardPolling.h>
|
||||
#include <linux/acs/GpsHyperionLinuxController.h>
|
||||
#include <linux/acs/ImtqPollingTask.h>
|
||||
@ -505,7 +506,7 @@ void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF*
|
||||
debugGps = true;
|
||||
#endif
|
||||
RESET_ARGS_GNSS.gpioComIF = gpioComIF;
|
||||
RESET_ARGS_GNSS.waitPeriodMs = 100;
|
||||
RESET_ARGS_GNSS.waitPeriodMs = 5;
|
||||
auto gpsCtrl = new GpsHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT,
|
||||
enableHkSets, debugGps);
|
||||
gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS);
|
||||
@ -764,6 +765,7 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) {
|
||||
VirtualChannelIF* vc3 =
|
||||
new PapbVcInterface(&args.gpioComIF, gpioIds::VC3_PAPB_BUSY, gpioIds::VC3_PAPB_EMPTY,
|
||||
q7s::UIO_PTME, q7s::uiomapids::PTME_VC3);
|
||||
|
||||
// Creating ptme object and adding virtual channel interfaces
|
||||
Ptme* ptme = new Ptme(objects::PTME);
|
||||
ptme->addVcInterface(ccsds::VC0, vc0);
|
||||
@ -1025,3 +1027,21 @@ void ObjectFactory::createRadSensorChipSelect(LinuxLibgpioIF* gpioIF) {
|
||||
gpioCookieRadSensor->addGpio(gpioIds::ENABLE_RADFET, gpio);
|
||||
gpioChecker(gpioIF->addGpios(gpioCookieRadSensor), "RAD sensor");
|
||||
}
|
||||
|
||||
void ObjectFactory::createPlI2cResetGpio(LinuxLibgpioIF* gpioIF) {
|
||||
using namespace gpio;
|
||||
if (common::OBSW_VERSION_MAJOR >= 6 or common::OBSW_VERSION_MAJOR == 4) {
|
||||
if (gpioIF == nullptr) {
|
||||
return;
|
||||
}
|
||||
GpioCookie* gpioI2cResetnCookie = new GpioCookie;
|
||||
GpiodRegularByLineName* gpioI2cResetn = new GpiodRegularByLineName(
|
||||
q7s::gpioNames::PL_I2C_ARESETN, "PL_I2C_ARESETN", Direction::OUT, Levels::HIGH);
|
||||
gpioI2cResetnCookie->addGpio(gpioIds::PL_I2C_ARESETN, gpioI2cResetn);
|
||||
gpioChecker(gpioIF->addGpios(gpioI2cResetnCookie), "PL I2C ARESETN");
|
||||
// Reset I2C explicitely again.
|
||||
gpioIF->pullLow(gpioIds::PL_I2C_ARESETN);
|
||||
TaskFactory::delayTask(1);
|
||||
gpioIF->pullHigh(gpioIds::PL_I2C_ARESETN);
|
||||
}
|
||||
}
|
||||
|
@ -78,6 +78,7 @@ ReturnValue_t createCcsdsComponents(CcsdsComponentArgs& args);
|
||||
void createMiscComponents();
|
||||
|
||||
void createTestComponents(LinuxLibgpioIF* gpioComIF);
|
||||
void createPlI2cResetGpio(LinuxLibgpioIF* gpioComIF);
|
||||
|
||||
void testAcsBrdAss(AcsBoardAssembly* assAss);
|
||||
|
||||
|
@ -47,6 +47,7 @@ void ObjectFactory::produce(void* args) {
|
||||
/* Adding gpios for chip select decoding to the gpioComIf */
|
||||
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
|
||||
gpioCallbacks::disableAllDecoder(gpioComIF);
|
||||
createPlI2cResetGpio(gpioComIF);
|
||||
|
||||
// Hardware is usually not connected to EM, so we need to create dummies which replace lower
|
||||
// level components.
|
||||
@ -83,21 +84,6 @@ void ObjectFactory::produce(void* args) {
|
||||
|
||||
new CoreController(objects::CORE_CONTROLLER, enableHkSets);
|
||||
|
||||
// Regular FM code, does not work for EM if the hardware is not connected
|
||||
// createPcduComponents(gpioComIF, &pwrSwitcher);
|
||||
// createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
|
||||
// createSyrlinksComponents(pwrSwitcher);
|
||||
// createSunSensorComponents(gpioComIF, spiMainComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
|
||||
// createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF);
|
||||
// createTmpComponents();
|
||||
// createSolarArrayDeploymentComponents();
|
||||
// createPayloadComponents(gpioComIF);
|
||||
// createHeaterComponents(gpioComIF, pwrSwitcher, healthTable);
|
||||
|
||||
// TODO: Careful! Switching this on somehow messes with the communication with the ProASIC
|
||||
// and will cause xsc_boot_copy commands to always boot to 0 0
|
||||
// createRadSensorComponent(gpioComIF);
|
||||
|
||||
#if OBSW_ADD_ACS_BOARD == 1
|
||||
// Still initialize chip select to avoid SPI bus issues.
|
||||
createRadSensorChipSelect(gpioComIF);
|
||||
|
@ -45,6 +45,7 @@ void ObjectFactory::produce(void* args) {
|
||||
/* Adding gpios for chip select decoding to the gpioComIf */
|
||||
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
|
||||
gpioCallbacks::disableAllDecoder(gpioComIF);
|
||||
createPlI2cResetGpio(gpioComIF);
|
||||
|
||||
new CoreController(objects::CORE_CONTROLLER, enableHkSets);
|
||||
createPcduComponents(gpioComIF, &pwrSwitcher, enableHkSets);
|
||||
|
@ -77,6 +77,8 @@ enum gpioId_t {
|
||||
CS_RAD_SENSOR,
|
||||
ENABLE_RADFET,
|
||||
|
||||
PL_I2C_ARESETN,
|
||||
|
||||
PAPB_BUSY_N,
|
||||
PAPB_EMPTY,
|
||||
|
||||
@ -93,7 +95,6 @@ enum gpioId_t {
|
||||
EN_RW_CS,
|
||||
|
||||
SPI_MUX,
|
||||
|
||||
VC0_PAPB_EMPTY,
|
||||
VC0_PAPB_BUSY,
|
||||
VC1_PAPB_EMPTY,
|
||||
|
@ -5,14 +5,19 @@
|
||||
ImtqDummy::ImtqDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie,
|
||||
power::Switch_t pwrSwitcher, bool enableHkSets)
|
||||
: DeviceHandlerBase(objectId, comif, comCookie),
|
||||
setNoTorque(this),
|
||||
setWithTorque(this),
|
||||
enableHkSets(enableHkSets),
|
||||
statusSet(this),
|
||||
dipoleSet(*this),
|
||||
rawMtmNoTorque(this),
|
||||
hkDatasetNoTorque(this),
|
||||
rawMtmWithTorque(this),
|
||||
hkDatasetWithTorque(this),
|
||||
calMtmMeasurementSet(this),
|
||||
switcher(pwrSwitcher) {}
|
||||
|
||||
ImtqDummy::~ImtqDummy() = default;
|
||||
|
||||
void ImtqDummy::doStartUp() { setMode(MODE_NORMAL); }
|
||||
void ImtqDummy::doStartUp() { setMode(MODE_ON); }
|
||||
|
||||
void ImtqDummy::doShutDown() { setMode(_MODE_POWER_DOWN); }
|
||||
|
||||
@ -79,17 +84,37 @@ ReturnValue_t ImtqDummy::initializeLocalDataPool(localpool::DataPool &localDataP
|
||||
localDataPoolMap.emplace(imtq::MCU_TEMPERATURE_WT, new PoolEntry<int16_t>({0}));
|
||||
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(setNoTorque.getSid(), enableHkSets, 30.0));
|
||||
subdp::DiagnosticsHkPeriodicParams(hkDatasetNoTorque.getSid(), enableHkSets, 30.0));
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(setWithTorque.getSid(), enableHkSets, 30.0));
|
||||
subdp::DiagnosticsHkPeriodicParams(hkDatasetWithTorque.getSid(), enableHkSets, 30.0));
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(rawMtmNoTorque.getSid(), false, 10.0));
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(rawMtmWithTorque.getSid(), false, 10.0));
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(calMtmMeasurementSet.getSid(), false, 10.0));
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(statusSet.getSid(), false, 10.0));
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(dipoleSet.getSid(), false, 10.0));
|
||||
return DeviceHandlerBase::initializeLocalDataPool(localDataPoolMap, poolManager);
|
||||
}
|
||||
|
||||
LocalPoolDataSetBase *ImtqDummy::getDataSetHandle(sid_t sid) {
|
||||
if (sid == setNoTorque.getSid()) {
|
||||
return &setNoTorque;
|
||||
} else if (sid == setWithTorque.getSid()) {
|
||||
return &setWithTorque;
|
||||
if (sid == hkDatasetNoTorque.getSid()) {
|
||||
return &hkDatasetNoTorque;
|
||||
} else if (sid == dipoleSet.getSid()) {
|
||||
return &dipoleSet;
|
||||
} else if (sid == statusSet.getSid()) {
|
||||
return &statusSet;
|
||||
} else if (sid == hkDatasetWithTorque.getSid()) {
|
||||
return &hkDatasetWithTorque;
|
||||
} else if (sid == rawMtmWithTorque.getSid()) {
|
||||
return &rawMtmWithTorque;
|
||||
} else if (sid == calMtmMeasurementSet.getSid()) {
|
||||
return &calMtmMeasurementSet;
|
||||
} else if (sid == rawMtmNoTorque.getSid()) {
|
||||
return &rawMtmNoTorque;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -18,11 +18,18 @@ class ImtqDummy : public DeviceHandlerBase {
|
||||
~ImtqDummy() override;
|
||||
|
||||
protected:
|
||||
ReturnValue_t getSwitches(const uint8_t **switches, uint8_t *numberOfSwitches) override;
|
||||
imtq::HkDatasetNoTorque setNoTorque;
|
||||
imtq::HkDatasetWithTorque setWithTorque;
|
||||
bool enableHkSets;
|
||||
|
||||
imtq::StatusDataset statusSet;
|
||||
imtq::DipoleActuationSet dipoleSet;
|
||||
imtq::RawMtmMeasurementNoTorque rawMtmNoTorque;
|
||||
imtq::HkDatasetNoTorque hkDatasetNoTorque;
|
||||
|
||||
imtq::RawMtmMeasurementWithTorque rawMtmWithTorque;
|
||||
imtq::HkDatasetWithTorque hkDatasetWithTorque;
|
||||
|
||||
imtq::CalibratedMtmMeasurementSet calMtmMeasurementSet;
|
||||
|
||||
PoolEntry<uint8_t> statusMode = PoolEntry<uint8_t>({0});
|
||||
PoolEntry<uint8_t> statusError = PoolEntry<uint8_t>({0});
|
||||
PoolEntry<uint8_t> statusConfig = PoolEntry<uint8_t>({0});
|
||||
@ -42,6 +49,8 @@ class ImtqDummy : public DeviceHandlerBase {
|
||||
|
||||
power::Switch_t switcher = power::NO_SWITCH;
|
||||
|
||||
ReturnValue_t getSwitches(const uint8_t **switches, uint8_t *numberOfSwitches) override;
|
||||
|
||||
void doStartUp() override;
|
||||
void doShutDown() override;
|
||||
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
||||
|
@ -3,13 +3,24 @@
|
||||
#include <mission/acs/rwHelpers.h>
|
||||
|
||||
RwDummy::RwDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
||||
: DeviceHandlerBase(objectId, comif, comCookie),
|
||||
|
||||
statusSet(this),
|
||||
lastResetStatusSet(this),
|
||||
tmDataset(this),
|
||||
rwSpeedActuationSet(*this) {}
|
||||
|
||||
RwDummy::~RwDummy() {}
|
||||
|
||||
void RwDummy::doStartUp() { setMode(MODE_ON); }
|
||||
void RwDummy::doStartUp() {
|
||||
statusSet.setReportingEnabled(true);
|
||||
setMode(MODE_ON);
|
||||
}
|
||||
|
||||
void RwDummy::doShutDown() { setMode(MODE_OFF); }
|
||||
void RwDummy::doShutDown() {
|
||||
statusSet.setReportingEnabled(false);
|
||||
setMode(MODE_OFF);
|
||||
}
|
||||
|
||||
ReturnValue_t RwDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; }
|
||||
|
||||
@ -74,5 +85,11 @@ ReturnValue_t RwDummy::initializeLocalDataPool(localpool::DataPool &localDataPoo
|
||||
localDataPoolMap.emplace(rws::SPI_BYTES_READ, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(rws::SPI_REG_OVERRUN_ERRORS, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(rws::SPI_TOTAL_ERRORS, new PoolEntry<uint32_t>({0}));
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(statusSet.getSid(), false, 12.0));
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(tmDataset.getSid(), false, 30.0));
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(lastResetStatusSet.getSid(), false, 30.0));
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define DUMMIES_RWDUMMY_H_
|
||||
|
||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||
#include <mission/acs/rwHelpers.h>
|
||||
|
||||
class RwDummy : public DeviceHandlerBase {
|
||||
public:
|
||||
@ -15,6 +16,11 @@ class RwDummy : public DeviceHandlerBase {
|
||||
virtual ~RwDummy();
|
||||
|
||||
protected:
|
||||
rws::StatusSet statusSet;
|
||||
rws::LastResetSatus lastResetStatusSet;
|
||||
rws::TmDataset tmDataset;
|
||||
rws::RwSpeedActuationSet rwSpeedActuationSet;
|
||||
|
||||
PoolEntry<int32_t> rwSpeed = PoolEntry<int32_t>({0});
|
||||
PoolEntry<uint16_t> rampTime = PoolEntry<uint16_t>({10});
|
||||
|
||||
|
@ -271,6 +271,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
14010;0x36ba;TRYING_I2C_RECOVERY;HIGH;I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C devices.;mission/sysDefs.h
|
||||
14011;0x36bb;I2C_REBOOT;HIGH;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h
|
||||
14012;0x36bc;PDEC_REBOOT;HIGH;PDEC recovery through reset was not possible, performing full reboot.;mission/sysDefs.h
|
||||
14013;0x36bd;FIRMWARE_INFO;INFO;Version information of the firmware (not OBSW). P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;mission/sysDefs.h
|
||||
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h
|
||||
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h
|
||||
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
||||
|
|
@ -271,6 +271,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
14010;0x36ba;TRYING_I2C_RECOVERY;HIGH;I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C devices.;mission/sysDefs.h
|
||||
14011;0x36bb;I2C_REBOOT;HIGH;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h
|
||||
14012;0x36bc;PDEC_REBOOT;HIGH;PDEC recovery through reset was not possible, performing full reboot.;mission/sysDefs.h
|
||||
14013;0x36bd;FIRMWARE_INFO;INFO;Version information of the firmware (not OBSW). P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;mission/sysDefs.h
|
||||
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h
|
||||
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h
|
||||
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
||||
|
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 295 translations.
|
||||
* @brief Auto-generated event translation file. Contains 296 translations.
|
||||
* @details
|
||||
* Generated on: 2023-05-17 17:15:34
|
||||
* Generated on: 2023-06-21 19:01:02
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -277,6 +277,7 @@ const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
|
||||
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
|
||||
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
|
||||
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
|
||||
const char *FIRMWARE_INFO_STRING = "FIRMWARE_INFO";
|
||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||
@ -847,6 +848,8 @@ const char *translateEvents(Event event) {
|
||||
return I2C_REBOOT_STRING;
|
||||
case (14012):
|
||||
return PDEC_REBOOT_STRING;
|
||||
case (14013):
|
||||
return FIRMWARE_INFO_STRING;
|
||||
case (14100):
|
||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||
case (14101):
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 175 translations.
|
||||
* Generated on: 2023-05-17 17:15:34
|
||||
* Generated on: 2023-06-21 19:01:02
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 295 translations.
|
||||
* @brief Auto-generated event translation file. Contains 296 translations.
|
||||
* @details
|
||||
* Generated on: 2023-05-17 17:15:34
|
||||
* Generated on: 2023-06-21 19:01:02
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -277,6 +277,7 @@ const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
|
||||
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
|
||||
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
|
||||
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
|
||||
const char *FIRMWARE_INFO_STRING = "FIRMWARE_INFO";
|
||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||
@ -847,6 +848,8 @@ const char *translateEvents(Event event) {
|
||||
return I2C_REBOOT_STRING;
|
||||
case (14012):
|
||||
return PDEC_REBOOT_STRING;
|
||||
case (14013):
|
||||
return FIRMWARE_INFO_STRING;
|
||||
case (14100):
|
||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||
case (14101):
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 175 translations.
|
||||
* Generated on: 2023-05-17 17:15:34
|
||||
* Generated on: 2023-06-21 19:01:02
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
|
@ -57,7 +57,8 @@
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
@ -119,7 +120,8 @@
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
@ -187,7 +189,8 @@
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
@ -255,7 +258,8 @@
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
@ -418,7 +422,8 @@
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="build-Debug-RPi/_deps/etl-src/uml|build-Debug-RPi/_deps/etl-src/test|build-Debug-RPi/_deps/etl-src/temp|build-Debug-RPi/_deps/etl-src/support|build-Debug-RPi/_deps/etl-src/subprojects|build-Debug-RPi/_deps/etl-src/scripts|build-Debug-RPi/_deps/etl-src/images|build-Debug-RPi/_deps/etl-src/examples|build-Debug-RPi/_deps/etl-src/cmake|build-Debug-RPi/_deps/etl-src/arduino|cmake-build-debug-q7s|cmake-build-debug|cmake-build-debug-q7s-em|cmake-build-release-q7s-em|bsp_hosted|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry excluding="unittest/rebootLogic|thirdparty/json|build-Debug-RPi/_deps/etl-src/uml|build-Debug-RPi/_deps/etl-src/test|build-Debug-RPi/_deps/etl-src/temp|build-Debug-RPi/_deps/etl-src/support|build-Debug-RPi/_deps/etl-src/subprojects|build-Debug-RPi/_deps/etl-src/scripts|build-Debug-RPi/_deps/etl-src/images|build-Debug-RPi/_deps/etl-src/examples|build-Debug-RPi/_deps/etl-src/cmake|build-Debug-RPi/_deps/etl-src/arduino|cmake-build-debug-q7s|cmake-build-debug|cmake-build-debug-q7s-em|cmake-build-release-q7s-em|bsp_hosted|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
@ -580,7 +585,8 @@
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="build-Debug-RPi/_deps/etl-src/uml|build-Debug-RPi/_deps/etl-src/test|build-Debug-RPi/_deps/etl-src/temp|build-Debug-RPi/_deps/etl-src/support|build-Debug-RPi/_deps/etl-src/subprojects|build-Debug-RPi/_deps/etl-src/scripts|build-Debug-RPi/_deps/etl-src/images|build-Debug-RPi/_deps/etl-src/examples|build-Debug-RPi/_deps/etl-src/cmake|build-Debug-RPi/_deps/etl-src/arduino|cmake-build-debug-q7s|cmake-build-debug|cmake-build-debug-q7s-em|cmake-build-release-q7s-em|bsp_hosted|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry excluding="unittest/rebootLogic|thirdparty/json|build-Debug-RPi/_deps/etl-src/uml|build-Debug-RPi/_deps/etl-src/test|build-Debug-RPi/_deps/etl-src/temp|build-Debug-RPi/_deps/etl-src/support|build-Debug-RPi/_deps/etl-src/subprojects|build-Debug-RPi/_deps/etl-src/scripts|build-Debug-RPi/_deps/etl-src/images|build-Debug-RPi/_deps/etl-src/examples|build-Debug-RPi/_deps/etl-src/cmake|build-Debug-RPi/_deps/etl-src/arduino|cmake-build-debug-q7s|cmake-build-debug|cmake-build-debug-q7s-em|cmake-build-release-q7s-em|bsp_hosted|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
@ -750,7 +756,8 @@
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="cmake-build-release-q7s-em|build-Debug-RPi|bsp_hosted|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|cmake-build-debug|cmake-build-debug-q7s-em|build-Debug-Host|build-Watchdog-Debug" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-release-q7s-em|build-Debug-RPi|bsp_hosted|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|cmake-build-debug|cmake-build-debug-q7s-em|build-Debug-Host|build-Watchdog-Debug" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
@ -917,7 +924,8 @@
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="cmake-build-debug-q7s|cmake-build-release-q7s-em|cmake-build-release-q7s/_deps/etl-src/uml|cmake-build-release-q7s/_deps/etl-src/test|cmake-build-release-q7s/_deps/etl-src/temp|cmake-build-release-q7s/_deps/etl-src/support|cmake-build-release-q7s/_deps/etl-src/subprojects|cmake-build-release-q7s/_deps/etl-src/scripts|cmake-build-release-q7s/_deps/etl-src/images|cmake-build-release-q7s/_deps/etl-src/examples|cmake-build-release-q7s/_deps/etl-src/cmake|cmake-build-release-q7s/_deps/etl-src/arduino|build-Debug-RPi|bsp_hosted|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|cmake-build-debug|cmake-build-debug-q7s-em|build-Debug-Host|build-Watchdog-Debug" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-debug-q7s|cmake-build-release-q7s-em|cmake-build-release-q7s/_deps/etl-src/uml|cmake-build-release-q7s/_deps/etl-src/test|cmake-build-release-q7s/_deps/etl-src/temp|cmake-build-release-q7s/_deps/etl-src/support|cmake-build-release-q7s/_deps/etl-src/subprojects|cmake-build-release-q7s/_deps/etl-src/scripts|cmake-build-release-q7s/_deps/etl-src/images|cmake-build-release-q7s/_deps/etl-src/examples|cmake-build-release-q7s/_deps/etl-src/cmake|cmake-build-release-q7s/_deps/etl-src/arduino|build-Debug-RPi|bsp_hosted|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|cmake-build-debug|cmake-build-debug-q7s-em|build-Debug-Host|build-Watchdog-Debug" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
@ -1084,7 +1092,8 @@
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="cmake-build-debug/_deps/etl-src/uml|cmake-build-debug/_deps/etl-src/test|cmake-build-debug/_deps/etl-src/temp|cmake-build-debug/_deps/etl-src/support|cmake-build-debug/_deps/etl-src/subprojects|cmake-build-debug/_deps/etl-src/scripts|cmake-build-debug/_deps/etl-src/images|cmake-build-debug/_deps/etl-src/examples|cmake-build-debug/_deps/etl-src/cmake|cmake-build-debug/_deps/etl-src/arduino|cmake-build-release-q7s-em|build-Debug-RPi|bsp_hosted|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-debug-q7s-em/_deps/etl-src|cmake-build-debug/_deps/etl-src/uml|cmake-build-debug/_deps/etl-src/test|cmake-build-debug/_deps/etl-src/temp|cmake-build-debug/_deps/etl-src/support|cmake-build-debug/_deps/etl-src/subprojects|cmake-build-debug/_deps/etl-src/scripts|cmake-build-debug/_deps/etl-src/images|cmake-build-debug/_deps/etl-src/examples|cmake-build-debug/_deps/etl-src/cmake|cmake-build-debug/_deps/etl-src/arduino|cmake-build-release-q7s-em|build-Debug-RPi|bsp_hosted|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
@ -1149,7 +1158,8 @@
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="cmake-build-debug/_deps/etl-src/uml|cmake-build-debug/_deps/etl-src/test|cmake-build-debug/_deps/etl-src/temp|cmake-build-debug/_deps/etl-src/support|cmake-build-debug/_deps/etl-src/subprojects|cmake-build-debug/_deps/etl-src/scripts|cmake-build-debug/_deps/etl-src/images|cmake-build-debug/_deps/etl-src/examples|cmake-build-debug/_deps/etl-src/cmake|cmake-build-debug/_deps/etl-src/arduino|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-debug-q7s-em/_deps/etl-src|cmake-build-debug/_deps/etl-src/uml|cmake-build-debug/_deps/etl-src/test|cmake-build-debug/_deps/etl-src/temp|cmake-build-debug/_deps/etl-src/support|cmake-build-debug/_deps/etl-src/subprojects|cmake-build-debug/_deps/etl-src/scripts|cmake-build-debug/_deps/etl-src/images|cmake-build-debug/_deps/etl-src/examples|cmake-build-debug/_deps/etl-src/cmake|cmake-build-debug/_deps/etl-src/arduino|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
@ -1172,7 +1182,7 @@
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" errorParsers="org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1171630561" name="eive-q7s-debug-em" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.enablement=null,org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.image=null,org.eclipse.cdt.docker.launcher.containerbuild.property.connection=null" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" errorParsers="org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1171630561" name="eive-q7s-debug-em" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.enablement=null,org.eclipse.cdt.docker.launcher.containerbuild.property.dockerdpath=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.connection=unix:///var/run/docker.sock,org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.image=null" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1171630561." name="/" resourcePath="">
|
||||
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.1640701365" name="Arm Cross GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.564607779" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
|
||||
@ -1317,7 +1327,9 @@
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="cmake-build-debug-q7s|cmake-build-release-q7s-em|build-Debug-RPi|bsp_hosted|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|cmake-build-debug|build-Debug-Host|build-Watchdog-Debug" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-debug-q7s-em/_deps/etl-src|cmake-build-debug-q7s|cmake-build-release-q7s-em|build-Debug-RPi|bsp_hosted|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|cmake-build-debug|build-Debug-Host|build-Watchdog-Debug" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="cmake-build-debug-q7s-em/_deps/etl-src/include"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
@ -1386,7 +1398,8 @@
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="cmake-build-debug/_deps/etl-src/uml|cmake-build-debug/_deps/etl-src/test|cmake-build-debug/_deps/etl-src/temp|cmake-build-debug/_deps/etl-src/support|cmake-build-debug/_deps/etl-src/subprojects|cmake-build-debug/_deps/etl-src/scripts|cmake-build-debug/_deps/etl-src/images|cmake-build-debug/_deps/etl-src/examples|cmake-build-debug/_deps/etl-src/cmake|cmake-build-debug/_deps/etl-src/arduino|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-debug-q7s-em/_deps/etl-src|cmake-build-debug/_deps/etl-src/uml|cmake-build-debug/_deps/etl-src/test|cmake-build-debug/_deps/etl-src/temp|cmake-build-debug/_deps/etl-src/support|cmake-build-debug/_deps/etl-src/subprojects|cmake-build-debug/_deps/etl-src/scripts|cmake-build-debug/_deps/etl-src/images|cmake-build-debug/_deps/etl-src/examples|cmake-build-debug/_deps/etl-src/cmake|cmake-build-debug/_deps/etl-src/arduino|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
@ -30,6 +30,7 @@ void SusHandler::doStartUp() {
|
||||
void SusHandler::doShutDown() {
|
||||
if (internalState != InternalState::SHUTDOWN) {
|
||||
PoolReadGuard pg(&dataset);
|
||||
dataset.tempC = thermal::INVALID_TEMPERATURE;
|
||||
dataset.setValidity(false, true);
|
||||
internalState = InternalState::SHUTDOWN;
|
||||
commandExecuted = false;
|
||||
|
@ -18,6 +18,7 @@ extern "C" {
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
#include "eive/definitions.h"
|
||||
#include "fsfw/thermal/tcsDefinitions.h"
|
||||
|
||||
std::atomic_bool JCFG_DONE(false);
|
||||
|
||||
@ -111,6 +112,9 @@ void StarTrackerHandler::doShutDown() {
|
||||
}
|
||||
{
|
||||
PoolReadGuard pg(&temperatureSet);
|
||||
temperatureSet.fpgaTemperature = thermal::INVALID_TEMPERATURE;
|
||||
temperatureSet.cmosTemperature = thermal::INVALID_TEMPERATURE;
|
||||
temperatureSet.mcuTemperature = thermal::INVALID_TEMPERATURE;
|
||||
temperatureSet.setValidity(false, true);
|
||||
}
|
||||
reinitNextSetParam = false;
|
||||
|
@ -93,7 +93,8 @@ ReturnValue_t CfdpHandler::handleCfdpPacket(TmTcMessage& msg) {
|
||||
return INVALID_PDU_FORMAT;
|
||||
}
|
||||
if (not FileDirectiveReader::checkFileDirective(pduDataField[0])) {
|
||||
sif::error << "CfdpHandler: Invalid PDU directive field " << pduDataField[0] << std::endl;
|
||||
sif::error << "CfdpHandler: Invalid PDU directive field " << static_cast<int>(pduDataField[0])
|
||||
<< std::endl;
|
||||
return INVALID_DIRECTIVE_FIELD;
|
||||
}
|
||||
auto directive = static_cast<FileDirective>(pduDataField[0]);
|
||||
|
@ -25,7 +25,7 @@ class SusConverter {
|
||||
|
||||
static constexpr float S = 0.03; // S=[mm] gap between diodes
|
||||
static constexpr float D = 5; // D=[mm] edge length of the quadratic aperture
|
||||
static constexpr float H = 1; // H=[mm] distance between diodes and aperture
|
||||
static constexpr float H = 2.5; // H=[mm] distance between diodes and aperture
|
||||
|
||||
AcsParameters acsParameters;
|
||||
};
|
||||
|
@ -66,7 +66,7 @@ void P60DockHandler::parseHkTableReply(const uint8_t *packet) {
|
||||
}
|
||||
coreHk.battMode = newBattMode;
|
||||
|
||||
auxHk.heaterOn = *(packet + 0x57);
|
||||
auxHk.heaterForBp4PackOn = *(packet + 0x57);
|
||||
auxHk.converter5VStatus = *(packet + 0x58);
|
||||
|
||||
for (uint8_t idx = 0; idx < hk::CHNLS_LEN; idx++) {
|
||||
@ -111,6 +111,8 @@ void P60DockHandler::parseHkTableReply(const uint8_t *packet) {
|
||||
}
|
||||
coreHk.setValidity(true, true);
|
||||
auxHk.setValidity(true, true);
|
||||
// No BP4 pack, no this is always invalid.
|
||||
auxHk.heaterForBp4PackOn.setValid(false);
|
||||
}
|
||||
|
||||
ReturnValue_t P60DockHandler::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||
|
@ -260,7 +260,8 @@ class HkTableDataset : public StaticLocalDataSet<32> {
|
||||
lp_var_t<uint16_t> resetcause = lp_var_t<uint16_t>(sid.objectId, pool::P60DOCK_RESETCAUSE, this);
|
||||
|
||||
/** Battery heater control only possible on BP4 packs */
|
||||
lp_var_t<uint8_t> heaterOn = lp_var_t<uint8_t>(sid.objectId, pool::P60DOCK_HEATER_ON, this);
|
||||
lp_var_t<uint8_t> heaterForBp4PackOn =
|
||||
lp_var_t<uint8_t>(sid.objectId, pool::P60DOCK_HEATER_ON, this);
|
||||
lp_var_t<uint8_t> converter5VStatus =
|
||||
lp_var_t<uint8_t>(sid.objectId, pool::P60DOCK_CONV_5V_ENABLE_STATUS, this);
|
||||
|
||||
|
@ -41,9 +41,13 @@ enum SystemctlCmd : uint8_t { START = 0, STOP = 1, RESTART = 2, NUM_CMDS = 3 };
|
||||
static constexpr char CONF_FOLDER[] = "conf";
|
||||
|
||||
static constexpr char VERSION_FILE_NAME[] = "version.txt";
|
||||
static constexpr char REBOOT_FILE_NAME[] = "reboot.txt";
|
||||
static constexpr char LEGACY_REBOOT_WATCHDOG_FILE_NAME[] = "reboot.txt";
|
||||
static constexpr char REBOOT_WATCHDOG_FILE_NAME[] = "reboot_watchdog.txt";
|
||||
static constexpr char REBOOT_COUNTER_FILE_NAME[] = "reboot_counters.txt";
|
||||
static constexpr char TIME_FILE_NAME[] = "time_backup.txt";
|
||||
|
||||
static constexpr uint32_t SYS_ROM_BASE_ADDR = 0x80000000;
|
||||
|
||||
static constexpr ActionId_t ANNOUNCE_VERSION = 1;
|
||||
static constexpr ActionId_t ANNOUNCE_CURRENT_IMAGE = 2;
|
||||
static constexpr ActionId_t ANNOUNCE_BOOT_COUNTS = 3;
|
||||
@ -51,6 +55,7 @@ static constexpr ActionId_t SWITCH_REBOOT_FILE_HANDLING = 5;
|
||||
static constexpr ActionId_t RESET_REBOOT_COUNTERS = 6;
|
||||
static constexpr ActionId_t SWITCH_IMG_LOCK = 7;
|
||||
static constexpr ActionId_t SET_MAX_REBOOT_CNT = 8;
|
||||
static constexpr ActionId_t READ_REBOOT_MECHANISM_INFO = 9;
|
||||
|
||||
static constexpr ActionId_t OBSW_UPDATE_FROM_SD_0 = 10;
|
||||
static constexpr ActionId_t OBSW_UPDATE_FROM_SD_1 = 11;
|
||||
@ -113,6 +118,10 @@ static constexpr Event TRYING_I2C_RECOVERY = event::makeEvent(SUBSYSTEM_ID, 10,
|
||||
static constexpr Event I2C_REBOOT = event::makeEvent(SUBSYSTEM_ID, 11, severity::HIGH);
|
||||
//! [EXPORT] : [COMMENT] PDEC recovery through reset was not possible, performing full reboot.
|
||||
static constexpr Event PDEC_REBOOT = event::makeEvent(SUBSYSTEM_ID, 12, severity::HIGH);
|
||||
//! [EXPORT] : [COMMENT] Version information of the firmware (not OBSW).
|
||||
//! P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash
|
||||
//! P2: First four letters of Git SHA is the last byte of P1 is set.
|
||||
static constexpr Event FIRMWARE_INFO = event::makeEvent(SUBSYSTEM_ID, 13, severity::INFO);
|
||||
|
||||
class ListDirectoryCmdBase {
|
||||
public: // TODO: Packet definition for clean deserialization
|
||||
@ -242,19 +251,22 @@ class CpHelperParser {
|
||||
CpHelperParser(const uint8_t* data, size_t maxLen) : data(data), maxLen(maxLen) {}
|
||||
|
||||
ReturnValue_t parse() {
|
||||
if (maxLen < 1) {
|
||||
if (maxLen < 2) {
|
||||
return SerializeIF::STREAM_TOO_SHORT;
|
||||
}
|
||||
recursiveOpt = data[0];
|
||||
return parseDestTargetString(data + 1, maxLen - 1, destTgt);
|
||||
forceOpt = data[1];
|
||||
return parseDestTargetString(data + 2, maxLen - 2, destTgt);
|
||||
}
|
||||
const SourceTargetPair& destTgtPair() const { return destTgt; }
|
||||
bool isRecursiveOptSet() const { return recursiveOpt; }
|
||||
bool isForceOptSet() const { return forceOpt; }
|
||||
|
||||
private:
|
||||
const uint8_t* data;
|
||||
size_t maxLen;
|
||||
bool recursiveOpt = false;
|
||||
bool forceOpt = false;
|
||||
SourceTargetPair destTgt;
|
||||
};
|
||||
|
||||
|
@ -37,6 +37,8 @@ void Max31865EiveHandler::doShutDown() {
|
||||
transitionOk = false;
|
||||
}
|
||||
if (state == InternalState::INACTIVE and transitionOk) {
|
||||
sensorDataset.temperatureCelcius = thermal::INVALID_TEMPERATURE;
|
||||
sensorDataset.setValidity(false, true);
|
||||
updatePeriodicReply(false, EiveMax31855::RtdCommands::EXCHANGE_SET_ID);
|
||||
setMode(MODE_OFF);
|
||||
}
|
||||
|
@ -268,7 +268,7 @@ ReturnValue_t PersistentTmStore::getNextDumpPacket(PusTmReader& reader, bool& fi
|
||||
// restore the file dump, but for now do not trust the file.
|
||||
std::error_code e;
|
||||
std::filesystem::remove(dumpParams.dirEntry.path().c_str(), e);
|
||||
if(dumpParams.dirEntry.path() == activeFile) {
|
||||
if (dumpParams.dirEntry.path() == activeFile) {
|
||||
activeFile == std::nullopt;
|
||||
assignAndOrCreateMostRecentFile();
|
||||
}
|
||||
|
@ -11,23 +11,20 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore,
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
for (unsigned int idx = 0; idx < destinations.size(); idx++) {
|
||||
const auto& dest = destinations[idx];
|
||||
if (destinations.size() > 1) {
|
||||
if (idx < destinations.size() - 1) {
|
||||
// Create copy of data to ensure each TM recipient has its own copy. That way, we don't need
|
||||
// to bother with send order and where the data is deleted.
|
||||
store_address_t storeId;
|
||||
result = tmStore.addData(&storeId, tmData, tmSize);
|
||||
if (result == returnvalue::OK) {
|
||||
message.setStorageId(storeId);
|
||||
} else {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "PusLiveDemux::handlePacket: Store too full to create data copy"
|
||||
<< std::endl;
|
||||
#endif
|
||||
}
|
||||
if ((destinations.size() > 1) and (idx < (destinations.size() - 1))) {
|
||||
// Create copy of data to ensure each TM recipient has its own copy. That way, we don't need
|
||||
// to bother with send order and where the data is deleted.
|
||||
store_address_t storeId;
|
||||
result = tmStore.addData(&storeId, tmData, tmSize);
|
||||
if (result == returnvalue::OK) {
|
||||
message.setStorageId(storeId);
|
||||
} else {
|
||||
message.setStorageId(origStoreId);
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "PusLiveDemux::handlePacket: Store too full to create data copy" << std::endl;
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
message.setStorageId(origStoreId);
|
||||
}
|
||||
result = ownerQueue.sendMessage(dest.queueId, &message);
|
||||
if (result != returnvalue::OK) {
|
||||
|
2
tmtc
2
tmtc
Submodule tmtc updated: 5f44cb96be...ec0ebc3653
@ -19,116 +19,117 @@ CoreController::CoreController() {
|
||||
setCurrentBootCopy(xsc::CHIP_0, xsc::COPY_0);
|
||||
}
|
||||
|
||||
void CoreController::performRebootFileHandling(bool recreateFile) {
|
||||
void CoreController::performRebootWatchdogHandling(bool recreateFile) {
|
||||
using namespace std;
|
||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_FILE;
|
||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_WATCHDOG_FILE;
|
||||
if (not std::filesystem::exists(path) or recreateFile) {
|
||||
#if OBSW_VERBOSE_LEVEL >= 1
|
||||
sif::info << "CoreController::performRebootFileHandling: Recreating reboot file" << std::endl;
|
||||
#endif
|
||||
rebootFile.enabled = true;
|
||||
rebootFile.img00Cnt = 0;
|
||||
rebootFile.img01Cnt = 0;
|
||||
rebootFile.img10Cnt = 0;
|
||||
rebootFile.img11Cnt = 0;
|
||||
rebootFile.lastChip = xsc::Chip::CHIP_0;
|
||||
rebootFile.lastCopy = xsc::Copy::COPY_0;
|
||||
rebootFile.img00Lock = false;
|
||||
rebootFile.img01Lock = false;
|
||||
rebootFile.img10Lock = false;
|
||||
rebootFile.img11Lock = false;
|
||||
rebootFile.mechanismNextChip = xsc::Chip::NO_CHIP;
|
||||
rebootFile.mechanismNextCopy = xsc::Copy::NO_COPY;
|
||||
rebootFile.bootFlag = false;
|
||||
rewriteRebootFile(rebootFile);
|
||||
rebootWatchdogFile.enabled = true;
|
||||
rebootWatchdogFile.img00Cnt = 0;
|
||||
rebootWatchdogFile.img01Cnt = 0;
|
||||
rebootWatchdogFile.img10Cnt = 0;
|
||||
rebootWatchdogFile.img11Cnt = 0;
|
||||
rebootWatchdogFile.lastChip = xsc::Chip::CHIP_0;
|
||||
rebootWatchdogFile.lastCopy = xsc::Copy::COPY_0;
|
||||
rebootWatchdogFile.img00Lock = false;
|
||||
rebootWatchdogFile.img01Lock = false;
|
||||
rebootWatchdogFile.img10Lock = false;
|
||||
rebootWatchdogFile.img11Lock = false;
|
||||
rebootWatchdogFile.mechanismNextChip = xsc::Chip::NO_CHIP;
|
||||
rebootWatchdogFile.mechanismNextCopy = xsc::Copy::NO_COPY;
|
||||
rebootWatchdogFile.bootFlag = false;
|
||||
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||
} else {
|
||||
if (not parseRebootFile(path, rebootFile)) {
|
||||
performRebootFileHandling(true);
|
||||
if (not parseRebootWatchdogFile(path, rebootWatchdogFile)) {
|
||||
performRebootWatchdogHandling(true);
|
||||
}
|
||||
}
|
||||
|
||||
if (CURRENT_CHIP == xsc::CHIP_0) {
|
||||
if (CURRENT_COPY == xsc::COPY_0) {
|
||||
rebootFile.img00Cnt++;
|
||||
rebootWatchdogFile.img00Cnt++;
|
||||
} else {
|
||||
rebootFile.img01Cnt++;
|
||||
rebootWatchdogFile.img01Cnt++;
|
||||
}
|
||||
} else {
|
||||
if (CURRENT_COPY == xsc::COPY_0) {
|
||||
rebootFile.img10Cnt++;
|
||||
rebootWatchdogFile.img10Cnt++;
|
||||
} else {
|
||||
rebootFile.img11Cnt++;
|
||||
rebootWatchdogFile.img11Cnt++;
|
||||
}
|
||||
}
|
||||
|
||||
if (rebootFile.bootFlag) {
|
||||
if (rebootWatchdogFile.bootFlag) {
|
||||
// Trigger event to inform ground that a reboot was triggered
|
||||
uint32_t p1 = rebootFile.lastChip << 16 | rebootFile.lastCopy;
|
||||
uint32_t p2 = rebootFile.img00Cnt << 24 | rebootFile.img01Cnt << 16 | rebootFile.img10Cnt << 8 |
|
||||
rebootFile.img11Cnt;
|
||||
uint32_t p1 = rebootWatchdogFile.lastChip << 16 | rebootWatchdogFile.lastCopy;
|
||||
uint32_t p2 = rebootWatchdogFile.img00Cnt << 24 | rebootWatchdogFile.img01Cnt << 16 |
|
||||
rebootWatchdogFile.img10Cnt << 8 | rebootWatchdogFile.img11Cnt;
|
||||
triggerEvent(REBOOT_MECHANISM_TRIGGERED, p1, p2);
|
||||
// Clear the boot flag
|
||||
rebootFile.bootFlag = false;
|
||||
rebootWatchdogFile.bootFlag = false;
|
||||
}
|
||||
|
||||
if (rebootFile.mechanismNextChip != xsc::NO_CHIP and
|
||||
rebootFile.mechanismNextCopy != xsc::NO_COPY) {
|
||||
if (CURRENT_CHIP != rebootFile.mechanismNextChip or
|
||||
CURRENT_COPY != rebootFile.mechanismNextCopy) {
|
||||
std::string infoString = std::to_string(rebootFile.mechanismNextChip) + " " +
|
||||
std::to_string(rebootFile.mechanismNextCopy);
|
||||
if (rebootWatchdogFile.mechanismNextChip != xsc::NO_CHIP and
|
||||
rebootWatchdogFile.mechanismNextCopy != xsc::NO_COPY) {
|
||||
if (CURRENT_CHIP != rebootWatchdogFile.mechanismNextChip or
|
||||
CURRENT_COPY != rebootWatchdogFile.mechanismNextCopy) {
|
||||
std::string infoString = std::to_string(rebootWatchdogFile.mechanismNextChip) + " " +
|
||||
std::to_string(rebootWatchdogFile.mechanismNextCopy);
|
||||
sif::warning << "CoreController::performRebootFileHandling: Expected to be on image "
|
||||
<< infoString << " but currently on other image. Locking " << infoString
|
||||
<< std::endl;
|
||||
// Firmware or other component might be corrupt and we are on another image then the target
|
||||
// image specified by the mechanism. We can't really trust the target image anymore.
|
||||
// Lock it for now
|
||||
if (rebootFile.mechanismNextChip == xsc::CHIP_0) {
|
||||
if (rebootFile.mechanismNextCopy == xsc::COPY_0) {
|
||||
rebootFile.img00Lock = true;
|
||||
if (rebootWatchdogFile.mechanismNextChip == xsc::CHIP_0) {
|
||||
if (rebootWatchdogFile.mechanismNextCopy == xsc::COPY_0) {
|
||||
rebootWatchdogFile.img00Lock = true;
|
||||
} else {
|
||||
rebootFile.img01Lock = true;
|
||||
rebootWatchdogFile.img01Lock = true;
|
||||
}
|
||||
} else {
|
||||
if (rebootFile.mechanismNextCopy == xsc::COPY_0) {
|
||||
rebootFile.img10Lock = true;
|
||||
if (rebootWatchdogFile.mechanismNextCopy == xsc::COPY_0) {
|
||||
rebootWatchdogFile.img10Lock = true;
|
||||
} else {
|
||||
rebootFile.img11Lock = true;
|
||||
rebootWatchdogFile.img11Lock = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rebootFile.lastChip = CURRENT_CHIP;
|
||||
rebootFile.lastCopy = CURRENT_COPY;
|
||||
rebootWatchdogFile.lastChip = CURRENT_CHIP;
|
||||
rebootWatchdogFile.lastCopy = CURRENT_COPY;
|
||||
// Only reboot if the reboot functionality is enabled.
|
||||
// The handler will still increment the boot counts
|
||||
if (rebootFile.enabled and (*rebootFile.relevantBootCnt >= rebootFile.maxCount)) {
|
||||
if (rebootWatchdogFile.enabled and
|
||||
(*rebootWatchdogFile.relevantBootCnt >= rebootWatchdogFile.maxCount)) {
|
||||
// Reboot to other image
|
||||
bool doReboot = false;
|
||||
xsc::Chip tgtChip = xsc::NO_CHIP;
|
||||
xsc::Copy tgtCopy = xsc::NO_COPY;
|
||||
determineAndExecuteReboot(rebootFile, doReboot, tgtChip, tgtCopy);
|
||||
determineAndExecuteReboot(rebootWatchdogFile, doReboot, tgtChip, tgtCopy);
|
||||
if (doReboot) {
|
||||
rebootFile.bootFlag = true;
|
||||
rebootWatchdogFile.bootFlag = true;
|
||||
#if OBSW_VERBOSE_LEVEL >= 1
|
||||
sif::info << "Boot counter for image " << CURRENT_CHIP << " " << CURRENT_COPY
|
||||
<< " too high. Rebooting to " << tgtChip << " " << tgtCopy << std::endl;
|
||||
#endif
|
||||
rebootFile.mechanismNextChip = tgtChip;
|
||||
rebootFile.mechanismNextCopy = tgtCopy;
|
||||
rewriteRebootFile(rebootFile);
|
||||
rebootWatchdogFile.mechanismNextChip = tgtChip;
|
||||
rebootWatchdogFile.mechanismNextCopy = tgtCopy;
|
||||
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||
xsc_boot_copy(static_cast<xsc_libnor_chip_t>(tgtChip),
|
||||
static_cast<xsc_libnor_copy_t>(tgtCopy));
|
||||
}
|
||||
} else {
|
||||
rebootFile.mechanismNextChip = xsc::NO_CHIP;
|
||||
rebootFile.mechanismNextCopy = xsc::NO_COPY;
|
||||
rebootWatchdogFile.mechanismNextChip = xsc::NO_CHIP;
|
||||
rebootWatchdogFile.mechanismNextCopy = xsc::NO_COPY;
|
||||
}
|
||||
rewriteRebootFile(rebootFile);
|
||||
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||
}
|
||||
|
||||
void CoreController::determineAndExecuteReboot(RebootFile &rf, bool &needsReboot,
|
||||
void CoreController::determineAndExecuteReboot(RebootWatchdogFile &rf, bool &needsReboot,
|
||||
xsc::Chip &tgtChip, xsc::Copy &tgtCopy) {
|
||||
tgtChip = xsc::CHIP_0;
|
||||
tgtCopy = xsc::COPY_0;
|
||||
@ -217,7 +218,7 @@ void CoreController::determineAndExecuteReboot(RebootFile &rf, bool &needsReboot
|
||||
}
|
||||
}
|
||||
|
||||
bool CoreController::parseRebootFile(std::string path, RebootFile &rf) {
|
||||
bool CoreController::parseRebootWatchdogFile(std::string path, RebootWatchdogFile &rf) {
|
||||
using namespace std;
|
||||
std::string selfMatch;
|
||||
if (CURRENT_CHIP == xsc::CHIP_0) {
|
||||
@ -400,34 +401,34 @@ bool CoreController::parseRebootFile(std::string path, RebootFile &rf) {
|
||||
}
|
||||
|
||||
void CoreController::resetRebootCount(xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_FILE;
|
||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_WATCHDOG_FILE;
|
||||
// Disable the reboot file mechanism
|
||||
parseRebootFile(path, rebootFile);
|
||||
parseRebootWatchdogFile(path, rebootWatchdogFile);
|
||||
if (tgtChip == xsc::ALL_CHIP and tgtCopy == xsc::ALL_COPY) {
|
||||
rebootFile.img00Cnt = 0;
|
||||
rebootFile.img01Cnt = 0;
|
||||
rebootFile.img10Cnt = 0;
|
||||
rebootFile.img11Cnt = 0;
|
||||
rebootWatchdogFile.img00Cnt = 0;
|
||||
rebootWatchdogFile.img01Cnt = 0;
|
||||
rebootWatchdogFile.img10Cnt = 0;
|
||||
rebootWatchdogFile.img11Cnt = 0;
|
||||
} else {
|
||||
if (tgtChip == xsc::CHIP_0) {
|
||||
if (tgtCopy == xsc::COPY_0) {
|
||||
rebootFile.img00Cnt = 0;
|
||||
rebootWatchdogFile.img00Cnt = 0;
|
||||
} else {
|
||||
rebootFile.img01Cnt = 0;
|
||||
rebootWatchdogFile.img01Cnt = 0;
|
||||
}
|
||||
} else {
|
||||
if (tgtCopy == xsc::COPY_0) {
|
||||
rebootFile.img10Cnt = 0;
|
||||
rebootWatchdogFile.img10Cnt = 0;
|
||||
} else {
|
||||
rebootFile.img11Cnt = 0;
|
||||
rebootWatchdogFile.img11Cnt = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
rewriteRebootFile(rebootFile);
|
||||
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||
}
|
||||
|
||||
void CoreController::rewriteRebootFile(RebootFile file) {
|
||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_FILE;
|
||||
void CoreController::rewriteRebootWatchdogFile(RebootWatchdogFile file) {
|
||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_WATCHDOG_FILE;
|
||||
std::ofstream rebootFile(path);
|
||||
if (rebootFile.is_open()) {
|
||||
// Initiate reboot file first. Reboot handling will be on on initialization
|
||||
@ -450,15 +451,15 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
||||
if (size < 1) {
|
||||
return HasActionsIF::INVALID_PARAMETERS;
|
||||
}
|
||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_FILE;
|
||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_WATCHDOG_FILE;
|
||||
// Disable the reboot file mechanism
|
||||
parseRebootFile(path, rebootFile);
|
||||
parseRebootWatchdogFile(path, rebootWatchdogFile);
|
||||
if (data[0] == 0) {
|
||||
rebootFile.enabled = false;
|
||||
rewriteRebootFile(rebootFile);
|
||||
rebootWatchdogFile.enabled = false;
|
||||
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||
} else if (data[0] == 1) {
|
||||
rebootFile.enabled = true;
|
||||
rewriteRebootFile(rebootFile);
|
||||
rebootWatchdogFile.enabled = true;
|
||||
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||
} else {
|
||||
return HasActionsIF::INVALID_PARAMETERS;
|
||||
}
|
||||
@ -490,11 +491,11 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
||||
if (size < 1) {
|
||||
return HasActionsIF::INVALID_PARAMETERS;
|
||||
}
|
||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_FILE;
|
||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_WATCHDOG_FILE;
|
||||
// Disable the reboot file mechanism
|
||||
parseRebootFile(path, rebootFile);
|
||||
rebootFile.maxCount = data[0];
|
||||
rewriteRebootFile(rebootFile);
|
||||
parseRebootWatchdogFile(path, rebootWatchdogFile);
|
||||
rebootWatchdogFile.maxCount = data[0];
|
||||
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||
return HasActionsIF::EXECUTION_FINISHED;
|
||||
}
|
||||
default: {
|
||||
@ -504,23 +505,23 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
||||
}
|
||||
|
||||
void CoreController::setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_FILE;
|
||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_WATCHDOG_FILE;
|
||||
// Disable the reboot file mechanism
|
||||
parseRebootFile(path, rebootFile);
|
||||
parseRebootWatchdogFile(path, rebootWatchdogFile);
|
||||
if (tgtChip == xsc::CHIP_0) {
|
||||
if (tgtCopy == xsc::COPY_0) {
|
||||
rebootFile.img00Lock = lock;
|
||||
rebootWatchdogFile.img00Lock = lock;
|
||||
} else {
|
||||
rebootFile.img01Lock = lock;
|
||||
rebootWatchdogFile.img01Lock = lock;
|
||||
}
|
||||
} else {
|
||||
if (tgtCopy == xsc::COPY_0) {
|
||||
rebootFile.img10Lock = lock;
|
||||
rebootWatchdogFile.img10Lock = lock;
|
||||
} else {
|
||||
rebootFile.img11Lock = lock;
|
||||
rebootWatchdogFile.img11Lock = lock;
|
||||
}
|
||||
}
|
||||
rewriteRebootFile(rebootFile);
|
||||
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||
}
|
||||
|
||||
void CoreController::setCurrentBootCopy(xsc::Chip chip, xsc::Copy copy) {
|
||||
|
@ -14,7 +14,7 @@ enum Copy : int { COPY_0, COPY_1, NO_COPY, SELF_COPY, ALL_COPY };
|
||||
|
||||
} // namespace xsc
|
||||
|
||||
struct RebootFile {
|
||||
struct RebootWatchdogFile {
|
||||
static constexpr uint8_t DEFAULT_MAX_BOOT_CNT = 10;
|
||||
|
||||
bool enabled = true;
|
||||
@ -39,7 +39,7 @@ class SdCardManager;
|
||||
|
||||
class CoreController {
|
||||
public:
|
||||
static constexpr char REBOOT_FILE[] = "/conf/reboot.txt";
|
||||
static constexpr char REBOOT_WATCHDOG_FILE[] = "/conf/reboot.txt";
|
||||
//! [EXPORT] : [COMMENT] The reboot mechanism was triggered.
|
||||
//! P1: First 16 bits: Last Chip, Last 16 bits: Last Copy,
|
||||
//! P2: Each byte is the respective reboot count for the slots
|
||||
@ -57,13 +57,13 @@ class CoreController {
|
||||
static void setCurrentBootCopy(xsc::Chip chip, xsc::Copy copy);
|
||||
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||
const uint8_t* data, size_t size);
|
||||
void performRebootFileHandling(bool recreateFile);
|
||||
void determineAndExecuteReboot(RebootFile& rf, bool& needsReboot, xsc::Chip& tgtChip,
|
||||
void performRebootWatchdogHandling(bool recreateFile);
|
||||
void determineAndExecuteReboot(RebootWatchdogFile& rf, bool& needsReboot, xsc::Chip& tgtChip,
|
||||
xsc::Copy& tgtCopy);
|
||||
void setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::Copy tgtCopy);
|
||||
void resetRebootCount(xsc::Chip tgtChip, xsc::Copy tgtCopy);
|
||||
bool parseRebootFile(std::string path, RebootFile& file);
|
||||
void rewriteRebootFile(RebootFile file);
|
||||
bool parseRebootWatchdogFile(std::string path, RebootWatchdogFile& file);
|
||||
void rewriteRebootWatchdogFile(RebootWatchdogFile file);
|
||||
|
||||
private:
|
||||
struct SdFsmParams {
|
||||
@ -74,6 +74,6 @@ class CoreController {
|
||||
} sdInfo;
|
||||
|
||||
SdCardManager* sdcMan = nullptr;
|
||||
RebootFile rebootFile = {};
|
||||
RebootWatchdogFile rebootWatchdogFile = {};
|
||||
bool doPerformRebootFileHandling = true;
|
||||
};
|
Reference in New Issue
Block a user