workarounds for MIB build
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
parent
acd365e421
commit
de856a514b
@ -38,12 +38,14 @@ if(TGT_BSP)
|
|||||||
OR TGT_BSP MATCHES "arm/beagleboneblack")
|
OR TGT_BSP MATCHES "arm/beagleboneblack")
|
||||||
option(LINUX_CROSS_COMPILE ON)
|
option(LINUX_CROSS_COMPILE ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack")
|
if(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack")
|
||||||
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" OFF)
|
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" OFF)
|
||||||
elseif(TGT_BSP MATCHES "arm/q7s")
|
elseif(TGT_BSP MATCHES "arm/q7s")
|
||||||
option(EIVE_Q7S_EM "Build configuration for the EM" OFF)
|
option(EIVE_Q7S_EM "Build configuration for the EM" OFF)
|
||||||
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" ON)
|
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(EIVE_CREATE_UNIQUE_OBSW_BIN "Append username to generated binary name"
|
option(EIVE_CREATE_UNIQUE_OBSW_BIN "Append username to generated binary name"
|
||||||
ON)
|
ON)
|
||||||
else()
|
else()
|
||||||
@ -52,6 +54,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
# Perform steps like loading toolchain files where applicable.
|
# Perform steps like loading toolchain files where applicable.
|
||||||
include(PreProjectConfig)
|
include(PreProjectConfig)
|
||||||
pre_project_config()
|
pre_project_config()
|
||||||
@ -81,6 +84,7 @@ else()
|
|||||||
CACHE STRING "Q7S FM configuration")
|
CACHE STRING "Q7S FM configuration")
|
||||||
set(INIT_VAL 1)
|
set(INIT_VAL 1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(OBSW_ADD_MGT
|
set(OBSW_ADD_MGT
|
||||||
${INIT_VAL}
|
${INIT_VAL}
|
||||||
CACHE STRING "Add MGT module")
|
CACHE STRING "Add MGT module")
|
||||||
@ -130,11 +134,13 @@ set(OBSW_ADD_RW
|
|||||||
|
|
||||||
# Version handling
|
# Version handling
|
||||||
set(GIT_VER_HANDLING_OK FALSE)
|
set(GIT_VER_HANDLING_OK FALSE)
|
||||||
|
|
||||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
|
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
|
||||||
determine_version_with_git("--exclude" "docker_*")
|
determine_version_with_git("--exclude" "docker_*")
|
||||||
set(GIT_INFO
|
set(GIT_INFO
|
||||||
${GIT_INFO}
|
${GIT_INFO}
|
||||||
CACHE STRING "Version information retrieved with git describe")
|
CACHE STRING "Version information retrieved with git describe")
|
||||||
|
|
||||||
if(GIT_INFO)
|
if(GIT_INFO)
|
||||||
set(GIT_INFO
|
set(GIT_INFO
|
||||||
${GIT_INFO}
|
${GIT_INFO}
|
||||||
@ -143,20 +149,25 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
|
|||||||
list(GET GIT_INFO 2 OBSW_VERSION_MINOR)
|
list(GET GIT_INFO 2 OBSW_VERSION_MINOR)
|
||||||
list(GET GIT_INFO 3 OBSW_VERSION_REVISION)
|
list(GET GIT_INFO 3 OBSW_VERSION_REVISION)
|
||||||
list(GET GIT_INFO 4 OBSW_VERSION_CST_GIT_SHA1)
|
list(GET GIT_INFO 4 OBSW_VERSION_CST_GIT_SHA1)
|
||||||
|
|
||||||
if(NOT OBSW_VERSION_MAJOR)
|
if(NOT OBSW_VERSION_MAJOR)
|
||||||
set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS})
|
set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT OBSW_VERSION_MINOR)
|
if(NOT OBSW_VERSION_MINOR)
|
||||||
set(FSFW_SUBVERSION ${OBSW_VERSION_MINOR_IF_GIT_FAILS})
|
set(FSFW_SUBVERSION ${OBSW_VERSION_MINOR_IF_GIT_FAILS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT OBSW_VERSION_REVISION)
|
if(NOT OBSW_VERSION_REVISION)
|
||||||
set(FSFW_REVISION ${OBSW_VERSION_REVISION_IF_GIT_FAILS})
|
set(FSFW_REVISION ${OBSW_VERSION_REVISION_IF_GIT_FAILS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(GIT_VER_HANDLING_OK TRUE)
|
set(GIT_VER_HANDLING_OK TRUE)
|
||||||
else()
|
else()
|
||||||
set(GIT_VER_HANDLING_OK FALSE)
|
set(GIT_VER_HANDLING_OK FALSE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT GIT_VER_HANDLING_OK)
|
if(NOT GIT_VER_HANDLING_OK)
|
||||||
set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS})
|
set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS})
|
||||||
set(OBSW_VERSION_MINOR ${OBSW_VERSION_MINOR_IF_GIT_FAILS})
|
set(OBSW_VERSION_MINOR ${OBSW_VERSION_MINOR_IF_GIT_FAILS})
|
||||||
@ -164,7 +175,7 @@ if(NOT GIT_VER_HANDLING_OK)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Set names and variables
|
# Set names and variables
|
||||||
set(OBSW_NAME ${CMAKE_PROJECT_NAME})
|
set(OBSW_NAME ${PROJECT_NAME})
|
||||||
set(WATCHDOG_NAME eive-watchdog)
|
set(WATCHDOG_NAME eive-watchdog)
|
||||||
set(SIMPLE_OBSW_NAME eive-simple)
|
set(SIMPLE_OBSW_NAME eive-simple)
|
||||||
set(UNITTEST_NAME eive-unittest)
|
set(UNITTEST_NAME eive-unittest)
|
||||||
@ -186,7 +197,7 @@ set(FSFW_PATH fsfw)
|
|||||||
set(TEST_PATH test)
|
set(TEST_PATH test)
|
||||||
set(UNITTEST_PATH unittest)
|
set(UNITTEST_PATH unittest)
|
||||||
set(LINUX_PATH linux)
|
set(LINUX_PATH linux)
|
||||||
set(COMMON_PATH common)
|
set(COMMON_PATH ${CMAKE_CURRENT_SOURCE_DIR}/common)
|
||||||
set(DUMMY_PATH dummies)
|
set(DUMMY_PATH dummies)
|
||||||
set(WATCHDOG_PATH watchdog)
|
set(WATCHDOG_PATH watchdog)
|
||||||
set(COMMON_CONFIG_PATH ${COMMON_PATH}/config)
|
set(COMMON_CONFIG_PATH ${COMMON_PATH}/config)
|
||||||
@ -209,16 +220,19 @@ pre_source_hw_os_config()
|
|||||||
|
|
||||||
if(TGT_BSP)
|
if(TGT_BSP)
|
||||||
set(LIBGPS_VERSION_MAJOR 3)
|
set(LIBGPS_VERSION_MAJOR 3)
|
||||||
|
|
||||||
# I assume a newer version than 3.17 will be installed on other Linux board
|
# I assume a newer version than 3.17 will be installed on other Linux board
|
||||||
# than the Q7S
|
# than the Q7S
|
||||||
set(LIBGPS_VERSION_MINOR 20)
|
set(LIBGPS_VERSION_MINOR 20)
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/q7s"
|
if(TGT_BSP MATCHES "arm/q7s"
|
||||||
OR TGT_BSP MATCHES "arm/raspberrypi"
|
OR TGT_BSP MATCHES "arm/raspberrypi"
|
||||||
OR TGT_BSP MATCHES "arm/beagleboneblack"
|
OR TGT_BSP MATCHES "arm/beagleboneblack"
|
||||||
OR TGT_BSP MATCHES "arm/egse"
|
OR TGT_BSP MATCHES "arm/egse"
|
||||||
OR TGT_BSP MATCHES "arm/te0720-1cfa")
|
OR TGT_BSP MATCHES "arm/te0720-1cfa")
|
||||||
find_library(${LIB_GPS} gps)
|
find_library(${LIB_GPS} gps)
|
||||||
set(FSFW_CONFIG_PATH "linux/fsfwconfig")
|
set(FSFW_CONFIG_PATH ${CMAKE_CURRENT_SOURCE_DIR}/linux/fsfwconfig)
|
||||||
|
|
||||||
if(NOT BUILD_Q7S_SIMPLE_MODE)
|
if(NOT BUILD_Q7S_SIMPLE_MODE)
|
||||||
set(EIVE_ADD_LINUX_FILES TRUE)
|
set(EIVE_ADD_LINUX_FILES TRUE)
|
||||||
set(ADD_CSP_LIB TRUE)
|
set(ADD_CSP_LIB TRUE)
|
||||||
@ -266,6 +280,7 @@ endif()
|
|||||||
configure_file(${COMMON_CONFIG_PATH}/commonConfig.h.in commonConfig.h)
|
configure_file(${COMMON_CONFIG_PATH}/commonConfig.h.in commonConfig.h)
|
||||||
configure_file(${FSFW_CONFIG_PATH}/FSFWConfig.h.in FSFWConfig.h)
|
configure_file(${FSFW_CONFIG_PATH}/FSFWConfig.h.in FSFWConfig.h)
|
||||||
configure_file(${BSP_PATH}/OBSWConfig.h.in OBSWConfig.h)
|
configure_file(${BSP_PATH}/OBSWConfig.h.in OBSWConfig.h)
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/q7s")
|
if(TGT_BSP MATCHES "arm/q7s")
|
||||||
configure_file(${BSP_PATH}/boardconfig/q7sConfig.h.in q7sConfig.h)
|
configure_file(${BSP_PATH}/boardconfig/q7sConfig.h.in q7sConfig.h)
|
||||||
elseif(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/egse")
|
elseif(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/egse")
|
||||||
@ -275,7 +290,8 @@ endif()
|
|||||||
configure_file(${WATCHDOG_PATH}/watchdogConf.h.in watchdogConf.h)
|
configure_file(${WATCHDOG_PATH}/watchdogConf.h.in watchdogConf.h)
|
||||||
|
|
||||||
# Set common config path for FSFW
|
# Set common config path for FSFW
|
||||||
set(FSFW_ADDITIONAL_INC_PATHS "${COMMON_PATH}/config"
|
set(FSFW_ADDITIONAL_INC_PATHS "${COMMON_PATH}"
|
||||||
|
${COMMON_CONFIG_PATH}
|
||||||
${CMAKE_CURRENT_BINARY_DIR})
|
${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
# ##############################################################################
|
# ##############################################################################
|
||||||
@ -304,11 +320,13 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|||||||
"-Wshift-overflow=2" # Search for bit left shift overflows (<c++14)
|
"-Wshift-overflow=2" # Search for bit left shift overflows (<c++14)
|
||||||
"-Wcast-qual" # Warn if the constness is cast away
|
"-Wcast-qual" # Warn if the constness is cast away
|
||||||
"-Wstringop-overflow=4"
|
"-Wstringop-overflow=4"
|
||||||
|
|
||||||
# -Wstack-protector # Emits a few false positives for low level access
|
# -Wstack-protector # Emits a few false positives for low level access
|
||||||
# -Wconversion # Creates many false positives -Warith-conversion # Use with
|
# -Wconversion # Creates many false positives -Warith-conversion # Use with
|
||||||
# Wconversion to find more implicit conversions -fanalyzer # Should be used
|
# Wconversion to find more implicit conversions -fanalyzer # Should be used
|
||||||
# to look through problems
|
# to look through problems
|
||||||
)
|
)
|
||||||
|
|
||||||
# Remove unused sections.
|
# Remove unused sections.
|
||||||
add_compile_options("-ffunction-sections" "-fdata-sections")
|
add_compile_options("-ffunction-sections" "-fdata-sections")
|
||||||
|
|
||||||
@ -324,7 +342,7 @@ add_library(${LIB_DUMMIES})
|
|||||||
|
|
||||||
# Add main executable
|
# Add main executable
|
||||||
add_executable(${OBSW_NAME})
|
add_executable(${OBSW_NAME})
|
||||||
set(OBSW_BIN_NAME ${CMAKE_PROJECT_NAME})
|
set(OBSW_BIN_NAME ${PROJECT_NAME})
|
||||||
|
|
||||||
set_target_properties(${OBSW_NAME} PROPERTIES OUTPUT_NAME ${OBSW_BIN_NAME})
|
set_target_properties(${OBSW_NAME} PROPERTIES OUTPUT_NAME ${OBSW_BIN_NAME})
|
||||||
|
|
||||||
@ -347,7 +365,6 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EIVE_ADD_ETL_LIB)
|
if(EIVE_ADD_ETL_LIB)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EIVE_ADD_JSON_LIB)
|
if(EIVE_ADD_JSON_LIB)
|
||||||
@ -360,6 +377,7 @@ if(EIVE_ADD_LINUX_FILES)
|
|||||||
add_subdirectory(${LIB_ARCSEC_PATH})
|
add_subdirectory(${LIB_ARCSEC_PATH})
|
||||||
add_subdirectory(${LINUX_PATH})
|
add_subdirectory(${LINUX_PATH})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(${BSP_PATH})
|
add_subdirectory(${BSP_PATH})
|
||||||
|
|
||||||
# TODO WIP:
|
# TODO WIP:
|
||||||
@ -382,6 +400,7 @@ add_subdirectory(${UNITTEST_PATH})
|
|||||||
# This should have already been downloaded by the FSFW Still include it to be
|
# This should have already been downloaded by the FSFW Still include it to be
|
||||||
# safe
|
# safe
|
||||||
find_package(etl ${FSFW_ETL_LIB_MAJOR_VERSION} CONFIG QUIET)
|
find_package(etl ${FSFW_ETL_LIB_MAJOR_VERSION} CONFIG QUIET)
|
||||||
|
|
||||||
# Not installed, so use FetchContent to download and provide etl
|
# Not installed, so use FetchContent to download and provide etl
|
||||||
if(NOT etl_FOUND)
|
if(NOT etl_FOUND)
|
||||||
message(
|
message(
|
||||||
@ -402,6 +421,7 @@ if(NOT (TGT_BSP MATCHES "arm/te0720-1cfa")
|
|||||||
AND NOT(TGT_BSP MATCHES "arm/raspberrypi"))
|
AND NOT(TGT_BSP MATCHES "arm/raspberrypi"))
|
||||||
# Check whether the user has already installed Catch2 first
|
# Check whether the user has already installed Catch2 first
|
||||||
find_package(Catch2 ${FSFW_CATCH2_LIB_MAJOR_VERSION} CONFIG QUIET)
|
find_package(Catch2 ${FSFW_CATCH2_LIB_MAJOR_VERSION} CONFIG QUIET)
|
||||||
|
|
||||||
# Not installed, so use FetchContent to download and provide Catch2
|
# Not installed, so use FetchContent to download and provide Catch2
|
||||||
if(NOT Catch2_FOUND)
|
if(NOT Catch2_FOUND)
|
||||||
message(
|
message(
|
||||||
@ -424,9 +444,11 @@ endif()
|
|||||||
# after their declaration
|
# after their declaration
|
||||||
if(FSFW_FETCH_CONTENT_TARGETS)
|
if(FSFW_FETCH_CONTENT_TARGETS)
|
||||||
FetchContent_MakeAvailable(${FSFW_FETCH_CONTENT_TARGETS})
|
FetchContent_MakeAvailable(${FSFW_FETCH_CONTENT_TARGETS})
|
||||||
|
|
||||||
if(TARGET etl)
|
if(TARGET etl)
|
||||||
add_library(${LIB_ETL_TARGET} ALIAS etl)
|
add_library(${LIB_ETL_TARGET} ALIAS etl)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(TARGET Catch2)
|
if(TARGET Catch2)
|
||||||
# Fixes regression -preview4, to be confirmed in later releases Related
|
# Fixes regression -preview4, to be confirmed in later releases Related
|
||||||
# GitHub issue: https://github.com/catchorg/Catch2/issues/2417
|
# GitHub issue: https://github.com/catchorg/Catch2/issues/2417
|
||||||
@ -474,6 +496,8 @@ endif()
|
|||||||
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_CXX_FS})
|
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_CXX_FS})
|
||||||
|
|
||||||
# Add include paths for all sources.
|
# Add include paths for all sources.
|
||||||
|
message(${FSFW_CONFIG_PATH})
|
||||||
|
|
||||||
target_include_directories(
|
target_include_directories(
|
||||||
${LIB_EIVE_MISSION} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${FSFW_CONFIG_PATH}
|
${LIB_EIVE_MISSION} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${FSFW_CONFIG_PATH}
|
||||||
${CMAKE_CURRENT_BINARY_DIR} ${LIB_ARCSEC_PATH})
|
${CMAKE_CURRENT_BINARY_DIR} ${LIB_ARCSEC_PATH})
|
||||||
@ -497,6 +521,7 @@ endif()
|
|||||||
|
|
||||||
if(NOT CMAKE_SIZE)
|
if(NOT CMAKE_SIZE)
|
||||||
set(CMAKE_SIZE size)
|
set(CMAKE_SIZE size)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(FILE_SUFFIX ".exe")
|
set(FILE_SUFFIX ".exe")
|
||||||
endif()
|
endif()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE FileSystemTest.cpp Q7STestTask.cpp)
|
target_sources(${OBSW_NAME} PUBLIC FileSystemTest.cpp Q7STestTask.cpp)
|
||||||
|
|
||||||
if(EIVE_BUILD_Q7S_SIMPLE_MODE)
|
if(EIVE_BUILD_Q7S_SIMPLE_MODE)
|
||||||
target_sources(${SIMPLE_OBSW_NAME} PRIVATE FileSystemTest.cpp)
|
target_sources(${SIMPLE_OBSW_NAME} PRIVATE FileSystemTest.cpp)
|
||||||
|
@ -34,114 +34,6 @@ ServiceInterfaceStream sif::error("ERROR", true, false, true);
|
|||||||
|
|
||||||
ObjectManagerIF* objectManager = nullptr;
|
ObjectManagerIF* objectManager = nullptr;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef FSFW_INTROSPECTION
|
|
||||||
void printEnum(ParameterIF* param) {
|
|
||||||
size_t i = 0;
|
|
||||||
for (auto iter : param->getEnumValues()) {
|
|
||||||
printf("---enum value %li: \"%s\"\n", iter, param->getEnumDescriptions()[i++]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*void printEnum(HousekeepingEntryIF* param) {
|
|
||||||
size_t i = 0;
|
|
||||||
for (auto iter : param->getEnumValues()) {
|
|
||||||
printf("---enum value %li: \"%s\"\n", iter, param->getEnumDescriptions()[i++]);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
void printModes(HasModesIF* object) {
|
|
||||||
const ModeHelper* modeHelper = object->getModeHelper();
|
|
||||||
|
|
||||||
auto modes = modeHelper->getModes();
|
|
||||||
|
|
||||||
for (auto mode : modes) {
|
|
||||||
auto submodes = modeHelper->getSubmodes(mode.first);
|
|
||||||
if (submodes.size() == 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
printf("-mode \"%s\" (%i) with \n", mode.second, mode.first);
|
|
||||||
for (auto submode : submodes) {
|
|
||||||
printf("--submode \"%s\" (%i)\n", submode.second, submode.first);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void printAction(HasActionsIF* actionIf) {
|
|
||||||
auto actionMap = actionIf->getActionHelper()->getActionMap();
|
|
||||||
|
|
||||||
for (auto iter = actionMap->begin(); iter != actionMap->end(); iter++) {
|
|
||||||
printf("-action \"%s\" (%i) with \n", iter->second->getName(), iter->second->getId());
|
|
||||||
auto parameterList = iter->second->getParameters();
|
|
||||||
for (ParameterIF* param : *parameterList) {
|
|
||||||
printf("--parameter \"%s\" %.3E, %.3E\n", param->getName(), param->getMinFloating(),
|
|
||||||
param->getMaxFloating());
|
|
||||||
if (param->getType() == Types::ENUM) {
|
|
||||||
printEnum(param);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
void printHousekeeping(HousekeepingIF* housekeepingIF) {
|
|
||||||
auto dataSets = housekeepingIF->getHousekeepingHelper()->getDataSets();
|
|
||||||
|
|
||||||
for (auto iter : *dataSets) {
|
|
||||||
printf("-SID \"%s\" (%i) with:\n", iter.second->getDescription(), iter.first);
|
|
||||||
for (HousekeepingEntryIF* param : *(iter.second->getVariables())) {
|
|
||||||
printf("--parameter \"%s\"\n", param->getName());
|
|
||||||
if (param->getType() == Types::ENUM) {
|
|
||||||
printEnum(param);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* getClassName(uint8_t classId) {
|
|
||||||
CLASS_ID::FwClassIds fwClassId(classId);
|
|
||||||
const char* description = fwClassId.getDescription();
|
|
||||||
if (description != nullptr) {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
return "UNKNOWN";
|
|
||||||
}
|
|
||||||
|
|
||||||
void printReturnCodes() {
|
|
||||||
puts("\nReturnvalues");
|
|
||||||
for (auto iter : ReturnValueItems::returnValues) {
|
|
||||||
uint8_t classId = iter.first >> 8;
|
|
||||||
printf("-\"%s:%s\" (%04x)\n", getClassName(classId), iter.second, iter.first);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void printEvents() {
|
|
||||||
puts("\nEvents");
|
|
||||||
for (auto iter : EventItems::events) {
|
|
||||||
uint8_t classId = iter.first >> 8;
|
|
||||||
printf("-\"%s:%s\" (%06x)\n", getClassName(classId), iter.second, iter.first);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void initmission::initMission() {
|
void initmission::initMission() {
|
||||||
sif::info << "Building global objects.." << std::endl;
|
sif::info << "Building global objects.." << std::endl;
|
||||||
try {
|
try {
|
||||||
@ -154,50 +46,6 @@ void initmission::initMission() {
|
|||||||
std::exit(1);
|
std::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FSFW_INTROSPECTION
|
|
||||||
sif::info << "Introspecting.." << std::endl;
|
|
||||||
ObjectManager::instance()->produce();
|
|
||||||
auto objectList = ObjectManager::instance()->getObjectList();
|
|
||||||
|
|
||||||
sif::info << "Looping.." << std::endl;
|
|
||||||
for (auto iter : *objectList) {
|
|
||||||
const char * name = "UNKNOWN";
|
|
||||||
objects::commonObjects commonObjectId(iter.first);
|
|
||||||
if (commonObjectId.isValid()){
|
|
||||||
name = commonObjectId.getDescription();
|
|
||||||
}
|
|
||||||
objects::systemObjects systemObject(iter.first);
|
|
||||||
if( systemObject.isValid()){
|
|
||||||
name = systemObject.getDescription();
|
|
||||||
}
|
|
||||||
printf("Object \"%s\" (0x%08x)\n", name, iter.first);
|
|
||||||
|
|
||||||
|
|
||||||
HasActionsIF* actionIf = dynamic_cast<HasActionsIF*>(iter.second);
|
|
||||||
if (actionIf != nullptr) {
|
|
||||||
printAction(actionIf);
|
|
||||||
}
|
|
||||||
|
|
||||||
HasModesIF* hasmodesIF = dynamic_cast<HasModesIF*>(iter.second);
|
|
||||||
if (hasmodesIF != nullptr) {
|
|
||||||
printModes(hasmodesIF);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
HousekeepingIF* hasHousekeeping = dynamic_cast<HousekeepingIF*>(iter.second);
|
|
||||||
if (hasHousekeeping != nullptr) {
|
|
||||||
printHousekeeping(hasHousekeeping);
|
|
||||||
}*/
|
|
||||||
}
|
|
||||||
|
|
||||||
// printReturnCodes();
|
|
||||||
|
|
||||||
// printEvents();
|
|
||||||
|
|
||||||
exit(0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
sif::info << "Initializing all objects.." << std::endl;
|
sif::info << "Initializing all objects.." << std::endl;
|
||||||
ObjectManager::instance()->initialize();
|
ObjectManager::instance()->initialize();
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#include "common/config/commonSubsystemIds.h"
|
#include <config/commonSubsystemIds.h>
|
||||||
#include "fsfw/events/fwSubsystemIdRanges.h"
|
#include "fsfw/events/fwSubsystemIdRanges.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#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 <config/commonClassIds.h>
|
||||||
#include <fsfw/returnvalues/FwClassIds.h>
|
#include <fsfw/returnvalues/FwClassIds.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user