Merge remote-tracking branch 'origin/develop' into petri_dev
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
commit
aa56c26e25
@ -12,6 +12,11 @@ list yields a list of all related PRs for each release.
|
|||||||
|
|
||||||
# [v1.14.0]
|
# [v1.14.0]
|
||||||
|
|
||||||
|
- Provide full SW update capability for the OBSW.
|
||||||
|
This includes very basic CFDP integration, a software update
|
||||||
|
procedure specified in detail in the README and some high level
|
||||||
|
commands to make this easier for operators.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/302
|
||||||
- Update for FSFW: `HasReturnvaluesIF` class replaced by namespace `returnvalue`
|
- Update for FSFW: `HasReturnvaluesIF` class replaced by namespace `returnvalue`
|
||||||
- Add some GomSpace clients as a submodule dependency. Use this dependency to deserialize the
|
- Add some GomSpace clients as a submodule dependency. Use this dependency to deserialize the
|
||||||
GomSpace TM tables
|
GomSpace TM tables
|
||||||
|
@ -367,7 +367,11 @@ if(EIVE_ADD_LINUX_FILES)
|
|||||||
add_subdirectory(${LINUX_PATH})
|
add_subdirectory(${LINUX_PATH})
|
||||||
endif()
|
endif()
|
||||||
add_subdirectory(${BSP_PATH})
|
add_subdirectory(${BSP_PATH})
|
||||||
add_subdirectory(${LIB_GOMSPACE_PATH})
|
|
||||||
|
if(UNIX)
|
||||||
|
add_subdirectory(${LIB_GOMSPACE_PATH})
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(${COMMON_PATH})
|
add_subdirectory(${COMMON_PATH})
|
||||||
add_subdirectory(${DUMMY_PATH})
|
add_subdirectory(${DUMMY_PATH})
|
||||||
|
|
||||||
@ -452,16 +456,15 @@ if(TGT_BSP MATCHES "arm/q7s")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
${UNITTEST_NAME} PRIVATE Catch2 ${LIB_EIVE_MISSION} rapidcsv ${LIB_DUMMIES}
|
${UNITTEST_NAME} PRIVATE Catch2 ${LIB_EIVE_MISSION} rapidcsv ${LIB_DUMMIES})
|
||||||
${LIB_GOMSPACE_CLIENTS})
|
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/egse")
|
if(TGT_BSP MATCHES "arm/egse")
|
||||||
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_ARCSEC})
|
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_ARCSEC})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_GOMSPACE_CLIENTS})
|
if(UNIX)
|
||||||
target_link_libraries(${LIB_EIVE_MISSION} PRIVATE ${LIB_GOMSPACE_CLIENTS})
|
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_GOMSPACE_CLIENTS})
|
||||||
target_link_libraries(${LIB_DUMMIES} PRIVATE ${LIB_GOMSPACE_CLIENTS})
|
endif()
|
||||||
|
|
||||||
if(EIVE_ADD_ETL_LIB)
|
if(EIVE_ADD_ETL_LIB)
|
||||||
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_ETL_TARGET})
|
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_ETL_TARGET})
|
||||||
|
72
README.md
72
README.md
@ -152,6 +152,78 @@ When using Windows, run theses steps in MSYS2.
|
|||||||
cmake --build . -j
|
cmake --build . -j
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Preparing and executing an OBSW update
|
||||||
|
|
||||||
|
A OBSW update consists of a `xz` compressed file `eive-sw-update.tar.xz`
|
||||||
|
which contains the following two files:
|
||||||
|
|
||||||
|
1. Stripped OBSW binary `eive-obsw-stripped`
|
||||||
|
2. OBSW version text file with the name `obsw_version.txt`
|
||||||
|
|
||||||
|
These files can be created manually:
|
||||||
|
|
||||||
|
1. Build the release image inside `cmake-build-release-q7s`
|
||||||
|
2. Switch into the build directory
|
||||||
|
3. Run the following command to create the version file
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git describe --tags --always --exclude docker_* > obsw_version.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also use the `create-version-file.sh` helper shell script
|
||||||
|
located in the `scripts` folder to do this.
|
||||||
|
|
||||||
|
4. Set the Q7S user as the file owner for both files
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo chown root:root eive-obsw-stripped
|
||||||
|
sudo chown root:root obsw_version.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Run the following command to create the compressed archive
|
||||||
|
|
||||||
|
```sh
|
||||||
|
tar -cJvf eive-sw-update.tar.xz eive-obsw-stripped obsw_version.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also use the helper script `create-sw-update.sh` inside the build folder
|
||||||
|
after sourcing the `q7s-env.sh` helper script to perform all steps including
|
||||||
|
a rebuild.
|
||||||
|
|
||||||
|
After creating these files, they need to be transferred onto the Q7S
|
||||||
|
to either the `/mnt/sd0/bin` or `/mnt/sd1/bin` folder if the OBSW update
|
||||||
|
is performed from the SD card. It can also be transferred to the `/tmp` folder
|
||||||
|
to perform the update from a temporary directory, which does not rely on any
|
||||||
|
of the SD cards being on and mounted. However, all files in the temporary
|
||||||
|
directory will be deleted if the Linux OS is rebooted for any reason.
|
||||||
|
|
||||||
|
After both files are in place (this is checked by the OBSW), the example command
|
||||||
|
sequence is used by the OBSW to write the OBSW update to the QSPI chip 0 and
|
||||||
|
slot 0 using SD card 0:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
tar -xJvf eive-update.tar.xz
|
||||||
|
xsc_mount_copy 0 0
|
||||||
|
cp eive-obsw-stripped /tmp/mntupdate-xdi-qspi0-nom-rootfs/usr/bin/eive-obsw
|
||||||
|
cp obsw_update.txt /tmp/mntupdate-xdi-qspi0-nom-rootfs/usr/share/obsw_update.txt
|
||||||
|
writeprotect 0 0 1
|
||||||
|
```
|
||||||
|
|
||||||
|
Some context information about the used commands:
|
||||||
|
|
||||||
|
1. It mounts the target chip and copy combination into the `/tmp` folder
|
||||||
|
using the `xsc_mount_copy <chip> <copy>` utility. This also unlocks the
|
||||||
|
writeprotection for the chip. The mount point name inside `/tmp` depends
|
||||||
|
on which chip and copy is used
|
||||||
|
|
||||||
|
- Chip 0 Copy 0: `/tmp/mntupdate-xdi-qspi0-nom-rootfs`
|
||||||
|
- Chip 0 Copy 1: `/tmp/mntupdate-xdi-qspi0-gold-rootfs`
|
||||||
|
- Slot 1 Copy 0: `/tmp/mntupdate-xdi-qspi1-nom-rootfs`
|
||||||
|
- Slot 1 Copy 1: `/tmp/mntupdate-xdi-qspi1-gold-rootfs`
|
||||||
|
|
||||||
|
2. Writing the file with a regular `cp <source> <target>` command
|
||||||
|
3. Enabling the writeprotection using the `writeprotect <chip> <copy> 1` utility.
|
||||||
|
|
||||||
## Build for the Q7S target root filesystem with `yocto`
|
## Build for the Q7S target root filesystem with `yocto`
|
||||||
|
|
||||||
The EIVE root filesystem will contain the EIVE OBSW and the Watchdog component.
|
The EIVE root filesystem will contain the EIVE OBSW and the Watchdog component.
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
#include <mission/core/GenericFactory.h>
|
#include <mission/core/GenericFactory.h>
|
||||||
#include <mission/tmtc/TmFunnel.h>
|
#include <mission/tmtc/TmFunnel.h>
|
||||||
#include <objects/systemObjectList.h>
|
#include <objects/systemObjectList.h>
|
||||||
#include <tmtc/apid.h>
|
|
||||||
#include <tmtc/pusIds.h>
|
#include <tmtc/pusIds.h>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
|
#include "eive/definitions.h"
|
||||||
#include "fsfw_tests/integration/task/TestTask.h"
|
#include "fsfw_tests/integration/task/TestTask.h"
|
||||||
|
|
||||||
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
|
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#ifndef CONFIG_EVENTS_SUBSYSTEMIDRANGES_H_
|
#ifndef CONFIG_EVENTS_SUBSYSTEMIDRANGES_H_
|
||||||
#define CONFIG_EVENTS_SUBSYSTEMIDRANGES_H_
|
#define CONFIG_EVENTS_SUBSYSTEMIDRANGES_H_
|
||||||
|
|
||||||
#include <common/config/commonSubsystemIds.h>
|
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
#include "eive/eventSubsystemIds.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* These IDs are part of the ID for an event thrown by a subsystem.
|
* These IDs are part of the ID for an event thrown by a subsystem.
|
||||||
* Numbers 0-80 are reserved for FSFW Subsystem IDs (framework/events/)
|
* Numbers 0-80 are reserved for FSFW Subsystem IDs (framework/events/)
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#ifndef HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_
|
#ifndef HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_
|
||||||
#define HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_
|
#define HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_
|
||||||
|
|
||||||
#include <commonObjects.h>
|
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
#include "eive/objects.h"
|
||||||
|
|
||||||
// The objects will be instantiated in the ID order
|
// The objects will be instantiated in the ID order
|
||||||
namespace objects {
|
namespace objects {
|
||||||
enum sourceObjects : uint32_t {
|
enum sourceObjects : uint32_t {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <fsfw/returnvalues/FwClassIds.h>
|
#include <fsfw/returnvalues/FwClassIds.h>
|
||||||
|
|
||||||
#include "commonClassIds.h"
|
#include "eive/resultClassIds.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Source IDs starts at 73 for now
|
* Source IDs starts at 73 for now
|
||||||
|
@ -24,3 +24,4 @@ endif()
|
|||||||
add_subdirectory(memory)
|
add_subdirectory(memory)
|
||||||
add_subdirectory(callbacks)
|
add_subdirectory(callbacks)
|
||||||
add_subdirectory(xadc)
|
add_subdirectory(xadc)
|
||||||
|
add_subdirectory(fs)
|
||||||
|
@ -16,16 +16,6 @@
|
|||||||
/** Other flags */
|
/** Other flags */
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
#define Q7S_SD_NONE 0
|
|
||||||
#define Q7S_SD_COLD_REDUNDANT 1
|
|
||||||
#define Q7S_SD_HOT_REDUNDANT 2
|
|
||||||
// The OBSW will perform different actions to set up the SD cards depending on the flag set here
|
|
||||||
// Set to Q7S_SD_NONE: Don't do anything
|
|
||||||
// Set to Q7S_COLD_REDUNDANT: On startup, get the prefered SD card, turn it on and mount it, and
|
|
||||||
// turn off the second SD card if it is on
|
|
||||||
// Set to Q7S_HOT_REDUNDANT: On startup, turn on both SD cards and mount them
|
|
||||||
#define Q7S_SD_CARD_CONFIG Q7S_SD_COLD_REDUNDANT
|
|
||||||
|
|
||||||
// Probably better if this is disabled for mission code. Convenient for development
|
// Probably better if this is disabled for mission code. Convenient for development
|
||||||
#define Q7S_CHECK_FOR_ALREADY_RUNNING_IMG 1
|
#define Q7S_CHECK_FOR_ALREADY_RUNNING_IMG 1
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#include "Q7STestTask.h"
|
#include "Q7STestTask.h"
|
||||||
|
|
||||||
#include <bsp_q7s/core/CoreController.h>
|
#include <bsp_q7s/core/CoreController.h>
|
||||||
#include <bsp_q7s/memory/FileSystemHandler.h>
|
|
||||||
#include <bsp_q7s/xadc/Xadc.h>
|
#include <bsp_q7s/xadc/Xadc.h>
|
||||||
#include <fsfw/globalfunctions/arrayprinter.h>
|
#include <fsfw/globalfunctions/arrayprinter.h>
|
||||||
#include <fsfw/objectmanager/ObjectManager.h>
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
|
#include <fsfw_hal/host/HostFilesystem.h>
|
||||||
#include <gps.h>
|
#include <gps.h>
|
||||||
#include <libgpsmm.h>
|
#include <libgpsmm.h>
|
||||||
#include <param/param_string.h>
|
#include <param/param_string.h>
|
||||||
@ -17,13 +17,17 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <nlohmann/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
|
|
||||||
#include "bsp_q7s/memory/SdCardManager.h"
|
#include "OBSWConfig.h"
|
||||||
|
#include "bsp_q7s/fs/SdCardManager.h"
|
||||||
|
#include "bsp_q7s/fs/helpers.h"
|
||||||
#include "bsp_q7s/memory/scratchApi.h"
|
#include "bsp_q7s/memory/scratchApi.h"
|
||||||
#include "fsfw/tasks/TaskFactory.h"
|
#include "fsfw/tasks/TaskFactory.h"
|
||||||
#include "fsfw/timemanager/Stopwatch.h"
|
#include "fsfw/timemanager/Stopwatch.h"
|
||||||
#include "p60pdu.h"
|
#include "p60pdu.h"
|
||||||
#include "test/DummyParameter.h"
|
#include "test/DummyParameter.h"
|
||||||
|
|
||||||
|
using namespace returnvalue;
|
||||||
|
|
||||||
Q7STestTask::Q7STestTask(object_id_t objectId) : TestTask(objectId) {
|
Q7STestTask::Q7STestTask(object_id_t objectId) : TestTask(objectId) {
|
||||||
doTestSdCard = false;
|
doTestSdCard = false;
|
||||||
doTestScratchApi = false;
|
doTestScratchApi = false;
|
||||||
@ -71,7 +75,7 @@ ReturnValue_t Q7STestTask::performOneShotAction() {
|
|||||||
if (doTestProtHandler) {
|
if (doTestProtHandler) {
|
||||||
testProtHandler();
|
testProtHandler();
|
||||||
}
|
}
|
||||||
FsOpCodes opCode = FsOpCodes::APPEND_TO_FILE;
|
FsOpCodes opCode = FsOpCodes::CREATE_EMPTY_FILE_IN_TMP;
|
||||||
testFileSystemHandlerDirect(opCode);
|
testFileSystemHandlerDirect(opCode);
|
||||||
return TestTask::performOneShotAction();
|
return TestTask::performOneShotAction();
|
||||||
}
|
}
|
||||||
@ -366,145 +370,23 @@ void Q7STestTask::testGpsDaemonSocket() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
|
void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
|
||||||
auto fsHandler = ObjectManager::instance()->get<FileSystemHandler>(objects::FILE_SYSTEM_HANDLER);
|
HostFilesystem hostFs;
|
||||||
if (fsHandler == nullptr) {
|
auto* sdcMan = SdCardManager::instance();
|
||||||
sif::warning << "Q7STestTask::testFileSystemHandlerDirect: No FS handler running.."
|
std::string mountPrefix = sdcMan->getCurrentMountPrefix();
|
||||||
<< std::endl;
|
sif::info << "Current mount prefix: " << mountPrefix << std::endl;
|
||||||
}
|
auto prefixedPath = fshelpers::getPrefixedPath(*sdcMan, "conf/test.txt");
|
||||||
FileSystemHandler::FsCommandCfg cfg = {};
|
sif::info << "Prefixed path: " << prefixedPath << std::endl;
|
||||||
ReturnValue_t result = returnvalue::OK;
|
if (opCode == FsOpCodes::CREATE_EMPTY_FILE_IN_TMP) {
|
||||||
|
FilesystemParams params("/tmp/hello.txt");
|
||||||
// Lambda for common code
|
auto res = hostFs.createFile(params);
|
||||||
auto createNonEmptyTmpDir = [&]() {
|
if (res != OK) {
|
||||||
if (not std::filesystem::exists("/tmp/test")) {
|
sif::warning << "Creating empty file in /tmp failed" << std::endl;
|
||||||
result = fsHandler->createDirectory("/tmp", "test", false, &cfg);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Creating sample files
|
bool fileExists = std::filesystem::exists("/tmp/hello.txt");
|
||||||
sif::info << "Creating sample files in directory" << std::endl;
|
if (not fileExists) {
|
||||||
result = fsHandler->createFile("/tmp/test", "test1.txt", nullptr, 0, &cfg);
|
sif::warning << "File was not created!" << std::endl;
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = fsHandler->createFile("/tmp/test", "test2.txt", nullptr, 0, &cfg);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
|
|
||||||
switch (opCode) {
|
|
||||||
case (FsOpCodes::CREATE_EMPTY_FILE_IN_TMP): {
|
|
||||||
// No mount prefix, cause file is created in tmp
|
|
||||||
cfg.useMountPrefix = false;
|
|
||||||
sif::info << "Creating empty file in /tmp folder" << std::endl;
|
|
||||||
// Do not delete file, user can check existence in shell
|
|
||||||
fsHandler->createFile("/tmp/", "test.txt", nullptr, 0, &cfg);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (FsOpCodes::REMOVE_TMP_FILE): {
|
|
||||||
sif::info << "Deleting /tmp/test.txt sample file" << std::endl;
|
|
||||||
// No mount prefix, cause file is created in tmp
|
|
||||||
cfg.useMountPrefix = false;
|
|
||||||
if (not std::filesystem::exists("/tmp/test.txt")) {
|
|
||||||
// Creating sample file
|
|
||||||
sif::info << "Creating sample file /tmp/test.txt to delete" << std::endl;
|
|
||||||
fsHandler->createFile("/tmp/", "test.txt", nullptr, 0, &cfg);
|
|
||||||
}
|
|
||||||
result = fsHandler->removeFile("/tmp", "test.txt", &cfg);
|
|
||||||
if (result == returnvalue::OK) {
|
|
||||||
sif::info << "File removed successfully" << std::endl;
|
|
||||||
} else {
|
|
||||||
sif::warning << "File removal failed!" << std::endl;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (FsOpCodes::CREATE_DIR_IN_TMP): {
|
|
||||||
// No mount prefix, cause file is created in tmp
|
|
||||||
cfg.useMountPrefix = false;
|
|
||||||
sif::info << "Creating empty file in /tmp folder" << std::endl;
|
|
||||||
// Do not delete file, user can check existence in shell
|
|
||||||
ReturnValue_t result = fsHandler->createDirectory("/tmp/", "test", false, &cfg);
|
|
||||||
if (result == returnvalue::OK) {
|
|
||||||
sif::info << "Directory created successfully" << std::endl;
|
|
||||||
} else {
|
|
||||||
sif::warning << "Directory creation failed!" << std::endl;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (FsOpCodes::REMOVE_EMPTY_DIR_IN_TMP): {
|
|
||||||
// No mount prefix, cause file is created in tmp
|
|
||||||
cfg.useMountPrefix = false;
|
|
||||||
if (not std::filesystem::exists("/tmp/test")) {
|
|
||||||
result = fsHandler->createDirectory("/tmp", "test", false, &cfg);
|
|
||||||
} else {
|
|
||||||
// Delete any leftover files to regular dir removal works
|
|
||||||
std::remove("/tmp/test/*");
|
|
||||||
}
|
|
||||||
result = fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
|
|
||||||
if (result == returnvalue::OK) {
|
|
||||||
sif::info << "Directory removed successfully" << std::endl;
|
|
||||||
} else {
|
|
||||||
sif::warning << "Directory removal failed!" << std::endl;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (FsOpCodes::REMOVE_FILLED_DIR_IN_TMP): {
|
|
||||||
result = createNonEmptyTmpDir();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
result = fsHandler->removeDirectory("/tmp/", "test", true, &cfg);
|
|
||||||
if (result == returnvalue::OK) {
|
|
||||||
sif::info << "Directory removed recursively successfully" << std::endl;
|
|
||||||
} else {
|
|
||||||
sif::warning << "Recursive directory removal failed!" << std::endl;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (FsOpCodes::ATTEMPT_DIR_REMOVAL_NON_EMPTY): {
|
|
||||||
result = createNonEmptyTmpDir();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
result = fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::info << "Directory removal attempt failed as expected" << std::endl;
|
|
||||||
} else {
|
|
||||||
sif::warning << "Directory removal worked when it should not have!" << std::endl;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (FsOpCodes::RENAME_FILE): {
|
|
||||||
// No mount prefix, cause file is created in tmp
|
|
||||||
cfg.useMountPrefix = false;
|
|
||||||
if (std::filesystem::exists("/tmp/test.txt")) {
|
|
||||||
fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
|
|
||||||
}
|
|
||||||
sif::info << "Creating empty file /tmp/test.txt and rename to /tmp/test2.txt" << std::endl;
|
|
||||||
// Do not delete file, user can check existence in shell
|
|
||||||
fsHandler->createFile("/tmp/", "test.txt", nullptr, 0, &cfg);
|
|
||||||
fsHandler->renameFile("/tmp/", "test.txt", "test2.txt", &cfg);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (FsOpCodes::APPEND_TO_FILE): {
|
|
||||||
// No mount prefix, cause file is created in tmp
|
|
||||||
cfg.useMountPrefix = false;
|
|
||||||
if (std::filesystem::exists("/tmp/test.txt")) {
|
|
||||||
fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
|
|
||||||
}
|
|
||||||
if (std::filesystem::exists("/tmp/test.txt")) {
|
|
||||||
fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
|
|
||||||
}
|
|
||||||
sif::info << "Creating empty file /tmp/test.txt and adding content" << std::endl;
|
|
||||||
std::string content = "Hello World\n";
|
|
||||||
// Do not delete file, user can check existence in shell
|
|
||||||
fsHandler->createFile("/tmp/", "test.txt", nullptr, 0, &cfg);
|
|
||||||
fsHandler->appendToFile("/tmp/", "test.txt", reinterpret_cast<const uint8_t*>(content.data()),
|
|
||||||
content.size(), 0, &cfg);
|
|
||||||
}
|
}
|
||||||
|
hostFs.removeFile("/tmp/hello.txt");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "CoreController.h"
|
#include "CoreController.h"
|
||||||
|
|
||||||
#include <fsfw/events/EventManager.h>
|
#include <fsfw/events/EventManager.h>
|
||||||
|
#include <fsfw/filesystem/HasFileSystemIF.h>
|
||||||
#include <fsfw/ipc/QueueFactory.h>
|
#include <fsfw/ipc/QueueFactory.h>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
@ -20,9 +21,10 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
||||||
#include "bsp_q7s/memory/SdCardManager.h"
|
#include "bsp_q7s/fs/SdCardManager.h"
|
||||||
#include "bsp_q7s/memory/scratchApi.h"
|
#include "bsp_q7s/memory/scratchApi.h"
|
||||||
#include "bsp_q7s/xadc/Xadc.h"
|
#include "bsp_q7s/xadc/Xadc.h"
|
||||||
|
#include "eive/definitions.h"
|
||||||
#include "linux/utility/utility.h"
|
#include "linux/utility/utility.h"
|
||||||
|
|
||||||
xsc::Chip CoreController::CURRENT_CHIP = xsc::Chip::NO_CHIP;
|
xsc::Chip CoreController::CURRENT_CHIP = xsc::Chip::NO_CHIP;
|
||||||
@ -47,7 +49,6 @@ CoreController::CoreController(object_id_t objectId)
|
|||||||
if (not BLOCKING_SD_INIT) {
|
if (not BLOCKING_SD_INIT) {
|
||||||
sdcMan->setBlocking(false);
|
sdcMan->setBlocking(false);
|
||||||
}
|
}
|
||||||
sdStateMachine();
|
|
||||||
|
|
||||||
result = initBootCopy();
|
result = initBootCopy();
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
@ -60,6 +61,8 @@ CoreController::CoreController(object_id_t objectId)
|
|||||||
eventQueue = QueueFactory::instance()->createMessageQueue(5, EventMessage::MAX_MESSAGE_SIZE);
|
eventQueue = QueueFactory::instance()->createMessageQueue(5, EventMessage::MAX_MESSAGE_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CoreController::~CoreController() {}
|
||||||
|
|
||||||
ReturnValue_t CoreController::handleCommandMessage(CommandMessage *message) {
|
ReturnValue_t CoreController::handleCommandMessage(CommandMessage *message) {
|
||||||
return ExtendedControllerBase::handleCommandMessage(message);
|
return ExtendedControllerBase::handleCommandMessage(message);
|
||||||
}
|
}
|
||||||
@ -139,8 +142,14 @@ ReturnValue_t CoreController::initialize() {
|
|||||||
|
|
||||||
ReturnValue_t CoreController::initializeAfterTaskCreation() {
|
ReturnValue_t CoreController::initializeAfterTaskCreation() {
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
sdInfo.pref = sdcMan->getPreferredSdCard();
|
sdInfo.active = sdcMan->getPreferredSdCard();
|
||||||
sdcMan->setActiveSdCard(sdInfo.pref);
|
if (sdInfo.active == sd::SdCard::NONE) {
|
||||||
|
sif::error << "CoreController::initializeAfterTaskCreation: "
|
||||||
|
"Issues getting preferred SD card, setting to 0"
|
||||||
|
<< std::endl;
|
||||||
|
sdInfo.active = sd::SdCard::SLOT_0;
|
||||||
|
}
|
||||||
|
sdcMan->setActiveSdCard(sdInfo.active);
|
||||||
currMntPrefix = sdcMan->getCurrentMountPrefix();
|
currMntPrefix = sdcMan->getCurrentMountPrefix();
|
||||||
if (BLOCKING_SD_INIT) {
|
if (BLOCKING_SD_INIT) {
|
||||||
ReturnValue_t result = initSdCardBlocking();
|
ReturnValue_t result = initSdCardBlocking();
|
||||||
@ -198,6 +207,47 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
}
|
}
|
||||||
return HasActionsIF::EXECUTION_FINISHED;
|
return HasActionsIF::EXECUTION_FINISHED;
|
||||||
}
|
}
|
||||||
|
case (OBSW_UPDATE_FROM_SD_0): {
|
||||||
|
return executeSwUpdate(SwUpdateSources::SD_0, data, size);
|
||||||
|
}
|
||||||
|
case (OBSW_UPDATE_FROM_SD_1): {
|
||||||
|
return executeSwUpdate(SwUpdateSources::SD_1, data, size);
|
||||||
|
}
|
||||||
|
case (OBSW_UPDATE_FROM_TMP): {
|
||||||
|
return executeSwUpdate(SwUpdateSources::TMP_DIR, data, size);
|
||||||
|
}
|
||||||
|
case (SWITCH_TO_SD_0): {
|
||||||
|
if (not startSdStateMachine(sd::SdCard::SLOT_0, SdCfgMode::COLD_REDUNDANT, commandedBy,
|
||||||
|
actionId)) {
|
||||||
|
return HasActionsIF::IS_BUSY;
|
||||||
|
}
|
||||||
|
// Completion will be reported by SD card state machine
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
case (SWITCH_TO_SD_1): {
|
||||||
|
if (not startSdStateMachine(sd::SdCard::SLOT_1, SdCfgMode::COLD_REDUNDANT, commandedBy,
|
||||||
|
actionId)) {
|
||||||
|
return HasActionsIF::IS_BUSY;
|
||||||
|
}
|
||||||
|
// Completion will be reported by SD card state machine
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
case (SWITCH_TO_BOTH_SD_CARDS): {
|
||||||
|
// An active SD still needs to be specified because the system needs to know which SD
|
||||||
|
// card to use for regular operations like telemetry storage.
|
||||||
|
if (size != 1) {
|
||||||
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
|
}
|
||||||
|
if (data[0] != 0 and data[0] != 1) {
|
||||||
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
|
}
|
||||||
|
auto active = static_cast<sd::SdCard>(data[0]);
|
||||||
|
if (not startSdStateMachine(active, SdCfgMode::HOT_REDUNDANT, commandedBy, actionId)) {
|
||||||
|
return HasActionsIF::IS_BUSY;
|
||||||
|
}
|
||||||
|
// Completion will be reported by SD card state machine
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
case (SWITCH_IMG_LOCK): {
|
case (SWITCH_IMG_LOCK): {
|
||||||
if (size != 3) {
|
if (size != 3) {
|
||||||
return HasActionsIF::INVALID_PARAMETERS;
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
@ -245,60 +295,59 @@ ReturnValue_t CoreController::initSdCardBlocking() {
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "CoreController::initialize: Updating SD card state file failed" << std::endl;
|
sif::warning << "CoreController::initialize: Updating SD card state file failed" << std::endl;
|
||||||
}
|
}
|
||||||
#if Q7S_SD_CARD_CONFIG == Q7S_SD_NONE
|
if (sdInfo.cfgMode == SdCfgMode::PASSIVE) {
|
||||||
sif::info << "No SD card initialization will be performed" << std::endl;
|
sif::info << "No SD card initialization will be performed" << std::endl;
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
#else
|
}
|
||||||
|
|
||||||
result = sdcMan->getSdCardsStatus(sdInfo.currentState);
|
result = sdcMan->getSdCardsStatus(sdInfo.currentState);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "Getting SD card activity status failed" << std::endl;
|
sif::warning << "Getting SD card activity status failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if Q7S_SD_CARD_CONFIG == Q7S_SD_COLD_REDUNDANT
|
if (sdInfo.cfgMode == SdCfgMode::COLD_REDUNDANT) {
|
||||||
updateSdInfoOther();
|
updateSdInfoOther();
|
||||||
sif::info << "Cold redundant SD card configuration, preferred SD card: "
|
sif::info << "Cold redundant SD card configuration, preferred SD card: "
|
||||||
<< static_cast<int>(sdInfo.pref) << std::endl;
|
<< static_cast<int>(sdInfo.active) << std::endl;
|
||||||
result = sdColdRedundantBlockingInit();
|
result = sdColdRedundantBlockingInit();
|
||||||
// Update status file
|
// Update status file
|
||||||
sdcMan->updateSdCardStateFile();
|
sdcMan->updateSdCardStateFile();
|
||||||
return result;
|
return result;
|
||||||
#elif Q7S_SD_CARD_CONFIG == Q7S_SD_HOT_REDUNDANT
|
}
|
||||||
sif::info << "Hot redundant SD card configuration" << std::endl;
|
if (sdInfo.cfgMode == SdCfgMode::HOT_REDUNDANT) {
|
||||||
sdCardSetup(sd::SdCard::SLOT_0, sd::SdState::MOUNTED, "0", false);
|
sif::info << "Hot redundant SD card configuration" << std::endl;
|
||||||
sdCardSetup(sd::SdCard::SLOT_1, sd::SdState::MOUNTED, "1", false);
|
sdCardSetup(sd::SdCard::SLOT_0, sd::SdState::MOUNTED, "0", false);
|
||||||
// Update status file
|
sdCardSetup(sd::SdCard::SLOT_1, sd::SdState::MOUNTED, "1", false);
|
||||||
sdcMan->updateSdCardStateFile();
|
// Update status file
|
||||||
|
sdcMan->updateSdCardStateFile();
|
||||||
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* Q7S_SD_CARD_CONFIG != Q7S_SD_NONE */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::sdStateMachine() {
|
ReturnValue_t CoreController::sdStateMachine() {
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
SdCardManager::Operations operation;
|
SdCardManager::Operations operation;
|
||||||
|
|
||||||
if (sdInfo.state == SdStates::IDLE) {
|
if (sdFsmState == SdStates::IDLE) {
|
||||||
// Nothing to do
|
// Nothing to do
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sdInfo.state == SdStates::START) {
|
if (sdFsmState == SdStates::START) {
|
||||||
// Init will be performed by separate function
|
// Init will be performed by separate function
|
||||||
if (BLOCKING_SD_INIT) {
|
if (BLOCKING_SD_INIT) {
|
||||||
sdInfo.state = SdStates::IDLE;
|
sdFsmState = SdStates::IDLE;
|
||||||
sdInfo.initFinished = true;
|
sdInfo.initFinished = true;
|
||||||
return result;
|
return result;
|
||||||
} else {
|
} else {
|
||||||
// Still update SD state file
|
// Still update SD state file
|
||||||
#if Q7S_SD_CARD_CONFIG == Q7S_SD_NONE
|
if (sdInfo.cfgMode == SdCfgMode::PASSIVE) {
|
||||||
sdInfo.state = SdStates::UPDATE_INFO;
|
sdFsmState = SdStates::UPDATE_INFO;
|
||||||
#else
|
} else {
|
||||||
sdInfo.cycleCount = 0;
|
sdInfo.cycleCount = 0;
|
||||||
sdInfo.commandExecuted = false;
|
sdInfo.commandExecuted = false;
|
||||||
sdInfo.state = SdStates::GET_INFO;
|
sdFsmState = SdStates::GET_INFO;
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -308,7 +357,7 @@ ReturnValue_t CoreController::sdStateMachine() {
|
|||||||
std::string opPrintout) {
|
std::string opPrintout) {
|
||||||
SdCardManager::OpStatus status = sdcMan->checkCurrentOp(operation);
|
SdCardManager::OpStatus status = sdcMan->checkCurrentOp(operation);
|
||||||
if (status == SdCardManager::OpStatus::SUCCESS) {
|
if (status == SdCardManager::OpStatus::SUCCESS) {
|
||||||
sdInfo.state = newStateOnSuccess;
|
sdFsmState = newStateOnSuccess;
|
||||||
sdInfo.commandExecuted = false;
|
sdInfo.commandExecuted = false;
|
||||||
sdInfo.cycleCount = 0;
|
sdInfo.cycleCount = 0;
|
||||||
return true;
|
return true;
|
||||||
@ -320,9 +369,9 @@ ReturnValue_t CoreController::sdStateMachine() {
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (sdInfo.state == SdStates::GET_INFO) {
|
if (sdFsmState == SdStates::GET_INFO) {
|
||||||
if (not sdInfo.commandExecuted) {
|
if (not sdInfo.commandExecuted) {
|
||||||
// Create update status file
|
// Create updated status file
|
||||||
result = sdcMan->updateSdCardStateFile();
|
result = sdcMan->updateSdCardStateFile();
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "CoreController::initialize: Updating SD card state file failed"
|
sif::warning << "CoreController::initialize: Updating SD card state file failed"
|
||||||
@ -334,139 +383,143 @@ ReturnValue_t CoreController::sdStateMachine() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sdInfo.state == SdStates::SET_STATE_SELF) {
|
if (sdFsmState == SdStates::SET_STATE_SELF) {
|
||||||
if (not sdInfo.commandExecuted) {
|
if (not sdInfo.commandExecuted) {
|
||||||
result = sdcMan->getSdCardsStatus(sdInfo.currentState);
|
result = sdcMan->getSdCardsStatus(sdInfo.currentState);
|
||||||
sdInfo.pref = sdcMan->getPreferredSdCard();
|
|
||||||
updateSdInfoOther();
|
updateSdInfoOther();
|
||||||
if (sdInfo.pref != sd::SdCard::SLOT_0 and sdInfo.pref != sd::SdCard::SLOT_1) {
|
if (sdInfo.active != sd::SdCard::SLOT_0 and sdInfo.active != sd::SdCard::SLOT_1) {
|
||||||
sif::warning << "Preferred SD card invalid. Setting to card 0.." << std::endl;
|
sif::warning << "Preferred SD card invalid. Setting to card 0.." << std::endl;
|
||||||
sdInfo.pref = sd::SdCard::SLOT_0;
|
sdInfo.active = sd::SdCard::SLOT_0;
|
||||||
}
|
}
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "Getting SD card activity status failed" << std::endl;
|
sif::warning << "Getting SD card activity status failed" << std::endl;
|
||||||
}
|
}
|
||||||
#if Q7S_SD_CARD_CONFIG == Q7S_SD_COLD_REDUNDANT
|
if (sdInfo.cfgMode == SdCfgMode::COLD_REDUNDANT) {
|
||||||
sif::info << "Cold redundant SD card configuration, preferred SD card: "
|
sif::info << "Cold redundant SD card configuration, target SD card: "
|
||||||
<< static_cast<int>(sdInfo.pref) << std::endl;
|
<< static_cast<int>(sdInfo.active) << std::endl;
|
||||||
#endif
|
}
|
||||||
if (sdInfo.prefState == sd::SdState::MOUNTED) {
|
if (sdInfo.activeState == sd::SdState::MOUNTED) {
|
||||||
#if OBSW_VERBOSE_LEVEL >= 1
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
std::string mountString;
|
std::string mountString;
|
||||||
if (sdInfo.pref == sd::SdCard::SLOT_0) {
|
if (sdInfo.active == sd::SdCard::SLOT_0) {
|
||||||
mountString = SdCardManager::SD_0_MOUNT_POINT;
|
mountString = config::SD_0_MOUNT_POINT;
|
||||||
} else {
|
} else {
|
||||||
mountString = SdCardManager::SD_1_MOUNT_POINT;
|
mountString = config::SD_1_MOUNT_POINT;
|
||||||
}
|
}
|
||||||
sif::info << "SD card " << sdInfo.prefChar << " already on and mounted at " << mountString
|
sif::info << "SD card " << sdInfo.activeChar << " already on and mounted at " << mountString
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
#endif
|
#endif
|
||||||
sdInfo.state = SdStates::DETERMINE_OTHER;
|
sdcMan->setActiveSdCard(sdInfo.active);
|
||||||
} else if (sdInfo.prefState == sd::SdState::OFF) {
|
currMntPrefix = sdcMan->getCurrentMountPrefix();
|
||||||
sdCardSetup(sdInfo.pref, sd::SdState::ON, sdInfo.prefChar, false);
|
sdFsmState = SdStates::DETERMINE_OTHER;
|
||||||
|
} else if (sdInfo.activeState == sd::SdState::OFF) {
|
||||||
|
sdCardSetup(sdInfo.active, sd::SdState::ON, sdInfo.activeChar, false);
|
||||||
sdInfo.commandExecuted = true;
|
sdInfo.commandExecuted = true;
|
||||||
} else if (sdInfo.prefState == sd::SdState::ON) {
|
} else if (sdInfo.activeState == sd::SdState::ON) {
|
||||||
sdInfo.state = SdStates::MOUNT_SELF;
|
sdFsmState = SdStates::MOUNT_SELF;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (nonBlockingOpChecking(SdStates::MOUNT_SELF, 10, "Setting SDC state")) {
|
if (nonBlockingOpChecking(SdStates::MOUNT_SELF, 10, "Setting SDC state")) {
|
||||||
sdInfo.prefState = sd::SdState::ON;
|
sdInfo.activeState = sd::SdState::ON;
|
||||||
currentStateSetter(sdInfo.pref, sd::SdState::ON);
|
currentStateSetter(sdInfo.active, sd::SdState::ON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sdInfo.state == SdStates::MOUNT_SELF) {
|
if (sdFsmState == SdStates::MOUNT_SELF) {
|
||||||
if (not sdInfo.commandExecuted) {
|
if (not sdInfo.commandExecuted) {
|
||||||
result = sdCardSetup(sdInfo.pref, sd::SdState::MOUNTED, sdInfo.prefChar);
|
result = sdCardSetup(sdInfo.active, sd::SdState::MOUNTED, sdInfo.activeChar);
|
||||||
sdInfo.commandExecuted = true;
|
sdInfo.commandExecuted = true;
|
||||||
} else {
|
} else {
|
||||||
if (nonBlockingOpChecking(SdStates::DETERMINE_OTHER, 5, "Mounting SD card")) {
|
if (nonBlockingOpChecking(SdStates::DETERMINE_OTHER, 5, "Mounting SD card")) {
|
||||||
sdInfo.prefState = sd::SdState::MOUNTED;
|
sdcMan->setActiveSdCard(sdInfo.active);
|
||||||
currentStateSetter(sdInfo.pref, sd::SdState::MOUNTED);
|
currMntPrefix = sdcMan->getCurrentMountPrefix();
|
||||||
|
sdInfo.activeState = sd::SdState::MOUNTED;
|
||||||
|
currentStateSetter(sdInfo.active, sd::SdState::MOUNTED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sdInfo.state == SdStates::DETERMINE_OTHER) {
|
if (sdFsmState == SdStates::DETERMINE_OTHER) {
|
||||||
// Determine whether any additional operations have to be done for the other SD card
|
// Determine whether any additional operations have to be done for the other SD card
|
||||||
// 1. Cold redundant case: Other SD card needs to be unmounted and switched off
|
// 1. Cold redundant case: Other SD card needs to be unmounted and switched off
|
||||||
// 2. Hot redundant case: Other SD card needs to be mounted and switched on
|
// 2. Hot redundant case: Other SD card needs to be mounted and switched on
|
||||||
#if Q7S_SD_CARD_CONFIG == Q7S_SD_COLD_REDUNDANT
|
if (sdInfo.cfgMode == SdCfgMode::COLD_REDUNDANT) {
|
||||||
if (sdInfo.otherState == sd::SdState::ON) {
|
if (sdInfo.otherState == sd::SdState::ON) {
|
||||||
sdInfo.state = SdStates::SET_STATE_OTHER;
|
sdFsmState = SdStates::SET_STATE_OTHER;
|
||||||
} else if (sdInfo.otherState == sd::SdState::MOUNTED) {
|
} else if (sdInfo.otherState == sd::SdState::MOUNTED) {
|
||||||
sdInfo.state = SdStates::MOUNT_UNMOUNT_OTHER;
|
sdFsmState = SdStates::MOUNT_UNMOUNT_OTHER;
|
||||||
} else {
|
} else {
|
||||||
// Is already off, update info, but with a small delay
|
// Is already off, update info, but with a small delay
|
||||||
sdInfo.state = SdStates::SKIP_CYCLE_BEFORE_INFO_UPDATE;
|
sdFsmState = SdStates::SKIP_CYCLE_BEFORE_INFO_UPDATE;
|
||||||
|
}
|
||||||
|
} else if (sdInfo.cfgMode == SdCfgMode::HOT_REDUNDANT) {
|
||||||
|
if (sdInfo.otherState == sd::SdState::OFF) {
|
||||||
|
sdFsmState = SdStates::SET_STATE_OTHER;
|
||||||
|
} else if (sdInfo.otherState == sd::SdState::ON) {
|
||||||
|
sdFsmState = SdStates::MOUNT_UNMOUNT_OTHER;
|
||||||
|
} else {
|
||||||
|
// Is already on and mounted, update info
|
||||||
|
sdFsmState = SdStates::SKIP_CYCLE_BEFORE_INFO_UPDATE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#elif Q7S_SD_CARD_CONFIG == Q7S_SD_HOT_REDUNDANT
|
|
||||||
if (sdInfo.otherState == sd::SdState::OFF) {
|
|
||||||
sdInfo.state = SdStates::SET_STATE_OTHER;
|
|
||||||
} else if (sdInfo.otherState == sd::SdState::ON) {
|
|
||||||
sdInfo.state = SdStates::MOUNT_UNMOUNT_OTHER;
|
|
||||||
} else {
|
|
||||||
// Is already on and mounted, update info
|
|
||||||
sdInfo.state = SdStates::SKIP_CYCLE_BEFORE_INFO_UPDATE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sdInfo.state == SdStates::SET_STATE_OTHER) {
|
if (sdFsmState == SdStates::SET_STATE_OTHER) {
|
||||||
// Set state of other SD card to ON or OFF, depending on redundancy mode
|
// Set state of other SD card to ON or OFF, depending on redundancy mode
|
||||||
#if Q7S_SD_CARD_CONFIG == Q7S_SD_COLD_REDUNDANT
|
if (sdInfo.cfgMode == SdCfgMode::COLD_REDUNDANT) {
|
||||||
if (not sdInfo.commandExecuted) {
|
if (not sdInfo.commandExecuted) {
|
||||||
result = sdCardSetup(sdInfo.other, sd::SdState::OFF, sdInfo.otherChar, false);
|
result = sdCardSetup(sdInfo.other, sd::SdState::OFF, sdInfo.otherChar, false);
|
||||||
sdInfo.commandExecuted = true;
|
sdInfo.commandExecuted = true;
|
||||||
} else {
|
} else {
|
||||||
if (nonBlockingOpChecking(SdStates::SKIP_CYCLE_BEFORE_INFO_UPDATE, 10,
|
if (nonBlockingOpChecking(SdStates::SKIP_CYCLE_BEFORE_INFO_UPDATE, 10,
|
||||||
"Switching off other SD card")) {
|
"Switching off other SD card")) {
|
||||||
sdInfo.otherState = sd::SdState::OFF;
|
sdInfo.otherState = sd::SdState::OFF;
|
||||||
currentStateSetter(sdInfo.other, sd::SdState::OFF);
|
currentStateSetter(sdInfo.other, sd::SdState::OFF);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (sdInfo.cfgMode == SdCfgMode::HOT_REDUNDANT) {
|
||||||
|
if (not sdInfo.commandExecuted) {
|
||||||
|
result = sdCardSetup(sdInfo.other, sd::SdState::ON, sdInfo.otherChar, false);
|
||||||
|
sdInfo.commandExecuted = true;
|
||||||
|
} else {
|
||||||
|
if (nonBlockingOpChecking(SdStates::MOUNT_UNMOUNT_OTHER, 10,
|
||||||
|
"Switching on other SD card")) {
|
||||||
|
sdInfo.otherState = sd::SdState::ON;
|
||||||
|
currentStateSetter(sdInfo.other, sd::SdState::ON);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#elif Q7S_SD_CARD_CONFIG == Q7S_SD_HOT_REDUNDANT
|
|
||||||
if (not sdInfo.commandExecuted) {
|
|
||||||
result = sdCardSetup(sdInfo.other, sd::SdState::ON, sdInfo.otherChar, false);
|
|
||||||
sdInfo.commandExecuted = true;
|
|
||||||
} else {
|
|
||||||
if (nonBlockingOpChecking(SdStates::MOUNT_UNMOUNT_OTHER, 10, "Switching on other SD card")) {
|
|
||||||
sdInfo.otherState = sd::SdState::ON;
|
|
||||||
currentStateSetter(sdInfo.other, sd::SdState::ON);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sdInfo.state == SdStates::MOUNT_UNMOUNT_OTHER) {
|
if (sdFsmState == SdStates::MOUNT_UNMOUNT_OTHER) {
|
||||||
// Mount or unmount other SD card, depending on redundancy mode
|
// Mount or unmount other SD card, depending on redundancy mode
|
||||||
#if Q7S_SD_CARD_CONFIG == Q7S_SD_COLD_REDUNDANT
|
if (sdInfo.cfgMode == SdCfgMode::COLD_REDUNDANT) {
|
||||||
if (not sdInfo.commandExecuted) {
|
if (not sdInfo.commandExecuted) {
|
||||||
result = sdCardSetup(sdInfo.other, sd::SdState::ON, sdInfo.otherChar);
|
result = sdCardSetup(sdInfo.other, sd::SdState::ON, sdInfo.otherChar);
|
||||||
sdInfo.commandExecuted = true;
|
sdInfo.commandExecuted = true;
|
||||||
} else {
|
} else {
|
||||||
if (nonBlockingOpChecking(SdStates::SET_STATE_OTHER, 10, "Unmounting other SD card")) {
|
if (nonBlockingOpChecking(SdStates::SET_STATE_OTHER, 10, "Unmounting other SD card")) {
|
||||||
sdInfo.otherState = sd::SdState::ON;
|
sdInfo.otherState = sd::SdState::ON;
|
||||||
currentStateSetter(sdInfo.other, sd::SdState::ON);
|
currentStateSetter(sdInfo.other, sd::SdState::ON);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (sdInfo.cfgMode == SdCfgMode::HOT_REDUNDANT) {
|
||||||
|
if (not sdInfo.commandExecuted) {
|
||||||
|
result = sdCardSetup(sdInfo.other, sd::SdState::MOUNTED, sdInfo.otherChar);
|
||||||
|
sdInfo.commandExecuted = true;
|
||||||
|
} else {
|
||||||
|
if (nonBlockingOpChecking(SdStates::UPDATE_INFO, 4, "Mounting other SD card")) {
|
||||||
|
sdInfo.otherState = sd::SdState::MOUNTED;
|
||||||
|
currentStateSetter(sdInfo.other, sd::SdState::MOUNTED);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#elif Q7S_SD_CARD_CONFIG == Q7S_SD_HOT_REDUNDANT
|
|
||||||
if (not sdInfo.commandExecuted) {
|
|
||||||
result = sdCardSetup(sdInfo.other, sd::SdState::MOUNTED, sdInfo.otherChar);
|
|
||||||
sdInfo.commandExecuted = true;
|
|
||||||
} else {
|
|
||||||
if (nonBlockingOpChecking(SdStates::UPDATE_INFO, 4, "Mounting other SD card")) {
|
|
||||||
sdInfo.otherState = sd::SdState::MOUNTED;
|
|
||||||
currentStateSetter(sdInfo.other, sd::SdState::MOUNTED);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sdInfo.state == SdStates::SKIP_CYCLE_BEFORE_INFO_UPDATE) {
|
if (sdFsmState == SdStates::SKIP_CYCLE_BEFORE_INFO_UPDATE) {
|
||||||
sdInfo.state = SdStates::UPDATE_INFO;
|
sdFsmState = SdStates::UPDATE_INFO;
|
||||||
} else if (sdInfo.state == SdStates::UPDATE_INFO) {
|
} else if (sdFsmState == SdStates::UPDATE_INFO) {
|
||||||
// It is assumed that all tasks are running by the point this section is reached.
|
// It is assumed that all tasks are running by the point this section is reached.
|
||||||
// Therefore, perform this operation in blocking mode because it does not take long
|
// Therefore, perform this operation in blocking mode because it does not take long
|
||||||
// and the ready state of the SD card is available sooner
|
// and the ready state of the SD card is available sooner
|
||||||
@ -477,10 +530,15 @@ ReturnValue_t CoreController::sdStateMachine() {
|
|||||||
sif::warning << "CoreController::initialize: Updating SD card state file failed" << std::endl;
|
sif::warning << "CoreController::initialize: Updating SD card state file failed" << std::endl;
|
||||||
}
|
}
|
||||||
sdInfo.commandExecuted = false;
|
sdInfo.commandExecuted = false;
|
||||||
sdInfo.state = SdStates::IDLE;
|
sdFsmState = SdStates::IDLE;
|
||||||
sdInfo.cycleCount = 0;
|
sdInfo.cycleCount = 0;
|
||||||
sdcMan->setBlocking(false);
|
sdcMan->setBlocking(false);
|
||||||
sdcMan->getSdCardsStatus(sdInfo.currentState);
|
sdcMan->getSdCardsStatus(sdInfo.currentState);
|
||||||
|
if (sdCommandingInfo.cmdPending) {
|
||||||
|
sdCommandingInfo.cmdPending = false;
|
||||||
|
actionHelper.finish(true, sdCommandingInfo.commander, sdCommandingInfo.actionId,
|
||||||
|
returnvalue::OK);
|
||||||
|
}
|
||||||
if (not sdInfo.initFinished) {
|
if (not sdInfo.initFinished) {
|
||||||
updateSdInfoOther();
|
updateSdInfoOther();
|
||||||
sdInfo.initFinished = true;
|
sdInfo.initFinished = true;
|
||||||
@ -488,81 +546,10 @@ ReturnValue_t CoreController::sdStateMachine() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sdInfo.state == SdStates::SET_STATE_FROM_COMMAND) {
|
|
||||||
if (not sdInfo.commandExecuted) {
|
|
||||||
executeNextExternalSdCommand();
|
|
||||||
} else {
|
|
||||||
checkExternalSdCommandStatus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sdInfo.cycleCount++;
|
sdInfo.cycleCount++;
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::executeNextExternalSdCommand() {
|
|
||||||
std::string sdChar;
|
|
||||||
sd::SdState currentStateOfCard = sd::SdState::OFF;
|
|
||||||
if (sdInfo.commandedCard == sd::SdCard::SLOT_0) {
|
|
||||||
sdChar = "0";
|
|
||||||
currentStateOfCard = sdInfo.currentState.first;
|
|
||||||
} else {
|
|
||||||
sdChar = "1";
|
|
||||||
currentStateOfCard = sdInfo.currentState.second;
|
|
||||||
}
|
|
||||||
if (currentStateOfCard == sd::SdState::OFF) {
|
|
||||||
if (sdInfo.commandedState == sd::SdState::ON) {
|
|
||||||
sdInfo.currentlyCommandedState = sdInfo.commandedState;
|
|
||||||
} else if (sdInfo.commandedState == sd::SdState::MOUNTED) {
|
|
||||||
sdInfo.currentlyCommandedState = sd::SdState::ON;
|
|
||||||
} else {
|
|
||||||
// SD card is already on target state
|
|
||||||
sdInfo.commandFinished = true;
|
|
||||||
sdInfo.state = SdStates::IDLE;
|
|
||||||
}
|
|
||||||
} else if (currentStateOfCard == sd::SdState::ON) {
|
|
||||||
if (sdInfo.commandedState == sd::SdState::OFF or
|
|
||||||
sdInfo.commandedState == sd::SdState::MOUNTED) {
|
|
||||||
sdInfo.currentlyCommandedState = sdInfo.commandedState;
|
|
||||||
} else {
|
|
||||||
// Already on target state
|
|
||||||
sdInfo.commandFinished = true;
|
|
||||||
sdInfo.state = SdStates::IDLE;
|
|
||||||
}
|
|
||||||
} else if (currentStateOfCard == sd::SdState::MOUNTED) {
|
|
||||||
if (sdInfo.commandedState == sd::SdState::ON) {
|
|
||||||
sdInfo.currentlyCommandedState = sdInfo.commandedState;
|
|
||||||
} else if (sdInfo.commandedState == sd::SdState::OFF) {
|
|
||||||
// This causes an unmount in sdCardSetup
|
|
||||||
sdInfo.currentlyCommandedState = sd::SdState::ON;
|
|
||||||
} else {
|
|
||||||
sdInfo.commandFinished = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sdCardSetup(sdInfo.commandedCard, sdInfo.commandedState, sdChar);
|
|
||||||
sdInfo.commandExecuted = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CoreController::checkExternalSdCommandStatus() {
|
|
||||||
SdCardManager::Operations operation;
|
|
||||||
SdCardManager::OpStatus status = sdcMan->checkCurrentOp(operation);
|
|
||||||
if (status == SdCardManager::OpStatus::SUCCESS) {
|
|
||||||
if (sdInfo.currentlyCommandedState == sdInfo.commandedState) {
|
|
||||||
sdInfo.state = SdStates::SKIP_CYCLE_BEFORE_INFO_UPDATE;
|
|
||||||
sdInfo.commandFinished = true;
|
|
||||||
} else {
|
|
||||||
// stay on same state machine state because the target state was not reached yet.
|
|
||||||
sdInfo.cycleCount = 0;
|
|
||||||
}
|
|
||||||
currentStateSetter(sdInfo.commandedCard, sdInfo.currentlyCommandedState);
|
|
||||||
sdInfo.commandExecuted = false;
|
|
||||||
} else if (sdInfo.cycleCount > 4) {
|
|
||||||
sif::warning << "CoreController::sdStateMachine: Commanding SD state "
|
|
||||||
"takes too long"
|
|
||||||
<< std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CoreController::currentStateSetter(sd::SdCard sdCard, sd::SdState newState) {
|
void CoreController::currentStateSetter(sd::SdCard sdCard, sd::SdState newState) {
|
||||||
if (sdCard == sd::SdCard::SLOT_0) {
|
if (sdCard == sd::SdCard::SLOT_0) {
|
||||||
sdInfo.currentState.first = newState;
|
sdInfo.currentState.first = newState;
|
||||||
@ -576,9 +563,9 @@ ReturnValue_t CoreController::sdCardSetup(sd::SdCard sdCard, sd::SdState targetS
|
|||||||
std::string mountString;
|
std::string mountString;
|
||||||
sdcMan->setPrintCommandOutput(printOutput);
|
sdcMan->setPrintCommandOutput(printOutput);
|
||||||
if (sdCard == sd::SdCard::SLOT_0) {
|
if (sdCard == sd::SdCard::SLOT_0) {
|
||||||
mountString = SdCardManager::SD_0_MOUNT_POINT;
|
mountString = config::SD_0_MOUNT_POINT;
|
||||||
} else {
|
} else {
|
||||||
mountString = SdCardManager::SD_1_MOUNT_POINT;
|
mountString = config::SD_1_MOUNT_POINT;
|
||||||
}
|
}
|
||||||
|
|
||||||
sd::SdState state = sd::SdState::OFF;
|
sd::SdState state = sd::SdState::OFF;
|
||||||
@ -634,12 +621,12 @@ ReturnValue_t CoreController::sdCardSetup(sd::SdCard sdCard, sd::SdState targetS
|
|||||||
ReturnValue_t CoreController::sdColdRedundantBlockingInit() {
|
ReturnValue_t CoreController::sdColdRedundantBlockingInit() {
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
|
||||||
result = sdCardSetup(sdInfo.pref, sd::SdState::MOUNTED, sdInfo.prefChar);
|
result = sdCardSetup(sdInfo.active, sd::SdState::MOUNTED, sdInfo.activeChar);
|
||||||
if (result != SdCardManager::ALREADY_MOUNTED and result != returnvalue::OK) {
|
if (result != SdCardManager::ALREADY_MOUNTED and result != returnvalue::OK) {
|
||||||
sif::warning << "Setting up preferred card " << sdInfo.otherChar
|
sif::warning << "Setting up preferred card " << sdInfo.otherChar
|
||||||
<< " in cold redundant mode failed" << std::endl;
|
<< " in cold redundant mode failed" << std::endl;
|
||||||
// Try other SD card and mark set up operation as failed
|
// Try other SD card and mark set up operation as failed
|
||||||
sdCardSetup(sdInfo.pref, sd::SdState::MOUNTED, sdInfo.prefChar);
|
sdCardSetup(sdInfo.active, sd::SdState::MOUNTED, sdInfo.activeChar);
|
||||||
result = returnvalue::FAILED;
|
result = returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -956,21 +943,19 @@ ReturnValue_t CoreController::gracefulShutdownTasks(xsc::Chip chip, xsc::Copy co
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreController::~CoreController() {}
|
|
||||||
|
|
||||||
void CoreController::updateSdInfoOther() {
|
void CoreController::updateSdInfoOther() {
|
||||||
if (sdInfo.pref == sd::SdCard::SLOT_0) {
|
if (sdInfo.active == sd::SdCard::SLOT_0) {
|
||||||
sdInfo.prefChar = "0";
|
sdInfo.activeChar = "0";
|
||||||
sdInfo.otherChar = "1";
|
sdInfo.otherChar = "1";
|
||||||
sdInfo.otherState = sdInfo.currentState.second;
|
sdInfo.otherState = sdInfo.currentState.second;
|
||||||
sdInfo.prefState = sdInfo.currentState.first;
|
sdInfo.activeState = sdInfo.currentState.first;
|
||||||
sdInfo.other = sd::SdCard::SLOT_1;
|
sdInfo.other = sd::SdCard::SLOT_1;
|
||||||
|
|
||||||
} else if (sdInfo.pref == sd::SdCard::SLOT_1) {
|
} else if (sdInfo.active == sd::SdCard::SLOT_1) {
|
||||||
sdInfo.prefChar = "1";
|
sdInfo.activeChar = "1";
|
||||||
sdInfo.otherChar = "0";
|
sdInfo.otherChar = "0";
|
||||||
sdInfo.otherState = sdInfo.currentState.first;
|
sdInfo.otherState = sdInfo.currentState.first;
|
||||||
sdInfo.prefState = sdInfo.currentState.second;
|
sdInfo.activeState = sdInfo.currentState.second;
|
||||||
sdInfo.other = sd::SdCard::SLOT_0;
|
sdInfo.other = sd::SdCard::SLOT_0;
|
||||||
} else {
|
} else {
|
||||||
sif::warning << "CoreController::updateSdInfoOther: Invalid SD card passed" << std::endl;
|
sif::warning << "CoreController::updateSdInfoOther: Invalid SD card passed" << std::endl;
|
||||||
@ -1243,7 +1228,7 @@ void CoreController::performWatchdogControlOperation() {
|
|||||||
void CoreController::performMountedSdCardOperations() {
|
void CoreController::performMountedSdCardOperations() {
|
||||||
auto mountedSdCardOp = [&](bool &mntSwitch, sd::SdCard sdCard, std::string mntPoint) {
|
auto mountedSdCardOp = [&](bool &mntSwitch, sd::SdCard sdCard, std::string mntPoint) {
|
||||||
if (mntSwitch) {
|
if (mntSwitch) {
|
||||||
bool sdCardMounted = sdcMan->isSdCardMounted(sdCard);
|
bool sdCardMounted = sdcMan->isSdCardUsable(sdCard);
|
||||||
if (sdCardMounted and not performOneShotSdCardOpsSwitch) {
|
if (sdCardMounted and not performOneShotSdCardOpsSwitch) {
|
||||||
std::ostringstream path;
|
std::ostringstream path;
|
||||||
path << mntPoint << "/" << CONF_FOLDER;
|
path << mntPoint << "/" << CONF_FOLDER;
|
||||||
@ -1258,12 +1243,12 @@ void CoreController::performMountedSdCardOperations() {
|
|||||||
mntSwitch = false;
|
mntSwitch = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (sdInfo.pref == sd::SdCard::SLOT_1) {
|
if (sdInfo.active == sd::SdCard::SLOT_1) {
|
||||||
mountedSdCardOp(sdInfo.mountSwitch.second, sd::SdCard::SLOT_1, SdCardManager::SD_1_MOUNT_POINT);
|
mountedSdCardOp(sdInfo.mountSwitch.second, sd::SdCard::SLOT_1, config::SD_1_MOUNT_POINT);
|
||||||
mountedSdCardOp(sdInfo.mountSwitch.first, sd::SdCard::SLOT_0, SdCardManager::SD_0_MOUNT_POINT);
|
mountedSdCardOp(sdInfo.mountSwitch.first, sd::SdCard::SLOT_0, config::SD_0_MOUNT_POINT);
|
||||||
} else {
|
} else {
|
||||||
mountedSdCardOp(sdInfo.mountSwitch.first, sd::SdCard::SLOT_0, SdCardManager::SD_0_MOUNT_POINT);
|
mountedSdCardOp(sdInfo.mountSwitch.first, sd::SdCard::SLOT_0, config::SD_0_MOUNT_POINT);
|
||||||
mountedSdCardOp(sdInfo.mountSwitch.second, sd::SdCard::SLOT_1, SdCardManager::SD_1_MOUNT_POINT);
|
mountedSdCardOp(sdInfo.mountSwitch.second, sd::SdCard::SLOT_1, config::SD_1_MOUNT_POINT);
|
||||||
}
|
}
|
||||||
timeFileHandler();
|
timeFileHandler();
|
||||||
}
|
}
|
||||||
@ -1272,13 +1257,15 @@ ReturnValue_t CoreController::performSdCardCheck() {
|
|||||||
bool mountedReadOnly = false;
|
bool mountedReadOnly = false;
|
||||||
SdCardManager::SdStatePair active;
|
SdCardManager::SdStatePair active;
|
||||||
sdcMan->getSdCardsStatus(active);
|
sdcMan->getSdCardsStatus(active);
|
||||||
|
if (sdFsmState != SdStates::IDLE) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
auto sdCardCheck = [&](sd::SdCard sdCard) {
|
auto sdCardCheck = [&](sd::SdCard sdCard) {
|
||||||
ReturnValue_t result = sdcMan->isSdCardMountedReadOnly(sdCard, mountedReadOnly);
|
ReturnValue_t result = sdcMan->isSdCardMountedReadOnly(sdCard, mountedReadOnly);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "CoreController::performSdCardCheck: Could not check "
|
sif::error << "CoreController::performSdCardCheck: Could not check "
|
||||||
"read-only mount state"
|
"read-only mount state"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
mountedReadOnly = true;
|
|
||||||
}
|
}
|
||||||
if (mountedReadOnly) {
|
if (mountedReadOnly) {
|
||||||
int linuxErrno = 0;
|
int linuxErrno = 0;
|
||||||
@ -1845,6 +1832,175 @@ void CoreController::readHkData() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *CoreController::getXscMountDir(xsc::Chip chip, xsc::Copy copy) {
|
||||||
|
if (chip == xsc::Chip::CHIP_0) {
|
||||||
|
if (copy == xsc::Copy::COPY_0) {
|
||||||
|
return CHIP_0_COPY_0_MOUNT_DIR;
|
||||||
|
} else if (copy == xsc::Copy::COPY_1) {
|
||||||
|
return CHIP_0_COPY_1_MOUNT_DIR;
|
||||||
|
}
|
||||||
|
} else if (chip == xsc::Chip::CHIP_1) {
|
||||||
|
if (copy == xsc::Copy::COPY_0) {
|
||||||
|
return CHIP_1_COPY_0_MOUNT_DIR;
|
||||||
|
} else if (copy == xsc::Copy::COPY_1) {
|
||||||
|
return CHIP_1_COPY_1_MOUNT_DIR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sif::error << "Invalid chip or copy passed to CoreController::getXscMountDir" << std::endl;
|
||||||
|
return CHIP_0_COPY_0_MOUNT_DIR;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t CoreController::executeSwUpdate(SwUpdateSources sourceDir, const uint8_t *data,
|
||||||
|
size_t size) {
|
||||||
|
using namespace std;
|
||||||
|
using namespace std::filesystem;
|
||||||
|
// At the very least, chip and copy ID need to be included in the command
|
||||||
|
if (size < 2) {
|
||||||
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
|
}
|
||||||
|
if (data[0] > 1 or data[1] > 1) {
|
||||||
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
|
}
|
||||||
|
auto chip = static_cast<xsc::Chip>(data[0]);
|
||||||
|
auto copy = static_cast<xsc::Copy>(data[1]);
|
||||||
|
const char *sourceStr = "unknown";
|
||||||
|
if (sourceDir == SwUpdateSources::SD_0) {
|
||||||
|
sourceStr = "SD 0";
|
||||||
|
} else if (sourceDir == SwUpdateSources::SD_1) {
|
||||||
|
sourceStr = "SD 1";
|
||||||
|
} else {
|
||||||
|
sourceStr = "tmp directory";
|
||||||
|
}
|
||||||
|
bool sameChipAndCopy = false;
|
||||||
|
if(chip == CURRENT_CHIP and copy == CURRENT_COPY) {
|
||||||
|
// This is problematic if the OBSW is running as a systemd service.
|
||||||
|
// Do not allow for now.
|
||||||
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
|
//sameChipAndCopy = true;
|
||||||
|
}
|
||||||
|
sif::info << "Executing SW update for Chip " << static_cast<int>(data[0]) << " Copy "
|
||||||
|
<< static_cast<int>(data[1]) << " from " << sourceStr << std::endl;
|
||||||
|
path prefixPath;
|
||||||
|
if (sourceDir == SwUpdateSources::SD_0) {
|
||||||
|
prefixPath = path(config::SD_0_MOUNT_POINT);
|
||||||
|
} else if (sourceDir == SwUpdateSources::SD_1) {
|
||||||
|
prefixPath = path(config::SD_1_MOUNT_POINT);
|
||||||
|
} else if (sourceDir == SwUpdateSources::TMP_DIR) {
|
||||||
|
prefixPath = path("/tmp");
|
||||||
|
}
|
||||||
|
path archivePath = prefixPath / path(config::OBSW_UPDATE_ARCHIVE_FILE_NAME);
|
||||||
|
if (not exists(archivePath)) {
|
||||||
|
return HasFileSystemIF::FILE_DOES_NOT_EXIST;
|
||||||
|
}
|
||||||
|
ostringstream cmd("tar -xJf", ios::app);
|
||||||
|
cmd << " " << archivePath << " -C " << prefixPath;
|
||||||
|
int result = system(cmd.str().c_str());
|
||||||
|
if (result != 0) {
|
||||||
|
utility::handleSystemError(result, "CoreController::executeAction: SW Update Decompression");
|
||||||
|
}
|
||||||
|
path strippedImagePath = prefixPath / path(config::STRIPPED_OBSW_BINARY_FILE_NAME);
|
||||||
|
if (!exists(strippedImagePath)) {
|
||||||
|
// TODO: Custom returnvalue?
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
|
path obswVersionFilePath = prefixPath / path(config::OBSW_VERSION_FILE_NAME);
|
||||||
|
if (!exists(obswVersionFilePath)) {
|
||||||
|
// TODO: Custom returnvalue?
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
|
cmd.str("");
|
||||||
|
cmd.clear();
|
||||||
|
path obswDestPath;
|
||||||
|
path obswVersionDestPath;
|
||||||
|
if(not sameChipAndCopy) {
|
||||||
|
cmd << "xsc_mount_copy " << std::to_string(data[0]) << " " << std::to_string(data[1]);
|
||||||
|
result = system(cmd.str().c_str());
|
||||||
|
if (result != 0) {
|
||||||
|
std::string contextString = "CoreController::executeAction: SW Update Mounting " +
|
||||||
|
std::to_string(data[0]) + " " + std::to_string(data[1]);
|
||||||
|
utility::handleSystemError(result, contextString);
|
||||||
|
}
|
||||||
|
cmd.str("");
|
||||||
|
cmd.clear();
|
||||||
|
path xscMountDest(getXscMountDir(chip, copy));
|
||||||
|
obswDestPath = xscMountDest / path(relative(config::OBSW_PATH, "/"));
|
||||||
|
obswVersionDestPath = xscMountDest / path(relative(config::OBSW_VERSION_FILE_PATH, "/"));
|
||||||
|
} else {
|
||||||
|
obswDestPath = path(config::OBSW_PATH);
|
||||||
|
obswVersionDestPath = path(config::OBSW_VERSION_FILE_PATH);
|
||||||
|
cmd << "writeprotect " << std::to_string(CURRENT_CHIP) << " " << std::to_string(CURRENT_COPY)
|
||||||
|
<< " 0";
|
||||||
|
result = system(cmd.str().c_str());
|
||||||
|
if (result != 0) {
|
||||||
|
std::string contextString = "CoreController::executeAction: Unlocking current chip";
|
||||||
|
utility::handleSystemError(result, contextString);
|
||||||
|
}
|
||||||
|
cmd.str("");
|
||||||
|
cmd.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd << "cp " << strippedImagePath << " " << obswDestPath;
|
||||||
|
result = system(cmd.str().c_str());
|
||||||
|
if (result != 0) {
|
||||||
|
utility::handleSystemError(result, "CoreController::executeAction: Copying SW update");
|
||||||
|
}
|
||||||
|
cmd.str("");
|
||||||
|
cmd.clear();
|
||||||
|
|
||||||
|
cmd << "cp " << obswVersionFilePath << " " << obswVersionDestPath;
|
||||||
|
result = system(cmd.str().c_str());
|
||||||
|
if (result != 0) {
|
||||||
|
utility::handleSystemError(result, "CoreController::executeAction: Copying SW version file");
|
||||||
|
}
|
||||||
|
cmd.str("");
|
||||||
|
cmd.clear();
|
||||||
|
|
||||||
|
// Set correct permission for both files
|
||||||
|
cmd << "chmod 0755 " << obswDestPath;
|
||||||
|
result = system(cmd.str().c_str());
|
||||||
|
if (result != 0) {
|
||||||
|
utility::handleSystemError(result,
|
||||||
|
"CoreController::executeAction: Setting SW permissions 0755");
|
||||||
|
}
|
||||||
|
cmd.str("");
|
||||||
|
cmd.clear();
|
||||||
|
|
||||||
|
cmd << "chmod 0644 " << obswVersionDestPath;
|
||||||
|
result = system(cmd.str().c_str());
|
||||||
|
if (result != 0) {
|
||||||
|
utility::handleSystemError(
|
||||||
|
result, "CoreController::executeAction: Setting version file permission 0644");
|
||||||
|
}
|
||||||
|
cmd.str("");
|
||||||
|
cmd.clear();
|
||||||
|
|
||||||
|
// TODO: This takes a long time and will block the core controller.. Maybe use command executor?
|
||||||
|
// For now dont care..
|
||||||
|
cmd << "writeprotect " << std::to_string(data[0]) << " " << std::to_string(data[1]) << " 1";
|
||||||
|
result = system(cmd.str().c_str());
|
||||||
|
if (result != 0) {
|
||||||
|
std::string contextString = "CoreController::executeAction: Writeprotecting " +
|
||||||
|
std::to_string(data[0]) + " " + std::to_string(data[1]);
|
||||||
|
utility::handleSystemError(result, contextString);
|
||||||
|
}
|
||||||
|
sif::info << "SW update complete" << std::endl;
|
||||||
|
return HasActionsIF::EXECUTION_FINISHED;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CoreController::startSdStateMachine(sd::SdCard targetActiveSd, SdCfgMode mode,
|
||||||
|
MessageQueueId_t commander, DeviceCommandId_t actionId) {
|
||||||
|
if (sdFsmState != SdStates::IDLE or sdCommandingInfo.cmdPending) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
sdFsmState = SdStates::START;
|
||||||
|
sdInfo.active = targetActiveSd;
|
||||||
|
sdInfo.cfgMode = mode;
|
||||||
|
sdCommandingInfo.actionId = actionId;
|
||||||
|
sdCommandingInfo.commander = commander;
|
||||||
|
sdCommandingInfo.cmdPending = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool CoreController::isNumber(const std::string &s) {
|
bool CoreController::isNumber(const std::string &s) {
|
||||||
return !s.empty() && std::find_if(s.begin(), s.end(),
|
return !s.empty() && std::find_if(s.begin(), s.end(),
|
||||||
[](unsigned char c) { return !std::isdigit(c); }) == s.end();
|
[](unsigned char c) { return !std::isdigit(c); }) == s.end();
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
#include "CoreDefinitions.h"
|
#include "CoreDefinitions.h"
|
||||||
#include "bsp_q7s/memory/SdCardManager.h"
|
#include "bsp_q7s/fs/SdCardManager.h"
|
||||||
#include "events/subsystemIdRanges.h"
|
#include "events/subsystemIdRanges.h"
|
||||||
#include "fsfw/controller/ExtendedControllerBase.h"
|
#include "fsfw/controller/ExtendedControllerBase.h"
|
||||||
#include "mission/devices/devicedefinitions/GPSDefinitions.h"
|
#include "mission/devices/devicedefinitions/GPSDefinitions.h"
|
||||||
@ -51,22 +51,38 @@ class CoreController : public ExtendedControllerBase {
|
|||||||
static constexpr char CHIP_PROT_SCRIPT[] = "get-chip-prot-status.sh";
|
static constexpr char CHIP_PROT_SCRIPT[] = "get-chip-prot-status.sh";
|
||||||
static constexpr char CHIP_STATE_FILE[] = "/tmp/chip_prot_status.txt";
|
static constexpr char CHIP_STATE_FILE[] = "/tmp/chip_prot_status.txt";
|
||||||
static constexpr char CURR_COPY_FILE[] = "/tmp/curr_copy.txt";
|
static constexpr char CURR_COPY_FILE[] = "/tmp/curr_copy.txt";
|
||||||
|
|
||||||
static constexpr char CONF_FOLDER[] = "conf";
|
static constexpr char CONF_FOLDER[] = "conf";
|
||||||
|
|
||||||
static constexpr char VERSION_FILE_NAME[] = "version.txt";
|
static constexpr char VERSION_FILE_NAME[] = "version.txt";
|
||||||
static constexpr char REBOOT_FILE_NAME[] = "reboot.txt";
|
static constexpr char REBOOT_FILE_NAME[] = "reboot.txt";
|
||||||
static constexpr char TIME_FILE_NAME[] = "time.txt";
|
static constexpr char TIME_FILE_NAME[] = "time.txt";
|
||||||
|
|
||||||
const std::string VERSION_FILE =
|
const std::string VERSION_FILE =
|
||||||
"/" + std::string(CONF_FOLDER) + "/" + std::string(VERSION_FILE_NAME);
|
"/" + std::string(CONF_FOLDER) + "/" + std::string(VERSION_FILE_NAME);
|
||||||
const std::string REBOOT_FILE =
|
const std::string REBOOT_FILE =
|
||||||
"/" + std::string(CONF_FOLDER) + "/" + std::string(REBOOT_FILE_NAME);
|
"/" + std::string(CONF_FOLDER) + "/" + std::string(REBOOT_FILE_NAME);
|
||||||
const std::string TIME_FILE = "/" + std::string(CONF_FOLDER) + "/" + std::string(TIME_FILE_NAME);
|
const std::string TIME_FILE = "/" + std::string(CONF_FOLDER) + "/" + std::string(TIME_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";
|
||||||
|
static constexpr char CHIP_1_COPY_0_MOUNT_DIR[] = "/tmp/mntupdate-xdi-qspi1-nom-rootfs";
|
||||||
|
static constexpr char CHIP_1_COPY_1_MOUNT_DIR[] = "/tmp/mntupdate-xdi-qspi1-gold-rootfs";
|
||||||
|
|
||||||
static constexpr ActionId_t LIST_DIRECTORY_INTO_FILE = 0;
|
static constexpr ActionId_t LIST_DIRECTORY_INTO_FILE = 0;
|
||||||
static constexpr ActionId_t SWITCH_REBOOT_FILE_HANDLING = 5;
|
static constexpr ActionId_t SWITCH_REBOOT_FILE_HANDLING = 5;
|
||||||
static constexpr ActionId_t RESET_REBOOT_COUNTERS = 6;
|
static constexpr ActionId_t RESET_REBOOT_COUNTERS = 6;
|
||||||
static constexpr ActionId_t SWITCH_IMG_LOCK = 7;
|
static constexpr ActionId_t SWITCH_IMG_LOCK = 7;
|
||||||
static constexpr ActionId_t SET_MAX_REBOOT_CNT = 8;
|
static constexpr ActionId_t SET_MAX_REBOOT_CNT = 8;
|
||||||
|
|
||||||
|
static constexpr ActionId_t OBSW_UPDATE_FROM_SD_0 = 10;
|
||||||
|
static constexpr ActionId_t OBSW_UPDATE_FROM_SD_1 = 11;
|
||||||
|
static constexpr ActionId_t OBSW_UPDATE_FROM_TMP = 12;
|
||||||
|
|
||||||
|
static constexpr ActionId_t SWITCH_TO_SD_0 = 16;
|
||||||
|
static constexpr ActionId_t SWITCH_TO_SD_1 = 17;
|
||||||
|
static constexpr ActionId_t SWITCH_TO_BOTH_SD_CARDS = 18;
|
||||||
|
|
||||||
//! Reboot using the xsc_boot_copy command
|
//! Reboot using the xsc_boot_copy command
|
||||||
static constexpr ActionId_t XSC_REBOOT_OBC = 32;
|
static constexpr ActionId_t XSC_REBOOT_OBC = 32;
|
||||||
static constexpr ActionId_t MOUNT_OTHER_COPY = 33;
|
static constexpr ActionId_t MOUNT_OTHER_COPY = 33;
|
||||||
@ -107,6 +123,7 @@ class CoreController : public ExtendedControllerBase {
|
|||||||
static ReturnValue_t generateChipStateFile();
|
static ReturnValue_t generateChipStateFile();
|
||||||
static ReturnValue_t incrementAllocationFailureCount();
|
static ReturnValue_t incrementAllocationFailureCount();
|
||||||
static void getCurrentBootCopy(xsc::Chip& chip, xsc::Copy& copy);
|
static void getCurrentBootCopy(xsc::Chip& chip, xsc::Copy& copy);
|
||||||
|
static const char* getXscMountDir(xsc::Chip chip, xsc::Copy copy);
|
||||||
|
|
||||||
ReturnValue_t updateProtInfo(bool regenerateChipStateFile = true);
|
ReturnValue_t updateProtInfo(bool regenerateChipStateFile = true);
|
||||||
|
|
||||||
@ -151,36 +168,41 @@ class CoreController : public ExtendedControllerBase {
|
|||||||
SKIP_CYCLE_BEFORE_INFO_UPDATE,
|
SKIP_CYCLE_BEFORE_INFO_UPDATE,
|
||||||
UPDATE_INFO,
|
UPDATE_INFO,
|
||||||
// SD initialization done
|
// SD initialization done
|
||||||
IDLE,
|
IDLE
|
||||||
// Used if SD switches or mount commands are issued via telecommand
|
|
||||||
SET_STATE_FROM_COMMAND,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class SwUpdateSources { SD_0, SD_1, TMP_DIR };
|
||||||
|
|
||||||
static constexpr bool BLOCKING_SD_INIT = false;
|
static constexpr bool BLOCKING_SD_INIT = false;
|
||||||
|
|
||||||
SdCardManager* sdcMan = nullptr;
|
SdCardManager* sdcMan = nullptr;
|
||||||
MessageQueueIF* eventQueue = nullptr;
|
MessageQueueIF* eventQueue = nullptr;
|
||||||
|
|
||||||
struct SdInfo {
|
SdStates sdFsmState = SdStates::START;
|
||||||
sd::SdCard pref = sd::SdCard::NONE;
|
enum SdCfgMode { PASSIVE, COLD_REDUNDANT, HOT_REDUNDANT };
|
||||||
|
|
||||||
|
struct SdFsmParams {
|
||||||
|
SdCfgMode cfgMode = SdCfgMode::COLD_REDUNDANT;
|
||||||
|
sd::SdCard active = sd::SdCard::NONE;
|
||||||
sd::SdCard other = sd::SdCard::NONE;
|
sd::SdCard other = sd::SdCard::NONE;
|
||||||
sd::SdState prefState = sd::SdState::OFF;
|
sd::SdState activeState = sd::SdState::OFF;
|
||||||
sd::SdState otherState = sd::SdState::OFF;
|
sd::SdState otherState = sd::SdState::OFF;
|
||||||
std::string prefChar = "0";
|
std::string activeChar = "0";
|
||||||
std::string otherChar = "1";
|
std::string otherChar = "1";
|
||||||
std::pair<bool, bool> mountSwitch = {true, true};
|
std::pair<bool, bool> mountSwitch = {true, true};
|
||||||
SdStates state = SdStates::START;
|
|
||||||
// Used to track whether a command was executed
|
// Used to track whether a command was executed
|
||||||
bool commandExecuted = true;
|
bool commandExecuted = true;
|
||||||
bool initFinished = false;
|
bool initFinished = false;
|
||||||
SdCardManager::SdStatePair currentState;
|
SdCardManager::SdStatePair currentState;
|
||||||
uint16_t cycleCount = 0;
|
uint16_t cycleCount = 0;
|
||||||
// These two flags are related to external commanding
|
|
||||||
bool commandIssued = false;
|
|
||||||
bool commandFinished = false;
|
|
||||||
sd::SdState currentlyCommandedState = sd::SdState::OFF;
|
|
||||||
sd::SdCard commandedCard = sd::SdCard::NONE;
|
|
||||||
sd::SdState commandedState = sd::SdState::OFF;
|
|
||||||
} sdInfo;
|
} sdInfo;
|
||||||
|
|
||||||
|
struct SdCommanding {
|
||||||
|
bool cmdPending = false;
|
||||||
|
MessageQueueId_t commander = MessageQueueIF::NO_QUEUE;
|
||||||
|
DeviceCommandId_t actionId;
|
||||||
|
} sdCommandingInfo;
|
||||||
|
|
||||||
RebootFile rebootFile = {};
|
RebootFile rebootFile = {};
|
||||||
std::string currMntPrefix;
|
std::string currMntPrefix;
|
||||||
bool performOneShotSdCardOpsSwitch = true;
|
bool performOneShotSdCardOpsSwitch = true;
|
||||||
@ -211,12 +233,15 @@ class CoreController : public ExtendedControllerBase {
|
|||||||
ReturnValue_t initBootCopy();
|
ReturnValue_t initBootCopy();
|
||||||
ReturnValue_t initWatchdogFifo();
|
ReturnValue_t initWatchdogFifo();
|
||||||
ReturnValue_t initSdCardBlocking();
|
ReturnValue_t initSdCardBlocking();
|
||||||
|
bool startSdStateMachine(sd::SdCard targetActiveSd, SdCfgMode mode, MessageQueueId_t commander,
|
||||||
|
DeviceCommandId_t actionId);
|
||||||
void initPrint();
|
void initPrint();
|
||||||
|
|
||||||
ReturnValue_t sdStateMachine();
|
ReturnValue_t sdStateMachine();
|
||||||
void updateSdInfoOther();
|
void updateSdInfoOther();
|
||||||
ReturnValue_t sdCardSetup(sd::SdCard sdCard, sd::SdState targetState, std::string sdChar,
|
ReturnValue_t sdCardSetup(sd::SdCard sdCard, sd::SdState targetState, std::string sdChar,
|
||||||
bool printOutput = true);
|
bool printOutput = true);
|
||||||
|
ReturnValue_t executeSwUpdate(SwUpdateSources sourceDir, const uint8_t* data, size_t size);
|
||||||
ReturnValue_t sdColdRedundantBlockingInit();
|
ReturnValue_t sdColdRedundantBlockingInit();
|
||||||
|
|
||||||
void currentStateSetter(sd::SdCard sdCard, sd::SdState newState);
|
void currentStateSetter(sd::SdCard sdCard, sd::SdState newState);
|
||||||
|
@ -84,6 +84,10 @@ void initmission::initTasks() {
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_PACKET_DISTRIB", objects::PUS_PACKET_DISTRIBUTOR);
|
initmission::printAddObjectError("PUS_PACKET_DISTRIB", objects::PUS_PACKET_DISTRIBUTOR);
|
||||||
}
|
}
|
||||||
|
result = tmTcDistributor->addComponent(objects::CFDP_DISTRIBUTOR);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
initmission::printAddObjectError("CFDP_DISTRIBUTOR", objects::CFDP_DISTRIBUTOR);
|
||||||
|
}
|
||||||
result = tmTcDistributor->addComponent(objects::TM_FUNNEL);
|
result = tmTcDistributor->addComponent(objects::TM_FUNNEL);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("TM_FUNNEL", objects::TM_FUNNEL);
|
initmission::printAddObjectError("TM_FUNNEL", objects::TM_FUNNEL);
|
||||||
@ -124,6 +128,15 @@ void initmission::initTasks() {
|
|||||||
}
|
}
|
||||||
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
|
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
|
||||||
|
|
||||||
|
#if OBSW_ADD_CFDP_COMPONENTS == 1
|
||||||
|
PeriodicTaskIF* cfdpTask = factory->createPeriodicTask(
|
||||||
|
"CFDP Handler", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
||||||
|
result = cfdpTask->addComponent(objects::CFDP_HANDLER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
initmission::printAddObjectError("CFDP Handler", objects::CFDP_HANDLER);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
PeriodicTaskIF* acsTask = factory->createPeriodicTask(
|
PeriodicTaskIF* acsTask = factory->createPeriodicTask(
|
||||||
"ACS_TASK", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
"ACS_TASK", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||||
#if OBSW_ADD_ACS_HANDLERS == 1
|
#if OBSW_ADD_ACS_HANDLERS == 1
|
||||||
@ -198,15 +211,6 @@ void initmission::initTasks() {
|
|||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_RTD_DEVICES */
|
#endif /* OBSW_ADD_RTD_DEVICES */
|
||||||
|
|
||||||
// FS task, task interval does not matter because it runs in permanent loop, priority low
|
|
||||||
// because it is a non-essential background task
|
|
||||||
PeriodicTaskIF* fsTask = factory->createPeriodicTask(
|
|
||||||
"FILE_SYSTEM_TASK", 25, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
|
||||||
result = fsTask->addComponent(objects::FILE_SYSTEM_HANDLER);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
initmission::printAddObjectError("FILE_SYSTEM_TASK", objects::FILE_SYSTEM_HANDLER);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if OBSW_ADD_STAR_TRACKER == 1
|
#if OBSW_ADD_STAR_TRACKER == 1
|
||||||
PeriodicTaskIF* strHelperTask = factory->createPeriodicTask(
|
PeriodicTaskIF* strHelperTask = factory->createPeriodicTask(
|
||||||
"STR_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"STR_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
@ -288,7 +292,10 @@ void initmission::initTasks() {
|
|||||||
ptmeTestTask->startTask();
|
ptmeTestTask->startTask();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fsTask->startTask();
|
#if OBSW_ADD_CFDP_COMPONENTS == 1
|
||||||
|
cfdpTask->startTask();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if OBSW_ADD_STAR_TRACKER == 1
|
#if OBSW_ADD_STAR_TRACKER == 1
|
||||||
strHelperTask->startTask();
|
strHelperTask->startTask();
|
||||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
#include "bsp_q7s/callbacks/pcduSwitchCb.h"
|
#include "bsp_q7s/callbacks/pcduSwitchCb.h"
|
||||||
#include "bsp_q7s/callbacks/q7sGpioCallbacks.h"
|
#include "bsp_q7s/callbacks/q7sGpioCallbacks.h"
|
||||||
#include "bsp_q7s/callbacks/rwSpiCallback.h"
|
#include "bsp_q7s/callbacks/rwSpiCallback.h"
|
||||||
#include "bsp_q7s/memory/FileSystemHandler.h"
|
|
||||||
#include "busConf.h"
|
#include "busConf.h"
|
||||||
#include "ccsdsConfig.h"
|
#include "ccsdsConfig.h"
|
||||||
#include "devConf.h"
|
#include "devConf.h"
|
||||||
#include "devices/addresses.h"
|
#include "devices/addresses.h"
|
||||||
#include "devices/gpioIds.h"
|
#include "devices/gpioIds.h"
|
||||||
#include "devices/powerSwitcherList.h"
|
#include "devices/powerSwitcherList.h"
|
||||||
|
#include "eive/definitions.h"
|
||||||
#include "fsfw/ipc/QueueFactory.h"
|
#include "fsfw/ipc/QueueFactory.h"
|
||||||
#include "linux/ObjectFactory.h"
|
#include "linux/ObjectFactory.h"
|
||||||
#include "linux/boardtest/I2cTestClass.h"
|
#include "linux/boardtest/I2cTestClass.h"
|
||||||
@ -41,7 +41,6 @@
|
|||||||
#include "mission/system/fdir/RtdFdir.h"
|
#include "mission/system/fdir/RtdFdir.h"
|
||||||
#include "mission/system/fdir/SusFdir.h"
|
#include "mission/system/fdir/SusFdir.h"
|
||||||
#include "mission/system/fdir/SyrlinksFdir.h"
|
#include "mission/system/fdir/SyrlinksFdir.h"
|
||||||
#include "tmtc/apid.h"
|
|
||||||
#include "tmtc/pusIds.h"
|
#include "tmtc/pusIds.h"
|
||||||
#if OBSW_TEST_LIBGPIOD == 1
|
#if OBSW_TEST_LIBGPIOD == 1
|
||||||
#include "linux/boardtest/LibgpiodTest.h"
|
#include "linux/boardtest/LibgpiodTest.h"
|
||||||
@ -908,10 +907,7 @@ void ObjectFactory::createBpxBatteryComponent() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createMiscComponents() {
|
void ObjectFactory::createMiscComponents() { new PlocMemoryDumper(objects::PLOC_MEMORY_DUMPER); }
|
||||||
new FileSystemHandler(objects::FILE_SYSTEM_HANDLER);
|
|
||||||
new PlocMemoryDumper(objects::PLOC_MEMORY_DUMPER);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ObjectFactory::testAcsBrdAss(AcsBoardAssembly* acsAss) {
|
void ObjectFactory::testAcsBrdAss(AcsBoardAssembly* acsAss) {
|
||||||
CommandMessage msg;
|
CommandMessage msg;
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
#include "bsp_q7s/core/CoreController.h"
|
#include "bsp_q7s/core/CoreController.h"
|
||||||
#include "bsp_q7s/core/ObjectFactory.h"
|
#include "bsp_q7s/core/ObjectFactory.h"
|
||||||
#include "busConf.h"
|
#include "busConf.h"
|
||||||
#include "commonObjects.h"
|
|
||||||
#include "devConf.h"
|
#include "devConf.h"
|
||||||
|
#include "eive/objects.h"
|
||||||
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
|
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
|
||||||
#include "linux/ObjectFactory.h"
|
#include "linux/ObjectFactory.h"
|
||||||
#include "linux/callbacks/gpioCallbacks.h"
|
#include "linux/callbacks/gpioCallbacks.h"
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
#include "bsp_q7s/core/CoreController.h"
|
#include "bsp_q7s/core/CoreController.h"
|
||||||
#include "bsp_q7s/core/ObjectFactory.h"
|
#include "bsp_q7s/core/ObjectFactory.h"
|
||||||
#include "busConf.h"
|
#include "busConf.h"
|
||||||
#include "commonObjects.h"
|
|
||||||
#include "devConf.h"
|
#include "devConf.h"
|
||||||
|
#include "eive/objects.h"
|
||||||
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
|
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
|
||||||
#include "linux/ObjectFactory.h"
|
#include "linux/ObjectFactory.h"
|
||||||
#include "linux/callbacks/gpioCallbacks.h"
|
#include "linux/callbacks/gpioCallbacks.h"
|
||||||
|
2
bsp_q7s/fs/CMakeLists.txt
Normal file
2
bsp_q7s/fs/CMakeLists.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
target_sources(${OBSW_NAME} PRIVATE helpers.cpp SdCardManager.cpp
|
||||||
|
FilesystemHelper.cpp)
|
@ -3,8 +3,9 @@
|
|||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
#include "bsp_q7s/memory/SdCardManager.h"
|
#include "SdCardManager.h"
|
||||||
#include "fsfw/serviceinterface/ServiceInterfaceStream.h"
|
#include "eive/definitions.h"
|
||||||
|
#include "fsfw/serviceinterface.h"
|
||||||
|
|
||||||
FilesystemHelper::FilesystemHelper() {}
|
FilesystemHelper::FilesystemHelper() {}
|
||||||
|
|
||||||
@ -14,15 +15,14 @@ ReturnValue_t FilesystemHelper::checkPath(std::string path) {
|
|||||||
sif::warning << "FilesystemHelper::checkPath: Invalid SD card manager" << std::endl;
|
sif::warning << "FilesystemHelper::checkPath: Invalid SD card manager" << std::endl;
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
if (path.substr(0, sizeof(SdCardManager::SD_0_MOUNT_POINT)) ==
|
if (path.substr(0, sizeof(config::SD_0_MOUNT_POINT)) == std::string(config::SD_0_MOUNT_POINT)) {
|
||||||
std::string(SdCardManager::SD_0_MOUNT_POINT)) {
|
if (!sdcMan->isSdCardUsable(sd::SLOT_0)) {
|
||||||
if (!sdcMan->isSdCardMounted(sd::SLOT_0)) {
|
|
||||||
sif::warning << "FilesystemHelper::checkPath: SD card 0 not mounted" << std::endl;
|
sif::warning << "FilesystemHelper::checkPath: SD card 0 not mounted" << std::endl;
|
||||||
return SD_NOT_MOUNTED;
|
return SD_NOT_MOUNTED;
|
||||||
}
|
}
|
||||||
} else if (path.substr(0, sizeof(SdCardManager::SD_1_MOUNT_POINT)) ==
|
} else if (path.substr(0, sizeof(config::SD_1_MOUNT_POINT)) ==
|
||||||
std::string(SdCardManager::SD_1_MOUNT_POINT)) {
|
std::string(config::SD_1_MOUNT_POINT)) {
|
||||||
if (!sdcMan->isSdCardMounted(sd::SLOT_0)) {
|
if (!sdcMan->isSdCardUsable(sd::SLOT_0)) {
|
||||||
sif::warning << "FilesystemHelper::checkPath: SD card 1 not mounted" << std::endl;
|
sif::warning << "FilesystemHelper::checkPath: SD card 1 not mounted" << std::endl;
|
||||||
return SD_NOT_MOUNTED;
|
return SD_NOT_MOUNTED;
|
||||||
}
|
}
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "commonClassIds.h"
|
#include "eive/resultClassIds.h"
|
||||||
#include "fsfw/returnvalues/returnvalue.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
|
|
||||||
/**
|
/**
|
@ -10,11 +10,12 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "common/config/commonObjects.h"
|
#include "bsp_q7s/memory/scratchApi.h"
|
||||||
|
#include "eive/definitions.h"
|
||||||
|
#include "eive/objects.h"
|
||||||
#include "fsfw/ipc/MutexFactory.h"
|
#include "fsfw/ipc/MutexFactory.h"
|
||||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||||
#include "linux/utility/utility.h"
|
#include "linux/utility/utility.h"
|
||||||
#include "scratchApi.h"
|
|
||||||
|
|
||||||
SdCardManager* SdCardManager::INSTANCE = nullptr;
|
SdCardManager* SdCardManager::INSTANCE = nullptr;
|
||||||
|
|
||||||
@ -212,6 +213,9 @@ ReturnValue_t SdCardManager::getSdCardsStatus(SdStatePair& active) {
|
|||||||
while (std::getline(sdStatus, line)) {
|
while (std::getline(sdStatus, line)) {
|
||||||
processSdStatusLine(active, line, idx, currentSd);
|
processSdStatusLine(active, line, idx, currentSd);
|
||||||
}
|
}
|
||||||
|
if (active.first != sd::SdState::MOUNTED && active.second != sd::SdState::MOUNTED) {
|
||||||
|
sdCardActive = false;
|
||||||
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,10 +233,10 @@ ReturnValue_t SdCardManager::mountSdCard(sd::SdCard sdCard) {
|
|||||||
string mountPoint;
|
string mountPoint;
|
||||||
if (sdCard == sd::SdCard::SLOT_0) {
|
if (sdCard == sd::SdCard::SLOT_0) {
|
||||||
mountDev = SD_0_DEV_NAME;
|
mountDev = SD_0_DEV_NAME;
|
||||||
mountPoint = SD_0_MOUNT_POINT;
|
mountPoint = config::SD_0_MOUNT_POINT;
|
||||||
} else if (sdCard == sd::SdCard::SLOT_1) {
|
} else if (sdCard == sd::SdCard::SLOT_1) {
|
||||||
mountDev = SD_1_DEV_NAME;
|
mountDev = SD_1_DEV_NAME;
|
||||||
mountPoint = SD_1_MOUNT_POINT;
|
mountPoint = config::SD_1_MOUNT_POINT;
|
||||||
}
|
}
|
||||||
if (not filesystem::exists(mountDev)) {
|
if (not filesystem::exists(mountDev)) {
|
||||||
sif::warning << "SdCardManager::mountSdCard: Device file does not exists. Make sure to"
|
sif::warning << "SdCardManager::mountSdCard: Device file does not exists. Make sure to"
|
||||||
@ -265,9 +269,9 @@ ReturnValue_t SdCardManager::unmountSdCard(sd::SdCard sdCard) {
|
|||||||
}
|
}
|
||||||
string mountPoint;
|
string mountPoint;
|
||||||
if (sdCard == sd::SdCard::SLOT_0) {
|
if (sdCard == sd::SdCard::SLOT_0) {
|
||||||
mountPoint = SD_0_MOUNT_POINT;
|
mountPoint = config::SD_0_MOUNT_POINT;
|
||||||
} else if (sdCard == sd::SdCard::SLOT_1) {
|
} else if (sdCard == sd::SdCard::SLOT_1) {
|
||||||
mountPoint = SD_1_MOUNT_POINT;
|
mountPoint = config::SD_1_MOUNT_POINT;
|
||||||
}
|
}
|
||||||
if (not filesystem::exists(mountPoint)) {
|
if (not filesystem::exists(mountPoint)) {
|
||||||
sif::error << "SdCardManager::unmountSdCard: Default mount point " << mountPoint
|
sif::error << "SdCardManager::unmountSdCard: Default mount point " << mountPoint
|
||||||
@ -415,9 +419,9 @@ ReturnValue_t SdCardManager::updateSdCardStateFile() {
|
|||||||
std::string SdCardManager::getCurrentMountPrefix() const {
|
std::string SdCardManager::getCurrentMountPrefix() const {
|
||||||
MutexGuard mg(mutex);
|
MutexGuard mg(mutex);
|
||||||
if (sdInfo.active == sd::SdCard::SLOT_0) {
|
if (sdInfo.active == sd::SdCard::SLOT_0) {
|
||||||
return SD_0_MOUNT_POINT;
|
return config::SD_0_MOUNT_POINT;
|
||||||
} else {
|
} else {
|
||||||
return SD_1_MOUNT_POINT;
|
return config::SD_1_MOUNT_POINT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -465,7 +469,7 @@ void SdCardManager::setBlocking(bool blocking) { this->blocking = blocking; }
|
|||||||
|
|
||||||
void SdCardManager::setPrintCommandOutput(bool print) { this->printCmdOutput = print; }
|
void SdCardManager::setPrintCommandOutput(bool print) { this->printCmdOutput = print; }
|
||||||
|
|
||||||
bool SdCardManager::isSdCardMounted(sd::SdCard sdCard) {
|
bool SdCardManager::isSdCardUsable(sd::SdCard sdCard) {
|
||||||
SdCardManager::SdStatePair active;
|
SdCardManager::SdStatePair active;
|
||||||
ReturnValue_t result = this->getSdCardsStatus(active);
|
ReturnValue_t result = this->getSdCardsStatus(active);
|
||||||
|
|
||||||
@ -494,9 +498,11 @@ bool SdCardManager::isSdCardMounted(sd::SdCard sdCard) {
|
|||||||
ReturnValue_t SdCardManager::isSdCardMountedReadOnly(sd::SdCard sdcard, bool& readOnly) {
|
ReturnValue_t SdCardManager::isSdCardMountedReadOnly(sd::SdCard sdcard, bool& readOnly) {
|
||||||
std::ostringstream command;
|
std::ostringstream command;
|
||||||
if (sdcard == sd::SdCard::SLOT_0) {
|
if (sdcard == sd::SdCard::SLOT_0) {
|
||||||
command << "grep -q '" << SD_0_MOUNT_POINT << " vfat ro,' /proc/mounts";
|
command << "grep -q '" << config::SD_0_MOUNT_POINT << " vfat ro,' /proc/mounts";
|
||||||
|
} else if (sdcard == sd::SdCard::SLOT_1) {
|
||||||
|
command << "grep -q '" << config::SD_1_MOUNT_POINT << " vfat ro,' /proc/mounts";
|
||||||
} else {
|
} else {
|
||||||
command << "grep -q '" << SD_1_MOUNT_POINT << " vfat ro,' /proc/mounts";
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
ReturnValue_t result = cmdExecutor.load(command.str(), true, false);
|
ReturnValue_t result = cmdExecutor.load(command.str(), true, false);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
@ -523,9 +529,9 @@ ReturnValue_t SdCardManager::isSdCardMountedReadOnly(sd::SdCard sdcard, bool& re
|
|||||||
ReturnValue_t SdCardManager::remountReadWrite(sd::SdCard sdcard) {
|
ReturnValue_t SdCardManager::remountReadWrite(sd::SdCard sdcard) {
|
||||||
std::ostringstream command;
|
std::ostringstream command;
|
||||||
if (sdcard == sd::SdCard::SLOT_0) {
|
if (sdcard == sd::SdCard::SLOT_0) {
|
||||||
command << "mount -o remount,rw " << SD_0_DEV_NAME << " " << SD_0_MOUNT_POINT;
|
command << "mount -o remount,rw " << SD_0_DEV_NAME << " " << config::SD_0_MOUNT_POINT;
|
||||||
} else {
|
} else {
|
||||||
command << "mount -o remount,rw " << SD_1_DEV_NAME << " " << SD_1_MOUNT_POINT;
|
command << "mount -o remount,rw " << SD_1_DEV_NAME << " " << config::SD_1_MOUNT_POINT;
|
||||||
}
|
}
|
||||||
ReturnValue_t result = cmdExecutor.load(command.str(), true, false);
|
ReturnValue_t result = cmdExecutor.load(command.str(), true, false);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
@ -64,8 +64,7 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
|
|||||||
// C++17 does not support constexpr std::string yet
|
// C++17 does not support constexpr std::string yet
|
||||||
static constexpr char SD_0_DEV_NAME[] = "/dev/mmcblk0p1";
|
static constexpr char SD_0_DEV_NAME[] = "/dev/mmcblk0p1";
|
||||||
static constexpr char SD_1_DEV_NAME[] = "/dev/mmcblk1p1";
|
static constexpr char SD_1_DEV_NAME[] = "/dev/mmcblk1p1";
|
||||||
static constexpr char SD_0_MOUNT_POINT[] = "/mnt/sd0";
|
|
||||||
static constexpr char SD_1_MOUNT_POINT[] = "/mnt/sd1";
|
|
||||||
static constexpr char SD_STATE_FILE[] = "/tmp/sd_status.txt";
|
static constexpr char SD_STATE_FILE[] = "/tmp/sd_status.txt";
|
||||||
|
|
||||||
virtual ~SdCardManager();
|
virtual ~SdCardManager();
|
||||||
@ -207,7 +206,7 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
|
|||||||
*
|
*
|
||||||
* @return true if mounted, otherwise false
|
* @return true if mounted, otherwise false
|
||||||
*/
|
*/
|
||||||
bool isSdCardMounted(sd::SdCard sdCard) override;
|
bool isSdCardUsable(sd::SdCard sdCard) override;
|
||||||
|
|
||||||
ReturnValue_t isSdCardMountedReadOnly(sd::SdCard sdcard, bool& readOnly);
|
ReturnValue_t isSdCardMountedReadOnly(sd::SdCard sdcard, bool& readOnly);
|
||||||
|
|
||||||
@ -219,6 +218,7 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
|
|||||||
CommandExecutor cmdExecutor;
|
CommandExecutor cmdExecutor;
|
||||||
Operations currentOp = Operations::IDLE;
|
Operations currentOp = Operations::IDLE;
|
||||||
bool blocking = false;
|
bool blocking = false;
|
||||||
|
bool sdCardActive = true;
|
||||||
bool printCmdOutput = true;
|
bool printCmdOutput = true;
|
||||||
MutexIF* mutex = nullptr;
|
MutexIF* mutex = nullptr;
|
||||||
|
|
8
bsp_q7s/fs/helpers.cpp
Normal file
8
bsp_q7s/fs/helpers.cpp
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#include "helpers.h"
|
||||||
|
|
||||||
|
std::filesystem::path fshelpers::getPrefixedPath(SdCardManager &man,
|
||||||
|
std::filesystem::path pathWihtoutPrefix) {
|
||||||
|
auto prefix = man.getCurrentMountPrefix();
|
||||||
|
auto resPath = prefix / pathWihtoutPrefix;
|
||||||
|
return resPath;
|
||||||
|
}
|
14
bsp_q7s/fs/helpers.h
Normal file
14
bsp_q7s/fs/helpers.h
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#ifndef BSP_Q7S_MEMORY_HELPERS_H_
|
||||||
|
#define BSP_Q7S_MEMORY_HELPERS_H_
|
||||||
|
|
||||||
|
#include <filesystem>
|
||||||
|
|
||||||
|
#include "SdCardManager.h"
|
||||||
|
|
||||||
|
namespace fshelpers {
|
||||||
|
|
||||||
|
std::filesystem::path getPrefixedPath(SdCardManager& man, std::filesystem::path pathWihtoutPrefix);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* BSP_Q7S_MEMORY_HELPERS_H_ */
|
@ -1,2 +1 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE FileSystemHandler.cpp SdCardManager.cpp
|
target_sources(${OBSW_NAME} PRIVATE scratchApi.cpp)
|
||||||
scratchApi.cpp FilesystemHelper.cpp)
|
|
||||||
|
@ -1,238 +0,0 @@
|
|||||||
#include "FileSystemHandler.h"
|
|
||||||
|
|
||||||
#include <cstring>
|
|
||||||
#include <filesystem>
|
|
||||||
#include <fstream>
|
|
||||||
|
|
||||||
#include "bsp_q7s/core/CoreController.h"
|
|
||||||
#include "fsfw/ipc/QueueFactory.h"
|
|
||||||
#include "fsfw/memory/GenericFileSystemMessage.h"
|
|
||||||
#include "fsfw/tasks/TaskFactory.h"
|
|
||||||
|
|
||||||
FileSystemHandler::FileSystemHandler(object_id_t fileSystemHandler)
|
|
||||||
: SystemObject(fileSystemHandler) {
|
|
||||||
auto mqArgs = MqArgs(this->getObjectId());
|
|
||||||
mq = QueueFactory::instance()->createMessageQueue(FS_MAX_QUEUE_SIZE,
|
|
||||||
MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs);
|
|
||||||
}
|
|
||||||
|
|
||||||
FileSystemHandler::~FileSystemHandler() { QueueFactory::instance()->deleteMessageQueue(mq); }
|
|
||||||
|
|
||||||
ReturnValue_t FileSystemHandler::performOperation(uint8_t unsignedChar) {
|
|
||||||
while (true) {
|
|
||||||
try {
|
|
||||||
fileSystemHandlerLoop();
|
|
||||||
} catch (std::bad_alloc& e) {
|
|
||||||
// Restart OBSW, hints at a memory leak
|
|
||||||
sif::error << "Allocation error in FileSystemHandler::performOperation" << e.what()
|
|
||||||
<< std::endl;
|
|
||||||
// Set up an error file or a special flag in the scratch buffer for these cases
|
|
||||||
triggerEvent(CoreController::ALLOC_FAILURE, 0, 0);
|
|
||||||
CoreController::incrementAllocationFailureCount();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void FileSystemHandler::fileSystemHandlerLoop() {
|
|
||||||
CommandMessage filemsg;
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
while (true) {
|
|
||||||
if (opCounter % 5 == 0) {
|
|
||||||
if (coreCtrl->sdInitFinished()) {
|
|
||||||
fileSystemCheckup();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
result = mq->receiveMessage(&filemsg);
|
|
||||||
if (result == MessageQueueIF::EMPTY) {
|
|
||||||
break;
|
|
||||||
} else if (result != returnvalue::FAILED) {
|
|
||||||
sif::warning << "FileSystemHandler::performOperation: Message reception failed!" << std::endl;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
Command_t command = filemsg.getCommand();
|
|
||||||
switch (command) {
|
|
||||||
case (GenericFileSystemMessage::CMD_CREATE_DIRECTORY): {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (GenericFileSystemMessage::CMD_CREATE_FILE): {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
opCounter++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// This task will have a low priority and will run permanently in the background
|
|
||||||
// so we will just run in a permanent loop here and check file system
|
|
||||||
// messages permanently
|
|
||||||
opCounter++;
|
|
||||||
TaskFactory::instance()->delayTask(1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
void FileSystemHandler::fileSystemCheckup() {
|
|
||||||
SdCardManager::SdStatePair statusPair;
|
|
||||||
sdcMan->getSdCardsStatus(statusPair);
|
|
||||||
sd::SdCard preferredSdCard = sdcMan->getPreferredSdCard();
|
|
||||||
if ((preferredSdCard == sd::SdCard::SLOT_0) and (statusPair.first == sd::SdState::MOUNTED)) {
|
|
||||||
currentMountPrefix = SdCardManager::SD_0_MOUNT_POINT;
|
|
||||||
} else if ((preferredSdCard == sd::SdCard::SLOT_1) and
|
|
||||||
(statusPair.second == sd::SdState::MOUNTED)) {
|
|
||||||
currentMountPrefix = SdCardManager::SD_1_MOUNT_POINT;
|
|
||||||
} else {
|
|
||||||
std::string sdString;
|
|
||||||
if (preferredSdCard == sd::SdCard::SLOT_0) {
|
|
||||||
sdString = "0";
|
|
||||||
} else {
|
|
||||||
sdString = "1";
|
|
||||||
}
|
|
||||||
sif::warning << "FileSystemHandler::performOperation: "
|
|
||||||
"Inconsistent state detected"
|
|
||||||
<< std::endl;
|
|
||||||
sif::warning << "Preferred SD card is " << sdString
|
|
||||||
<< " but does not appear to be mounted. Attempting fix.." << std::endl;
|
|
||||||
// This function will appear to fix the inconsistent state
|
|
||||||
ReturnValue_t result = sdcMan->sanitizeState(&statusPair, preferredSdCard);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
// Oh no.
|
|
||||||
triggerEvent(SdCardManager::SANITIZATION_FAILED, 0, 0);
|
|
||||||
sif::error << "FileSystemHandler::fileSystemCheckup: Sanitization failed" << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MessageQueueId_t FileSystemHandler::getCommandQueue() const { return mq->getId(); }
|
|
||||||
|
|
||||||
ReturnValue_t FileSystemHandler::initialize() {
|
|
||||||
coreCtrl = ObjectManager::instance()->get<CoreController>(objects::CORE_CONTROLLER);
|
|
||||||
if (coreCtrl == nullptr) {
|
|
||||||
sif::error << "FileSystemHandler::initialize: Could not retrieve core controller handle"
|
|
||||||
<< std::endl;
|
|
||||||
}
|
|
||||||
sdcMan = SdCardManager::instance();
|
|
||||||
sd::SdCard preferredSdCard = sdcMan->getPreferredSdCard();
|
|
||||||
if (preferredSdCard == sd::SdCard::SLOT_0) {
|
|
||||||
currentMountPrefix = SdCardManager::SD_0_MOUNT_POINT;
|
|
||||||
} else if (preferredSdCard == sd::SdCard::SLOT_1) {
|
|
||||||
currentMountPrefix = SdCardManager::SD_1_MOUNT_POINT;
|
|
||||||
}
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t FileSystemHandler::appendToFile(const char* repositoryPath, const char* filename,
|
|
||||||
const uint8_t* data, size_t size,
|
|
||||||
uint16_t packetNumber, FileSystemArgsIF* args) {
|
|
||||||
auto path = getInitPath(args) / repositoryPath / filename;
|
|
||||||
if (not std::filesystem::exists(path)) {
|
|
||||||
return FILE_DOES_NOT_EXIST;
|
|
||||||
}
|
|
||||||
std::ofstream file(path, std::ios_base::app | std::ios_base::out);
|
|
||||||
file.write(reinterpret_cast<const char*>(data), size);
|
|
||||||
if (not file.good()) {
|
|
||||||
return GENERIC_FILE_ERROR;
|
|
||||||
}
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t FileSystemHandler::createFile(const char* repositoryPath, const char* filename,
|
|
||||||
const uint8_t* data, size_t size,
|
|
||||||
FileSystemArgsIF* args) {
|
|
||||||
auto path = getInitPath(args) / filename;
|
|
||||||
if (std::filesystem::exists(path)) {
|
|
||||||
return FILE_ALREADY_EXISTS;
|
|
||||||
}
|
|
||||||
std::ofstream file(path);
|
|
||||||
file.write(reinterpret_cast<const char*>(data), size);
|
|
||||||
if (not file.good()) {
|
|
||||||
return GENERIC_FILE_ERROR;
|
|
||||||
}
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t FileSystemHandler::removeFile(const char* repositoryPath, const char* filename,
|
|
||||||
FileSystemArgsIF* args) {
|
|
||||||
auto path = getInitPath(args) / repositoryPath / filename;
|
|
||||||
if (not std::filesystem::exists(path)) {
|
|
||||||
return FILE_DOES_NOT_EXIST;
|
|
||||||
}
|
|
||||||
int result = std::remove(path.c_str());
|
|
||||||
if (result != 0) {
|
|
||||||
sif::warning << "FileSystemHandler::deleteFile: Failed with code " << result << std::endl;
|
|
||||||
return GENERIC_FILE_ERROR;
|
|
||||||
}
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t FileSystemHandler::createDirectory(const char* repositoryPath, const char* dirname,
|
|
||||||
bool createParentDirs, FileSystemArgsIF* args) {
|
|
||||||
auto path = getInitPath(args) / repositoryPath / dirname;
|
|
||||||
if (std::filesystem::exists(path)) {
|
|
||||||
return DIRECTORY_ALREADY_EXISTS;
|
|
||||||
}
|
|
||||||
if (std::filesystem::create_directory(path)) {
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
sif::warning << "Creating directory " << path << " failed" << std::endl;
|
|
||||||
return GENERIC_FILE_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t FileSystemHandler::removeDirectory(const char* repositoryPath, const char* dirname,
|
|
||||||
bool deleteRecurively, FileSystemArgsIF* args) {
|
|
||||||
auto path = getInitPath(args) / repositoryPath / dirname;
|
|
||||||
if (not std::filesystem::exists(path)) {
|
|
||||||
return DIRECTORY_DOES_NOT_EXIST;
|
|
||||||
}
|
|
||||||
std::error_code err;
|
|
||||||
if (not deleteRecurively) {
|
|
||||||
if (std::filesystem::remove(path, err)) {
|
|
||||||
return returnvalue::OK;
|
|
||||||
} else {
|
|
||||||
// Check error code. Most probably denied permissions because folder is not empty
|
|
||||||
sif::warning << "FileSystemHandler::removeDirectory: Deleting directory failed with "
|
|
||||||
"code "
|
|
||||||
<< err.value() << ": " << strerror(err.value()) << std::endl;
|
|
||||||
if (err.value() == ENOTEMPTY) {
|
|
||||||
return DIRECTORY_NOT_EMPTY;
|
|
||||||
} else {
|
|
||||||
return GENERIC_FILE_ERROR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (std::filesystem::remove_all(path, err)) {
|
|
||||||
return returnvalue::OK;
|
|
||||||
} else {
|
|
||||||
sif::warning << "FileSystemHandler::removeDirectory: Deleting directory failed with "
|
|
||||||
"code "
|
|
||||||
<< err.value() << ": " << strerror(err.value()) << std::endl;
|
|
||||||
// Check error code
|
|
||||||
if (err.value() == ENOTEMPTY) {
|
|
||||||
return DIRECTORY_NOT_EMPTY;
|
|
||||||
} else {
|
|
||||||
return GENERIC_FILE_ERROR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t FileSystemHandler::renameFile(const char* repositoryPath, const char* oldFilename,
|
|
||||||
const char* newFilename, FileSystemArgsIF* args) {
|
|
||||||
auto basepath = getInitPath(args) / repositoryPath;
|
|
||||||
std::filesystem::rename(basepath / oldFilename, basepath / newFilename);
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FileSystemHandler::parseCfg(FsCommandCfg* cfg, bool& useMountPrefix) {
|
|
||||||
if (cfg != nullptr) {
|
|
||||||
useMountPrefix = cfg->useMountPrefix;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
std::filesystem::path FileSystemHandler::getInitPath(FileSystemArgsIF* args) {
|
|
||||||
bool useMountPrefix = true;
|
|
||||||
parseCfg(reinterpret_cast<FsCommandCfg*>(args), useMountPrefix);
|
|
||||||
std::string path;
|
|
||||||
if (useMountPrefix) {
|
|
||||||
path = currentMountPrefix;
|
|
||||||
}
|
|
||||||
return std::filesystem::path(path);
|
|
||||||
}
|
|
@ -1,68 +0,0 @@
|
|||||||
#ifndef BSP_Q7S_MEMORY_FILESYSTEMHANDLER_H_
|
|
||||||
#define BSP_Q7S_MEMORY_FILESYSTEMHANDLER_H_
|
|
||||||
|
|
||||||
#include <filesystem>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
|
||||||
#include "SdCardManager.h"
|
|
||||||
#include "eive/definitions.h"
|
|
||||||
#include "fsfw/ipc/MessageQueueIF.h"
|
|
||||||
#include "fsfw/memory/HasFileSystemIF.h"
|
|
||||||
#include "fsfw/objectmanager/SystemObject.h"
|
|
||||||
#include "fsfw/tasks/ExecutableObjectIF.h"
|
|
||||||
|
|
||||||
class CoreController;
|
|
||||||
|
|
||||||
class FileSystemHandler : public SystemObject, public ExecutableObjectIF, public HasFileSystemIF {
|
|
||||||
public:
|
|
||||||
struct FsCommandCfg : public FileSystemArgsIF {
|
|
||||||
// Can be used to automatically use mount prefix of active SD card.
|
|
||||||
// Otherwise, the operator has to specify the full path to the mounted SD card as well.
|
|
||||||
bool useMountPrefix = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
FileSystemHandler(object_id_t fileSystemHandler);
|
|
||||||
virtual ~FileSystemHandler();
|
|
||||||
|
|
||||||
ReturnValue_t performOperation(uint8_t) override;
|
|
||||||
|
|
||||||
ReturnValue_t initialize() override;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function to get the MessageQueueId_t of the implementing object
|
|
||||||
* @return MessageQueueId_t of the object
|
|
||||||
*/
|
|
||||||
MessageQueueId_t getCommandQueue() const override;
|
|
||||||
ReturnValue_t appendToFile(const char* repositoryPath, const char* filename, const uint8_t* data,
|
|
||||||
size_t size, uint16_t packetNumber,
|
|
||||||
FileSystemArgsIF* args = nullptr) override;
|
|
||||||
ReturnValue_t createFile(const char* repositoryPath, const char* filename,
|
|
||||||
const uint8_t* data = nullptr, size_t size = 0,
|
|
||||||
FileSystemArgsIF* args = nullptr) override;
|
|
||||||
ReturnValue_t removeFile(const char* repositoryPath, const char* filename,
|
|
||||||
FileSystemArgsIF* args = nullptr) override;
|
|
||||||
ReturnValue_t createDirectory(const char* repositoryPath, const char* dirname,
|
|
||||||
bool createParentDirs, FileSystemArgsIF* args = nullptr) override;
|
|
||||||
ReturnValue_t removeDirectory(const char* repositoryPath, const char* dirname,
|
|
||||||
bool deleteRecurively = false,
|
|
||||||
FileSystemArgsIF* args = nullptr) override;
|
|
||||||
ReturnValue_t renameFile(const char* repositoryPath, const char* oldFilename,
|
|
||||||
const char* newFilename, FileSystemArgsIF* args = nullptr) override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
CoreController* coreCtrl = nullptr;
|
|
||||||
MessageQueueIF* mq = nullptr;
|
|
||||||
std::string currentMountPrefix = SdCardManager::SD_0_MOUNT_POINT;
|
|
||||||
static constexpr uint32_t FS_MAX_QUEUE_SIZE = config::OBSW_FILESYSTEM_HANDLER_QUEUE_SIZE;
|
|
||||||
|
|
||||||
SdCardManager* sdcMan = nullptr;
|
|
||||||
uint8_t opCounter = 0;
|
|
||||||
|
|
||||||
void fileSystemHandlerLoop();
|
|
||||||
void fileSystemCheckup();
|
|
||||||
std::filesystem::path getInitPath(FileSystemArgsIF* args);
|
|
||||||
void parseCfg(FsCommandCfg* cfg, bool& useMountPrefix);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* BSP_Q7S_MEMORY_FILESYSTEMMANAGER_H_ */
|
|
@ -1,8 +1,11 @@
|
|||||||
#include "commonConfig.h"
|
#include "commonConfig.h"
|
||||||
|
|
||||||
|
#include "eive/definitions.h"
|
||||||
#include "fsfw/tmtcpacket/ccsds/defs.h"
|
#include "fsfw/tmtcpacket/ccsds/defs.h"
|
||||||
#include "tmtc/apid.h"
|
|
||||||
|
|
||||||
const fsfw::Version common::OBSW_VERSION{OBSW_VERSION_MAJOR, OBSW_VERSION_MINOR,
|
const fsfw::Version common::OBSW_VERSION{OBSW_VERSION_MAJOR, OBSW_VERSION_MINOR,
|
||||||
OBSW_VERSION_REVISION, OBSW_VERSION_CST_GIT_SHA1};
|
OBSW_VERSION_REVISION, OBSW_VERSION_CST_GIT_SHA1};
|
||||||
const uint16_t common::PUS_PACKET_ID = ccsds::getTcSpacePacketIdFromApid(apid::EIVE_OBSW);
|
const uint16_t common::PUS_PACKET_ID =
|
||||||
|
ccsds::getTcSpacePacketIdFromApid(config::EIVE_PUS_APID, true);
|
||||||
|
const uint16_t common::CFDP_PACKET_ID =
|
||||||
|
ccsds::getTcSpacePacketIdFromApid(config::EIVE_CFDP_APID, false);
|
||||||
|
@ -25,6 +25,8 @@ debugging. */
|
|||||||
// CCSDS IP Cores.
|
// CCSDS IP Cores.
|
||||||
#define OBSW_USE_TMTC_TCP_BRIDGE 1
|
#define OBSW_USE_TMTC_TCP_BRIDGE 1
|
||||||
|
|
||||||
|
#define OBSW_ADD_CFDP_COMPONENTS 1
|
||||||
|
|
||||||
namespace common {
|
namespace common {
|
||||||
|
|
||||||
static constexpr uint8_t OBSW_VERSION_MAJOR = @OBSW_VERSION_MAJOR@;
|
static constexpr uint8_t OBSW_VERSION_MAJOR = @OBSW_VERSION_MAJOR@;
|
||||||
@ -39,6 +41,7 @@ static constexpr uint32_t OBSW_MAX_SCHEDULED_TCS = @OBSW_MAX_SCHEDULED_TCS@;
|
|||||||
extern const fsfw::Version OBSW_VERSION;
|
extern const fsfw::Version OBSW_VERSION;
|
||||||
|
|
||||||
extern const uint16_t PUS_PACKET_ID;
|
extern const uint16_t PUS_PACKET_ID;
|
||||||
|
extern const uint16_t CFDP_PACKET_ID;
|
||||||
|
|
||||||
static constexpr uint32_t CCSDS_HANDLER_QUEUE_SIZE = 50;
|
static constexpr uint32_t CCSDS_HANDLER_QUEUE_SIZE = 50;
|
||||||
static constexpr uint8_t NUMBER_OF_VIRTUAL_CHANNELS = 4;
|
static constexpr uint8_t NUMBER_OF_VIRTUAL_CHANNELS = 4;
|
||||||
|
@ -5,6 +5,21 @@
|
|||||||
|
|
||||||
namespace config {
|
namespace config {
|
||||||
|
|
||||||
|
static constexpr char SD_0_MOUNT_POINT[] = "/mnt/sd0";
|
||||||
|
static constexpr char SD_1_MOUNT_POINT[] = "/mnt/sd1";
|
||||||
|
|
||||||
|
static constexpr char OBSW_UPDATE_ARCHIVE_FILE_NAME[] = "eive-sw-update.tar.xz";
|
||||||
|
static constexpr char STRIPPED_OBSW_BINARY_FILE_NAME[] = "eive-obsw-stripped";
|
||||||
|
static constexpr char OBSW_VERSION_FILE_NAME[] = "obsw_version.txt";
|
||||||
|
|
||||||
|
static constexpr char OBSW_PATH[] = "/usr/bin/eive-obsw";
|
||||||
|
static constexpr char OBSW_VERSION_FILE_PATH[] = "/usr/share/eive-obsw/obsw_version.txt";
|
||||||
|
|
||||||
|
static constexpr uint16_t EIVE_PUS_APID = 0x65;
|
||||||
|
static constexpr uint16_t EIVE_CFDP_APID = 0x66;
|
||||||
|
static constexpr uint16_t EIVE_LOCAL_CFDP_ENTITY_ID = EIVE_CFDP_APID;
|
||||||
|
static constexpr uint16_t EIVE_GROUND_CFDP_ENTITY_ID = 1;
|
||||||
|
|
||||||
static constexpr uint32_t PL_PCDU_TRANSITION_TIMEOUT_MS = 20 * 60 * 1000;
|
static constexpr uint32_t PL_PCDU_TRANSITION_TIMEOUT_MS = 20 * 60 * 1000;
|
||||||
static constexpr uint32_t LONGEST_MODE_TIMEOUT_SECONDS = PL_PCDU_TRANSITION_TIMEOUT_MS / 1000;
|
static constexpr uint32_t LONGEST_MODE_TIMEOUT_SECONDS = PL_PCDU_TRANSITION_TIMEOUT_MS / 1000;
|
||||||
|
|
||||||
|
@ -122,7 +122,9 @@ enum commonObjects : uint32_t {
|
|||||||
ACS_BOARD_ASS = 0x73000001,
|
ACS_BOARD_ASS = 0x73000001,
|
||||||
SUS_BOARD_ASS = 0x73000002,
|
SUS_BOARD_ASS = 0x73000002,
|
||||||
TCS_BOARD_ASS = 0x73000003,
|
TCS_BOARD_ASS = 0x73000003,
|
||||||
RW_ASS = 0x73000004
|
RW_ASS = 0x73000004,
|
||||||
|
CFDP_HANDLER = 0x73000005,
|
||||||
|
CFDP_DISTRIBUTOR = 0x73000006
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -1,18 +0,0 @@
|
|||||||
#ifndef FSFWCONFIG_TMTC_APID_H_
|
|
||||||
#define FSFWCONFIG_TMTC_APID_H_
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Application Process Definition: entity, uniquely identified by an
|
|
||||||
* application process ID (APID), capable of generating telemetry source
|
|
||||||
* packets and receiving telecommand packets
|
|
||||||
*
|
|
||||||
* EIVE APID: 0x65 / 101 / e
|
|
||||||
* APID is a 11 bit number
|
|
||||||
*/
|
|
||||||
namespace apid {
|
|
||||||
static const uint16_t EIVE_OBSW = 0x65;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* FSFWCONFIG_TMTC_APID_H_ */
|
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit 7e0a5d5a9e4f38c6d818bbdd5b44d34d8007eb1e
|
Subproject commit c47bed07606548fd2510caa45bdd9fc867732065
|
@ -69,6 +69,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
7510;0x1d56;TRYING_RECOVERY;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
|
7510;0x1d56;TRYING_RECOVERY;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
7511;0x1d57;RECOVERY_STEP;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
|
7511;0x1d57;RECOVERY_STEP;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
7512;0x1d58;RECOVERY_DONE;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
|
7512;0x1d58;RECOVERY_DONE;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
|
7600;0x1db0;HANDLE_PACKET_FAILED;LOW;;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
7900;0x1edc;RF_AVAILABLE;INFO;A RF available signal was detected. P1: raw RFA state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
7900;0x1edc;RF_AVAILABLE;INFO;A RF available signal was detected. P1: raw RFA state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||||
7901;0x1edd;RF_LOST;INFO;A previously found RF available signal was lost. P1: raw RFA state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
7901;0x1edd;RF_LOST;INFO;A previously found RF available signal was lost. P1: raw RFA state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||||
7902;0x1ede;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
7902;0x1ede;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||||
@ -119,8 +120,8 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
12003;0x2ee3;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report P1: ID of command for which the execution failed P2: Status code sent by the supervisor handler;linux/devices/ploc/PlocSupervisorHandler.h
|
12003;0x2ee3;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report P1: ID of command for which the execution failed P2: Status code sent by the supervisor handler;linux/devices/ploc/PlocSupervisorHandler.h
|
||||||
12004;0x2ee4;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;linux/devices/ploc/PlocSupervisorHandler.h
|
12004;0x2ee4;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;linux/devices/ploc/PlocSupervisorHandler.h
|
||||||
12005;0x2ee5;SUPV_MPSOC_SHUWDOWN_BUILD_FAILED;LOW;Failed to build the command to shutdown the MPSoC;linux/devices/ploc/PlocSupervisorHandler.h
|
12005;0x2ee5;SUPV_MPSOC_SHUWDOWN_BUILD_FAILED;LOW;Failed to build the command to shutdown the MPSoC;linux/devices/ploc/PlocSupervisorHandler.h
|
||||||
12100;0x2f44;SANITIZATION_FAILED;LOW;;bsp_q7s/memory/SdCardManager.h
|
12100;0x2f44;SANITIZATION_FAILED;LOW;;bsp_q7s/fs/SdCardManager.h
|
||||||
12101;0x2f45;MOUNTED_SD_CARD;INFO;;bsp_q7s/memory/SdCardManager.h
|
12101;0x2f45;MOUNTED_SD_CARD;INFO;;bsp_q7s/fs/SdCardManager.h
|
||||||
12300;0x300c;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;linux/devices/ploc/PlocMemoryDumper.h
|
12300;0x300c;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;linux/devices/ploc/PlocMemoryDumper.h
|
||||||
12301;0x300d;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;linux/devices/ploc/PlocMemoryDumper.h
|
12301;0x300d;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;linux/devices/ploc/PlocMemoryDumper.h
|
||||||
12302;0x300e;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;linux/devices/ploc/PlocMemoryDumper.h
|
12302;0x300e;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;linux/devices/ploc/PlocMemoryDumper.h
|
||||||
@ -215,3 +216,8 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
13701;0x3585;REBOOT_SW;MEDIUM; Software reboot occurred. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
13701;0x3585;REBOOT_SW;MEDIUM; Software reboot occurred. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
||||||
13702;0x3586;REBOOT_MECHANISM_TRIGGERED;MEDIUM;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;bsp_q7s/core/CoreController.h
|
13702;0x3586;REBOOT_MECHANISM_TRIGGERED;MEDIUM;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;bsp_q7s/core/CoreController.h
|
||||||
13703;0x3587;REBOOT_HW;MEDIUM;;bsp_q7s/core/CoreController.h
|
13703;0x3587;REBOOT_HW;MEDIUM;;bsp_q7s/core/CoreController.h
|
||||||
|
13801;0x35e9;SET_CONFIGFILEVALUE_FAILED;MEDIUM;;mission/utility/GlobalConfigHandler.h
|
||||||
|
13802;0x35ea;GET_CONFIGFILEVALUE_FAILED;MEDIUM;;mission/utility/GlobalConfigHandler.h
|
||||||
|
13803;0x35eb;INSERT_CONFIGFILEVALUE_FAILED;MEDIUM;;mission/utility/GlobalConfigHandler.h
|
||||||
|
13804;0x35ec;WRITE_CONFIGFILE_FAILED;MEDIUM;;mission/utility/GlobalConfigHandler.h
|
||||||
|
13805;0x35ed;READ_CONFIGFILE_FAILED;MEDIUM;;mission/utility/GlobalConfigHandler.h
|
||||||
|
|
@ -1,6 +1,7 @@
|
|||||||
0x00005060;P60DOCK_TEST_TASK
|
0x00005060;P60DOCK_TEST_TASK
|
||||||
0x43000002;ACS_CONTROLLER
|
0x43000002;ACS_CONTROLLER
|
||||||
0x43000003;CORE_CONTROLLER
|
0x43000003;CORE_CONTROLLER
|
||||||
|
0x43000006;GLOBAL_JSON_CFG
|
||||||
0x43400001;THERMAL_CONTROLLER
|
0x43400001;THERMAL_CONTROLLER
|
||||||
0x44120006;MGM_0_LIS3_HANDLER
|
0x44120006;MGM_0_LIS3_HANDLER
|
||||||
0x44120010;GYRO_0_ADIS_HANDLER
|
0x44120010;GYRO_0_ADIS_HANDLER
|
||||||
@ -128,6 +129,8 @@
|
|||||||
0x73000002;SUS_BOARD_ASS
|
0x73000002;SUS_BOARD_ASS
|
||||||
0x73000003;TCS_BOARD_ASS
|
0x73000003;TCS_BOARD_ASS
|
||||||
0x73000004;RW_ASS
|
0x73000004;RW_ASS
|
||||||
|
0x73000005;CFDP_HANDLER
|
||||||
|
0x73000006;CFDP_DISTRIBUTOR
|
||||||
0x73000100;TM_FUNNEL
|
0x73000100;TM_FUNNEL
|
||||||
0x73500000;CCSDS_IP_CORE_BRIDGE
|
0x73500000;CCSDS_IP_CORE_BRIDGE
|
||||||
0xFFFFFFFF;NO_OBJECT
|
0xFFFFFFFF;NO_OBJECT
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||||
0x0000;OK;System-wide code for ok.;0;HasReturnvaluesIF;fsfw/returnvalues/HasReturnvaluesIF.h
|
0x0000;OK;System-wide code for ok.;0;HasReturnvaluesIF;fsfw/returnvalues/returnvalue.h
|
||||||
0x0001;Failed;Unspecified system-wide code for failed.;1;HasReturnvaluesIF;fsfw/returnvalues/HasReturnvaluesIF.h
|
0x0001;Failed;Unspecified system-wide code for failed.;1;HasReturnvaluesIF;fsfw/returnvalues/returnvalue.h
|
||||||
0x63a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NVMParameterBase.h
|
0x63a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NVMParameterBase.h
|
||||||
0x58a0;SUSS_ErrorUnlockMutex;;160;SUS_HANDLER;mission/devices/SusHandler.h
|
0x58a0;SUSS_ErrorUnlockMutex;;160;SUS_HANDLER;mission/devices/SusHandler.h
|
||||||
0x58a1;SUSS_ErrorLockMutex;;161;SUS_HANDLER;mission/devices/SusHandler.h
|
0x58a1;SUSS_ErrorLockMutex;;161;SUS_HANDLER;mission/devices/SusHandler.h
|
||||||
@ -89,17 +89,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x06e2;PP_InvalidContent;;226;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x06e2;PP_InvalidContent;;226;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x06e3;PP_UnalignedAccess;;227;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x06e3;PP_UnalignedAccess;;227;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x06e4;PP_WriteProtected;;228;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x06e4;PP_WriteProtected;;228;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x4300;FILS_GenericFileError;;0;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x4301;FILS_IsBusy;;1;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x4302;FILS_InvalidParameters;;2;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x4305;FILS_FileDoesNotExist;;5;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x4306;FILS_FileAlreadyExists;;6;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x4307;FILS_FileLocked;;7;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x430a;FILS_DirectoryDoesNotExist;;10;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x430b;FILS_DirectoryAlreadyExists;;11;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x430c;FILS_DirectoryNotEmpty;;12;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x430f;FILS_SequencePacketMissingWrite;;15;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x4310;FILS_SequencePacketMissingRead;;16;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x13e0;MH_UnknownCmd;;224;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
0x13e0;MH_UnknownCmd;;224;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||||
0x13e1;MH_InvalidAddress;;225;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
0x13e1;MH_InvalidAddress;;225;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||||
0x13e2;MH_InvalidSize;;226;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
0x13e2;MH_InvalidSize;;226;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||||
@ -215,19 +204,20 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x0804;DPS_DataSetUninitialised;;4;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
0x0804;DPS_DataSetUninitialised;;4;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||||
0x0805;DPS_DataSetFull;;5;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
0x0805;DPS_DataSetFull;;5;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||||
0x0806;DPS_PoolVarNull;;6;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
0x0806;DPS_PoolVarNull;;6;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||||
0x1c01;TCD_PacketLost;;1;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributor.h
|
0x1c01;TCD_PacketLost;;1;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributorBase.h
|
||||||
0x1c02;TCD_DestinationNotFound;;2;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributor.h
|
0x1c02;TCD_DestinationNotFound;;2;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributorBase.h
|
||||||
0x1c03;TCD_ServiceIdAlreadyExists;;3;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributor.h
|
0x1c03;TCD_ServiceIdAlreadyExists;;3;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributorBase.h
|
||||||
0x1b00;TCC_InvalidCcsdsVersion;;0;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b00;TCC_NoDestinationFound;;0;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1b01;TCC_InvalidApid;;1;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b01;TCC_InvalidCcsdsVersion;;1;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1b02;TCC_InvalidPacketType;;2;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b02;TCC_InvalidApid;;2;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1b03;TCC_InvalidSecHeaderField;;3;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b03;TCC_InvalidPacketType;;3;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1b04;TCC_IncorrectPrimaryHeader;;4;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b04;TCC_InvalidSecHeaderField;;4;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1b05;TCC_IncompletePacket;;5;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b05;TCC_IncorrectPrimaryHeader;;5;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1b06;TCC_InvalidPusVersion;;6;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b07;TCC_IncompletePacket;;7;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1b07;TCC_IncorrectChecksum;;7;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b08;TCC_InvalidPusVersion;;8;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1b08;TCC_IllegalPacketSubtype;;8;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b09;TCC_IncorrectChecksum;;9;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1b09;TCC_IncorrectSecondaryHeader;;9;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b0a;TCC_IllegalPacketSubtype;;10;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
|
0x1b0b;TCC_IncorrectSecondaryHeader;;11;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x3001;POS_InPowerTransition;;1;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
0x3001;POS_InPowerTransition;;1;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
||||||
0x3002;POS_SwitchStateMismatch;;2;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
0x3002;POS_SwitchStateMismatch;;2;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
||||||
0x0501;PS_SwitchOn;;1;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
0x0501;PS_SwitchOn;;1;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||||
@ -324,13 +314,31 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x31e3;LIM_WrongLimitId;;227;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
0x31e3;LIM_WrongLimitId;;227;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x31ee;LIM_MonitorNotFound;;238;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
0x31ee;LIM_MonitorNotFound;;238;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x3601;CFDP_InvalidTlvType;;1;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
0x3601;CFDP_InvalidTlvType;;1;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x3602;CFDP_InvalidDirectiveFields;;2;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
0x3602;CFDP_InvalidDirectiveField;;2;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x3603;CFDP_InvalidPduDatafieldLen;;3;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
0x3603;CFDP_InvalidPduDatafieldLen;;3;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x3604;CFDP_InvalidAckDirectiveFields;;4;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
0x3604;CFDP_InvalidAckDirectiveFields;;4;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x3605;CFDP_MetadataCantParseOptions;;5;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
0x3605;CFDP_MetadataCantParseOptions;;5;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x3606;CFDP_FinishedCantParseFsResponses;;6;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
0x3606;CFDP_NakCantParseOptions;;6;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
|
0x3607;CFDP_FinishedCantParseFsResponses;;7;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x3608;CFDP_FilestoreRequiresSecondFile;;8;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
0x3608;CFDP_FilestoreRequiresSecondFile;;8;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x3609;CFDP_FilestoreResponseCantParseFsMessage;;9;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
0x3609;CFDP_FilestoreResponseCantParseFsMessage;;9;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
|
0x360a;CFDP_InvalidPduFormat;;10;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
|
0x4300;FILS_GenericFileError;;0;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4301;FILS_GenericDirError;;1;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4303;FILS_GenericRenameError;;3;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4304;FILS_IsBusy;;4;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4305;FILS_InvalidParameters;;5;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x430a;FILS_FileDoesNotExist;;10;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x430b;FILS_FileAlreadyExists;;11;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x430c;FILS_NotAFile;;12;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x430d;FILS_FileLocked;;13;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x430e;FILS_PermissionDenied;;14;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4315;FILS_DirectoryDoesNotExist;;21;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4316;FILS_DirectoryAlreadyExists;;22;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4317;FILS_NotADirectory;;23;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4318;FILS_DirectoryNotEmpty;;24;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x431e;FILS_SequencePacketMissingWrite;;30;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x431f;FILS_SequencePacketMissingRead;;31;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
0x2c01;CCS_BcIsSetVrCommand;;1;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2c01;CCS_BcIsSetVrCommand;;1;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x2c02;CCS_BcIsUnlockCommand;;2;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2c02;CCS_BcIsUnlockCommand;;2;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x2cb0;CCS_BcIllegalCommand;;176;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2cb0;CCS_BcIllegalCommand;;176;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
@ -361,8 +369,9 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x2cd2;CCS_TooShortBlockedPacket;;210;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2cd2;CCS_TooShortBlockedPacket;;210;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x2cd3;CCS_TooShortMapExtraction;;211;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2cd3;CCS_TooShortMapExtraction;;211;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x4201;PUS11_InvalidTypeTimeWindow;;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
0x4201;PUS11_InvalidTypeTimeWindow;;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||||
0x4202;PUS11_TimeshiftingNotPossible;;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
0x4202;PUS11_InvalidTimeWindow;;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||||
0x4203;PUS11_InvalidRelativeTime;;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
0x4203;PUS11_TimeshiftingNotPossible;;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||||
|
0x4204;PUS11_InvalidRelativeTime;;4;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||||
0x3401;DC_NoReplyReceived;;1;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
0x3401;DC_NoReplyReceived;;1;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||||
0x3402;DC_ProtocolError;;2;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
0x3402;DC_ProtocolError;;2;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||||
0x3403;DC_Nullpointer;;3;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
0x3403;DC_Nullpointer;;3;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||||
@ -457,15 +466,15 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x1d04;ATC_SendTmFailed;;4;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
0x1d04;ATC_SendTmFailed;;4;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||||
0x1d05;ATC_Timeout;;5;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
0x1d05;ATC_Timeout;;5;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||||
0x6b00;SCBU_KeyNotFound;;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h
|
0x6b00;SCBU_KeyNotFound;;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h
|
||||||
0x64a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/memory/FilesystemHelper.h
|
0x64a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
||||||
0x64a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/memory/FilesystemHelper.h
|
0x64a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
||||||
0x6a00;SDMA_OpOngoing;;0;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a00;SDMA_OpOngoing;;0;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a01;SDMA_AlreadyOn;;1;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a01;SDMA_AlreadyOn;;1;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a02;SDMA_AlreadyMounted;;2;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a02;SDMA_AlreadyMounted;;2;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a03;SDMA_AlreadyOff;;3;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a03;SDMA_AlreadyOff;;3;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a0a;SDMA_StatusFileNexists;;10;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a0a;SDMA_StatusFileNexists;;10;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a0b;SDMA_StatusFileFormatInvalid;;11;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a0b;SDMA_StatusFileFormatInvalid;;11;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a0c;SDMA_MountError;;12;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a0c;SDMA_MountError;;12;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a0d;SDMA_UnmountError;;13;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a0d;SDMA_UnmountError;;13;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a0e;SDMA_SystemCallError;;14;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a0e;SDMA_SystemCallError;;14;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a0f;SDMA_PopenCallError;;15;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a0f;SDMA_PopenCallError;;15;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
|
|
@ -60,7 +60,7 @@ FILE_SEPARATOR = ";"
|
|||||||
SUBSYSTEM_DEFINITION_DESTINATIONS = [
|
SUBSYSTEM_DEFINITION_DESTINATIONS = [
|
||||||
f"{FSFW_CONFIG_ROOT}/events/subsystemIdRanges.h",
|
f"{FSFW_CONFIG_ROOT}/events/subsystemIdRanges.h",
|
||||||
f"{OBSW_ROOT_DIR}/fsfw/src/fsfw/events/fwSubsystemIdRanges.h",
|
f"{OBSW_ROOT_DIR}/fsfw/src/fsfw/events/fwSubsystemIdRanges.h",
|
||||||
f"{OBSW_ROOT_DIR}/common/config/commonSubsystemIds.h",
|
f"{OBSW_ROOT_DIR}/common/config/eive/eventSubsystemIds.h",
|
||||||
]
|
]
|
||||||
SUBSYSTEM_DEFS_DEST_AS_PATH = [Path(x) for x in SUBSYSTEM_DEFINITION_DESTINATIONS]
|
SUBSYSTEM_DEFS_DEST_AS_PATH = [Path(x) for x in SUBSYSTEM_DEFINITION_DESTINATIONS]
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 216 translations.
|
* @brief Auto-generated event translation file. Contains 222 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2022-08-24 16:44:18
|
* Generated on: 2022-09-29 13:45:11
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -75,6 +75,7 @@ const char *OVERWRITING_HEALTH_STRING = "OVERWRITING_HEALTH";
|
|||||||
const char *TRYING_RECOVERY_STRING = "TRYING_RECOVERY";
|
const char *TRYING_RECOVERY_STRING = "TRYING_RECOVERY";
|
||||||
const char *RECOVERY_STEP_STRING = "RECOVERY_STEP";
|
const char *RECOVERY_STEP_STRING = "RECOVERY_STEP";
|
||||||
const char *RECOVERY_DONE_STRING = "RECOVERY_DONE";
|
const char *RECOVERY_DONE_STRING = "RECOVERY_DONE";
|
||||||
|
const char *HANDLE_PACKET_FAILED_STRING = "HANDLE_PACKET_FAILED";
|
||||||
const char *RF_AVAILABLE_STRING = "RF_AVAILABLE";
|
const char *RF_AVAILABLE_STRING = "RF_AVAILABLE";
|
||||||
const char *RF_LOST_STRING = "RF_LOST";
|
const char *RF_LOST_STRING = "RF_LOST";
|
||||||
const char *BIT_LOCK_STRING = "BIT_LOCK";
|
const char *BIT_LOCK_STRING = "BIT_LOCK";
|
||||||
@ -217,6 +218,11 @@ const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
|
|||||||
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
||||||
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
|
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
|
||||||
const char *REBOOT_HW_STRING = "REBOOT_HW";
|
const char *REBOOT_HW_STRING = "REBOOT_HW";
|
||||||
|
const char *SET_CONFIGFILEVALUE_FAILED_STRING = "SET_CONFIGFILEVALUE_FAILED";
|
||||||
|
const char *GET_CONFIGFILEVALUE_FAILED_STRING = "GET_CONFIGFILEVALUE_FAILED";
|
||||||
|
const char *INSERT_CONFIGFILEVALUE_FAILED_STRING = "INSERT_CONFIGFILEVALUE_FAILED";
|
||||||
|
const char *WRITE_CONFIGFILE_FAILED_STRING = "WRITE_CONFIGFILE_FAILED";
|
||||||
|
const char *READ_CONFIGFILE_FAILED_STRING = "READ_CONFIGFILE_FAILED";
|
||||||
|
|
||||||
const char *translateEvents(Event event) {
|
const char *translateEvents(Event event) {
|
||||||
switch ((event & 0xFFFF)) {
|
switch ((event & 0xFFFF)) {
|
||||||
@ -360,6 +366,8 @@ const char *translateEvents(Event event) {
|
|||||||
return RECOVERY_STEP_STRING;
|
return RECOVERY_STEP_STRING;
|
||||||
case (7512):
|
case (7512):
|
||||||
return RECOVERY_DONE_STRING;
|
return RECOVERY_DONE_STRING;
|
||||||
|
case (7600):
|
||||||
|
return HANDLE_PACKET_FAILED_STRING;
|
||||||
case (7900):
|
case (7900):
|
||||||
return RF_AVAILABLE_STRING;
|
return RF_AVAILABLE_STRING;
|
||||||
case (7901):
|
case (7901):
|
||||||
@ -644,6 +652,16 @@ const char *translateEvents(Event event) {
|
|||||||
return REBOOT_MECHANISM_TRIGGERED_STRING;
|
return REBOOT_MECHANISM_TRIGGERED_STRING;
|
||||||
case (13703):
|
case (13703):
|
||||||
return REBOOT_HW_STRING;
|
return REBOOT_HW_STRING;
|
||||||
|
case (13801):
|
||||||
|
return SET_CONFIGFILEVALUE_FAILED_STRING;
|
||||||
|
case (13802):
|
||||||
|
return GET_CONFIGFILEVALUE_FAILED_STRING;
|
||||||
|
case (13803):
|
||||||
|
return INSERT_CONFIGFILEVALUE_FAILED_STRING;
|
||||||
|
case (13804):
|
||||||
|
return WRITE_CONFIGFILE_FAILED_STRING;
|
||||||
|
case (13805):
|
||||||
|
return READ_CONFIGFILE_FAILED_STRING;
|
||||||
default:
|
default:
|
||||||
return "UNKNOWN_EVENT";
|
return "UNKNOWN_EVENT";
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ OBJECTS_PATH = Path(f"{FSFW_CONFIG_ROOT}/objects/systemObjectList.h")
|
|||||||
FRAMEWORK_OBJECT_PATH = Path(
|
FRAMEWORK_OBJECT_PATH = Path(
|
||||||
f"{OBSW_ROOT_DIR}/fsfw/src/fsfw/objectmanager/frameworkObjects.h"
|
f"{OBSW_ROOT_DIR}/fsfw/src/fsfw/objectmanager/frameworkObjects.h"
|
||||||
)
|
)
|
||||||
COMMON_OBJECTS_PATH = Path(f"{OBSW_ROOT_DIR}/common/config/commonObjects.h")
|
COMMON_OBJECTS_PATH = Path(f"{OBSW_ROOT_DIR}/common/config/eive/objects.h")
|
||||||
OBJECTS_DEFINITIONS = [OBJECTS_PATH, FRAMEWORK_OBJECT_PATH, COMMON_OBJECTS_PATH]
|
OBJECTS_DEFINITIONS = [OBJECTS_PATH, FRAMEWORK_OBJECT_PATH, COMMON_OBJECTS_PATH]
|
||||||
|
|
||||||
SQL_DELETE_OBJECTS_CMD = """
|
SQL_DELETE_OBJECTS_CMD = """
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 133 translations.
|
* Contains 136 translations.
|
||||||
* Generated on: 2022-08-24 16:44:18
|
* Generated on: 2022-09-29 13:45:11
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
const char *P60DOCK_TEST_TASK_STRING = "P60DOCK_TEST_TASK";
|
const char *P60DOCK_TEST_TASK_STRING = "P60DOCK_TEST_TASK";
|
||||||
const char *ACS_CONTROLLER_STRING = "ACS_CONTROLLER";
|
const char *ACS_CONTROLLER_STRING = "ACS_CONTROLLER";
|
||||||
const char *CORE_CONTROLLER_STRING = "CORE_CONTROLLER";
|
const char *CORE_CONTROLLER_STRING = "CORE_CONTROLLER";
|
||||||
|
const char *GLOBAL_JSON_CFG_STRING = "GLOBAL_JSON_CFG";
|
||||||
const char *THERMAL_CONTROLLER_STRING = "THERMAL_CONTROLLER";
|
const char *THERMAL_CONTROLLER_STRING = "THERMAL_CONTROLLER";
|
||||||
const char *MGM_0_LIS3_HANDLER_STRING = "MGM_0_LIS3_HANDLER";
|
const char *MGM_0_LIS3_HANDLER_STRING = "MGM_0_LIS3_HANDLER";
|
||||||
const char *GYRO_0_ADIS_HANDLER_STRING = "GYRO_0_ADIS_HANDLER";
|
const char *GYRO_0_ADIS_HANDLER_STRING = "GYRO_0_ADIS_HANDLER";
|
||||||
@ -136,6 +137,8 @@ const char *ACS_BOARD_ASS_STRING = "ACS_BOARD_ASS";
|
|||||||
const char *SUS_BOARD_ASS_STRING = "SUS_BOARD_ASS";
|
const char *SUS_BOARD_ASS_STRING = "SUS_BOARD_ASS";
|
||||||
const char *TCS_BOARD_ASS_STRING = "TCS_BOARD_ASS";
|
const char *TCS_BOARD_ASS_STRING = "TCS_BOARD_ASS";
|
||||||
const char *RW_ASS_STRING = "RW_ASS";
|
const char *RW_ASS_STRING = "RW_ASS";
|
||||||
|
const char *CFDP_HANDLER_STRING = "CFDP_HANDLER";
|
||||||
|
const char *CFDP_DISTRIBUTOR_STRING = "CFDP_DISTRIBUTOR";
|
||||||
const char *TM_FUNNEL_STRING = "TM_FUNNEL";
|
const char *TM_FUNNEL_STRING = "TM_FUNNEL";
|
||||||
const char *CCSDS_IP_CORE_BRIDGE_STRING = "CCSDS_IP_CORE_BRIDGE";
|
const char *CCSDS_IP_CORE_BRIDGE_STRING = "CCSDS_IP_CORE_BRIDGE";
|
||||||
const char *NO_OBJECT_STRING = "NO_OBJECT";
|
const char *NO_OBJECT_STRING = "NO_OBJECT";
|
||||||
@ -148,6 +151,8 @@ const char *translateObject(object_id_t object) {
|
|||||||
return ACS_CONTROLLER_STRING;
|
return ACS_CONTROLLER_STRING;
|
||||||
case 0x43000003:
|
case 0x43000003:
|
||||||
return CORE_CONTROLLER_STRING;
|
return CORE_CONTROLLER_STRING;
|
||||||
|
case 0x43000006:
|
||||||
|
return GLOBAL_JSON_CFG_STRING;
|
||||||
case 0x43400001:
|
case 0x43400001:
|
||||||
return THERMAL_CONTROLLER_STRING;
|
return THERMAL_CONTROLLER_STRING;
|
||||||
case 0x44120006:
|
case 0x44120006:
|
||||||
@ -402,6 +407,10 @@ const char *translateObject(object_id_t object) {
|
|||||||
return TCS_BOARD_ASS_STRING;
|
return TCS_BOARD_ASS_STRING;
|
||||||
case 0x73000004:
|
case 0x73000004:
|
||||||
return RW_ASS_STRING;
|
return RW_ASS_STRING;
|
||||||
|
case 0x73000005:
|
||||||
|
return CFDP_HANDLER_STRING;
|
||||||
|
case 0x73000006:
|
||||||
|
return CFDP_DISTRIBUTOR_STRING;
|
||||||
case 0x73000100:
|
case 0x73000100:
|
||||||
return TM_FUNNEL_STRING;
|
return TM_FUNNEL_STRING;
|
||||||
case 0x73500000:
|
case 0x73500000:
|
||||||
|
@ -43,7 +43,7 @@ BSP_PATH = f"{OBSW_ROOT_DIR}/{BSP_DIR_NAME}"
|
|||||||
|
|
||||||
INTERFACE_DEFINITION_FILES = [
|
INTERFACE_DEFINITION_FILES = [
|
||||||
f"{OBSW_ROOT_DIR}/fsfw/src/fsfw/returnvalues/FwClassIds.h",
|
f"{OBSW_ROOT_DIR}/fsfw/src/fsfw/returnvalues/FwClassIds.h",
|
||||||
f"{OBSW_ROOT_DIR}/common/config/commonClassIds.h",
|
f"{OBSW_ROOT_DIR}/common/config/eive/resultClassIds.h",
|
||||||
f"{FSFW_CONFIG_ROOT}/returnvalues/classIds.h",
|
f"{FSFW_CONFIG_ROOT}/returnvalues/classIds.h",
|
||||||
]
|
]
|
||||||
RETURNVALUE_SOURCES = [
|
RETURNVALUE_SOURCES = [
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef MISSION_DEVICES_GPSHYPERIONHANDLER_H_
|
#ifndef MISSION_DEVICES_GPSHYPERIONHANDLER_H_
|
||||||
#define MISSION_DEVICES_GPSHYPERIONHANDLER_H_
|
#define MISSION_DEVICES_GPSHYPERIONHANDLER_H_
|
||||||
|
|
||||||
#include "commonSubsystemIds.h"
|
#include "eive/eventSubsystemIds.h"
|
||||||
#include "fsfw/FSFW.h"
|
#include "fsfw/FSFW.h"
|
||||||
#include "fsfw/controller/ExtendedControllerBase.h"
|
#include "fsfw/controller/ExtendedControllerBase.h"
|
||||||
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
#include "bsp_q7s/memory/FilesystemHelper.h"
|
#include "bsp_q7s/fs/FilesystemHelper.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "mission/utility/Timestamp.h"
|
#include "mission/utility/Timestamp.h"
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "fsfw_hal/linux/uart/UartComIF.h"
|
#include "fsfw_hal/linux/uart/UartComIF.h"
|
||||||
#include "linux/devices/devicedefinitions/PlocMPSoCDefinitions.h"
|
#include "linux/devices/devicedefinitions/PlocMPSoCDefinitions.h"
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
#include "bsp_q7s/memory/SdCardManager.h"
|
#include "bsp_q7s/fs/SdCardManager.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include <linux/devices/devicedefinitions/PlocSupervisorDefinitions.h>
|
#include <linux/devices/devicedefinitions/PlocSupervisorDefinitions.h>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "bsp_q7s/memory/SdCardManager.h"
|
#include "bsp_q7s/fs/SdCardManager.h"
|
||||||
#include "fsfw/action/ActionHelper.h"
|
#include "fsfw/action/ActionHelper.h"
|
||||||
#include "fsfw/action/CommandActionHelper.h"
|
#include "fsfw/action/CommandActionHelper.h"
|
||||||
#include "fsfw/action/CommandsActionsIF.h"
|
#include "fsfw/action/CommandsActionsIF.h"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "PlocSupervisorHandler.h"
|
#include "PlocSupervisorHandler.h"
|
||||||
|
|
||||||
#include <fsfw/memory/HasFileSystemIF.h>
|
#include <fsfw/filesystem/HasFileSystemIF.h>
|
||||||
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "PlocSupvHelper.h"
|
#include "PlocSupvHelper.h"
|
||||||
#include "bsp_q7s/memory/SdCardManager.h"
|
#include "bsp_q7s/fs/SdCardManager.h"
|
||||||
#include "devices/powerSwitcherList.h"
|
#include "devices/powerSwitcherList.h"
|
||||||
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
||||||
#include "fsfw/timemanager/Countdown.h"
|
#include "fsfw/timemanager/Countdown.h"
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
#include "bsp_q7s/memory/FilesystemHelper.h"
|
#include "bsp_q7s/fs/FilesystemHelper.h"
|
||||||
#include "bsp_q7s/memory/SdCardManager.h"
|
#include "bsp_q7s/fs/SdCardManager.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "fsfw/tasks/TaskFactory.h"
|
#include "fsfw/tasks/TaskFactory.h"
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
|
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
|
||||||
|
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
#include "bsp_q7s/memory/SdCardManager.h"
|
#include "bsp_q7s/fs/SdCardManager.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
|
#include "eive/definitions.h"
|
||||||
#include "fsfw/timemanager/Countdown.h"
|
#include "fsfw/timemanager/Countdown.h"
|
||||||
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
||||||
#include "mission/utility/Filenaming.h"
|
#include "mission/utility/Filenaming.h"
|
||||||
@ -541,15 +542,14 @@ ReturnValue_t StrHelper::checkReplyPosition(uint32_t expectedPosition) {
|
|||||||
|
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
ReturnValue_t StrHelper::checkPath(std::string name) {
|
ReturnValue_t StrHelper::checkPath(std::string name) {
|
||||||
if (name.substr(0, sizeof(SdCardManager::SD_0_MOUNT_POINT)) ==
|
if (name.substr(0, sizeof(config::SD_0_MOUNT_POINT)) == std::string(config::SD_0_MOUNT_POINT)) {
|
||||||
std::string(SdCardManager::SD_0_MOUNT_POINT)) {
|
if (!sdcMan->isSdCardUsable(sd::SLOT_0)) {
|
||||||
if (!sdcMan->isSdCardMounted(sd::SLOT_0)) {
|
|
||||||
sif::warning << "StrHelper::checkPath: SD card 0 not mounted" << std::endl;
|
sif::warning << "StrHelper::checkPath: SD card 0 not mounted" << std::endl;
|
||||||
return SD_NOT_MOUNTED;
|
return SD_NOT_MOUNTED;
|
||||||
}
|
}
|
||||||
} else if (name.substr(0, sizeof(SdCardManager::SD_1_MOUNT_POINT)) ==
|
} else if (name.substr(0, sizeof(config::SD_1_MOUNT_POINT)) ==
|
||||||
std::string(SdCardManager::SD_1_MOUNT_POINT)) {
|
std::string(config::SD_1_MOUNT_POINT)) {
|
||||||
if (!sdcMan->isSdCardMounted(sd::SLOT_0)) {
|
if (!sdcMan->isSdCardUsable(sd::SLOT_0)) {
|
||||||
sif::warning << "StrHelper::checkPath: SD card 1 not mounted" << std::endl;
|
sif::warning << "StrHelper::checkPath: SD card 1 not mounted" << std::endl;
|
||||||
return SD_NOT_MOUNTED;
|
return SD_NOT_MOUNTED;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
|
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
#include "bsp_q7s/memory/SdCardManager.h"
|
#include "bsp_q7s/fs/SdCardManager.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "fsfw/devicehandlers/CookieIF.h"
|
#include "fsfw/devicehandlers/CookieIF.h"
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#include "common/config/commonSubsystemIds.h"
|
#include "eive/eventSubsystemIds.h"
|
||||||
#include "fsfw/events/fwSubsystemIdRanges.h"
|
#include "fsfw/events/fwSubsystemIdRanges.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 216 translations.
|
* @brief Auto-generated event translation file. Contains 222 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2022-08-24 16:44:18
|
* Generated on: 2022-09-29 13:45:11
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -75,6 +75,7 @@ const char *OVERWRITING_HEALTH_STRING = "OVERWRITING_HEALTH";
|
|||||||
const char *TRYING_RECOVERY_STRING = "TRYING_RECOVERY";
|
const char *TRYING_RECOVERY_STRING = "TRYING_RECOVERY";
|
||||||
const char *RECOVERY_STEP_STRING = "RECOVERY_STEP";
|
const char *RECOVERY_STEP_STRING = "RECOVERY_STEP";
|
||||||
const char *RECOVERY_DONE_STRING = "RECOVERY_DONE";
|
const char *RECOVERY_DONE_STRING = "RECOVERY_DONE";
|
||||||
|
const char *HANDLE_PACKET_FAILED_STRING = "HANDLE_PACKET_FAILED";
|
||||||
const char *RF_AVAILABLE_STRING = "RF_AVAILABLE";
|
const char *RF_AVAILABLE_STRING = "RF_AVAILABLE";
|
||||||
const char *RF_LOST_STRING = "RF_LOST";
|
const char *RF_LOST_STRING = "RF_LOST";
|
||||||
const char *BIT_LOCK_STRING = "BIT_LOCK";
|
const char *BIT_LOCK_STRING = "BIT_LOCK";
|
||||||
@ -217,6 +218,11 @@ const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
|
|||||||
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
||||||
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
|
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
|
||||||
const char *REBOOT_HW_STRING = "REBOOT_HW";
|
const char *REBOOT_HW_STRING = "REBOOT_HW";
|
||||||
|
const char *SET_CONFIGFILEVALUE_FAILED_STRING = "SET_CONFIGFILEVALUE_FAILED";
|
||||||
|
const char *GET_CONFIGFILEVALUE_FAILED_STRING = "GET_CONFIGFILEVALUE_FAILED";
|
||||||
|
const char *INSERT_CONFIGFILEVALUE_FAILED_STRING = "INSERT_CONFIGFILEVALUE_FAILED";
|
||||||
|
const char *WRITE_CONFIGFILE_FAILED_STRING = "WRITE_CONFIGFILE_FAILED";
|
||||||
|
const char *READ_CONFIGFILE_FAILED_STRING = "READ_CONFIGFILE_FAILED";
|
||||||
|
|
||||||
const char *translateEvents(Event event) {
|
const char *translateEvents(Event event) {
|
||||||
switch ((event & 0xFFFF)) {
|
switch ((event & 0xFFFF)) {
|
||||||
@ -360,6 +366,8 @@ const char *translateEvents(Event event) {
|
|||||||
return RECOVERY_STEP_STRING;
|
return RECOVERY_STEP_STRING;
|
||||||
case (7512):
|
case (7512):
|
||||||
return RECOVERY_DONE_STRING;
|
return RECOVERY_DONE_STRING;
|
||||||
|
case (7600):
|
||||||
|
return HANDLE_PACKET_FAILED_STRING;
|
||||||
case (7900):
|
case (7900):
|
||||||
return RF_AVAILABLE_STRING;
|
return RF_AVAILABLE_STRING;
|
||||||
case (7901):
|
case (7901):
|
||||||
@ -644,6 +652,16 @@ const char *translateEvents(Event event) {
|
|||||||
return REBOOT_MECHANISM_TRIGGERED_STRING;
|
return REBOOT_MECHANISM_TRIGGERED_STRING;
|
||||||
case (13703):
|
case (13703):
|
||||||
return REBOOT_HW_STRING;
|
return REBOOT_HW_STRING;
|
||||||
|
case (13801):
|
||||||
|
return SET_CONFIGFILEVALUE_FAILED_STRING;
|
||||||
|
case (13802):
|
||||||
|
return GET_CONFIGFILEVALUE_FAILED_STRING;
|
||||||
|
case (13803):
|
||||||
|
return INSERT_CONFIGFILEVALUE_FAILED_STRING;
|
||||||
|
case (13804):
|
||||||
|
return WRITE_CONFIGFILE_FAILED_STRING;
|
||||||
|
case (13805):
|
||||||
|
return READ_CONFIGFILE_FAILED_STRING;
|
||||||
default:
|
default:
|
||||||
return "UNKNOWN_EVENT";
|
return "UNKNOWN_EVENT";
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#include "commonObjects.h"
|
#include "eive/objects.h"
|
||||||
|
|
||||||
// The objects will be instantiated in the ID order
|
// The objects will be instantiated in the ID order
|
||||||
// For naming scheme see flight manual
|
// For naming scheme see flight manual
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 133 translations.
|
* Contains 136 translations.
|
||||||
* Generated on: 2022-08-24 16:44:18
|
* Generated on: 2022-09-29 13:45:11
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
const char *P60DOCK_TEST_TASK_STRING = "P60DOCK_TEST_TASK";
|
const char *P60DOCK_TEST_TASK_STRING = "P60DOCK_TEST_TASK";
|
||||||
const char *ACS_CONTROLLER_STRING = "ACS_CONTROLLER";
|
const char *ACS_CONTROLLER_STRING = "ACS_CONTROLLER";
|
||||||
const char *CORE_CONTROLLER_STRING = "CORE_CONTROLLER";
|
const char *CORE_CONTROLLER_STRING = "CORE_CONTROLLER";
|
||||||
|
const char *GLOBAL_JSON_CFG_STRING = "GLOBAL_JSON_CFG";
|
||||||
const char *THERMAL_CONTROLLER_STRING = "THERMAL_CONTROLLER";
|
const char *THERMAL_CONTROLLER_STRING = "THERMAL_CONTROLLER";
|
||||||
const char *MGM_0_LIS3_HANDLER_STRING = "MGM_0_LIS3_HANDLER";
|
const char *MGM_0_LIS3_HANDLER_STRING = "MGM_0_LIS3_HANDLER";
|
||||||
const char *GYRO_0_ADIS_HANDLER_STRING = "GYRO_0_ADIS_HANDLER";
|
const char *GYRO_0_ADIS_HANDLER_STRING = "GYRO_0_ADIS_HANDLER";
|
||||||
@ -136,6 +137,8 @@ const char *ACS_BOARD_ASS_STRING = "ACS_BOARD_ASS";
|
|||||||
const char *SUS_BOARD_ASS_STRING = "SUS_BOARD_ASS";
|
const char *SUS_BOARD_ASS_STRING = "SUS_BOARD_ASS";
|
||||||
const char *TCS_BOARD_ASS_STRING = "TCS_BOARD_ASS";
|
const char *TCS_BOARD_ASS_STRING = "TCS_BOARD_ASS";
|
||||||
const char *RW_ASS_STRING = "RW_ASS";
|
const char *RW_ASS_STRING = "RW_ASS";
|
||||||
|
const char *CFDP_HANDLER_STRING = "CFDP_HANDLER";
|
||||||
|
const char *CFDP_DISTRIBUTOR_STRING = "CFDP_DISTRIBUTOR";
|
||||||
const char *TM_FUNNEL_STRING = "TM_FUNNEL";
|
const char *TM_FUNNEL_STRING = "TM_FUNNEL";
|
||||||
const char *CCSDS_IP_CORE_BRIDGE_STRING = "CCSDS_IP_CORE_BRIDGE";
|
const char *CCSDS_IP_CORE_BRIDGE_STRING = "CCSDS_IP_CORE_BRIDGE";
|
||||||
const char *NO_OBJECT_STRING = "NO_OBJECT";
|
const char *NO_OBJECT_STRING = "NO_OBJECT";
|
||||||
@ -148,6 +151,8 @@ const char *translateObject(object_id_t object) {
|
|||||||
return ACS_CONTROLLER_STRING;
|
return ACS_CONTROLLER_STRING;
|
||||||
case 0x43000003:
|
case 0x43000003:
|
||||||
return CORE_CONTROLLER_STRING;
|
return CORE_CONTROLLER_STRING;
|
||||||
|
case 0x43000006:
|
||||||
|
return GLOBAL_JSON_CFG_STRING;
|
||||||
case 0x43400001:
|
case 0x43400001:
|
||||||
return THERMAL_CONTROLLER_STRING;
|
return THERMAL_CONTROLLER_STRING;
|
||||||
case 0x44120006:
|
case 0x44120006:
|
||||||
@ -402,6 +407,10 @@ const char *translateObject(object_id_t object) {
|
|||||||
return TCS_BOARD_ASS_STRING;
|
return TCS_BOARD_ASS_STRING;
|
||||||
case 0x73000004:
|
case 0x73000004:
|
||||||
return RW_ASS_STRING;
|
return RW_ASS_STRING;
|
||||||
|
case 0x73000005:
|
||||||
|
return CFDP_HANDLER_STRING;
|
||||||
|
case 0x73000006:
|
||||||
|
return CFDP_DISTRIBUTOR_STRING;
|
||||||
case 0x73000100:
|
case 0x73000100:
|
||||||
return TM_FUNNEL_STRING;
|
return TM_FUNNEL_STRING;
|
||||||
case 0x73500000:
|
case 0x73500000:
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
#ifndef FSFWCONFIG_RETURNVALUES_CLASSIDS_H_
|
#ifndef FSFWCONFIG_RETURNVALUES_CLASSIDS_H_
|
||||||
#define FSFWCONFIG_RETURNVALUES_CLASSIDS_H_
|
#define FSFWCONFIG_RETURNVALUES_CLASSIDS_H_
|
||||||
|
|
||||||
#include <common/config/commonClassIds.h>
|
|
||||||
#include <fsfw/returnvalues/FwClassIds.h>
|
#include <fsfw/returnvalues/FwClassIds.h>
|
||||||
|
|
||||||
|
#include "eive/resultClassIds.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Source IDs starts at 73 for now
|
* Source IDs starts at 73 for now
|
||||||
* Framework IDs for ReturnValues run from 0 to 56
|
* Framework IDs for ReturnValues run from 0 to 56
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||||
#include "fsfw/timemanager/Clock.h"
|
#include "fsfw/timemanager/Clock.h"
|
||||||
|
|
||||||
void utility::handleSystemError(int retcode, std::string function) {
|
void utility::handleSystemError(int retcode, std::string context) {
|
||||||
#if OBSW_VERBOSE_LEVEL >= 1
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
sif::warning << function << ": System call failed with code " << retcode << ": "
|
sif::warning << context << ": System call failed with code " << retcode << ": "
|
||||||
<< strerror(retcode) << std::endl;
|
<< strerror(retcode) << std::endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<folderInfo id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443." name="/" resourcePath="">
|
<folderInfo id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443." name="/" resourcePath="">
|
||||||
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.base.1176904738" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.base">
|
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.base.1176904738" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.base">
|
||||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF;org.eclipse.cdt.core.PE64" id="cdt.managedbuild.target.gnu.platform.mingw.base.1087094604" name="Debug Platform" osList="win32" superClass="cdt.managedbuild.target.gnu.platform.mingw.base"/>
|
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF;org.eclipse.cdt.core.PE64" id="cdt.managedbuild.target.gnu.platform.mingw.base.1087094604" name="Debug Platform" osList="win32" superClass="cdt.managedbuild.target.gnu.platform.mingw.base"/>
|
||||||
<builder arguments="--build ." buildPath="${workspace_loc:/eive_obsw/Debug-Host}" command="cmake" id="cdt.managedbuild.builder.gnu.cross.1026777292" incrementalBuildTarget="" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
<builder arguments="--build . -j" buildPath="${workspace_loc:/eive-obsw/cmake-build-debug}" command="cmake" id="cdt.managedbuild.builder.gnu.cross.1026777292" incrementalBuildTarget="" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||||
<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.base.813737526" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.base">
|
<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.base.813737526" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.base">
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.both.asm.option.include.paths.596367416" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.both.asm.option.include.paths.596367416" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
|
||||||
<listOptionValue builtIn="false" value=""${Q7S_SYSROOT_UNIX}/usr/include""/>
|
<listOptionValue builtIn="false" value=""${Q7S_SYSROOT_UNIX}/usr/include""/>
|
||||||
@ -1451,9 +1451,18 @@
|
|||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.447898075;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.447898075.;cdt.managedbuild.tool.gnu.cpp.compiler.base.1522927967;cdt.managedbuild.tool.gnu.cpp.compiler.input.305765911">
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.447898075;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.447898075.;cdt.managedbuild.tool.gnu.cpp.compiler.base.1522927967;cdt.managedbuild.tool.gnu.cpp.compiler.input.305765911">
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
</scannerConfigBuildInfo>
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.628631287;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.216437361">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.;cdt.managedbuild.tool.gnu.cpp.compiler.base.1405808772;cdt.managedbuild.tool.gnu.cpp.compiler.input.1960112549">
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.;cdt.managedbuild.tool.gnu.cpp.compiler.base.1405808772;cdt.managedbuild.tool.gnu.cpp.compiler.input.1960112549">
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
</scannerConfigBuildInfo>
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.;cdt.managedbuild.tool.gnu.c.compiler.base.1946711528;cdt.managedbuild.tool.gnu.c.compiler.input.584209663">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.190921171;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.190921171.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.2044466190;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1551006500">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.2065184927;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.920837857">
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.2065184927;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.920837857">
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
</scannerConfigBuildInfo>
|
</scannerConfigBuildInfo>
|
||||||
@ -1469,45 +1478,6 @@
|
|||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1775596945;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1775596945.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1154394228;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1228307894">
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1775596945;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1775596945.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1154394228;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1228307894">
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
</scannerConfigBuildInfo>
|
</scannerConfigBuildInfo>
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.1043649249;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.1043649249.;cdt.managedbuild.tool.gnu.cpp.compiler.mingw.base.539225324;cdt.managedbuild.tool.gnu.cpp.compiler.input.1848997248">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.190921171;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.190921171.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.193772074;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.2081570054">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.;cdt.managedbuild.tool.gnu.c.compiler.mingw.base.397223006;cdt.managedbuild.tool.gnu.c.compiler.input.1482659499">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1171630561;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1171630561.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.308264050;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.259982159">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1031020513;cdt.managedbuild.toolchain.gnu.mingw.base.1031020513.519944638;cdt.managedbuild.tool.gnu.c.compiler.mingw.base.438317679;cdt.managedbuild.tool.gnu.c.compiler.input.336445831">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1939781894;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1939781894.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.2002501811;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1316209993">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.;cdt.managedbuild.tool.gnu.cpp.compiler.mingw.base.646655988;cdt.managedbuild.tool.gnu.cpp.compiler.input.1437856797">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1631077874;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1631077874.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1992099127;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.234631061">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.628631287;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.216437361">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.758550634;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.758550634.;cdt.managedbuild.tool.gnu.cpp.compiler.base.1957014384;cdt.managedbuild.tool.gnu.cpp.compiler.input.957560385">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1631077874;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1631077874.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.715561087;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1004720080">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.;cdt.managedbuild.tool.gnu.c.compiler.base.1946711528;cdt.managedbuild.tool.gnu.c.compiler.input.584209663">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.190921171;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.190921171.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.2044466190;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1551006500">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1535302916;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.96000231">
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1535302916;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.96000231">
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
</scannerConfigBuildInfo>
|
</scannerConfigBuildInfo>
|
||||||
@ -1520,13 +1490,25 @@
|
|||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.364559455;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.364559455.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1970346305;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.2096585345">
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.364559455;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.364559455.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1970346305;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.2096585345">
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
</scannerConfigBuildInfo>
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.1043649249;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.1043649249.;cdt.managedbuild.tool.gnu.cpp.compiler.mingw.base.539225324;cdt.managedbuild.tool.gnu.cpp.compiler.input.1848997248">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.447898075;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.447898075.;cdt.managedbuild.tool.gnu.c.compiler.base.623389075;cdt.managedbuild.tool.gnu.c.compiler.input.1382191457">
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.447898075;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.447898075.;cdt.managedbuild.tool.gnu.c.compiler.base.623389075;cdt.managedbuild.tool.gnu.c.compiler.input.1382191457">
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
</scannerConfigBuildInfo>
|
</scannerConfigBuildInfo>
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.758550634;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.758550634.;cdt.managedbuild.tool.gnu.c.compiler.base.1695077973;cdt.managedbuild.tool.gnu.c.compiler.input.509259725">
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.190921171;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.190921171.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.193772074;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.2081570054">
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
</scannerConfigBuildInfo>
|
</scannerConfigBuildInfo>
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1171630561;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1171630561.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1477130926;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.779990384">
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.;cdt.managedbuild.tool.gnu.c.compiler.mingw.base.397223006;cdt.managedbuild.tool.gnu.c.compiler.input.1482659499">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1031020513;cdt.managedbuild.toolchain.gnu.mingw.base.1031020513.519944638;cdt.managedbuild.tool.gnu.c.compiler.mingw.base.438317679;cdt.managedbuild.tool.gnu.c.compiler.input.336445831">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1939781894;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1939781894.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.2002501811;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1316209993">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.;cdt.managedbuild.tool.gnu.cpp.compiler.mingw.base.646655988;cdt.managedbuild.tool.gnu.cpp.compiler.input.1437856797">
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
</scannerConfigBuildInfo>
|
</scannerConfigBuildInfo>
|
||||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1595165802;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1925043110">
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851;cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1595165802;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1925043110">
|
||||||
|
@ -6,3 +6,4 @@ add_subdirectory(memory)
|
|||||||
add_subdirectory(tmtc)
|
add_subdirectory(tmtc)
|
||||||
add_subdirectory(system)
|
add_subdirectory(system)
|
||||||
add_subdirectory(csp)
|
add_subdirectory(csp)
|
||||||
|
add_subdirectory(cfdp)
|
||||||
|
1
mission/cfdp/CMakeLists.txt
Normal file
1
mission/cfdp/CMakeLists.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
57
mission/cfdp/Config.h
Normal file
57
mission/cfdp/Config.h
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#ifndef MISSION_CFDP_CONFIG_H_
|
||||||
|
#define MISSION_CFDP_CONFIG_H_
|
||||||
|
|
||||||
|
#include "fsfw/cfdp.h"
|
||||||
|
|
||||||
|
namespace cfdp {
|
||||||
|
|
||||||
|
class EiveUserHandler : public cfdp::UserBase {
|
||||||
|
public:
|
||||||
|
explicit EiveUserHandler(HasFileSystemIF& vfs) : cfdp::UserBase(vfs) {}
|
||||||
|
virtual ~EiveUserHandler() = default;
|
||||||
|
|
||||||
|
void transactionIndication(const cfdp::TransactionId& id) override {}
|
||||||
|
void eofSentIndication(const cfdp::TransactionId& id) override {}
|
||||||
|
void transactionFinishedIndication(const cfdp::TransactionFinishedParams& params) override {
|
||||||
|
sif::info << "File transaction finished for transaction with " << params.id << std::endl;
|
||||||
|
}
|
||||||
|
void metadataRecvdIndication(const cfdp::MetadataRecvdParams& params) override {
|
||||||
|
sif::info << "Metadata received for transaction with " << params.id << std::endl;
|
||||||
|
}
|
||||||
|
void fileSegmentRecvdIndication(const cfdp::FileSegmentRecvdParams& params) override {}
|
||||||
|
void reportIndication(const cfdp::TransactionId& id, cfdp::StatusReportIF& report) override {}
|
||||||
|
void suspendedIndication(const cfdp::TransactionId& id, cfdp::ConditionCode code) override {}
|
||||||
|
void resumedIndication(const cfdp::TransactionId& id, size_t progress) override {}
|
||||||
|
void faultIndication(const cfdp::TransactionId& id, cfdp::ConditionCode code,
|
||||||
|
size_t progress) override {}
|
||||||
|
void abandonedIndication(const cfdp::TransactionId& id, cfdp::ConditionCode code,
|
||||||
|
size_t progress) override {}
|
||||||
|
void eofRecvIndication(const cfdp::TransactionId& id) override {
|
||||||
|
sif::info << "EOF PDU received for transaction with " << id << std::endl;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class EiveFaultHandler : public cfdp::FaultHandlerBase {
|
||||||
|
public:
|
||||||
|
void noticeOfSuspensionCb(cfdp::TransactionId& id, cfdp::ConditionCode code) override {
|
||||||
|
sif::warning << "Notice of suspension detected for transaction " << id
|
||||||
|
<< " with condition code: " << cfdp::getConditionCodeString(code) << std::endl;
|
||||||
|
}
|
||||||
|
void noticeOfCancellationCb(cfdp::TransactionId& id, cfdp::ConditionCode code) override {
|
||||||
|
sif::warning << "Notice of suspension detected for transaction " << id
|
||||||
|
<< " with condition code: " << cfdp::getConditionCodeString(code) << std::endl;
|
||||||
|
}
|
||||||
|
void abandonCb(cfdp::TransactionId& id, cfdp::ConditionCode code) override {
|
||||||
|
sif::warning << "Transaction " << id
|
||||||
|
<< " was abandoned, condition code : " << cfdp::getConditionCodeString(code)
|
||||||
|
<< std::endl;
|
||||||
|
}
|
||||||
|
void ignoreCb(cfdp::TransactionId& id, cfdp::ConditionCode code) override {
|
||||||
|
sif::warning << "Fault ignored for transaction " << id
|
||||||
|
<< ", condition code: " << cfdp::getConditionCodeString(code) << std::endl;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace cfdp
|
||||||
|
|
||||||
|
#endif /* MISSION_CFDP_CONFIG_H_ */
|
@ -1,10 +1,10 @@
|
|||||||
#ifndef MISSION_CONTROLLER_ACSCONTROLLER_H_
|
#ifndef MISSION_CONTROLLER_ACSCONTROLLER_H_
|
||||||
#define MISSION_CONTROLLER_ACSCONTROLLER_H_
|
#define MISSION_CONTROLLER_ACSCONTROLLER_H_
|
||||||
|
|
||||||
#include <commonObjects.h>
|
|
||||||
#include <fsfw/controller/ExtendedControllerBase.h>
|
#include <fsfw/controller/ExtendedControllerBase.h>
|
||||||
|
|
||||||
#include "controllerdefinitions/AcsCtrlDefinitions.h"
|
#include "controllerdefinitions/AcsCtrlDefinitions.h"
|
||||||
|
#include "eive/objects.h"
|
||||||
#include "fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h"
|
#include "fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h"
|
||||||
#include "fsfw_hal/devicehandlers/MgmRM3100Handler.h"
|
#include "fsfw_hal/devicehandlers/MgmRM3100Handler.h"
|
||||||
#include "mission/devices/devicedefinitions/IMTQHandlerDefinitions.h"
|
#include "mission/devices/devicedefinitions/IMTQHandlerDefinitions.h"
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
#include "GenericFactory.h"
|
#include "GenericFactory.h"
|
||||||
|
|
||||||
|
#include <fsfw/cfdp/CfdpDistributor.h>
|
||||||
|
#include <fsfw/cfdp/handler/CfdpHandler.h>
|
||||||
|
#include <fsfw/cfdp/handler/RemoteConfigTableIF.h>
|
||||||
#include <fsfw/events/EventManager.h>
|
#include <fsfw/events/EventManager.h>
|
||||||
#include <fsfw/health/HealthTable.h>
|
#include <fsfw/health/HealthTable.h>
|
||||||
#include <fsfw/internalerror/InternalErrorReporter.h>
|
#include <fsfw/internalerror/InternalErrorReporter.h>
|
||||||
|
#include <fsfw/ipc/QueueFactory.h>
|
||||||
#include <fsfw/pus/CService200ModeCommanding.h>
|
#include <fsfw/pus/CService200ModeCommanding.h>
|
||||||
#include <fsfw/pus/CService201HealthCommanding.h>
|
#include <fsfw/pus/CService201HealthCommanding.h>
|
||||||
#include <fsfw/pus/Service17Test.h>
|
#include <fsfw/pus/Service17Test.h>
|
||||||
@ -14,16 +18,17 @@
|
|||||||
#include <fsfw/pus/Service8FunctionManagement.h>
|
#include <fsfw/pus/Service8FunctionManagement.h>
|
||||||
#include <fsfw/pus/Service9TimeManagement.h>
|
#include <fsfw/pus/Service9TimeManagement.h>
|
||||||
#include <fsfw/storagemanager/PoolManager.h>
|
#include <fsfw/storagemanager/PoolManager.h>
|
||||||
#include <fsfw/tcdistribution/CCSDSDistributor.h>
|
#include <fsfw/tcdistribution/CcsdsDistributor.h>
|
||||||
#include <fsfw/tcdistribution/PusDistributor.h>
|
#include <fsfw/tcdistribution/PusDistributor.h>
|
||||||
#include <fsfw/timemanager/CdsShortTimeStamper.h>
|
#include <fsfw/timemanager/CdsShortTimeStamper.h>
|
||||||
|
#include <fsfw_hal/host/HostFilesystem.h>
|
||||||
#include <mission/tmtc/TmFunnel.h>
|
#include <mission/tmtc/TmFunnel.h>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "eive/definitions.h"
|
#include "eive/definitions.h"
|
||||||
#include "fsfw/pus/Service11TelecommandScheduling.h"
|
#include "fsfw/pus/Service11TelecommandScheduling.h"
|
||||||
|
#include "mission/cfdp/Config.h"
|
||||||
#include "objects/systemObjectList.h"
|
#include "objects/systemObjectList.h"
|
||||||
#include "tmtc/apid.h"
|
|
||||||
#include "tmtc/pusIds.h"
|
#include "tmtc/pusIds.h"
|
||||||
|
|
||||||
#if OBSW_ADD_TCPIP_BRIDGE == 1
|
#if OBSW_ADD_TCPIP_BRIDGE == 1
|
||||||
@ -46,6 +51,19 @@
|
|||||||
#define OBSW_TM_TO_PTME 0
|
#define OBSW_TM_TO_PTME 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
namespace cfdp {
|
||||||
|
|
||||||
|
PacketInfoList<64> PACKET_LIST;
|
||||||
|
LostSegmentsList<128> LOST_SEGMENTS;
|
||||||
|
EntityId REMOTE_CFDP_ID(UnsignedByteField<uint16_t>(config::EIVE_GROUND_CFDP_ENTITY_ID));
|
||||||
|
RemoteEntityCfg GROUND_REMOTE_CFG(REMOTE_CFDP_ID);
|
||||||
|
OneRemoteConfigProvider REMOTE_CFG_PROVIDER(GROUND_REMOTE_CFG);
|
||||||
|
HostFilesystem HOST_FS;
|
||||||
|
EiveUserHandler USER_HANDLER(HOST_FS);
|
||||||
|
EiveFaultHandler EIVE_FAULT_HANDLER;
|
||||||
|
|
||||||
|
} // namespace cfdp
|
||||||
|
|
||||||
void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_) {
|
void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_) {
|
||||||
// Framework objects
|
// Framework objects
|
||||||
new EventManager(objects::EVENT_MANAGER);
|
new EventManager(objects::EVENT_MANAGER);
|
||||||
@ -56,17 +74,18 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_) {
|
|||||||
new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER);
|
new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER);
|
||||||
new VerificationReporter();
|
new VerificationReporter();
|
||||||
auto* timeStamper = new CdsShortTimeStamper(objects::TIME_STAMPER);
|
auto* timeStamper = new CdsShortTimeStamper(objects::TIME_STAMPER);
|
||||||
|
StorageManagerIF* tcStore;
|
||||||
|
StorageManagerIF* tmStore;
|
||||||
{
|
{
|
||||||
PoolManager::LocalPoolConfig poolCfg = {{300, 16}, {300, 32}, {200, 64},
|
PoolManager::LocalPoolConfig poolCfg = {{200, 16}, {200, 32}, {150, 64},
|
||||||
{200, 128}, {100, 1024}, {10, 2048}};
|
{100, 128}, {100, 1024}, {100, 2048}};
|
||||||
new PoolManager(objects::TC_STORE, poolCfg);
|
tcStore = new PoolManager(objects::TC_STORE, poolCfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
PoolManager::LocalPoolConfig poolCfg = {{300, 16}, {300, 32}, {100, 64},
|
PoolManager::LocalPoolConfig poolCfg = {{300, 16}, {300, 32}, {100, 64},
|
||||||
{100, 128}, {100, 1024}, {10, 2048}};
|
{100, 128}, {100, 1024}, {100, 2048}};
|
||||||
new PoolManager(objects::TM_STORE, poolCfg);
|
tmStore = new PoolManager(objects::TM_STORE, poolCfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -75,40 +94,42 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_) {
|
|||||||
new PoolManager(objects::IPC_STORE, poolCfg);
|
new PoolManager(objects::IPC_STORE, poolCfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto* ccsdsDistrib = new CCSDSDistributor(apid::EIVE_OBSW, objects::CCSDS_PACKET_DISTRIBUTOR);
|
auto* ccsdsDistrib =
|
||||||
new PusDistributor(apid::EIVE_OBSW, objects::PUS_PACKET_DISTRIBUTOR, ccsdsDistrib);
|
new CcsdsDistributor(config::EIVE_PUS_APID, objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||||
|
new PusDistributor(config::EIVE_PUS_APID, objects::PUS_PACKET_DISTRIBUTOR, ccsdsDistrib);
|
||||||
|
|
||||||
uint8_t vc = 0;
|
uint8_t vc = 0;
|
||||||
#if OBSW_TM_TO_PTME == 1
|
#if OBSW_TM_TO_PTME == 1
|
||||||
vc = config::LIVE_TM;
|
vc = config::LIVE_TM;
|
||||||
#endif
|
#endif
|
||||||
// Every TM packet goes through this funnel
|
// Every TM packet goes through this funnel
|
||||||
new TmFunnel(objects::TM_FUNNEL, *timeStamper, 50, vc);
|
auto* funnel = new TmFunnel(objects::TM_FUNNEL, *timeStamper, 50, vc);
|
||||||
|
|
||||||
// PUS service stack
|
// PUS service stack
|
||||||
new Service1TelecommandVerification(objects::PUS_SERVICE_1_VERIFICATION, apid::EIVE_OBSW,
|
new Service1TelecommandVerification(objects::PUS_SERVICE_1_VERIFICATION, config::EIVE_PUS_APID,
|
||||||
pus::PUS_SERVICE_1, objects::TM_FUNNEL, 20);
|
pus::PUS_SERVICE_1, objects::TM_FUNNEL, 20);
|
||||||
new Service2DeviceAccess(objects::PUS_SERVICE_2_DEVICE_ACCESS, apid::EIVE_OBSW,
|
new Service2DeviceAccess(objects::PUS_SERVICE_2_DEVICE_ACCESS, config::EIVE_PUS_APID,
|
||||||
pus::PUS_SERVICE_2, 3, 10);
|
pus::PUS_SERVICE_2, 3, 10);
|
||||||
new Service3Housekeeping(objects::PUS_SERVICE_3_HOUSEKEEPING, apid::EIVE_OBSW,
|
new Service3Housekeeping(objects::PUS_SERVICE_3_HOUSEKEEPING, config::EIVE_PUS_APID,
|
||||||
pus::PUS_SERVICE_3);
|
pus::PUS_SERVICE_3);
|
||||||
new Service5EventReporting(
|
new Service5EventReporting(
|
||||||
PsbParams(objects::PUS_SERVICE_5_EVENT_REPORTING, apid::EIVE_OBSW, pus::PUS_SERVICE_5), 15,
|
PsbParams(objects::PUS_SERVICE_5_EVENT_REPORTING, config::EIVE_PUS_APID, pus::PUS_SERVICE_5),
|
||||||
45);
|
15, 45);
|
||||||
new Service8FunctionManagement(objects::PUS_SERVICE_8_FUNCTION_MGMT, apid::EIVE_OBSW,
|
new Service8FunctionManagement(objects::PUS_SERVICE_8_FUNCTION_MGMT, config::EIVE_PUS_APID,
|
||||||
pus::PUS_SERVICE_8, 16, 60);
|
pus::PUS_SERVICE_8, 16, 60);
|
||||||
new Service9TimeManagement(
|
new Service9TimeManagement(
|
||||||
PsbParams(objects::PUS_SERVICE_9_TIME_MGMT, apid::EIVE_OBSW, pus::PUS_SERVICE_9));
|
PsbParams(objects::PUS_SERVICE_9_TIME_MGMT, config::EIVE_PUS_APID, pus::PUS_SERVICE_9));
|
||||||
|
|
||||||
new Service11TelecommandScheduling<common::OBSW_MAX_SCHEDULED_TCS>(
|
new Service11TelecommandScheduling<common::OBSW_MAX_SCHEDULED_TCS>(
|
||||||
PsbParams(objects::PUS_SERVICE_11_TC_SCHEDULER, apid::EIVE_OBSW, pus::PUS_SERVICE_11),
|
PsbParams(objects::PUS_SERVICE_11_TC_SCHEDULER, config::EIVE_PUS_APID, pus::PUS_SERVICE_11),
|
||||||
ccsdsDistrib);
|
ccsdsDistrib);
|
||||||
new Service17Test(PsbParams(objects::PUS_SERVICE_17_TEST, apid::EIVE_OBSW, pus::PUS_SERVICE_17));
|
new Service17Test(
|
||||||
new Service20ParameterManagement(objects::PUS_SERVICE_20_PARAMETERS, apid::EIVE_OBSW,
|
PsbParams(objects::PUS_SERVICE_17_TEST, config::EIVE_PUS_APID, pus::PUS_SERVICE_17));
|
||||||
|
new Service20ParameterManagement(objects::PUS_SERVICE_20_PARAMETERS, config::EIVE_PUS_APID,
|
||||||
pus::PUS_SERVICE_20);
|
pus::PUS_SERVICE_20);
|
||||||
new CService200ModeCommanding(objects::PUS_SERVICE_200_MODE_MGMT, apid::EIVE_OBSW,
|
new CService200ModeCommanding(objects::PUS_SERVICE_200_MODE_MGMT, config::EIVE_PUS_APID,
|
||||||
pus::PUS_SERVICE_200, 8);
|
pus::PUS_SERVICE_200, 8);
|
||||||
new CService201HealthCommanding(objects::PUS_SERVICE_201_HEALTH, apid::EIVE_OBSW,
|
new CService201HealthCommanding(objects::PUS_SERVICE_201_HEALTH, config::EIVE_PUS_APID,
|
||||||
pus::PUS_SERVICE_201);
|
pus::PUS_SERVICE_201);
|
||||||
#if OBSW_ADD_TCPIP_BRIDGE == 1
|
#if OBSW_ADD_TCPIP_BRIDGE == 1
|
||||||
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
|
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
|
||||||
@ -120,7 +141,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_) {
|
|||||||
auto tmtcBridge = new TcpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
|
auto tmtcBridge = new TcpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||||
auto tcpServer = new TcpTmTcServer(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
|
auto tcpServer = new TcpTmTcServer(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
|
||||||
// TCP is stream based. Use packet ID as start marker when parsing for space packets
|
// TCP is stream based. Use packet ID as start marker when parsing for space packets
|
||||||
tcpServer->setSpacePacketParsingOptions({common::PUS_PACKET_ID});
|
tcpServer->setSpacePacketParsingOptions({common::PUS_PACKET_ID, common::CFDP_PACKET_ID});
|
||||||
sif::info << "Created TCP server for TMTC commanding with listener port "
|
sif::info << "Created TCP server for TMTC commanding with listener port "
|
||||||
<< tcpServer->getTcpPort() << std::endl;
|
<< tcpServer->getTcpPort() << std::endl;
|
||||||
#if OBSW_TCP_SERVER_WIRETAPPING == 1
|
#if OBSW_TCP_SERVER_WIRETAPPING == 1
|
||||||
@ -129,4 +150,25 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_) {
|
|||||||
#endif /* OBSW_USE_TMTC_TCP_BRIDGE == 0 */
|
#endif /* OBSW_USE_TMTC_TCP_BRIDGE == 0 */
|
||||||
tmtcBridge->setMaxNumberOfPacketsStored(300);
|
tmtcBridge->setMaxNumberOfPacketsStored(300);
|
||||||
#endif /* OBSW_ADD_TCPIP_BRIDGE == 1 */
|
#endif /* OBSW_ADD_TCPIP_BRIDGE == 1 */
|
||||||
|
|
||||||
|
#if OBSW_ADD_CFDP_COMPONENTS == 1
|
||||||
|
using namespace cfdp;
|
||||||
|
MessageQueueIF* cfdpMsgQueue = QueueFactory::instance()->createMessageQueue(32);
|
||||||
|
CfdpDistribCfg distribCfg(objects::CFDP_DISTRIBUTOR, *tcStore, cfdpMsgQueue);
|
||||||
|
new CfdpDistributor(distribCfg);
|
||||||
|
|
||||||
|
auto* msgQueue = QueueFactory::instance()->createMessageQueue(32);
|
||||||
|
FsfwHandlerParams params(objects::CFDP_HANDLER, HOST_FS, *funnel, *tcStore, *tmStore, *msgQueue);
|
||||||
|
cfdp::IndicationCfg indicationCfg;
|
||||||
|
UnsignedByteField<uint16_t> apid(config::EIVE_LOCAL_CFDP_ENTITY_ID);
|
||||||
|
cfdp::EntityId localId(apid);
|
||||||
|
GROUND_REMOTE_CFG.defaultChecksum = cfdp::ChecksumType::CRC_32;
|
||||||
|
CfdpHandlerCfg cfdpCfg(localId, indicationCfg, USER_HANDLER, EIVE_FAULT_HANDLER, PACKET_LIST,
|
||||||
|
LOST_SEGMENTS, REMOTE_CFG_PROVIDER);
|
||||||
|
auto* cfdpHandler = new CfdpHandler(params, cfdpCfg);
|
||||||
|
// All CFDP packets arrive wrapped inside CCSDS space packets
|
||||||
|
CcsdsDistributorIF::DestInfo info("CFDP Destination", config::EIVE_CFDP_APID,
|
||||||
|
cfdpHandler->getRequestQueue(), true);
|
||||||
|
ccsdsDistrib->registerApplication(info);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include "GomspaceDeviceHandler.h"
|
#include "GomspaceDeviceHandler.h"
|
||||||
|
|
||||||
#include <common/config/commonObjects.h>
|
|
||||||
#include <fsfw/datapool/PoolReadGuard.h>
|
#include <fsfw/datapool/PoolReadGuard.h>
|
||||||
#include <fsfw/globalfunctions/arrayprinter.h>
|
#include <fsfw/globalfunctions/arrayprinter.h>
|
||||||
|
|
||||||
@ -8,6 +7,7 @@
|
|||||||
|
|
||||||
#include "devicedefinitions/GomSpacePackets.h"
|
#include "devicedefinitions/GomSpacePackets.h"
|
||||||
#include "devicedefinitions/powerDefinitions.h"
|
#include "devicedefinitions/powerDefinitions.h"
|
||||||
|
#include "eive/objects.h"
|
||||||
|
|
||||||
using namespace GOMSPACE;
|
using namespace GOMSPACE;
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
|
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
|
||||||
|
|
||||||
#include "GomspaceDeviceHandler.h"
|
#include "GomspaceDeviceHandler.h"
|
||||||
#include "commonSubsystemIds.h"
|
#include "eive/eventSubsystemIds.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Device handler for the P60Dock. The P60Dock serves as carrier for the ACU, PDU1 and
|
* @brief Device handler for the P60Dock. The P60Dock serves as carrier for the ACU, PDU1 and
|
||||||
|
@ -492,7 +492,7 @@ void PayloadPcduHandler::checkAdcValues() {
|
|||||||
void PayloadPcduHandler::checkJsonFileInit() {
|
void PayloadPcduHandler::checkJsonFileInit() {
|
||||||
if (not jsonFileInitComplete) {
|
if (not jsonFileInitComplete) {
|
||||||
sd::SdCard activeSd = sdcMan->getActiveSdCard();
|
sd::SdCard activeSd = sdcMan->getActiveSdCard();
|
||||||
if (sdcMan->isSdCardMounted(activeSd)) {
|
if (sdcMan->isSdCardUsable(activeSd)) {
|
||||||
params.initialize(sdcMan->getCurrentMountPrefix());
|
params.initialize(sdcMan->getCurrentMountPrefix());
|
||||||
jsonFileInitComplete = true;
|
jsonFileInitComplete = true;
|
||||||
}
|
}
|
||||||
|
@ -9,12 +9,8 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#include "devices/powerSwitcherList.h"
|
#include "devices/powerSwitcherList.h"
|
||||||
#include "p60acu_hk.h"
|
#include "fsfw/platform.h"
|
||||||
#include "p60acu_param.h"
|
#include "gomspaceDefines.h"
|
||||||
#include "p60dock_hk.h"
|
|
||||||
#include "p60dock_param.h"
|
|
||||||
#include "p60pdu_hk.h"
|
|
||||||
#include "p60pdu_param.h"
|
|
||||||
|
|
||||||
namespace GOMSPACE {
|
namespace GOMSPACE {
|
||||||
|
|
||||||
@ -212,8 +208,8 @@ static const uint16_t MAX_CONFIGTABLE_ADDRESS = 408;
|
|||||||
static const uint16_t MAX_HKTABLE_ADDRESS = 187;
|
static const uint16_t MAX_HKTABLE_ADDRESS = 187;
|
||||||
// Sources:
|
// Sources:
|
||||||
// GomSpace library lib/p60-dock_client/include/gs/p60-dock/param
|
// GomSpace library lib/p60-dock_client/include/gs/p60-dock/param
|
||||||
static const uint16_t HK_TABLE_SIZE = P60DOCK_HK_SIZE;
|
static const uint16_t HK_TABLE_SIZE = gsConstants::P60DOCK_HK_SIZE;
|
||||||
static const uint16_t CONFIG_TABLE_SIZE = P60DOCK_PARAM_SIZE;
|
static const uint16_t CONFIG_TABLE_SIZE = gsConstants::P60DOCK_PARAM_SIZE;
|
||||||
static const size_t MAX_REPLY_SIZE = CONFIG_TABLE_SIZE;
|
static const size_t MAX_REPLY_SIZE = CONFIG_TABLE_SIZE;
|
||||||
static const uint16_t CAL_TABLE = 0xAE;
|
static const uint16_t CAL_TABLE = 0xAE;
|
||||||
static const uint8_t HK_TABLE_ENTRIES = 100;
|
static const uint8_t HK_TABLE_ENTRIES = 100;
|
||||||
@ -389,8 +385,8 @@ enum Ids {
|
|||||||
static const uint16_t MAX_CONFIGTABLE_ADDRESS = 316;
|
static const uint16_t MAX_CONFIGTABLE_ADDRESS = 316;
|
||||||
static const uint16_t MAX_HKTABLE_ADDRESS = 141;
|
static const uint16_t MAX_HKTABLE_ADDRESS = 141;
|
||||||
/** The size of the csp reply containing the housekeeping table data */
|
/** The size of the csp reply containing the housekeeping table data */
|
||||||
static const uint16_t HK_TABLE_SIZE = P60PDU_HK_SIZE;
|
static const uint16_t HK_TABLE_SIZE = gsConstants::P60PDU_HK_SIZE;
|
||||||
static const uint16_t CONFIG_TABLE_SIZE = P60PDU_PARAM_SIZE;
|
static const uint16_t CONFIG_TABLE_SIZE = gsConstants::P60PDU_PARAM_SIZE;
|
||||||
/** When retrieving full configuration parameter table */
|
/** When retrieving full configuration parameter table */
|
||||||
static const uint16_t MAX_REPLY_SIZE = CONFIG_TABLE_SIZE;
|
static const uint16_t MAX_REPLY_SIZE = CONFIG_TABLE_SIZE;
|
||||||
static const uint8_t HK_TABLE_ENTRIES = 73;
|
static const uint8_t HK_TABLE_ENTRIES = 73;
|
||||||
@ -658,8 +654,8 @@ enum Ids : lp_id_t {
|
|||||||
static const uint16_t MAX_CONFIGTABLE_ADDRESS = 26;
|
static const uint16_t MAX_CONFIGTABLE_ADDRESS = 26;
|
||||||
static const uint16_t MAX_HKTABLE_ADDRESS = 120;
|
static const uint16_t MAX_HKTABLE_ADDRESS = 120;
|
||||||
static const uint8_t HK_TABLE_ENTRIES = 64;
|
static const uint8_t HK_TABLE_ENTRIES = 64;
|
||||||
static const uint16_t HK_TABLE_SIZE = P60ACU_HK_SIZE;
|
static const uint16_t HK_TABLE_SIZE = gsConstants::P60ACU_HK_SIZE;
|
||||||
static const uint16_t CONFIG_TABLE_SIZE = P60ACU_PARAM_SIZE;
|
static const uint16_t CONFIG_TABLE_SIZE = gsConstants::P60ACU_PARAM_SIZE;
|
||||||
static const size_t MAX_REPLY_SIZE = HK_TABLE_SIZE;
|
static const size_t MAX_REPLY_SIZE = HK_TABLE_SIZE;
|
||||||
|
|
||||||
class CoreHk : public StaticLocalDataSet<14> {
|
class CoreHk : public StaticLocalDataSet<14> {
|
||||||
|
@ -39,7 +39,7 @@ class SpTcBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void updateSpFields() {
|
void updateSpFields() {
|
||||||
spParams.creator.setDataLen(spParams.dataFieldLen - 1);
|
spParams.creator.setDataLenField(spParams.dataFieldLen - 1);
|
||||||
spParams.creator.setPacketType(ccsds::PacketType::TC);
|
spParams.creator.setPacketType(ccsds::PacketType::TC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_SYRLINKSDEFINITIONS_H_
|
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_SYRLINKSDEFINITIONS_H_
|
||||||
#define MISSION_DEVICES_DEVICEDEFINITIONS_SYRLINKSDEFINITIONS_H_
|
#define MISSION_DEVICES_DEVICEDEFINITIONS_SYRLINKSDEFINITIONS_H_
|
||||||
|
|
||||||
#include <commonSubsystemIds.h>
|
#include "eive/eventSubsystemIds.h"
|
||||||
|
|
||||||
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
||||||
|
|
||||||
namespace syrlinks {
|
namespace syrlinks {
|
||||||
|
33
mission/devices/devicedefinitions/gomspaceDefines.h
Normal file
33
mission/devices/devicedefinitions/gomspaceDefines.h
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_GOMSPACEDEFINES_H_
|
||||||
|
#define MISSION_DEVICES_DEVICEDEFINITIONS_GOMSPACEDEFINES_H_
|
||||||
|
|
||||||
|
#include "fsfw/platform.h"
|
||||||
|
|
||||||
|
#ifdef PLATFORM_UNIX
|
||||||
|
|
||||||
|
// I really don't want to pull in all of those GomSpace headers just for 6 constants..
|
||||||
|
// Those are the headers which contain the defines which were just hardcoded below.
|
||||||
|
|
||||||
|
//#include "p60acu_hk.h"
|
||||||
|
//#include "p60acu_param.h"
|
||||||
|
//#include "p60dock_hk.h"
|
||||||
|
//#include "p60dock_param.h"
|
||||||
|
//#include "p60pdu_hk.h"
|
||||||
|
//#include "p60pdu_param.h"
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
namespace gsConstants {
|
||||||
|
|
||||||
|
static constexpr uint32_t P60DOCK_HK_SIZE = 0xBE;
|
||||||
|
static constexpr uint32_t P60DOCK_PARAM_SIZE = 0x19C;
|
||||||
|
static constexpr uint32_t P60PDU_HK_SIZE = 0x90;
|
||||||
|
static constexpr uint32_t P60PDU_PARAM_SIZE = 0x13E;
|
||||||
|
static constexpr uint32_t P60ACU_HK_SIZE = 0x7C;
|
||||||
|
static constexpr uint32_t P60ACU_PARAM_SIZE = 0x1B;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_GOMSPACEDEFINES_H_ */
|
@ -1,9 +1,10 @@
|
|||||||
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_POWERDEFINITIONS_H_
|
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_POWERDEFINITIONS_H_
|
||||||
#define MISSION_DEVICES_DEVICEDEFINITIONS_POWERDEFINITIONS_H_
|
#define MISSION_DEVICES_DEVICEDEFINITIONS_POWERDEFINITIONS_H_
|
||||||
|
|
||||||
#include <common/config/commonSubsystemIds.h>
|
|
||||||
#include <fsfw/events/Event.h>
|
#include <fsfw/events/Event.h>
|
||||||
|
|
||||||
|
#include "eive/eventSubsystemIds.h"
|
||||||
|
|
||||||
namespace power {
|
namespace power {
|
||||||
|
|
||||||
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PCDU_HANDLER;
|
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PCDU_HANDLER;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
#include "fsfw/memory/HasFileSystemIF.h"
|
#include "fsfw/filesystem/HasFileSystemIF.h"
|
||||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||||
|
|
||||||
NVMParameterBase::NVMParameterBase(std::string fullName) : fullName(fullName) {}
|
NVMParameterBase::NVMParameterBase(std::string fullName) : fullName(fullName) {}
|
||||||
|
@ -9,7 +9,7 @@ class SdCardMountedIF {
|
|||||||
public:
|
public:
|
||||||
virtual ~SdCardMountedIF(){};
|
virtual ~SdCardMountedIF(){};
|
||||||
virtual std::string getCurrentMountPrefix() const = 0;
|
virtual std::string getCurrentMountPrefix() const = 0;
|
||||||
virtual bool isSdCardMounted(sd::SdCard sdCard) = 0;
|
virtual bool isSdCardUsable(sd::SdCard sdCard) = 0;
|
||||||
virtual sd::SdCard getPreferredSdCard() const = 0;
|
virtual sd::SdCard getPreferredSdCard() const = 0;
|
||||||
virtual void setActiveSdCard(sd::SdCard sdCard) = 0;
|
virtual void setActiveSdCard(sd::SdCard sdCard) = 0;
|
||||||
virtual sd::SdCard getActiveSdCard() const = 0;
|
virtual sd::SdCard getActiveSdCard() const = 0;
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
#ifndef MISSION_SYSTEM_ACSBOARDASSEMBLY_H_
|
#ifndef MISSION_SYSTEM_ACSBOARDASSEMBLY_H_
|
||||||
#define MISSION_SYSTEM_ACSBOARDASSEMBLY_H_
|
#define MISSION_SYSTEM_ACSBOARDASSEMBLY_H_
|
||||||
|
|
||||||
#include <common/config/commonSubsystemIds.h>
|
|
||||||
#include <devices/powerSwitcherList.h>
|
#include <devices/powerSwitcherList.h>
|
||||||
#include <fsfw/objectmanager/frameworkObjects.h>
|
#include <fsfw/objectmanager/frameworkObjects.h>
|
||||||
#include <fsfw_hal/common/gpio/gpioDefinitions.h>
|
#include <fsfw_hal/common/gpio/gpioDefinitions.h>
|
||||||
|
|
||||||
#include "DualLaneAssemblyBase.h"
|
#include "DualLaneAssemblyBase.h"
|
||||||
#include "DualLanePowerStateMachine.h"
|
#include "DualLanePowerStateMachine.h"
|
||||||
|
#include "eive/eventSubsystemIds.h"
|
||||||
|
|
||||||
struct AcsBoardHelper {
|
struct AcsBoardHelper {
|
||||||
AcsBoardHelper(object_id_t mgm0Id, object_id_t mgm1Id, object_id_t mgm2Id, object_id_t mgm3Id,
|
AcsBoardHelper(object_id_t mgm0Id, object_id_t mgm1Id, object_id_t mgm2Id, object_id_t mgm3Id,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "AcsBoardFdir.h"
|
#include "AcsBoardFdir.h"
|
||||||
|
|
||||||
#include <common/config/commonObjects.h>
|
#include "eive/objects.h"
|
||||||
|
|
||||||
AcsBoardFdir::AcsBoardFdir(object_id_t sensorId)
|
AcsBoardFdir::AcsBoardFdir(object_id_t sensorId)
|
||||||
: DeviceHandlerFailureIsolation(sensorId, objects::ACS_BOARD_ASS) {}
|
: DeviceHandlerFailureIsolation(sensorId, objects::ACS_BOARD_ASS) {}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "RtdFdir.h"
|
#include "RtdFdir.h"
|
||||||
|
|
||||||
#include <common/config/commonObjects.h>
|
#include "eive/objects.h"
|
||||||
|
|
||||||
RtdFdir::RtdFdir(object_id_t sensorId)
|
RtdFdir::RtdFdir(object_id_t sensorId)
|
||||||
: DeviceHandlerFailureIsolation(sensorId, objects::TCS_BOARD_ASS) {}
|
: DeviceHandlerFailureIsolation(sensorId, objects::TCS_BOARD_ASS) {}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "SusFdir.h"
|
#include "SusFdir.h"
|
||||||
|
|
||||||
#include <common/config/commonObjects.h>
|
#include "eive/objects.h"
|
||||||
|
|
||||||
SusFdir::SusFdir(object_id_t sensorId)
|
SusFdir::SusFdir(object_id_t sensorId)
|
||||||
: DeviceHandlerFailureIsolation(sensorId, objects::SUS_BOARD_ASS) {}
|
: DeviceHandlerFailureIsolation(sensorId, objects::SUS_BOARD_ASS) {}
|
||||||
|
@ -203,9 +203,9 @@ ReturnValue_t CCSDSHandler::getParameter(uint8_t domainId, uint8_t uniqueIdentif
|
|||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t CCSDSHandler::getIdentifier() { return 0; }
|
uint32_t CCSDSHandler::getIdentifier() const { return 0; }
|
||||||
|
|
||||||
MessageQueueId_t CCSDSHandler::getRequestQueue() {
|
MessageQueueId_t CCSDSHandler::getRequestQueue() const {
|
||||||
// Forward packets directly to TC distributor
|
// Forward packets directly to TC distributor
|
||||||
return tcDistributorQueueId;
|
return tcDistributorQueueId;
|
||||||
}
|
}
|
||||||
@ -345,3 +345,5 @@ void CCSDSHandler::disableTransmit() {
|
|||||||
forwardLinkstate();
|
forwardLinkstate();
|
||||||
transmitterCountdown.setTimeout(0);
|
transmitterCountdown.setTimeout(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* CCSDSHandler::getName() const { return "CCSDS Handler"; }
|
||||||
|
@ -72,8 +72,9 @@ class CCSDSHandler : public SystemObject,
|
|||||||
ParameterWrapper* parameterWrapper, const ParameterWrapper* newValues,
|
ParameterWrapper* parameterWrapper, const ParameterWrapper* newValues,
|
||||||
uint16_t startAtIndex);
|
uint16_t startAtIndex);
|
||||||
|
|
||||||
uint16_t getIdentifier() override;
|
uint32_t getIdentifier() const override;
|
||||||
MessageQueueId_t getRequestQueue() override;
|
MessageQueueId_t getRequestQueue() const override;
|
||||||
|
const char* getName() const override;
|
||||||
|
|
||||||
virtual ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
virtual ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||||
const uint8_t* data, size_t size);
|
const uint8_t* data, size_t size);
|
||||||
|
@ -121,3 +121,5 @@ ReturnValue_t TmFunnel::initialize() {
|
|||||||
|
|
||||||
return SystemObject::initialize();
|
return SystemObject::initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* TmFunnel::getName() const { return "TM Funnel"; }
|
||||||
|
@ -28,9 +28,10 @@ class TmFunnel : public AcceptsTelemetryIF, public ExecutableObjectIF, public Sy
|
|||||||
uint8_t reportReceptionVc = 0);
|
uint8_t reportReceptionVc = 0);
|
||||||
virtual ~TmFunnel();
|
virtual ~TmFunnel();
|
||||||
|
|
||||||
virtual MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel = 0) override;
|
const char* getName() const override;
|
||||||
virtual ReturnValue_t performOperation(uint8_t operationCode = 0) override;
|
MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel = 0) override;
|
||||||
virtual ReturnValue_t initialize() override;
|
ReturnValue_t performOperation(uint8_t operationCode = 0) override;
|
||||||
|
ReturnValue_t initialize() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static object_id_t downlinkDestination;
|
static object_id_t downlinkDestination;
|
||||||
|
@ -12,6 +12,7 @@ VirtualChannel::VirtualChannel(uint8_t vcId, uint32_t tmQueueDepth, object_id_t
|
|||||||
auto mqArgs = MqArgs(ownerId, reinterpret_cast<void*>(vcId));
|
auto mqArgs = MqArgs(ownerId, reinterpret_cast<void*>(vcId));
|
||||||
tmQueue = QueueFactory::instance()->createMessageQueue(
|
tmQueue = QueueFactory::instance()->createMessageQueue(
|
||||||
tmQueueDepth, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs);
|
tmQueueDepth, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs);
|
||||||
|
vcName = "VC " + vcId;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t VirtualChannel::initialize() {
|
ReturnValue_t VirtualChannel::initialize() {
|
||||||
@ -65,3 +66,5 @@ void VirtualChannel::setPtmeObject(PtmeIF* ptme_) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void VirtualChannel::setLinkState(bool linkIsUp_) { linkIsUp = linkIsUp_; }
|
void VirtualChannel::setLinkState(bool linkIsUp_) { linkIsUp = linkIsUp_; }
|
||||||
|
|
||||||
|
const char* VirtualChannel::getName() const { return vcName.c_str(); }
|
||||||
|
@ -42,11 +42,13 @@ class VirtualChannel : public AcceptsTelemetryIF {
|
|||||||
* to ground station is down.
|
* to ground station is down.
|
||||||
*/
|
*/
|
||||||
void setLinkState(bool linkIsUp_);
|
void setLinkState(bool linkIsUp_);
|
||||||
|
const char* getName() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PtmeIF* ptme = nullptr;
|
PtmeIF* ptme = nullptr;
|
||||||
MessageQueueIF* tmQueue = nullptr;
|
MessageQueueIF* tmQueue = nullptr;
|
||||||
uint8_t vcId = 0;
|
uint8_t vcId = 0;
|
||||||
|
std::string vcName;
|
||||||
|
|
||||||
bool linkIsUp = false;
|
bool linkIsUp = false;
|
||||||
|
|
||||||
|
34
scripts/create-sw-update.sh
Executable file
34
scripts/create-sw-update.sh
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cmake --build . -j
|
||||||
|
source create-version-file.sh
|
||||||
|
|
||||||
|
if [ ! -f eive-obsw-stripped ]; then
|
||||||
|
echo "No file eive-obsw-stripped found. Please ensure you are in the "
|
||||||
|
echo "build folder and the OBSW was built properly"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f obsw_version.txt ]; then
|
||||||
|
echo "No OBSW version file found."
|
||||||
|
echo "You can use the create-version-file.sh script to create it"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir update-archive
|
||||||
|
cp eive-obsw-stripped update-archive
|
||||||
|
cp obsw_version.txt update-archive
|
||||||
|
|
||||||
|
cd update-archive
|
||||||
|
|
||||||
|
sudo chown root:root eive-obsw-stripped
|
||||||
|
sudo chown root:root obsw_version.txt
|
||||||
|
|
||||||
|
cmd="tar -cJvf eive-sw-update.tar.xz eive-obsw-stripped obsw_version.txt"
|
||||||
|
echo "Running command ${cmd} to generate compressed SW update archive."
|
||||||
|
eval ${cmd}
|
||||||
|
cp eive-sw-update.tar.xz ..
|
||||||
|
cd ..
|
||||||
|
rm -rf update-archive
|
||||||
|
|
||||||
|
echo "Generated eive-sw-update.tar.xz update archive."
|
7
scripts/create-version-file.sh
Executable file
7
scripts/create-version-file.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
obsw_version_filename="obsw_version.txt"
|
||||||
|
version_cmd="git describe --tags --always --exclude docker_*"
|
||||||
|
version_tag=$(${version_cmd})
|
||||||
|
echo "-I- Running ${version_cmd} to retrieve OBSW version and store it into ${obsw_version_filename}"
|
||||||
|
echo "-I- Detected version tag ${version_tag}"
|
||||||
|
echo ${version_tag} > ${obsw_version_filename}
|
@ -97,10 +97,12 @@ def build_cmd(args):
|
|||||||
target = f"/tmp"
|
target = f"/tmp"
|
||||||
else:
|
else:
|
||||||
target = args.target
|
target = args.target
|
||||||
|
# accepted_key_rsa_args = "-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
|
||||||
|
accepted_key_rsa_args = ""
|
||||||
if args.invert:
|
if args.invert:
|
||||||
cmd += f"{port_args} {address}:{args.source} {target}"
|
cmd += f"{port_args} {accepted_key_rsa_args} {address}:{args.source} {target}"
|
||||||
else:
|
else:
|
||||||
cmd += f"{port_args} {args.source} {address}:{target}"
|
cmd += f"{port_args} {accepted_key_rsa_args} {args.source} {address}:{target}"
|
||||||
return cmd
|
return cmd
|
||||||
|
|
||||||
|
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit debbe9813b1ff0d395cccabad84ee4afe10f64e5
|
Subproject commit a19b6599396707850a15c7b6c3d15a4884aede1e
|
@ -21,7 +21,7 @@ CoreController::CoreController() {
|
|||||||
|
|
||||||
void CoreController::performRebootFileHandling(bool recreateFile) {
|
void CoreController::performRebootFileHandling(bool recreateFile) {
|
||||||
using namespace std;
|
using namespace std;
|
||||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.pref) + REBOOT_FILE;
|
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_FILE;
|
||||||
if (not std::filesystem::exists(path) or recreateFile) {
|
if (not std::filesystem::exists(path) or recreateFile) {
|
||||||
#if OBSW_VERBOSE_LEVEL >= 1
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
sif::info << "CoreController::performRebootFileHandling: Recreating reboot file" << std::endl;
|
sif::info << "CoreController::performRebootFileHandling: Recreating reboot file" << std::endl;
|
||||||
@ -400,7 +400,7 @@ bool CoreController::parseRebootFile(std::string path, RebootFile &rf) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::resetRebootCount(xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
void CoreController::resetRebootCount(xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
||||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.pref) + REBOOT_FILE;
|
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_FILE;
|
||||||
// Disable the reboot file mechanism
|
// Disable the reboot file mechanism
|
||||||
parseRebootFile(path, rebootFile);
|
parseRebootFile(path, rebootFile);
|
||||||
if (tgtChip == xsc::ALL_CHIP and tgtCopy == xsc::ALL_COPY) {
|
if (tgtChip == xsc::ALL_CHIP and tgtCopy == xsc::ALL_COPY) {
|
||||||
@ -427,7 +427,7 @@ void CoreController::resetRebootCount(xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::rewriteRebootFile(RebootFile file) {
|
void CoreController::rewriteRebootFile(RebootFile file) {
|
||||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.pref) + REBOOT_FILE;
|
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_FILE;
|
||||||
std::ofstream rebootFile(path);
|
std::ofstream rebootFile(path);
|
||||||
if (rebootFile.is_open()) {
|
if (rebootFile.is_open()) {
|
||||||
// Initiate reboot file first. Reboot handling will be on on initialization
|
// Initiate reboot file first. Reboot handling will be on on initialization
|
||||||
@ -450,7 +450,7 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
if (size < 1) {
|
if (size < 1) {
|
||||||
return HasActionsIF::INVALID_PARAMETERS;
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
}
|
}
|
||||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.pref) + REBOOT_FILE;
|
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_FILE;
|
||||||
// Disable the reboot file mechanism
|
// Disable the reboot file mechanism
|
||||||
parseRebootFile(path, rebootFile);
|
parseRebootFile(path, rebootFile);
|
||||||
if (data[0] == 0) {
|
if (data[0] == 0) {
|
||||||
@ -490,7 +490,7 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
if (size < 1) {
|
if (size < 1) {
|
||||||
return HasActionsIF::INVALID_PARAMETERS;
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
}
|
}
|
||||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.pref) + REBOOT_FILE;
|
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_FILE;
|
||||||
// Disable the reboot file mechanism
|
// Disable the reboot file mechanism
|
||||||
parseRebootFile(path, rebootFile);
|
parseRebootFile(path, rebootFile);
|
||||||
rebootFile.maxCount = data[0];
|
rebootFile.maxCount = data[0];
|
||||||
@ -504,7 +504,7 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
void CoreController::setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
||||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.pref) + REBOOT_FILE;
|
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_FILE;
|
||||||
// Disable the reboot file mechanism
|
// Disable the reboot file mechanism
|
||||||
parseRebootFile(path, rebootFile);
|
parseRebootFile(path, rebootFile);
|
||||||
if (tgtChip == xsc::CHIP_0) {
|
if (tgtChip == xsc::CHIP_0) {
|
||||||
|
@ -66,9 +66,9 @@ class CoreController {
|
|||||||
void rewriteRebootFile(RebootFile file);
|
void rewriteRebootFile(RebootFile file);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct SdInfo {
|
struct SdFsmParams {
|
||||||
sd::SdCard pref = sd::SdCard::NONE;
|
sd::SdCard active = sd::SdCard::NONE;
|
||||||
sd::SdState prefState = sd::SdState::OFF;
|
sd::SdState activeState = sd::SdState::OFF;
|
||||||
sd::SdCard other = sd::SdCard::NONE;
|
sd::SdCard other = sd::SdCard::NONE;
|
||||||
sd::SdState otherState = sd::SdState::OFF;
|
sd::SdState otherState = sd::SdState::OFF;
|
||||||
} sdInfo;
|
} sdInfo;
|
||||||
|
Loading…
Reference in New Issue
Block a user