v1.16.0 #323

Merged
muellerr merged 223 commits from develop into main 2022-11-18 14:23:24 +01:00
95 changed files with 2823 additions and 1983 deletions
Showing only changes of commit e1ed532f91 - Show all commits

View File

@ -14,6 +14,10 @@ list yields a list of all related PRs for each release.
## Added
- Regular reboot command
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/242
- Commands for individual RTD devices
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/84
- `RwAssembly` added to system components. Assembly works in principle,
issues making 4 consecutives RWs communicate at once..
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/224

View File

@ -1,12 +1,12 @@
################################################################################
# ##############################################################################
# CMake support for the EIVE OBSW
#
#
# Author: R. Mueller
################################################################################
# ##############################################################################
################################################################################
# ##############################################################################
# Pre-Project preparation
################################################################################
# ##############################################################################
cmake_minimum_required(VERSION 3.13)
set(OBSW_VERSION_MAJOR_IF_GIT_FAILS 0)
@ -15,28 +15,36 @@ set(OBSW_VERSION_REVISION_IF_GIT_FAILS 0)
# set(CMAKE_VERBOSE TRUE)
option(EIVE_HARDCODED_TOOLCHAIN_FILE "\
option(
EIVE_HARDCODED_TOOLCHAIN_FILE
"\
For Linux Board Target BSPs, a default toolchain file will be set. Should be set to OFF \
if a different toolchain file is set externally" ON
)
if a different toolchain file is set externally"
ON)
if(NOT FSFW_OSAL)
set(FSFW_OSAL linux CACHE STRING "OS for the FSFW.")
set(FSFW_OSAL
linux
CACHE STRING "OS for the FSFW.")
endif()
if(TGT_BSP)
if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack")
option(LINUX_CROSS_COMPILE ON)
endif()
if(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack")
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" OFF)
elseif(TGT_BSP MATCHES "arm/q7s")
option(EIVE_Q7S_EM "Build configuration for the EM" OFF)
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" ON)
endif()
option(EIVE_CREATE_UNIQUE_OBSW_BIN "Append username to generated binary name" ON)
if(TGT_BSP MATCHES "arm/q7s"
OR TGT_BSP MATCHES "arm/raspberrypi"
OR TGT_BSP MATCHES "arm/beagleboneblack")
option(LINUX_CROSS_COMPILE ON)
endif()
if(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack")
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" OFF)
elseif(TGT_BSP MATCHES "arm/q7s")
option(EIVE_Q7S_EM "Build configuration for the EM" OFF)
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" ON)
endif()
option(EIVE_CREATE_UNIQUE_OBSW_BIN "Append username to generated binary name"
ON)
else()
option(EIVE_CREATE_UNIQUE_OBSW_BIN "Append username to generated binary name" OFF)
option(EIVE_CREATE_UNIQUE_OBSW_BIN "Append username to generated binary name"
OFF)
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
@ -57,60 +65,96 @@ option(EIVE_ADD_ETL_LIB "Add ETL library" ON)
option(EIVE_ADD_JSON_LIB "Add JSON library" ON)
if(EIVE_Q7S_EM)
set(OBSW_Q7S_EM 1 CACHE STRING "Q7S EM configuration")
set(INIT_VAL 0)
set(OBSW_Q7S_EM
1
CACHE STRING "Q7S EM configuration")
set(INIT_VAL 0)
else()
set(OBSW_Q7S_EM 0 CACHE STRING "Q7S EM configuration")
set(INIT_VAL 1)
set(OBSW_Q7S_EM
0
CACHE STRING "Q7S EM configuration")
set(INIT_VAL 1)
endif()
set(OBSW_ADD_MGT ${INIT_VAL} CACHE STRING "Add MGT module" )
set(OBSW_ADD_BPX_BATTERY_HANDLER ${INIT_VAL} CACHE STRING "Add MGT module")
set(OBSW_ADD_STAR_TRACKER ${INIT_VAL} CACHE STRING "Add Startracker module")
set(OBSW_ADD_SUN_SENSORS ${INIT_VAL} CACHE STRING "Add sun sensor module")
set(OBSW_ADD_SUS_BOARD_ASS ${INIT_VAL} CACHE STRING "Add sun sensor board assembly")
set(OBSW_ADD_ACS_BOARD ${INIT_VAL} CACHE STRING "Add ACS board module")
set(OBSW_ADD_ACS_HANDLERS ${INIT_VAL} CACHE STRING "Add ACS handlers")
set(OBSW_ADD_RTD_DEVICES ${INIT_VAL} CACHE STRING "Add RTD devices")
set(OBSW_ADD_RAD_SENSORS ${INIT_VAL} CACHE STRING "Add Rad Sensor module")
set(OBSW_ADD_PL_PCDU ${INIT_VAL} CACHE STRING "Add Payload PCDU modukle")
set(OBSW_ADD_SYRLINKS ${INIT_VAL} CACHE STRING "Add Syrlinks module")
set(OBSW_ADD_TMP_DEVICES ${INIT_VAL} CACHE STRING "Add TMP devices")
set(OBSW_ADD_GOMSPACE_PCDU ${INIT_VAL} CACHE STRING "Add GomSpace PCDU modules")
set(OBSW_ADD_RW ${INIT_VAL} CACHE STRING "Add RW modules")
set(OBSW_ADD_MGT
${INIT_VAL}
CACHE STRING "Add MGT module")
set(OBSW_ADD_BPX_BATTERY_HANDLER
${INIT_VAL}
CACHE STRING "Add MGT module")
set(OBSW_ADD_STAR_TRACKER
${INIT_VAL}
CACHE STRING "Add Startracker module")
set(OBSW_ADD_SUN_SENSORS
${INIT_VAL}
CACHE STRING "Add sun sensor module")
set(OBSW_ADD_SUS_BOARD_ASS
${INIT_VAL}
CACHE STRING "Add sun sensor board assembly")
set(OBSW_ADD_ACS_BOARD
${INIT_VAL}
CACHE STRING "Add ACS board module")
set(OBSW_ADD_ACS_HANDLERS
${INIT_VAL}
CACHE STRING "Add ACS handlers")
set(OBSW_ADD_RTD_DEVICES
${INIT_VAL}
CACHE STRING "Add RTD devices")
set(OBSW_ADD_RAD_SENSORS
${INIT_VAL}
CACHE STRING "Add Rad Sensor module")
set(OBSW_ADD_PL_PCDU
${INIT_VAL}
CACHE STRING "Add Payload PCDU modukle")
set(OBSW_ADD_SYRLINKS
${INIT_VAL}
CACHE STRING "Add Syrlinks module")
set(OBSW_ADD_TMP_DEVICES
${INIT_VAL}
CACHE STRING "Add TMP devices")
set(OBSW_ADD_GOMSPACE_PCDU
${INIT_VAL}
CACHE STRING "Add GomSpace PCDU modules")
set(OBSW_ADD_RW
${INIT_VAL}
CACHE STRING "Add RW modules")
################################################################################
# ##############################################################################
# Pre-Sources preparation
################################################################################
# ##############################################################################
# Version handling
set(GIT_VER_HANDLING_OK FALSE)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
determine_version_with_git("--exclude" "docker_*")
set(GIT_INFO ${GIT_INFO} CACHE STRING "Version information retrieved with git describe")
if(GIT_INFO)
set(GIT_INFO ${GIT_INFO} CACHE STRING "Version information retrieved with git describe")
list(GET GIT_INFO 1 OBSW_VERSION_MAJOR)
list(GET GIT_INFO 2 OBSW_VERSION_MINOR)
list(GET GIT_INFO 3 OBSW_VERSION_REVISION)
list(GET GIT_INFO 4 OBSW_VERSION_CST_GIT_SHA1)
if(NOT OBSW_VERSION_MAJOR)
set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS})
endif()
if(NOT OBSW_VERSION_MINOR)
set(FSFW_SUBVERSION ${OBSW_VERSION_MINOR_IF_GIT_FAILS})
endif()
if(NOT OBSW_VERSION_REVISION)
set(FSFW_REVISION ${OBSW_VERSION_REVISION_IF_GIT_FAILS})
endif()
set(GIT_VER_HANDLING_OK TRUE)
else()
set(GIT_VER_HANDLING_OK FALSE)
endif()
determine_version_with_git("--exclude" "docker_*")
set(GIT_INFO
${GIT_INFO}
CACHE STRING "Version information retrieved with git describe")
if(GIT_INFO)
set(GIT_INFO
${GIT_INFO}
CACHE STRING "Version information retrieved with git describe")
list(GET GIT_INFO 1 OBSW_VERSION_MAJOR)
list(GET GIT_INFO 2 OBSW_VERSION_MINOR)
list(GET GIT_INFO 3 OBSW_VERSION_REVISION)
list(GET GIT_INFO 4 OBSW_VERSION_CST_GIT_SHA1)
if(NOT OBSW_VERSION_MAJOR)
set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS})
endif()
if(NOT OBSW_VERSION_MINOR)
set(FSFW_SUBVERSION ${OBSW_VERSION_MINOR_IF_GIT_FAILS})
endif()
if(NOT OBSW_VERSION_REVISION)
set(FSFW_REVISION ${OBSW_VERSION_REVISION_IF_GIT_FAILS})
endif()
set(GIT_VER_HANDLING_OK TRUE)
else()
set(GIT_VER_HANDLING_OK FALSE)
endif()
endif()
if(NOT GIT_VER_HANDLING_OK)
set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS})
set(OBSW_VERSION_MINOR ${OBSW_VERSION_MINOR_IF_GIT_FAILS})
set(OBSW_VERSION_REVISION ${OBSW_VERSION_REVISION_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_REVISION ${OBSW_VERSION_REVISION_IF_GIT_FAILS})
endif()
# Set names and variables
@ -156,119 +200,113 @@ set(EIVE_ADD_LINUX_FILES False)
pre_source_hw_os_config()
if(TGT_BSP)
set(LIBGPS_VERSION_MAJOR 3)
# I assume a newer version than 3.17 will be installed on other Linux board
# than the Q7S
set(LIBGPS_VERSION_MINOR 20)
if(TGT_BSP MATCHES "arm/q7s"
OR TGT_BSP MATCHES "arm/raspberrypi"
OR TGT_BSP MATCHES "arm/beagleboneblack"
OR TGT_BSP MATCHES "arm/egse"
OR TGT_BSP MATCHES "arm/te0720-1cfa")
find_library(${LIB_GPS} gps)
set(FSFW_CONFIG_PATH "linux/fsfwconfig")
if(NOT BUILD_Q7S_SIMPLE_MODE)
set(EIVE_ADD_LINUX_FILES TRUE)
set(ADD_CSP_LIB TRUE)
set(FSFW_HAL_ADD_LINUX ON)
endif()
endif()
if(TGT_BSP MATCHES "arm/raspberrypi")
# Used by configure file
set(RASPBERRY_PI ON)
set(FSFW_HAL_ADD_RASPBERRY_PI ON)
endif()
if(TGT_BSP MATCHES "arm/egse")
# Used by configure file
set(EGSE ON)
set(FSFW_HAL_LINUX_ADD_LIBGPIOD OFF)
set(OBSW_ADD_STAR_TRACKER 1)
set(OBSW_DEBUG_STARTRACKER 1)
endif()
if(TGT_BSP MATCHES "arm/beagleboneblack")
# Used by configure file
set(BEAGLEBONEBLACK ON)
endif()
if(TGT_BSP MATCHES "arm/q7s")
# Used by configure file
set(XIPHOS_Q7S ON)
set(LIBGPS_VERSION_MAJOR 3)
# I assume a newer version than 3.17 will be installed on other Linux board than the Q7S
set(LIBGPS_VERSION_MINOR 20)
if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/raspberrypi"
OR TGT_BSP MATCHES "arm/beagleboneblack" OR TGT_BSP MATCHES "arm/egse"
OR TGT_BSP MATCHES "arm/te0720-1cfa"
)
find_library(${LIB_GPS} gps)
set(FSFW_CONFIG_PATH "linux/fsfwconfig")
if(NOT BUILD_Q7S_SIMPLE_MODE)
set(EIVE_ADD_LINUX_FILES TRUE)
set(ADD_CSP_LIB TRUE)
set(FSFW_HAL_ADD_LINUX ON)
endif()
endif()
if(TGT_BSP MATCHES "arm/raspberrypi" )
# Used by configure file
set(RASPBERRY_PI ON)
set(FSFW_HAL_ADD_RASPBERRY_PI ON)
endif()
set(LIBGPS_VERSION_MINOR 17)
endif()
if(TGT_BSP MATCHES "arm/egse")
# Used by configure file
set(EGSE ON)
set(FSFW_HAL_LINUX_ADD_LIBGPIOD OFF)
set(OBSW_ADD_STAR_TRACKER 1)
set(OBSW_DEBUG_STARTRACKER 1)
endif()
if(TGT_BSP MATCHES "arm/beagleboneblack")
# Used by configure file
set(BEAGLEBONEBLACK ON)
endif()
if(TGT_BSP MATCHES "arm/q7s")
# Used by configure file
set(XIPHOS_Q7S ON)
set(LIBGPS_VERSION_MAJOR 3)
set(LIBGPS_VERSION_MINOR 17)
endif()
if(TGT_BSP MATCHES "arm/te0720-1cfa")
set(TE0720_1CFA ON)
endif()
if(TGT_BSP MATCHES "arm/te0720-1cfa")
set(TE0720_1CFA ON)
endif()
else()
# Required by FSFW library
set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig")
# Required by FSFW library
set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig")
endif()
# Configuration files
configure_file(${COMMON_CONFIG_PATH}/commonConfig.h.in commonConfig.h)
configure_file(${FSFW_CONFIG_PATH}/FSFWConfig.h.in FSFWConfig.h)
configure_file(${BSP_PATH}/OBSWConfig.h.in OBSWConfig.h)
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")
configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h)
configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h)
endif()
configure_file(${WATCHDOG_PATH}/watchdogConf.h.in watchdogConf.h)
# Set common config path for FSFW
set(FSFW_ADDITIONAL_INC_PATHS
"${COMMON_PATH}/config"
${CMAKE_CURRENT_BINARY_DIR}
)
set(FSFW_ADDITIONAL_INC_PATHS "${COMMON_PATH}/config"
${CMAKE_CURRENT_BINARY_DIR})
################################################################################
# ##############################################################################
# Executable and Sources
################################################################################
# ##############################################################################
#global compiler options need to be set before adding executables
# global compiler options need to be set before adding executables
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(
"-Wall"
"-Wextra"
"-Wimplicit-fallthrough=1"
"-Wno-unused-parameter"
"-Wno-psabi"
"-Wduplicated-cond" # check for duplicate conditions
"-Wduplicated-branches" # check for duplicate branches
"-Wlogical-op" # Search for bitwise operations instead of logical
"-Wnull-dereference" # Search for NULL dereference
"-Wundef" # Warn if undefind marcos are used
"-Wformat=2" # Format string problem detection
"-Wformat-overflow=2" # Formatting issues in printf
"-Wformat-truncation=2" # Formatting issues in printf
"-Wformat-security" # Search for dangerous printf operations
"-Wstrict-overflow=3" # Warn if integer overflows might happen
"-Warray-bounds=2" # Some array bounds violations will be found
"-Wshift-overflow=2" # Search for bit left shift overflows (<c++14)
"-Wcast-qual" # Warn if the constness is cast away
"-Wstringop-overflow=4"
# -Wstack-protector # Emits a few false positives for low level access
# -Wconversion # Creates many false positives
# -Warith-conversion # Use with Wconversion to find more implicit conversions
# -fanalyzer # Should be used to look through problems
)
# Remove unused sections.
add_compile_options(
"-ffunction-sections"
"-fdata-sections"
)
add_compile_options(
"-Wall"
"-Wextra"
"-Wimplicit-fallthrough=1"
"-Wno-unused-parameter"
"-Wno-psabi"
"-Wduplicated-cond" # check for duplicate conditions
"-Wduplicated-branches" # check for duplicate branches
"-Wlogical-op" # Search for bitwise operations instead of logical
"-Wnull-dereference" # Search for NULL dereference
"-Wundef" # Warn if undefind marcos are used
"-Wformat=2" # Format string problem detection
"-Wformat-overflow=2" # Formatting issues in printf
"-Wformat-truncation=2" # Formatting issues in printf
"-Wformat-security" # Search for dangerous printf operations
"-Wstrict-overflow=3" # Warn if integer overflows might happen
"-Warray-bounds=2" # Some array bounds violations will be found
"-Wshift-overflow=2" # Search for bit left shift overflows (<c++14)
"-Wcast-qual" # Warn if the constness is cast away
"-Wstringop-overflow=4"
# -Wstack-protector # Emits a few false positives for low level access
# -Wconversion # Creates many false positives -Warith-conversion # Use with
# Wconversion to find more implicit conversions -fanalyzer # Should be used
# to look through problems
)
# Remove unused sections.
add_compile_options("-ffunction-sections" "-fdata-sections")
# Removed unused sections.
add_link_options(
"-Wl,--gc-sections"
)
# Removed unused sections.
add_link_options("-Wl,--gc-sections")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(COMPILER_FLAGS "/permissive-")
set(COMPILER_FLAGS "/permissive-")
endif()
add_library(${LIB_EIVE_MISSION})
@ -281,42 +319,39 @@ set_target_properties(${OBSW_NAME} PROPERTIES OUTPUT_NAME ${OBSW_BIN_NAME})
# Watchdog
if(TGT_BSP MATCHES "arm/q7s")
add_executable(${WATCHDOG_NAME})
add_executable(${WATCHDOG_NAME})
else()
add_executable(${WATCHDOG_NAME} EXCLUDE_FROM_ALL)
add_executable(${WATCHDOG_NAME} EXCLUDE_FROM_ALL)
endif()
add_subdirectory(${WATCHDOG_PATH})
target_link_libraries(${WATCHDOG_NAME} PUBLIC
${LIB_CXX_FS}
)
target_include_directories(${WATCHDOG_NAME} PUBLIC
${CMAKE_BINARY_DIR}
)
add_subdirectory(${WATCHDOG_PATH})
target_link_libraries(${WATCHDOG_NAME} PUBLIC ${LIB_CXX_FS})
target_include_directories(${WATCHDOG_NAME} PUBLIC ${CMAKE_BINARY_DIR})
# unittests
if(NOT TGT_BSP)
add_executable(${UNITTEST_NAME})
add_executable(${UNITTEST_NAME})
else()
add_executable(${UNITTEST_NAME} EXCLUDE_FROM_ALL)
add_executable(${UNITTEST_NAME} EXCLUDE_FROM_ALL)
endif()
if(EIVE_ADD_ETL_LIB)
endif()
if(EIVE_ADD_JSON_LIB)
add_subdirectory(${LIB_JSON_PATH})
add_subdirectory(${LIB_JSON_PATH})
endif()
add_subdirectory(thirdparty/rapidcsv)
if(EIVE_ADD_LINUX_FILES)
add_subdirectory(${LIB_ARCSEC_PATH})
add_subdirectory(${LINUX_PATH})
add_subdirectory(${LIB_ARCSEC_PATH})
add_subdirectory(${LINUX_PATH})
endif()
add_subdirectory(${BSP_PATH})
if(ADD_CSP_LIB)
add_subdirectory(${LIB_CSP_PATH})
add_subdirectory(${LIB_CSP_PATH})
endif()
add_subdirectory(${COMMON_PATH})
@ -328,175 +363,144 @@ add_subdirectory(${TEST_PATH})
add_subdirectory(${UNITTEST_PATH})
# This should have already been downloaded by the FSFW
# Still include it to be safe
# This should have already been downloaded by the FSFW Still include it to be
# safe
find_package(etl ${FSFW_ETL_LIB_MAJOR_VERSION} CONFIG QUIET)
# Not installed, so use FetchContent to download and provide etl
if(NOT etl_FOUND)
message(STATUS
"No ETL installation was found with find_package. Installing and providing "
"etl with FindPackage"
)
include(FetchContent)
FetchContent_Declare(
etl
GIT_REPOSITORY https://github.com/ETLCPP/etl
GIT_TAG ${FSFW_ETL_LIB_VERSION}
)
list(APPEND FSFW_FETCH_CONTENT_TARGETS etl)
message(
STATUS
"No ETL installation was found with find_package. Installing and providing "
"etl with FindPackage")
include(FetchContent)
FetchContent_Declare(
etl
GIT_REPOSITORY https://github.com/ETLCPP/etl
GIT_TAG ${FSFW_ETL_LIB_VERSION})
list(APPEND FSFW_FETCH_CONTENT_TARGETS etl)
endif()
# Use same Catch2 version as framework
if (NOT(TGT_BSP MATCHES "arm/te0720-1cfa") AND NOT(TGT_BSP MATCHES "arm/q7s")
AND NOT (TGT_BSP MATCHES "arm/raspberrypi"))
# Check whether the user has already installed Catch2 first
find_package(Catch2 ${FSFW_CATCH2_LIB_MAJOR_VERSION} CONFIG QUIET)
# Not installed, so use FetchContent to download and provide Catch2
if(NOT Catch2_FOUND)
message(STATUS "${MSG_PREFIX} Catch2 installation not found. Downloading Catch2 library with FetchContent")
include(FetchContent)
if(NOT (TGT_BSP MATCHES "arm/te0720-1cfa")
AND NOT (TGT_BSP MATCHES "arm/q7s")
AND NOT (TGT_BSP MATCHES "arm/raspberrypi"))
# Check whether the user has already installed Catch2 first
find_package(Catch2 ${FSFW_CATCH2_LIB_MAJOR_VERSION} CONFIG QUIET)
# Not installed, so use FetchContent to download and provide Catch2
if(NOT Catch2_FOUND)
message(
STATUS
"${MSG_PREFIX} Catch2 installation not found. Downloading Catch2 library with FetchContent"
)
include(FetchContent)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG ${FSFW_CATCH2_LIB_VERSION}
)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG ${FSFW_CATCH2_LIB_VERSION})
list(APPEND FSFW_FETCH_CONTENT_TARGETS Catch2)
endif()
list(APPEND FSFW_FETCH_CONTENT_TARGETS Catch2)
endif()
endif()
# The documentation for FetchContent recommends declaring all the dependencies
# before making them available. We make all declared dependency available here
# after their declaration
if(FSFW_FETCH_CONTENT_TARGETS)
FetchContent_MakeAvailable(${FSFW_FETCH_CONTENT_TARGETS})
if(TARGET etl)
add_library(${LIB_ETL_TARGET} ALIAS etl)
endif()
if(TARGET Catch2)
# Fixes regression -preview4, to be confirmed in later releases
# Related GitHub issue: https://github.com/catchorg/Catch2/issues/2417
set_target_properties(Catch2 PROPERTIES DEBUG_POSTFIX "")
set_target_properties(Catch2 PROPERTIES EXCLUDE_FROM_ALL "true")
set_target_properties(Catch2WithMain PROPERTIES EXCLUDE_FROM_ALL "true")
endif()
FetchContent_MakeAvailable(${FSFW_FETCH_CONTENT_TARGETS})
if(TARGET etl)
add_library(${LIB_ETL_TARGET} ALIAS etl)
endif()
if(TARGET Catch2)
# Fixes regression -preview4, to be confirmed in later releases Related
# GitHub issue: https://github.com/catchorg/Catch2/issues/2417
set_target_properties(Catch2 PROPERTIES DEBUG_POSTFIX "")
set_target_properties(Catch2 PROPERTIES EXCLUDE_FROM_ALL "true")
set_target_properties(Catch2WithMain PROPERTIES EXCLUDE_FROM_ALL "true")
endif()
endif()
################################################################################
# ##############################################################################
# Post-Sources preparation
################################################################################
# ##############################################################################
# Add libraries
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
${LIB_FSFW_NAME}
${LIB_LWGPS_NAME}
${LIB_OS_NAME}
)
target_link_libraries(${LIB_EIVE_MISSION}
PUBLIC ${LIB_FSFW_NAME} ${LIB_LWGPS_NAME} ${LIB_OS_NAME})
target_link_libraries(${OBSW_NAME} PRIVATE
${LIB_EIVE_MISSION}
)
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_EIVE_MISSION})
if(TGT_BSP MATCHES "arm/q7s")
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
${LIB_GPS}
${LIB_ARCSEC}
)
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_GPS} ${LIB_ARCSEC})
endif()
target_link_libraries(${UNITTEST_NAME} PRIVATE
Catch2
${LIB_EIVE_MISSION}
rapidcsv
)
target_link_libraries(${UNITTEST_NAME} PRIVATE Catch2 ${LIB_EIVE_MISSION}
rapidcsv)
if(TGT_BSP MATCHES "arm/egse")
target_link_libraries(${OBSW_NAME} PRIVATE
${LIB_ARCSEC}
)
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_ARCSEC})
endif()
if(ADD_CSP_LIB)
target_link_libraries(${OBSW_NAME} PRIVATE
${LIB_CSP_NAME}
)
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_CSP_NAME})
endif()
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})
endif()
if(EIVE_ADD_JSON_LIB)
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
${LIB_JSON_NAME}
)
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_JSON_NAME})
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.
target_include_directories(${LIB_EIVE_MISSION} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${FSFW_CONFIG_PATH}
${CMAKE_CURRENT_BINARY_DIR}
${LIB_ARCSEC_PATH}
)
target_include_directories(
${LIB_EIVE_MISSION} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${FSFW_CONFIG_PATH}
${CMAKE_CURRENT_BINARY_DIR} ${LIB_ARCSEC_PATH})
if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/egse")
target_include_directories(${LIB_EIVE_MISSION} PUBLIC
${ARCSEC_LIB_PATH}
)
target_include_directories(${LIB_EIVE_MISSION} PUBLIC ${ARCSEC_LIB_PATH})
endif()
if(CMAKE_VERBOSE)
message(STATUS "Warning flags: ${WARNING_FLAGS}")
message(STATUS "Warning flags: ${WARNING_FLAGS}")
endif()
if(CMAKE_CROSSCOMPILING)
include (HardwareOsPostConfig)
post_source_hw_os_config()
include(HardwareOsPostConfig)
post_source_hw_os_config()
endif()
if(NOT CMAKE_SIZE)
set(CMAKE_SIZE size)
if(WIN32)
set(FILE_SUFFIX ".exe")
endif()
set(CMAKE_SIZE size)
if(WIN32)
set(FILE_SUFFIX ".exe")
endif()
endif()
if(EIVE_BUILD_WATCHDOG)
set(TARGET_STRING "OBSW Watchdog")
set(TARGET_STRING "OBSW Watchdog")
else()
if(TGT_BSP)
set(TARGET_STRING "Target BSP: ${TGT_BSP}")
else()
set(TARGET_STRING "Target BSP: Hosted")
endif()
if(TGT_BSP)
set(TARGET_STRING "Target BSP: ${TGT_BSP}")
else()
set(TARGET_STRING "Target BSP: Hosted")
endif()
endif()
install(TARGETS ${OBSW_NAME} RUNTIME DESTINATION bin)
string(CONCAT POST_BUILD_COMMENT
"Build directory: ${CMAKE_BINARY_DIR}\n"
"Target OSAL: ${FSFW_OSAL}\n"
"Target Build Type: ${CMAKE_BUILD_TYPE}\n"
"${TARGET_STRING}"
)
string(CONCAT POST_BUILD_COMMENT "Build directory: ${CMAKE_BINARY_DIR}\n"
"Target OSAL: ${FSFW_OSAL}\n"
"Target Build Type: ${CMAKE_BUILD_TYPE}\n" "${TARGET_STRING}")
add_custom_command(
TARGET ${OBSW_NAME}
POST_BUILD
COMMAND ${CMAKE_SIZE} ${OBSW_BIN_NAME}${FILE_SUFFIX}
COMMENT ${POST_BUILD_COMMENT}
)
TARGET ${OBSW_NAME}
POST_BUILD
COMMAND ${CMAKE_SIZE} ${OBSW_BIN_NAME}${FILE_SUFFIX}
COMMENT ${POST_BUILD_COMMENT})
include (BuildType)
include(BuildType)
set_build_type()

View File

@ -1,7 +1,3 @@
target_sources(${OBSW_NAME} PUBLIC
InitMission.cpp
main.cpp
ObjectFactory.cpp
)
target_sources(${OBSW_NAME} PUBLIC InitMission.cpp main.cpp ObjectFactory.cpp)
add_subdirectory(boardconfig)

View File

@ -1,7 +1,3 @@
target_sources(${OBSW_NAME} PRIVATE
print.c
)
target_sources(${OBSW_NAME} PRIVATE print.c)
target_include_directories(${OBSW_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -1,8 +1,4 @@
target_sources(${OBSW_NAME} PUBLIC
InitMission.cpp
main.cpp
ObjectFactory.cpp
)
target_sources(${OBSW_NAME} PUBLIC InitMission.cpp main.cpp ObjectFactory.cpp)
add_subdirectory(fsfwconfig)
add_subdirectory(boardconfig)

View File

@ -1,10 +1,3 @@
target_sources(${OBSW_NAME} PRIVATE
print.c
)
target_include_directories(${OBSW_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_sources(${OBSW_NAME} PRIVATE print.c)
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -1,8 +1 @@
target_sources(${TARGET_NAME} PUBLIC
ArduinoComIF.cpp
ArduinoCookie.cpp
)
target_sources(${TARGET_NAME} PUBLIC ArduinoComIF.cpp ArduinoCookie.cpp)

View File

@ -1,27 +1,15 @@
target_sources(${OBSW_NAME} PRIVATE
ipc/MissionMessageTypes.cpp
)
target_sources(${OBSW_NAME} PRIVATE ipc/MissionMessageTypes.cpp)
target_include_directories(${OBSW_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
# If a special translation file for object IDs exists, compile it.
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp")
target_sources(${OBSW_NAME} PRIVATE
objects/translateObjects.cpp
)
target_sources(${UNITTEST_NAME} PRIVATE
objects/translateObjects.cpp
)
target_sources(${OBSW_NAME} PRIVATE objects/translateObjects.cpp)
target_sources(${UNITTEST_NAME} PRIVATE objects/translateObjects.cpp)
endif()
# If a special translation file for events exists, compile it.
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp")
target_sources(${OBSW_NAME} PRIVATE
events/translateEvents.cpp
)
target_sources(${UNITTEST_NAME} PRIVATE
events/translateEvents.cpp
)
target_sources(${OBSW_NAME} PRIVATE events/translateEvents.cpp)
target_sources(${UNITTEST_NAME} PRIVATE events/translateEvents.cpp)
endif()

View File

@ -1,9 +1,5 @@
target_sources(${OBSW_NAME} PUBLIC
InitMission.cpp
main.cpp
gpioInit.cpp
ObjectFactory.cpp
)
target_sources(${OBSW_NAME} PUBLIC InitMission.cpp main.cpp gpioInit.cpp
ObjectFactory.cpp)
add_subdirectory(boardconfig)
add_subdirectory(boardtest)

View File

@ -1,7 +1,3 @@
target_sources(${OBSW_NAME} PRIVATE
print.c
)
target_sources(${OBSW_NAME} PRIVATE print.c)
target_include_directories(${OBSW_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -1,6 +1 @@
target_sources(${OBSW_NAME} PRIVATE
)
target_sources(${OBSW_NAME} PRIVATE)

View File

@ -1,20 +1,13 @@
#simple mode
# simple mode
add_executable(${SIMPLE_OBSW_NAME} EXCLUDE_FROM_ALL)
target_compile_definitions(${SIMPLE_OBSW_NAME} PRIVATE "Q7S_SIMPLE_MODE")
target_sources(${SIMPLE_OBSW_NAME} PUBLIC
main.cpp
)
#I think this is unintentional? (produces linker errors for stuff in /linux)
target_link_libraries(${SIMPLE_OBSW_NAME} PUBLIC
${LIB_FSFW_NAME}
)
target_sources(${SIMPLE_OBSW_NAME} PUBLIC main.cpp)
# I think this is unintentional? (produces linker errors for stuff in /linux)
target_link_libraries(${SIMPLE_OBSW_NAME} PUBLIC ${LIB_FSFW_NAME})
target_compile_definitions(${SIMPLE_OBSW_NAME} PRIVATE "Q7S_SIMPLE_MODE")
add_subdirectory(simple)
target_sources(${OBSW_NAME} PUBLIC
main.cpp
obsw.cpp
)
target_sources(${OBSW_NAME} PUBLIC main.cpp obsw.cpp)
add_subdirectory(boardtest)
@ -23,11 +16,9 @@ add_subdirectory(comIF)
add_subdirectory(core)
if(EIVE_Q7S_EM)
add_subdirectory(em)
add_subdirectory(em)
else()
target_sources(${OBSW_NAME} PUBLIC
fmObjectFactory.cpp
)
target_sources(${OBSW_NAME} PUBLIC fmObjectFactory.cpp)
endif()
add_subdirectory(memory)

View File

@ -1,12 +1,5 @@
target_sources(${OBSW_NAME} PRIVATE
print.c
)
target_sources(${OBSW_NAME} PRIVATE print.c)
target_sources(${SIMPLE_OBSW_NAME} PRIVATE
print.c
)
target_sources(${SIMPLE_OBSW_NAME} PRIVATE print.c)
target_include_directories(${OBSW_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -4,6 +4,8 @@
namespace q7s {
static constexpr char SPI_DEFAULT_DEV[] = "/dev/spi-main";
static constexpr uint32_t SPI_MAIN_BUS_LOCK_TIMEOUT = 50;
static constexpr char SPI_RW_DEV[] = "/dev/spi-rw";
static constexpr char I2C_DEFAULT_DEV[] = "/dev/i2c-eive";

View File

@ -1,10 +1,5 @@
target_sources(${OBSW_NAME} PRIVATE
FileSystemTest.cpp
Q7STestTask.cpp
)
target_sources(${OBSW_NAME} PRIVATE FileSystemTest.cpp Q7STestTask.cpp)
if(EIVE_BUILD_Q7S_SIMPLE_MODE)
target_sources(${SIMPLE_OBSW_NAME} PRIVATE
FileSystemTest.cpp
)
endif()
target_sources(${SIMPLE_OBSW_NAME} PRIVATE FileSystemTest.cpp)
endif()

View File

@ -1,6 +1,2 @@
target_sources(${OBSW_NAME} PRIVATE
rwSpiCallback.cpp
gnssCallback.cpp
pcduSwitchCb.cpp
q7sGpioCallbacks.cpp
)
target_sources(${OBSW_NAME} PRIVATE rwSpiCallback.cpp gnssCallback.cpp
pcduSwitchCb.cpp q7sGpioCallbacks.cpp)

View File

@ -44,7 +44,8 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
GpioIF* gpioIF = comIf->getGpioInterface();
MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING;
uint32_t timeoutMs = 0;
MutexIF* mutex = comIf->getMutex(&timeoutType, &timeoutMs);
MutexIF* mutex = comIf->getCsMutex();
cookie->getMutexParams(timeoutType, timeoutMs);
if (mutex == nullptr or gpioIF == nullptr) {
sif::debug << "rwSpiCallback::spiCallback: Mutex or GPIO interface invalid" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED;

View File

@ -1,6 +1 @@
target_sources(${OBSW_NAME} PRIVATE
)
target_sources(${OBSW_NAME} PRIVATE)

View File

@ -1,9 +1,4 @@
target_sources(${OBSW_NAME} PRIVATE
CoreController.cpp
InitMission.cpp
ObjectFactory.cpp
)
target_sources(${OBSW_NAME} PRIVATE CoreController.cpp InitMission.cpp
ObjectFactory.cpp)
target_sources(${SIMPLE_OBSW_NAME} PRIVATE
InitMission.cpp
)
target_sources(${SIMPLE_OBSW_NAME} PRIVATE InitMission.cpp)

View File

@ -87,6 +87,7 @@ ReturnValue_t CoreController::initializeLocalDataPool(localpool::DataPool &local
localDataPoolMap.emplace(core::TEMPERATURE, new PoolEntry<float>({0}));
localDataPoolMap.emplace(core::PS_VOLTAGE, new PoolEntry<float>({0}));
localDataPoolMap.emplace(core::PL_VOLTAGE, new PoolEntry<float>({0}));
poolManager.subscribeForPeriodicPacket(hkSet.getSid(), false, 10.0, false);
return HasReturnvaluesIF::RETURN_OK;
}
@ -211,8 +212,13 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
rewriteRebootFile(rebootFile);
return HasActionsIF::EXECUTION_FINISHED;
}
case (XSC_REBOOT_OBC): {
// Warning: This function will never return, because it reboots the system
return actionXscReboot(data, size);
}
case (REBOOT_OBC): {
return actionPerformReboot(data, size);
// Warning: This function will never return, because it reboots the system
return actionReboot(data, size);
}
default: {
return HasActionsIF::INVALID_ACTION_ID;
@ -844,25 +850,18 @@ void CoreController::initPrint() {
#endif
}
ReturnValue_t CoreController::actionPerformReboot(const uint8_t *data, size_t size) {
ReturnValue_t CoreController::actionXscReboot(const uint8_t *data, size_t size) {
if (size < 1) {
return HasActionsIF::INVALID_PARAMETERS;
}
bool rebootSameBootCopy = data[0];
bool protOpPerformed;
bool protOpPerformed = false;
SdCardManager::instance()->setBlocking(true);
if (rebootSameBootCopy) {
#if OBSW_VERBOSE_LEVEL >= 1
sif::info << "CoreController::actionPerformReboot: Rebooting on current image" << std::endl;
#endif
// Attempt graceful shutdown by unmounting and switching off SD cards
SdCardManager::instance()->switchOffSdCard(sd::SdCard::SLOT_0);
SdCardManager::instance()->switchOffSdCard(sd::SdCard::SLOT_1);
// If any boot copies are unprotected
ReturnValue_t retval = setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, true,
protOpPerformed, false);
if (retval == HasReturnvaluesIF::RETURN_OK and protOpPerformed) {
sif::info << "Running slot was writeprotected before reboot" << std::endl;
}
gracefulShutdownTasks(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, protOpPerformed);
int result = std::system("xsc_boot_copy -r");
if (result != 0) {
utility::handleSystemError(result, "CoreController::executeAction");
@ -884,12 +883,8 @@ ReturnValue_t CoreController::actionPerformReboot(const uint8_t *data, size_t si
auto tgtChip = static_cast<xsc::Chip>(data[1]);
auto tgtCopy = static_cast<xsc::Copy>(data[2]);
ReturnValue_t retval =
setBootCopyProtection(static_cast<xsc::Chip>(data[1]), static_cast<xsc::Copy>(data[2]), true,
protOpPerformed, false);
if (retval == HasReturnvaluesIF::RETURN_OK and protOpPerformed) {
sif::info << "Target slot was writeprotected before reboot" << std::endl;
}
// This function can not really fail
gracefulShutdownTasks(tgtChip, tgtCopy, protOpPerformed);
switch (tgtChip) {
case (xsc::Chip::CHIP_0): {
@ -930,6 +925,30 @@ ReturnValue_t CoreController::actionPerformReboot(const uint8_t *data, size_t si
return HasReturnvaluesIF::RETURN_FAILED;
}
ReturnValue_t CoreController::actionReboot(const uint8_t *data, size_t size) {
bool protOpPerformed = false;
gracefulShutdownTasks(xsc::Chip::CHIP_0, xsc::Copy::COPY_0, protOpPerformed);
std::system("reboot");
return RETURN_OK;
}
ReturnValue_t CoreController::gracefulShutdownTasks(xsc::Chip chip, xsc::Copy copy,
bool &protOpPerformed) {
sdcMan->setBlocking(true);
// Attempt graceful shutdown by unmounting and switching off SD cards
sdcMan->switchOffSdCard(sd::SdCard::SLOT_0);
sdcMan->switchOffSdCard(sd::SdCard::SLOT_1);
// If any boot copies are unprotected
ReturnValue_t result = setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, true,
protOpPerformed, false);
if (result == HasReturnvaluesIF::RETURN_OK and protOpPerformed) {
// TODO: Would be nice to notify operator. But we can't use the filesystem anymore
// and a reboot is imminent. Use scratch buffer?
sif::info << "Running slot was writeprotected before reboot" << std::endl;
}
return result;
}
CoreController::~CoreController() {}
void CoreController::determinePreferredSdCard() {

View File

@ -67,8 +67,11 @@ class CoreController : public ExtendedControllerBase {
static constexpr ActionId_t SWITCH_IMG_LOCK = 7;
static constexpr ActionId_t SET_MAX_REBOOT_CNT = 8;
static constexpr ActionId_t REBOOT_OBC = 32;
//! Reboot using the xsc_boot_copy command
static constexpr ActionId_t XSC_REBOOT_OBC = 32;
static constexpr ActionId_t MOUNT_OTHER_COPY = 33;
//! Reboot using the reboot command
static constexpr ActionId_t REBOOT_OBC = 34;
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::CORE;
@ -221,7 +224,10 @@ class CoreController : public ExtendedControllerBase {
ReturnValue_t actionListDirectoryIntoFile(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size);
ReturnValue_t actionPerformReboot(const uint8_t* data, size_t size);
ReturnValue_t actionXscReboot(const uint8_t* data, size_t size);
ReturnValue_t actionReboot(const uint8_t* data, size_t size);
ReturnValue_t gracefulShutdownTasks(xsc::Chip chip, xsc::Copy copy, bool& protOpPerformed);
void performWatchdogControlOperation();

View File

@ -1,5 +1,7 @@
#include "bsp_q7s/core/InitMission.h"
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
#include <iostream>
#include <vector>
@ -13,6 +15,7 @@
#include "fsfw/tasks/FixedTimeslotTaskIF.h"
#include "fsfw/tasks/PeriodicTaskIF.h"
#include "fsfw/tasks/TaskFactory.h"
#include "mission/devices/devicedefinitions/Max31865Definitions.h"
#include "mission/utility/InitMission.h"
#include "pollingsequence/pollingSequenceFactory.h"
@ -122,16 +125,17 @@ void initmission::initTasks() {
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
#if OBSW_ADD_ACS_HANDLERS == 1
PeriodicTaskIF* gpsTask = factory->createPeriodicTask(
"ACS_CTRL", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
result = gpsTask->addComponent(objects::GPS_CONTROLLER);
PeriodicTaskIF* acsTask = factory->createPeriodicTask(
"ACS_TASK", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
result = acsTask->addComponent(objects::GPS_CONTROLLER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("GPS_CTRL", objects::GPS_CONTROLLER);
}
#endif /* OBSW_ADD_ACS_HANDLERS */
PeriodicTaskIF* sysTask = factory->createPeriodicTask(
"SYS_TASK", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
"SYS_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
static_cast<void>(sysTask);
#if OBSW_ADD_ACS_HANDLERS == 1
result = sysTask->addComponent(objects::ACS_BOARD_ASS);
if (result != HasReturnvaluesIF::RETURN_OK) {
@ -144,23 +148,57 @@ void initmission::initTasks() {
initmission::printAddObjectError("RW_ASS", objects::RW_ASS);
}
#endif
#if OBSW_ADD_SUS_BOARD_ASS == 1
result = sysTask->addComponent(objects::SUS_BOARD_ASS);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("SUS_BOARD_ASS", objects::SUS_BOARD_ASS);
}
#endif
#if OBSW_ADD_RTD_DEVICES == 1
result = sysTask->addComponent(objects::TCS_BOARD_ASS);
PeriodicTaskIF* tcsPollingTask = factory->createPeriodicTask(
"TCS_POLLING_TASK", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.5, missedDeadlineFunc);
result = tcsPollingTask->addComponent(objects::SPI_RTD_COM_IF);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("TCS_BOARD_ASS", objects::TCS_BOARD_ASS);
initmission::printAddObjectError("SPI_RTD_POLLING", objects::SPI_RTD_COM_IF);
}
<<<<<<< HEAD
result = sysTask->addComponent(objects::ACS_SUBSYSTEM);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("ACS_SUBSYSTEM", objects::ACS_SUBSYSTEM);
}
#endif /* OBSW_ADD_RTD_DEVICES == 1 */
=======
PeriodicTaskIF* tcsTask = factory->createPeriodicTask(
"TCS_TASK", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
std::array<object_id_t, EiveMax31855::NUM_RTDS> rtdIds = {
objects::RTD_0_IC3_PLOC_HEATSPREADER,
objects::RTD_1_IC4_PLOC_MISSIONBOARD,
objects::RTD_2_IC5_4K_CAMERA,
objects::RTD_3_IC6_DAC_HEATSPREADER,
objects::RTD_4_IC7_STARTRACKER,
objects::RTD_5_IC8_RW1_MX_MY,
objects::RTD_6_IC9_DRO,
objects::RTD_7_IC10_SCEX,
objects::RTD_8_IC11_X8,
objects::RTD_9_IC12_HPA,
objects::RTD_10_IC13_PL_TX,
objects::RTD_11_IC14_MPA,
objects::RTD_12_IC15_ACU,
objects::RTD_13_IC16_PLPCDU_HEATSPREADER,
objects::RTD_14_IC17_TCS_BOARD,
objects::RTD_15_IC18_IMTQ,
};
#if OBSW_ADD_RTD_DEVICES == 1
tcsTask->addComponent(objects::TCS_BOARD_ASS);
for (const auto& rtd : rtdIds) {
tcsTask->addComponent(rtd, DeviceHandlerIF::PERFORM_OPERATION);
tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_WRITE);
tcsTask->addComponent(rtd, DeviceHandlerIF::GET_WRITE);
tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_READ);
tcsTask->addComponent(rtd, DeviceHandlerIF::GET_READ);
}
#endif /* OBSW_ADD_RTD_DEVICES */
>>>>>>> origin/develop
// FS task, task interval does not matter because it runs in permanent loop, priority low
// because it is a non-essential background task
@ -257,12 +295,17 @@ void initmission::initTasks() {
strHelperTask->startTask();
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
<<<<<<< HEAD
#if OBSW_ADD_ACS_HANDLERS == 1
gpsTask->startTask();
#endif
#if OBSW_ADD_RTD_DEVICES == 1
=======
acsTask->startTask();
>>>>>>> origin/develop
sysTask->startTask();
#endif
tcsPollingTask->startTask();
tcsTask->startTask();
#if OBSW_ADD_PLOC_SUPERVISOR == 1
supvHelperTask->startTask();
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */

View File

@ -3,7 +3,7 @@
#include <vector>
#include "fsfw/tasks/Typedef.h"
#include "fsfw/tasks/definitions.h"
class PeriodicTaskIF;
class TaskFactory;

View File

@ -216,6 +216,7 @@ void ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF) {
SpiCookie* spiCookieRadSensor =
new SpiCookie(addresses::RAD_SENSOR, gpioIds::CS_RAD_SENSOR, RAD_SENSOR::READ_SIZE,
spi::DEFAULT_MAX_1227_MODE, spi::DEFAULT_MAX_1227_SPEED);
spiCookieRadSensor->setMutexParams(MutexIF::TimeoutType::WAITING, spi::RAD_SENSOR_CS_TIMEOUT);
auto radSensor = new RadiationSensorHandler(objects::RAD_SENSOR, objects::SPI_MAIN_COM_IF,
spiCookieRadSensor, gpioComIF);
static_cast<void>(radSensor);

View File

@ -1,3 +1 @@
target_sources(${OBSW_NAME} PRIVATE
emObjectFactory.cpp
)
target_sources(${OBSW_NAME} PRIVATE emObjectFactory.cpp)

View File

@ -1,3 +1,5 @@
#include <fsfw/health/HealthTableIF.h>
#include "OBSWConfig.h"
#include "bsp_q7s/core/CoreController.h"
#include "bsp_q7s/core/ObjectFactory.h"
@ -11,7 +13,8 @@
void ObjectFactory::produce(void* args) {
ObjectFactory::setStatics();
ObjectFactory::produceGenericObjects();
HealthTableIF* healthTable = nullptr;
ObjectFactory::produceGenericObjects(&healthTable);
LinuxLibgpioIF* gpioComIF = nullptr;
UartComIF* uartComIF = nullptr;
@ -31,7 +34,7 @@ void ObjectFactory::produce(void* args) {
#if OBSW_ADD_ACS_BOARD == 1
createAcsBoardComponents(gpioComIF, uartComIF, pwrSwitcher);
#endif
createHeaterComponents();
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable);
createSolarArrayDeploymentComponents();
createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
#if OBSW_ADD_SYRLINKS == 1

View File

@ -39,7 +39,7 @@ void ObjectFactory::produce(void* args) {
#if OBSW_ADD_SYRLINKS == 1
createSyrlinksComponents(pwrSwitcher);
#endif /* OBSW_ADD_SYRLINKS == 1 */
createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher);
createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF);
createPayloadComponents(gpioComIF);
#if OBSW_ADD_MGT == 1

View File

@ -1,6 +1,2 @@
target_sources(${OBSW_NAME} PRIVATE
FileSystemHandler.cpp
SdCardManager.cpp
scratchApi.cpp
FilesystemHelper.cpp
)
target_sources(${OBSW_NAME} PRIVATE FileSystemHandler.cpp SdCardManager.cpp
scratchApi.cpp FilesystemHelper.cpp)

View File

@ -8,14 +8,19 @@
#include "core/InitMission.h"
#include "fsfw/tasks/TaskFactory.h"
#include "fsfw/version.h"
#include "q7sConfig.h"
#include "watchdog/definitions.h"
static int OBSW_ALREADY_RUNNING = -2;
#if OBSW_Q7S_EM == 0
static const char* DEV_STRING = "Xiphos Q7S FM";
#else
static const char* DEV_STRING = "Xiphos Q7S EM";
#endif
int obsw::obsw() {
using namespace fsfw;
std::cout << "-- EIVE OBSW --" << std::endl;
std::cout << "-- Compiled for Linux (Xiphos Q7S) --" << std::endl;
std::cout << "-- Compiled for Linux (" << DEV_STRING << ") --" << std::endl;
std::cout << "-- OBSW v" << common::OBSW_VERSION << " | FSFW v" << fsfw::FSFW_VERSION << " --"
<< std::endl;
std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;

View File

@ -1,3 +1 @@
target_sources(${SIMPLE_OBSW_NAME} PRIVATE
simple.cpp
)
target_sources(${SIMPLE_OBSW_NAME} PRIVATE simple.cpp)

View File

@ -1,3 +1 @@
target_sources(${OBSW_NAME} PRIVATE
Xadc.cpp
)
target_sources(${OBSW_NAME} PRIVATE Xadc.cpp)

View File

@ -1,7 +1,3 @@
target_include_directories(${OBSW_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(${OBSW_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_sources(${OBSW_NAME} PRIVATE
commonConfig.cpp
)
target_sources(${OBSW_NAME} PRIVATE commonConfig.cpp)

View File

@ -2,14 +2,7 @@
#define COMMON_CONFIG_CCSDSCONFIG_H_
namespace ccsds {
enum {
VC0,
VC1,
VC2,
VC3
};
enum { VC0, VC1, VC2, VC3 };
}
#endif /* COMMON_CONFIG_CCSDSCONFIG_H_ */

View File

@ -2,39 +2,40 @@
#define COMMON_CONFIG_COMMONCLASSIDS_H_
#include <fsfw/returnvalues/FwClassIds.h>
#include <cstdint>
namespace CLASS_ID {
enum commonClassIds: uint8_t {
enum commonClassIds : uint8_t {
COMMON_CLASS_ID_START = FW_CLASS_ID_COUNT,
PCDU_HANDLER, //PCDU
HEATER_HANDLER, //HEATER
SYRLINKS_HANDLER, //SYRLINKS
IMTQ_HANDLER, //IMTQ
RW_HANDLER, //RWHA
STR_HANDLER, //STRH
DWLPWRON_CMD, //DWLPWRON
MPSOC_TM, //MPTM
PLOC_SUPERVISOR_HANDLER, //PLSV
PLOC_SUPV_HELPER, //PLSPVhLP
SUS_HANDLER, //SUSS
CCSDS_IP_CORE_BRIDGE, //IPCI
PTME, //PTME
PLOC_UPDATER, //PLUD
STR_HELPER, //STRHLP
GOM_SPACE_HANDLER, //GOMS
PLOC_MEMORY_DUMPER, //PLMEMDUMP
PDEC_HANDLER, //PDEC
CCSDS_HANDLER, //CCSDS
RATE_SETTER, //RS
ARCSEC_JSON_BASE, //JSONBASE
NVM_PARAM_BASE, //NVMB
FILE_SYSTEM_HELPER, //FSHLP
PLOC_MPSOC_HELPER, // PLMPHLP
SA_DEPL_HANDLER, //SADPL
MPSOC_RETURN_VALUES_IF, //MPSOCRTVIF
SUPV_RETURN_VALUES_IF, //SPVRTVIF
COMMON_CLASS_ID_END // [EXPORT] : [END]
PCDU_HANDLER, // PCDU
HEATER_HANDLER, // HEATER
SYRLINKS_HANDLER, // SYRLINKS
IMTQ_HANDLER, // IMTQ
RW_HANDLER, // RWHA
STR_HANDLER, // STRH
DWLPWRON_CMD, // DWLPWRON
MPSOC_TM, // MPTM
PLOC_SUPERVISOR_HANDLER, // PLSV
PLOC_SUPV_HELPER, // PLSPVhLP
SUS_HANDLER, // SUSS
CCSDS_IP_CORE_BRIDGE, // IPCI
PTME, // PTME
PLOC_UPDATER, // PLUD
STR_HELPER, // STRHLP
GOM_SPACE_HANDLER, // GOMS
PLOC_MEMORY_DUMPER, // PLMEMDUMP
PDEC_HANDLER, // PDEC
CCSDS_HANDLER, // CCSDS
RATE_SETTER, // RS
ARCSEC_JSON_BASE, // JSONBASE
NVM_PARAM_BASE, // NVMB
FILE_SYSTEM_HELPER, // FSHLP
PLOC_MPSOC_HELPER, // PLMPHLP
SA_DEPL_HANDLER, // SADPL
MPSOC_RETURN_VALUES_IF, // MPSOCRTVIF
SUPV_RETURN_VALUES_IF, // SPVRTVIF
COMMON_CLASS_ID_END // [EXPORT] : [END]
};
}

View File

@ -1,6 +1,8 @@
#include "commonConfig.h"
#include "tmtc/apid.h"
#include "fsfw/tmtcpacket/SpacePacket.h"
const Version common::OBSW_VERSION { OBSW_VERSION_MAJOR, OBSW_VERSION_MINOR, OBSW_VERSION_REVISION, OBSW_VERSION_CST_GIT_SHA1 };
#include "fsfw/tmtcpacket/SpacePacket.h"
#include "tmtc/apid.h"
const fsfw::Version common::OBSW_VERSION{OBSW_VERSION_MAJOR, OBSW_VERSION_MINOR,
OBSW_VERSION_REVISION, OBSW_VERSION_CST_GIT_SHA1};
const uint16_t common::PUS_PACKET_ID = spacepacket::getTcSpacePacketIdFromApid(apid::EIVE_OBSW);

View File

@ -33,7 +33,7 @@ static constexpr uint8_t OBSW_VERSION_REVISION = @OBSW_VERSION_REVISION@;
// CST: Commits since tag
static const char OBSW_VERSION_CST_GIT_SHA1[] = "@OBSW_VERSION_CST_GIT_SHA1@";
extern const Version OBSW_VERSION;
extern const fsfw::Version OBSW_VERSION;
extern const uint16_t PUS_PACKET_ID;

View File

@ -4,128 +4,127 @@
#include <cstdint>
namespace objects {
enum commonObjects: uint32_t {
/* First Byte 0x50-0x52 reserved for PUS Services **/
CCSDS_PACKET_DISTRIBUTOR = 0x50000100,
PUS_PACKET_DISTRIBUTOR = 0x50000200,
TMTC_BRIDGE = 0x50000300,
TMTC_POLLING_TASK = 0x50000400,
FILE_SYSTEM_HANDLER = 0x50000500,
SDC_MANAGER = 0x50000550,
PTME = 0x50000600,
PDEC_HANDLER = 0x50000700,
CCSDS_HANDLER = 0x50000800,
enum commonObjects : uint32_t {
/* First Byte 0x50-0x52 reserved for PUS Services **/
CCSDS_PACKET_DISTRIBUTOR = 0x50000100,
PUS_PACKET_DISTRIBUTOR = 0x50000200,
TMTC_BRIDGE = 0x50000300,
TMTC_POLLING_TASK = 0x50000400,
FILE_SYSTEM_HANDLER = 0x50000500,
SDC_MANAGER = 0x50000550,
PTME = 0x50000600,
PDEC_HANDLER = 0x50000700,
CCSDS_HANDLER = 0x50000800,
/* 0x43 ('C') for Controllers */
THERMAL_CONTROLLER = 0x43400001,
ACS_CONTROLLER = 0x43100002,
CORE_CONTROLLER = 0x43000003,
/* 0x43 ('C') for Controllers */
THERMAL_CONTROLLER = 0x43400001,
ACS_CONTROLLER = 0x43100002,
CORE_CONTROLLER = 0x43000003,
/* 0x44 ('D') for device handlers */
MGM_0_LIS3_HANDLER = 0x44120006,
MGM_1_RM3100_HANDLER = 0x44120107,
MGM_2_LIS3_HANDLER = 0x44120208,
MGM_3_RM3100_HANDLER = 0x44120309,
GYRO_0_ADIS_HANDLER = 0x44120010,
GYRO_1_L3G_HANDLER = 0x44120111,
GYRO_2_ADIS_HANDLER = 0x44120212,
GYRO_3_L3G_HANDLER = 0x44120313,
RW1 = 0x44120047,
RW2 = 0x44120148,
RW3 = 0x44120249,
RW4 = 0x44120350,
STAR_TRACKER = 0x44130001,
GPS_CONTROLLER = 0x44130045,
/* 0x44 ('D') for device handlers */
MGM_0_LIS3_HANDLER = 0x44120006,
MGM_1_RM3100_HANDLER = 0x44120107,
MGM_2_LIS3_HANDLER = 0x44120208,
MGM_3_RM3100_HANDLER = 0x44120309,
GYRO_0_ADIS_HANDLER = 0x44120010,
GYRO_1_L3G_HANDLER = 0x44120111,
GYRO_2_ADIS_HANDLER = 0x44120212,
GYRO_3_L3G_HANDLER = 0x44120313,
RW1 = 0x44120047,
RW2 = 0x44120148,
RW3 = 0x44120249,
RW4 = 0x44120350,
STAR_TRACKER = 0x44130001,
GPS_CONTROLLER = 0x44130045,
IMTQ_HANDLER = 0x44140014,
TMP1075_HANDLER_1 = 0x44420004,
TMP1075_HANDLER_2 = 0x44420005,
PCDU_HANDLER = 0x442000A1,
P60DOCK_HANDLER = 0x44250000,
PDU1_HANDLER = 0x44250001,
PDU2_HANDLER = 0x44250002,
ACU_HANDLER = 0x44250003,
BPX_BATT_HANDLER = 0x44260000,
PLPCDU_HANDLER = 0x44300000,
RAD_SENSOR = 0x443200A5,
PLOC_UPDATER = 0x44330000,
PLOC_MEMORY_DUMPER = 0x44330001,
STR_HELPER = 0x44330002,
PLOC_MPSOC_HELPER = 0x44330003,
AXI_PTME_CONFIG = 0x44330004,
PTME_CONFIG = 0x44330005,
PLOC_MPSOC_HANDLER = 0x44330015,
PLOC_SUPERVISOR_HANDLER = 0x44330016,
PLOC_SUPERVISOR_HELPER = 0x44330017,
SOLAR_ARRAY_DEPL_HANDLER = 0x444100A2,
HEATER_HANDLER = 0x444100A4,
IMTQ_HANDLER = 0x44140014,
TMP1075_HANDLER_1 = 0x44420004,
TMP1075_HANDLER_2 = 0x44420005,
PCDU_HANDLER = 0x442000A1,
P60DOCK_HANDLER = 0x44250000,
PDU1_HANDLER = 0x44250001,
PDU2_HANDLER = 0x44250002,
ACU_HANDLER = 0x44250003,
BPX_BATT_HANDLER = 0x44260000,
PLPCDU_HANDLER = 0x44300000,
RAD_SENSOR = 0x443200A5,
PLOC_UPDATER = 0x44330000,
PLOC_MEMORY_DUMPER = 0x44330001,
STR_HELPER = 0x44330002,
PLOC_MPSOC_HELPER = 0x44330003,
AXI_PTME_CONFIG = 0x44330004,
PTME_CONFIG = 0x44330005,
PLOC_MPSOC_HANDLER = 0x44330015,
PLOC_SUPERVISOR_HANDLER = 0x44330016,
PLOC_SUPERVISOR_HELPER = 0x44330017,
SOLAR_ARRAY_DEPL_HANDLER = 0x444100A2,
HEATER_HANDLER = 0x444100A4,
/**
* Not yet specified which pt1000 will measure which device/location in the satellite.
* Therefore object ids are named according to the IC naming of the RTDs in the schematic.
*/
RTD_0_IC3_PLOC_HEATSPREADER = 0x44420016,
RTD_1_IC4_PLOC_MISSIONBOARD = 0x44420017,
RTD_2_IC5_4K_CAMERA = 0x44420018,
RTD_3_IC6_DAC_HEATSPREADER = 0x44420019,
RTD_4_IC7_STARTRACKER = 0x44420020,
RTD_5_IC8_RW1_MX_MY = 0x44420021,
RTD_6_IC9_DRO = 0x44420022,
RTD_7_IC10_SCEX = 0x44420023,
RTD_8_IC11_X8 = 0x44420024,
RTD_9_IC12_HPA = 0x44420025,
RTD_10_IC13_PL_TX = 0x44420026,
RTD_11_IC14_MPA = 0x44420027,
RTD_12_IC15_ACU = 0x44420028,
RTD_13_IC16_PLPCDU_HEATSPREADER = 0x44420029,
RTD_14_IC17_TCS_BOARD = 0x44420030,
RTD_15_IC18_IMTQ = 0x44420031,
/**
* Not yet specified which pt1000 will measure which device/location in the satellite.
* Therefore object ids are named according to the IC naming of the RTDs in the schematic.
*/
RTD_0_IC3_PLOC_HEATSPREADER = 0x44420016,
RTD_1_IC4_PLOC_MISSIONBOARD = 0x44420017,
RTD_2_IC5_4K_CAMERA = 0x44420018,
RTD_3_IC6_DAC_HEATSPREADER = 0x44420019,
RTD_4_IC7_STARTRACKER = 0x44420020,
RTD_5_IC8_RW1_MX_MY = 0x44420021,
RTD_6_IC9_DRO = 0x44420022,
RTD_7_IC10_SCEX = 0x44420023,
RTD_8_IC11_X8 = 0x44420024,
RTD_9_IC12_HPA = 0x44420025,
RTD_10_IC13_PL_TX = 0x44420026,
RTD_11_IC14_MPA = 0x44420027,
RTD_12_IC15_ACU = 0x44420028,
RTD_13_IC16_PLPCDU_HEATSPREADER = 0x44420029,
RTD_14_IC17_TCS_BOARD = 0x44420030,
RTD_15_IC18_IMTQ = 0x44420031,
// Name convention for SUS devices
// SUS_<IDX>_<N/R>_LOC_X<F/M/B>Y<F/M/B>Z<F/M/B>_PT_<DIR><F/B>
// LOC: Location
// PT: Pointing
// N/R: Nominal/Redundant
// F/M/B: Forward/Middle/Backwards
SUS_0_N_LOC_XFYFZM_PT_XF = 0x44120032,
SUS_6_R_LOC_XFYBZM_PT_XF = 0x44120038,
// Name convention for SUS devices
// SUS_<IDX>_<N/R>_LOC_X<F/M/B>Y<F/M/B>Z<F/M/B>_PT_<DIR><F/B>
// LOC: Location
// PT: Pointing
// N/R: Nominal/Redundant
// F/M/B: Forward/Middle/Backwards
SUS_0_N_LOC_XFYFZM_PT_XF = 0x44120032,
SUS_6_R_LOC_XFYBZM_PT_XF = 0x44120038,
SUS_1_N_LOC_XBYFZM_PT_XB = 0x44120033,
SUS_7_R_LOC_XBYBZM_PT_XB = 0x44120039,
SUS_1_N_LOC_XBYFZM_PT_XB = 0x44120033,
SUS_7_R_LOC_XBYBZM_PT_XB = 0x44120039,
SUS_2_N_LOC_XFYBZB_PT_YB = 0x44120034,
SUS_8_R_LOC_XBYBZB_PT_YB = 0x44120040,
SUS_2_N_LOC_XFYBZB_PT_YB = 0x44120034,
SUS_8_R_LOC_XBYBZB_PT_YB = 0x44120040,
SUS_3_N_LOC_XFYBZF_PT_YF = 0x44120035,
SUS_9_R_LOC_XBYBZB_PT_YF = 0x44120041,
SUS_3_N_LOC_XFYBZF_PT_YF = 0x44120035,
SUS_9_R_LOC_XBYBZB_PT_YF = 0x44120041,
SUS_4_N_LOC_XMYFZF_PT_ZF = 0x44120036,
SUS_10_N_LOC_XMYBZF_PT_ZF = 0x44120042,
SUS_4_N_LOC_XMYFZF_PT_ZF = 0x44120036,
SUS_10_N_LOC_XMYBZF_PT_ZF = 0x44120042,
SUS_5_N_LOC_XFYMZB_PT_ZB = 0x44120037,
SUS_11_R_LOC_XBYMZB_PT_ZB = 0x44120043,
SUS_5_N_LOC_XFYMZB_PT_ZB = 0x44120037,
SUS_11_R_LOC_XBYMZB_PT_ZB = 0x44120043,
SYRLINKS_HK_HANDLER = 0x445300A3,
SYRLINKS_HK_HANDLER = 0x445300A3,
// 0x60 for other stuff
HEATER_0_PLOC_PROC_BRD = 0x60000000,
HEATER_1_PCDU_BRD = 0x60000001,
HEATER_2_ACS_BRD = 0x60000002,
HEATER_3_OBC_BRD = 0x60000003,
HEATER_4_CAMERA = 0x60000004,
HEATER_5_STR = 0x60000005,
HEATER_6_DRO = 0x60000006,
HEATER_7_HPA = 0x60000007,
// 0x60 for other stuff
HEATER_0_PLOC_PROC_BRD = 0x60000000,
HEATER_1_PCDU_BRD = 0x60000001,
HEATER_2_ACS_BRD = 0x60000002,
HEATER_3_OBC_BRD = 0x60000003,
HEATER_4_CAMERA = 0x60000004,
HEATER_5_STR = 0x60000005,
HEATER_6_DRO = 0x60000006,
HEATER_7_HPA = 0x60000007,
// 0x73 ('s') for assemblies and system/subsystem components
ACS_BOARD_ASS = 0x73000001,
SUS_BOARD_ASS = 0x73000002,
TCS_BOARD_ASS = 0x73000003,
RW_ASS = 0x73000004,
ACS_SUBSYSTEM = 0x73010001,
EIVE_SYSTEM = 0x73010000,
// 0x73 ('s') for assemblies and system/subsystem components
ACS_BOARD_ASS = 0x73000001,
SUS_BOARD_ASS = 0x73000002,
TCS_BOARD_ASS = 0x73000003,
RW_ASS = 0x73000004,
ACS_SUBSYSTEM = 0x73010001,
EIVE_SYSTEM = 0x73010000,
};
}
#endif /* COMMON_CONFIG_COMMONOBJECTS_H_ */

View File

@ -4,37 +4,36 @@
#include <fsfw/events/fwSubsystemIdRanges.h>
namespace SUBSYSTEM_ID {
enum: uint8_t {
COMMON_SUBSYSTEM_ID_START = FW_SUBSYSTEM_ID_RANGE,
ACS_SUBSYSTEM = 112,
PCDU_HANDLER = 113,
HEATER_HANDLER = 114,
SA_DEPL_HANDLER = 115,
PLOC_MPSOC_HANDLER = 116,
IMTQ_HANDLER = 117,
RW_HANDLER = 118,
STR_HANDLER = 119,
PLOC_SUPERVISOR_HANDLER = 120,
FILE_SYSTEM = 121,
PLOC_UPDATER = 122,
PLOC_MEMORY_DUMPER = 123,
PDEC_HANDLER = 124,
STR_HELPER = 125,
PLOC_MPSOC_HELPER = 126,
PL_PCDU_HANDLER = 127,
ACS_BOARD_ASS = 128,
SUS_BOARD_ASS = 129,
TCS_BOARD_ASS = 130,
GPS_HANDLER = 131,
P60_DOCK_HANDLER = 132,
PDU1_HANDLER = 133,
PDU2_HANDLER = 134,
ACU_HANDLER = 135,
PLOC_SUPV_HELPER = 136,
SYRLINKS = 137,
COMMON_SUBSYSTEM_ID_END
enum : uint8_t {
COMMON_SUBSYSTEM_ID_START = FW_SUBSYSTEM_ID_RANGE,
ACS_SUBSYSTEM = 112,
PCDU_HANDLER = 113,
HEATER_HANDLER = 114,
SA_DEPL_HANDLER = 115,
PLOC_MPSOC_HANDLER = 116,
IMTQ_HANDLER = 117,
RW_HANDLER = 118,
STR_HANDLER = 119,
PLOC_SUPERVISOR_HANDLER = 120,
FILE_SYSTEM = 121,
PLOC_UPDATER = 122,
PLOC_MEMORY_DUMPER = 123,
PDEC_HANDLER = 124,
STR_HELPER = 125,
PLOC_MPSOC_HELPER = 126,
PL_PCDU_HANDLER = 127,
ACS_BOARD_ASS = 128,
SUS_BOARD_ASS = 129,
TCS_BOARD_ASS = 130,
GPS_HANDLER = 131,
P60_DOCK_HANDLER = 132,
PDU1_HANDLER = 133,
PDU2_HANDLER = 134,
ACU_HANDLER = 135,
PLOC_SUPV_HELPER = 136,
SYRLINKS = 137,
COMMON_SUBSYSTEM_ID_END
};
}
#endif /* COMMON_CONFIG_COMMONSUBSYSTEMIDS_H_ */

View File

@ -1,10 +1,11 @@
#ifndef COMMON_CONFIG_DEVCONF_H_
#define COMMON_CONFIG_DEVCONF_H_
#include <cstdint>
#include <fsfw_hal/linux/spi/spiDefinitions.h>
#include <fsfw_hal/linux/uart/UartCookie.h>
#include <cstdint>
/**
* SPI configuration will be contained here to let the device handlers remain independent
* of SPI specific properties.
@ -31,6 +32,7 @@ static constexpr spi::SpiModes DEFAULT_L3G_MODE = spi::SpiModes::MODE_3;
static const uint32_t SUS_MAX1227_SPI_FREQ = 976'000;
static constexpr spi::SpiModes SUS_MAX_1227_MODE = spi::SpiModes::MODE_3;
static constexpr dur_millis_t RAD_SENSOR_CS_TIMEOUT = 120;
static constexpr uint32_t DEFAULT_MAX_1227_SPEED = 976'000;
static constexpr spi::SpiModes DEFAULT_MAX_1227_MODE = spi::SpiModes::MODE_3;
@ -42,10 +44,11 @@ static constexpr spi::SpiModes DEFAULT_ADIS16507_MODE = spi::SpiModes::MODE_3;
static constexpr uint32_t RW_SPEED = 300'000;
static constexpr spi::SpiModes RW_MODE = spi::SpiModes::MODE_0;
static constexpr dur_millis_t RTD_CS_TIMEOUT = 50;
static constexpr uint32_t RTD_SPEED = 2'000'000;
static constexpr spi::SpiModes RTD_MODE = spi::SpiModes::MODE_3;
}
} // namespace spi
namespace uart {
@ -56,6 +59,6 @@ static constexpr UartBaudRate PLOC_MPSOC_BAUD = UartBaudRate::RATE_115200;
static constexpr UartBaudRate PLOC_SUPV_BAUD = UartBaudRate::RATE_115200;
static constexpr UartBaudRate STAR_TRACKER_BAUD = UartBaudRate::RATE_921600;
}
} // namespace uart
#endif /* COMMON_CONFIG_DEVCONF_H_ */

View File

@ -4,17 +4,17 @@
#include <cstdint>
namespace heater {
enum Switchers: uint8_t {
HEATER_0_OBC_BRD,
HEATER_1_PLOC_PROC_BRD,
HEATER_2_ACS_BRD,
HEATER_3_PCDU_PDU,
HEATER_4_CAMERA,
HEATER_5_STR,
HEATER_6_DRO,
HEATER_7_HPA,
NUMBER_OF_SWITCHES
};
enum Switchers : uint8_t {
HEATER_0_OBC_BRD,
HEATER_1_PLOC_PROC_BRD,
HEATER_2_ACS_BRD,
HEATER_3_PCDU_PDU,
HEATER_4_CAMERA,
HEATER_5_STR,
HEATER_6_DRO,
HEATER_7_HPA,
NUMBER_OF_SWITCHES
};
}
#endif /* FSFWCONFIG_DEVICES_HEATERSWITCHERLIST_H_ */

View File

@ -19,7 +19,6 @@ static constexpr uint8_t LIVE_TM = 0;
static constexpr uint32_t MAX_PATH_SIZE = 100;
static constexpr uint32_t MAX_FILENAME_SIZE = 50;
}
} // namespace config
#endif /* COMMON_CONFIG_DEFINITIONS_H_ */

View File

@ -12,8 +12,7 @@
* APID is a 11 bit number
*/
namespace apid {
static const uint16_t EIVE_OBSW = 0x65;
static const uint16_t EIVE_OBSW = 0x65;
}
#endif /* FSFWCONFIG_TMTC_APID_H_ */

2
fsfw

@ -1 +1 @@
Subproject commit 4841d5d92d721383e92b521b584c7d0e62c9873d
Subproject commit c8355251967009559ea790b63c3ebfc67a27efef

View File

@ -1,204 +1,206 @@
2200;0x0898;STORE_SEND_WRITE_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2201;0x0899;STORE_WRITE_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2202;0x089a;STORE_SEND_READ_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2203;0x089b;STORE_READ_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2204;0x089c;UNEXPECTED_MSG;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2205;0x089d;STORING_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2206;0x089e;TM_DUMP_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2207;0x089f;STORE_INIT_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2208;0x08a0;STORE_INIT_EMPTY;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2209;0x08a1;STORE_CONTENT_CORRUPTED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2210;0x08a2;STORE_INITIALIZE;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2211;0x08a3;INIT_DONE;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2212;0x08a4;DUMP_FINISHED;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2213;0x08a5;DELETION_FINISHED;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2214;0x08a6;DELETION_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2215;0x08a7;AUTO_CATALOGS_SENDING_FAILED;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2600;0x0a28;GET_DATA_FAILED;LOW;;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
2601;0x0a29;STORE_DATA_FAILED;LOW;;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
2800;0x0af0;DEVICE_BUILDING_COMMAND_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2801;0x0af1;DEVICE_SENDING_COMMAND_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2802;0x0af2;DEVICE_REQUESTING_REPLY_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2803;0x0af3;DEVICE_READING_REPLY_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2804;0x0af4;DEVICE_INTERPRETING_REPLY_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2805;0x0af5;DEVICE_MISSED_REPLY;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2806;0x0af6;DEVICE_UNKNOWN_REPLY;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2807;0x0af7;DEVICE_UNREQUESTED_REPLY;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2808;0x0af8;INVALID_DEVICE_COMMAND;LOW;Indicates a SW bug in child class.;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2809;0x0af9;MONITORING_LIMIT_EXCEEDED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2810;0x0afa;MONITORING_AMBIGUOUS;HIGH;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2811;0x0afb;DEVICE_WANTS_HARD_REBOOT;HIGH;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
4201;0x1069;FUSE_CURRENT_HIGH;LOW;;fsfw/src/fsfw/power/Fuse.h
4202;0x106a;FUSE_WENT_OFF;LOW;;fsfw/src/fsfw/power/Fuse.h
4204;0x106c;POWER_ABOVE_HIGH_LIMIT;LOW;;fsfw/src/fsfw/power/Fuse.h
4205;0x106d;POWER_BELOW_LOW_LIMIT;LOW;;fsfw/src/fsfw/power/Fuse.h
4300;0x10cc;SWITCH_WENT_OFF;LOW;;fsfw/src/fsfw/power/PowerSwitchIF.h
5000;0x1388;HEATER_ON;INFO;;fsfw/src/fsfw/thermal/Heater.h
5001;0x1389;HEATER_OFF;INFO;;fsfw/src/fsfw/thermal/Heater.h
5002;0x138a;HEATER_TIMEOUT;LOW;;fsfw/src/fsfw/thermal/Heater.h
5003;0x138b;HEATER_STAYED_ON;LOW;;fsfw/src/fsfw/thermal/Heater.h
5004;0x138c;HEATER_STAYED_OFF;LOW;;fsfw/src/fsfw/thermal/Heater.h
5200;0x1450;TEMP_SENSOR_HIGH;LOW;;fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
5201;0x1451;TEMP_SENSOR_LOW;LOW;;fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
5202;0x1452;TEMP_SENSOR_GRADIENT;LOW;;fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
5901;0x170d;COMPONENT_TEMP_LOW;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
5902;0x170e;COMPONENT_TEMP_HIGH;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
5903;0x170f;COMPONENT_TEMP_OOL_LOW;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
5904;0x1710;COMPONENT_TEMP_OOL_HIGH;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
5905;0x1711;TEMP_NOT_IN_OP_RANGE;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
7101;0x1bbd;FDIR_CHANGED_STATE;INFO;;fsfw/src/fsfw/fdir/FailureIsolationBase.h
7102;0x1bbe;FDIR_STARTS_RECOVERY;MEDIUM;;fsfw/src/fsfw/fdir/FailureIsolationBase.h
7103;0x1bbf;FDIR_TURNS_OFF_DEVICE;MEDIUM;;fsfw/src/fsfw/fdir/FailureIsolationBase.h
7201;0x1c21;MONITOR_CHANGED_STATE;LOW;;fsfw/src/fsfw/monitoring/MonitoringIF.h
7202;0x1c22;VALUE_BELOW_LOW_LIMIT;LOW;;fsfw/src/fsfw/monitoring/MonitoringIF.h
7203;0x1c23;VALUE_ABOVE_HIGH_LIMIT;LOW;;fsfw/src/fsfw/monitoring/MonitoringIF.h
7204;0x1c24;VALUE_OUT_OF_RANGE;LOW;;fsfw/src/fsfw/monitoring/MonitoringIF.h
7400;0x1ce8;CHANGING_MODE;INFO;;fsfw/src/fsfw/modes/HasModesIF.h
7401;0x1ce9;MODE_INFO;INFO;;fsfw/src/fsfw/modes/HasModesIF.h
7402;0x1cea;FALLBACK_FAILED;HIGH;;fsfw/src/fsfw/modes/HasModesIF.h
7403;0x1ceb;MODE_TRANSITION_FAILED;LOW;;fsfw/src/fsfw/modes/HasModesIF.h
7404;0x1cec;CANT_KEEP_MODE;HIGH;;fsfw/src/fsfw/modes/HasModesIF.h
7405;0x1ced;OBJECT_IN_INVALID_MODE;LOW;;fsfw/src/fsfw/modes/HasModesIF.h
7406;0x1cee;FORCING_MODE;MEDIUM;;fsfw/src/fsfw/modes/HasModesIF.h
7407;0x1cef;MODE_CMD_REJECTED;LOW;;fsfw/src/fsfw/modes/HasModesIF.h
7506;0x1d52;HEALTH_INFO;INFO;;fsfw/src/fsfw/health/HasHealthIF.h
7507;0x1d53;CHILD_CHANGED_HEALTH;INFO;;fsfw/src/fsfw/health/HasHealthIF.h
7508;0x1d54;CHILD_PROBLEMS;LOW;;fsfw/src/fsfw/health/HasHealthIF.h
7509;0x1d55;OVERWRITING_HEALTH;LOW;;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
7512;0x1d58;RECOVERY_DONE;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.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
7902;0x1ede;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
7903;0x1edf;BIT_LOCK_LOST;INFO;A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
7905;0x1ee1;FRAME_PROCESSING_FAILED;LOW;The CCSDS Board could not interpret a TC;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
8900;0x22c4;CLOCK_SET;INFO;;fsfw/src/fsfw/pus/Service9TimeManagement.h
8901;0x22c5;CLOCK_SET_FAILURE;LOW;;fsfw/src/fsfw/pus/Service9TimeManagement.h
9700;0x25e4;TEST;INFO;;fsfw/src/fsfw/pus/Service17Test.h
10600;0x2968;CHANGE_OF_SETUP_PARAMETER;LOW;;fsfw/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h
11300;0x2c24;SWITCH_CMD_SENT;INFO;Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
11301;0x2c25;SWITCH_HAS_CHANGED;INFO;Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
11302;0x2c26;SWITCHING_Q7S_DENIED;MEDIUM;;mission/devices/devicedefinitions/powerDefinitions.h
11303;0x2c27;FDIR_REACTION_IGNORED;MEDIUM;;mission/devices/devicedefinitions/powerDefinitions.h
11400;0x2c88;GPIO_PULL_HIGH_FAILED;LOW;;mission/devices/HeaterHandler.h
11401;0x2c89;GPIO_PULL_LOW_FAILED;LOW;;mission/devices/HeaterHandler.h
11402;0x2c8a;HEATER_WENT_ON;INFO;;mission/devices/HeaterHandler.h
11403;0x2c8b;HEATER_WENT_OFF;INFO;;mission/devices/HeaterHandler.h
11404;0x2c8c;SWITCH_ALREADY_ON;LOW;;mission/devices/HeaterHandler.h
11405;0x2c8d;SWITCH_ALREADY_OFF;LOW;;mission/devices/HeaterHandler.h
11406;0x2c8e;MAIN_SWITCH_TIMEOUT;MEDIUM;;mission/devices/HeaterHandler.h
11407;0x2c8f;FAULTY_HEATER_WAS_ON;LOW;;mission/devices/HeaterHandler.h
11500;0x2cec;MAIN_SWITCH_ON_TIMEOUT;LOW;;mission/devices/SolarArrayDeploymentHandler.h
11501;0x2ced;MAIN_SWITCH_OFF_TIMEOUT;LOW;;mission/devices/SolarArrayDeploymentHandler.h
11502;0x2cee;DEPLOYMENT_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
11503;0x2cef;DEPL_SA1_GPIO_SWTICH_ON_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
11504;0x2cf0;DEPL_SA2_GPIO_SWTICH_ON_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
11601;0x2d51;MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC crc failure in telemetry packet;linux/devices/ploc/PlocMPSoCHandler.h
11602;0x2d52;ACK_FAILURE;LOW;PLOC receive acknowledgment failure report P1: Command Id which leads the acknowledgment failure report P2: The status field inserted by the MPSoC into the data field;linux/devices/ploc/PlocMPSoCHandler.h
11603;0x2d53;EXE_FAILURE;LOW;PLOC receive execution failure report P1: Command Id which leads the execution failure report P2: The status field inserted by the MPSoC into the data field;linux/devices/ploc/PlocMPSoCHandler.h
11604;0x2d54;MPSOC_HANDLER_CRC_FAILURE;LOW;PLOC reply has invalid crc;linux/devices/ploc/PlocMPSoCHandler.h
11605;0x2d55;MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH;LOW;Packet sequence count in received space packet does not match expected count P1: Expected sequence count P2: Received sequence count;linux/devices/ploc/PlocMPSoCHandler.h
11606;0x2d56;MPSOC_SHUTDOWN_FAILED;HIGH;Supervisor fails to shutdown MPSoC. Requires to power off the PLOC and thus also to shutdown the supervisor.;linux/devices/ploc/PlocMPSoCHandler.h
11701;0x2db5;SELF_TEST_I2C_FAILURE;LOW;Get self test result returns I2C failure P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
11702;0x2db6;SELF_TEST_SPI_FAILURE;LOW;Get self test result returns SPI failure. This concerns the MTM connectivity. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
11703;0x2db7;SELF_TEST_ADC_FAILURE;LOW;Get self test result returns failure in measurement of current and temperature. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
11704;0x2db8;SELF_TEST_PWM_FAILURE;LOW;Get self test result returns PWM failure which concerns the coil actuation. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
11705;0x2db9;SELF_TEST_TC_FAILURE;LOW;Get self test result returns TC failure (system failure) P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
11706;0x2dba;SELF_TEST_MTM_RANGE_FAILURE;LOW;Get self test result returns failure that MTM values were outside of the expected range. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
11707;0x2dbb;SELF_TEST_COIL_CURRENT_FAILURE;LOW;Get self test result returns failure indicating that the coil current was outside of the expected range P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
11708;0x2dbc;INVALID_ERROR_BYTE;LOW;Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC.;mission/devices/IMTQHandler.h
11801;0x2e19;ERROR_STATE;HIGH;Reaction wheel signals an error state;mission/devices/devicedefinitions/RwDefinitions.h
11802;0x2e1a;RESET_OCCURED;LOW;;mission/devices/devicedefinitions/RwDefinitions.h
11901;0x2e7d;BOOTING_FIRMWARE_FAILED;LOW;Failed to boot firmware;linux/devices/startracker/StarTrackerHandler.h
11902;0x2e7e;BOOTING_BOOTLOADER_FAILED;LOW;Failed to boot star tracker into bootloader mode;linux/devices/startracker/StarTrackerHandler.h
12001;0x2ee1;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;linux/devices/ploc/PlocSupervisorHandler.h
12002;0x2ee2;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;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
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
12101;0x2f45;MOUNTED_SD_CARD;INFO;;bsp_q7s/memory/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
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
12401;0x3071;INVALID_TC_FRAME;HIGH;;linux/obc/PdecHandler.h
12402;0x3072;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;linux/obc/PdecHandler.h
12403;0x3073;CARRIER_LOCK;INFO;Carrier lock detected;linux/obc/PdecHandler.h
12404;0x3074;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);linux/obc/PdecHandler.h
12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/devices/startracker/StrHelper.h
12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/devices/startracker/StrHelper.h
12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/devices/startracker/StrHelper.h
12503;0x30d7;IMAGE_DOWNLOAD_SUCCESSFUL;LOW;Image download was successful;linux/devices/startracker/StrHelper.h
12504;0x30d8;FLASH_WRITE_SUCCESSFUL;LOW;Finished flash write procedure successfully;linux/devices/startracker/StrHelper.h
12505;0x30d9;FLASH_READ_SUCCESSFUL;LOW;Finished flash read procedure successfully;linux/devices/startracker/StrHelper.h
12506;0x30da;FLASH_READ_FAILED;LOW;Flash read procedure failed;linux/devices/startracker/StrHelper.h
12507;0x30db;FIRMWARE_UPDATE_SUCCESSFUL;LOW;Firmware update was successful;linux/devices/startracker/StrHelper.h
12508;0x30dc;FIRMWARE_UPDATE_FAILED;LOW;Firmware update failed;linux/devices/startracker/StrHelper.h
12509;0x30dd;STR_HELPER_READING_REPLY_FAILED;LOW;Failed to read communication interface reply data P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;linux/devices/startracker/StrHelper.h
12510;0x30de;STR_HELPER_COM_ERROR;LOW;Unexpected stop of decoding sequence P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;linux/devices/startracker/StrHelper.h
12511;0x30df;STR_HELPER_NO_REPLY;LOW;Star tracker did not send replies (maybe device is powered off) P1: Position of upload or download packet for which no reply was sent;linux/devices/startracker/StrHelper.h
12512;0x30e0;STR_HELPER_DEC_ERROR;LOW;Error during decoding of received reply occurred P1: Return value of decoding function P2: Position of upload/download packet, or address of flash write/read request;linux/devices/startracker/StrHelper.h
12513;0x30e1;POSITION_MISMATCH;LOW;Position mismatch P1: The expected position and thus the position for which the image upload/download failed;linux/devices/startracker/StrHelper.h
12514;0x30e2;STR_HELPER_FILE_NOT_EXISTS;LOW;Specified file does not exist P1: Internal state of str helper;linux/devices/startracker/StrHelper.h
12515;0x30e3;STR_HELPER_SENDING_PACKET_FAILED;LOW;;linux/devices/startracker/StrHelper.h
12516;0x30e4;STR_HELPER_REQUESTING_MSG_FAILED;LOW;;linux/devices/startracker/StrHelper.h
12600;0x3138;MPSOC_FLASH_WRITE_FAILED;LOW;Flash write fails;linux/devices/ploc/PlocMPSoCHelper.h
12601;0x3139;MPSOC_FLASH_WRITE_SUCCESSFUL;LOW;Flash write successful;linux/devices/ploc/PlocMPSoCHelper.h
12602;0x313a;MPSOC_SENDING_COMMAND_FAILED;LOW;;linux/devices/ploc/PlocMPSoCHelper.h
12603;0x313b;MPSOC_HELPER_REQUESTING_REPLY_FAILED;LOW;Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of MPSoC helper;linux/devices/ploc/PlocMPSoCHelper.h
12604;0x313c;MPSOC_HELPER_READING_REPLY_FAILED;LOW;Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of MPSoC helper;linux/devices/ploc/PlocMPSoCHelper.h
12605;0x313d;MPSOC_MISSING_ACK;LOW;Did not receive acknowledgment report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux/devices/ploc/PlocMPSoCHelper.h
12606;0x313e;MPSOC_MISSING_EXE;LOW;Did not receive execution report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux/devices/ploc/PlocMPSoCHelper.h
12607;0x313f;MPSOC_ACK_FAILURE_REPORT;LOW;Received acknowledgment failure report P1: Internal state of MPSoC;linux/devices/ploc/PlocMPSoCHelper.h
12608;0x3140;MPSOC_EXE_FAILURE_REPORT;LOW;Received execution failure report P1: Internal state of MPSoC;linux/devices/ploc/PlocMPSoCHelper.h
12609;0x3141;MPSOC_ACK_INVALID_APID;LOW;Expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/devices/ploc/PlocMPSoCHelper.h
12610;0x3142;MPSOC_EXE_INVALID_APID;LOW;Expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/devices/ploc/PlocMPSoCHelper.h
12611;0x3143;MPSOC_HELPER_SEQ_CNT_MISMATCH;LOW;Received sequence count does not match expected sequence count P1: Expected sequence count P2: Received sequence count;linux/devices/ploc/PlocMPSoCHelper.h
12700;0x319c;TRANSITION_BACK_TO_OFF;MEDIUM;Could not transition properly and went back to ALL OFF;mission/devices/PayloadPcduHandler.h
12701;0x319d;NEG_V_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12702;0x319e;U_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12703;0x319f;I_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12704;0x31a0;U_X8_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12705;0x31a1;I_X8_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12706;0x31a2;U_TX_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12707;0x31a3;I_TX_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12708;0x31a4;U_MPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12709;0x31a5;I_MPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12710;0x31a6;U_HPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12711;0x31a7;I_HPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12800;0x3200;TRANSITION_OTHER_SIDE_FAILED;HIGH;;mission/system/AcsBoardAssembly.h
12801;0x3201;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;;mission/system/AcsBoardAssembly.h
12802;0x3202;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;;mission/system/AcsBoardAssembly.h
12803;0x3203;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/AcsBoardAssembly.h
12900;0x3264;TRANSITION_OTHER_SIDE_FAILED;HIGH;;mission/system/SusAssembly.h
12901;0x3265;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;;mission/system/SusAssembly.h
12902;0x3266;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;;mission/system/SusAssembly.h
12903;0x3267;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/SusAssembly.h
13000;0x32c8;CHILDREN_LOST_MODE;MEDIUM;;mission/system/TcsBoardAssembly.h
13100;0x332c;GPS_FIX_CHANGE;INFO;Fix has changed. P1: Old fix. P2: New fix 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix;mission/devices/devicedefinitions/GPSDefinitions.h
13200;0x3390;P60_BOOT_COUNT;INFO;P60 boot count is broadcasted once at SW startup. P1: Boot count;mission/devices/P60DockHandler.h
13201;0x3391;BATT_MODE;INFO;Battery mode is broadcasted at startup. P1: Mode;mission/devices/P60DockHandler.h
13202;0x3392;BATT_MODE_CHANGED;MEDIUM;Battery mode has changed. P1: Old mode. P2: New mode;mission/devices/P60DockHandler.h
13600;0x3520;SUPV_UPDATE_FAILED;LOW;update failed;linux/devices/ploc/PlocSupvHelper.h
13601;0x3521;SUPV_UPDATE_SUCCESSFUL;LOW;update successful;linux/devices/ploc/PlocSupvHelper.h
13602;0x3522;TERMINATED_UPDATE_PROCEDURE;LOW;Terminated update procedure by command;linux/devices/ploc/PlocSupvHelper.h
13603;0x3523;SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL;LOW;Requesting event buffer was successful;linux/devices/ploc/PlocSupvHelper.h
13604;0x3524;SUPV_EVENT_BUFFER_REQUEST_FAILED;LOW;Requesting event buffer failed;linux/devices/ploc/PlocSupvHelper.h
13605;0x3525;SUPV_EVENT_BUFFER_REQUEST_TERMINATED;LOW;Terminated event buffer request by command P1: Number of packets read before process was terminated;linux/devices/ploc/PlocSupvHelper.h
13606;0x3526;SUPV_SENDING_COMMAND_FAILED;LOW;;linux/devices/ploc/PlocSupvHelper.h
13607;0x3527;SUPV_HELPER_REQUESTING_REPLY_FAILED;LOW;Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
13608;0x3528;SUPV_HELPER_READING_REPLY_FAILED;LOW;Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
13609;0x3529;SUPV_MISSING_ACK;LOW;Did not receive acknowledgement report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux/devices/ploc/PlocSupvHelper.h
13610;0x352a;SUPV_MISSING_EXE;LOW;Supervisor did not receive execution report P1: Number of bytes missing P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
13611;0x352b;SUPV_ACK_FAILURE_REPORT;LOW;Supervisor received acknowledgment failure report P1: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
13612;0x352c;SUPV_EXE_FAILURE_REPORT;LOW;Execution report failure P1:;linux/devices/ploc/PlocSupvHelper.h
13613;0x352d;SUPV_ACK_INVALID_APID;LOW;Supervisor expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
13614;0x352e;SUPV_EXE_INVALID_APID;LOW;Supervisor helper expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
13615;0x352f;ACK_RECEPTION_FAILURE;LOW;Failed to receive acknowledgment report P1: Return value P2: Apid of command for which the reception of the acknowledgment report failed;linux/devices/ploc/PlocSupvHelper.h
13616;0x3530;EXE_RECEPTION_FAILURE;LOW;Failed to receive execution report P1: Return value P2: Apid of command for which the reception of the execution report failed;linux/devices/ploc/PlocSupvHelper.h
13617;0x3531;WRITE_MEMORY_FAILED;LOW;Update procedure failed when sending packet with number P1 P1: Packet number for which the memory write command fails;linux/devices/ploc/PlocSupvHelper.h
13700;0x3584;ALLOC_FAILURE;MEDIUM;;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
13703;0x3587;REBOOT_HW;MEDIUM;;bsp_q7s/core/CoreController.h
2200;0x0898;STORE_SEND_WRITE_FAILED;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2201;0x0899;STORE_WRITE_FAILED;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2202;0x089a;STORE_SEND_READ_FAILED;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2203;0x089b;STORE_READ_FAILED;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2204;0x089c;UNEXPECTED_MSG;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2205;0x089d;STORING_FAILED;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2206;0x089e;TM_DUMP_FAILED;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2207;0x089f;STORE_INIT_FAILED;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2208;0x08a0;STORE_INIT_EMPTY;INFO;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2209;0x08a1;STORE_CONTENT_CORRUPTED;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2210;0x08a2;STORE_INITIALIZE;INFO;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2211;0x08a3;INIT_DONE;INFO;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2212;0x08a4;DUMP_FINISHED;INFO;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2213;0x08a5;DELETION_FINISHED;INFO;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2214;0x08a6;DELETION_FAILED;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2215;0x08a7;AUTO_CATALOGS_SENDING_FAILED;INFO;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2600;0x0a28;GET_DATA_FAILED;LOW;;fsfw\src\fsfw\storagemanager\StorageManagerIF.h
2601;0x0a29;STORE_DATA_FAILED;LOW;;fsfw\src\fsfw\storagemanager\StorageManagerIF.h
2800;0x0af0;DEVICE_BUILDING_COMMAND_FAILED;LOW;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2801;0x0af1;DEVICE_SENDING_COMMAND_FAILED;LOW;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2802;0x0af2;DEVICE_REQUESTING_REPLY_FAILED;LOW;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2803;0x0af3;DEVICE_READING_REPLY_FAILED;LOW;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2804;0x0af4;DEVICE_INTERPRETING_REPLY_FAILED;LOW;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2805;0x0af5;DEVICE_MISSED_REPLY;LOW;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2806;0x0af6;DEVICE_UNKNOWN_REPLY;LOW;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2807;0x0af7;DEVICE_UNREQUESTED_REPLY;LOW;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2808;0x0af8;INVALID_DEVICE_COMMAND;LOW;Indicates a SW bug in child class.;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2809;0x0af9;MONITORING_LIMIT_EXCEEDED;LOW;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2810;0x0afa;MONITORING_AMBIGUOUS;HIGH;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2811;0x0afb;DEVICE_WANTS_HARD_REBOOT;HIGH;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
4201;0x1069;FUSE_CURRENT_HIGH;LOW;;fsfw\src\fsfw\power\Fuse.h
4202;0x106a;FUSE_WENT_OFF;LOW;;fsfw\src\fsfw\power\Fuse.h
4204;0x106c;POWER_ABOVE_HIGH_LIMIT;LOW;;fsfw\src\fsfw\power\Fuse.h
4205;0x106d;POWER_BELOW_LOW_LIMIT;LOW;;fsfw\src\fsfw\power\Fuse.h
4300;0x10cc;SWITCH_WENT_OFF;LOW;;fsfw\src\fsfw\power\PowerSwitchIF.h
5000;0x1388;HEATER_ON;INFO;;fsfw\src\fsfw\thermal\Heater.h
5001;0x1389;HEATER_OFF;INFO;;fsfw\src\fsfw\thermal\Heater.h
5002;0x138a;HEATER_TIMEOUT;LOW;;fsfw\src\fsfw\thermal\Heater.h
5003;0x138b;HEATER_STAYED_ON;LOW;;fsfw\src\fsfw\thermal\Heater.h
5004;0x138c;HEATER_STAYED_OFF;LOW;;fsfw\src\fsfw\thermal\Heater.h
5200;0x1450;TEMP_SENSOR_HIGH;LOW;;fsfw\src\fsfw\thermal\AbstractTemperatureSensor.h
5201;0x1451;TEMP_SENSOR_LOW;LOW;;fsfw\src\fsfw\thermal\AbstractTemperatureSensor.h
5202;0x1452;TEMP_SENSOR_GRADIENT;LOW;;fsfw\src\fsfw\thermal\AbstractTemperatureSensor.h
5901;0x170d;COMPONENT_TEMP_LOW;LOW;;fsfw\src\fsfw\thermal\ThermalComponentIF.h
5902;0x170e;COMPONENT_TEMP_HIGH;LOW;;fsfw\src\fsfw\thermal\ThermalComponentIF.h
5903;0x170f;COMPONENT_TEMP_OOL_LOW;LOW;;fsfw\src\fsfw\thermal\ThermalComponentIF.h
5904;0x1710;COMPONENT_TEMP_OOL_HIGH;LOW;;fsfw\src\fsfw\thermal\ThermalComponentIF.h
5905;0x1711;TEMP_NOT_IN_OP_RANGE;LOW;;fsfw\src\fsfw\thermal\ThermalComponentIF.h
7101;0x1bbd;FDIR_CHANGED_STATE;INFO;;fsfw\src\fsfw\fdir\FailureIsolationBase.h
7102;0x1bbe;FDIR_STARTS_RECOVERY;MEDIUM;;fsfw\src\fsfw\fdir\FailureIsolationBase.h
7103;0x1bbf;FDIR_TURNS_OFF_DEVICE;MEDIUM;;fsfw\src\fsfw\fdir\FailureIsolationBase.h
7201;0x1c21;MONITOR_CHANGED_STATE;LOW;;fsfw\src\fsfw\monitoring\MonitoringIF.h
7202;0x1c22;VALUE_BELOW_LOW_LIMIT;LOW;;fsfw\src\fsfw\monitoring\MonitoringIF.h
7203;0x1c23;VALUE_ABOVE_HIGH_LIMIT;LOW;;fsfw\src\fsfw\monitoring\MonitoringIF.h
7204;0x1c24;VALUE_OUT_OF_RANGE;LOW;;fsfw\src\fsfw\monitoring\MonitoringIF.h
7400;0x1ce8;CHANGING_MODE;INFO;;fsfw\src\fsfw\modes\HasModesIF.h
7401;0x1ce9;MODE_INFO;INFO;;fsfw\src\fsfw\modes\HasModesIF.h
7402;0x1cea;FALLBACK_FAILED;HIGH;;fsfw\src\fsfw\modes\HasModesIF.h
7403;0x1ceb;MODE_TRANSITION_FAILED;LOW;;fsfw\src\fsfw\modes\HasModesIF.h
7404;0x1cec;CANT_KEEP_MODE;HIGH;;fsfw\src\fsfw\modes\HasModesIF.h
7405;0x1ced;OBJECT_IN_INVALID_MODE;LOW;;fsfw\src\fsfw\modes\HasModesIF.h
7406;0x1cee;FORCING_MODE;MEDIUM;;fsfw\src\fsfw\modes\HasModesIF.h
7407;0x1cef;MODE_CMD_REJECTED;LOW;;fsfw\src\fsfw\modes\HasModesIF.h
7506;0x1d52;HEALTH_INFO;INFO;;fsfw\src\fsfw\health\HasHealthIF.h
7507;0x1d53;CHILD_CHANGED_HEALTH;INFO;;fsfw\src\fsfw\health\HasHealthIF.h
7508;0x1d54;CHILD_PROBLEMS;LOW;;fsfw\src\fsfw\health\HasHealthIF.h
7509;0x1d55;OVERWRITING_HEALTH;LOW;;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
7512;0x1d58;RECOVERY_DONE;MEDIUM;;fsfw\src\fsfw\health\HasHealthIF.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
7902;0x1ede;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;fsfw\src\fsfw\datalinklayer\DataLinkLayer.h
7903;0x1edf;BIT_LOCK_LOST;INFO;A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0;fsfw\src\fsfw\datalinklayer\DataLinkLayer.h
7905;0x1ee1;FRAME_PROCESSING_FAILED;LOW;The CCSDS Board could not interpret a TC;fsfw\src\fsfw\datalinklayer\DataLinkLayer.h
8900;0x22c4;CLOCK_SET;INFO;;fsfw\src\fsfw\pus\Service9TimeManagement.h
8901;0x22c5;CLOCK_SET_FAILURE;LOW;;fsfw\src\fsfw\pus\Service9TimeManagement.h
9700;0x25e4;TEST;INFO;;fsfw\src\fsfw\pus\Service17Test.h
10600;0x2968;CHANGE_OF_SETUP_PARAMETER;LOW;;fsfw\hal\src\fsfw_hal\devicehandlers\MgmLIS3MDLHandler.h
11300;0x2c24;SWITCH_CMD_SENT;INFO;Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;mission\devices\devicedefinitions\powerDefinitions.h
11301;0x2c25;SWITCH_HAS_CHANGED;INFO;Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index;mission\devices\devicedefinitions\powerDefinitions.h
11302;0x2c26;SWITCHING_Q7S_DENIED;MEDIUM;;mission\devices\devicedefinitions\powerDefinitions.h
11303;0x2c27;FDIR_REACTION_IGNORED;MEDIUM;;mission\devices\devicedefinitions\powerDefinitions.h
11400;0x2c88;GPIO_PULL_HIGH_FAILED;LOW;;mission\devices\HeaterHandler.h
11401;0x2c89;GPIO_PULL_LOW_FAILED;LOW;;mission\devices\HeaterHandler.h
11402;0x2c8a;HEATER_WENT_ON;INFO;;mission\devices\HeaterHandler.h
11403;0x2c8b;HEATER_WENT_OFF;INFO;;mission\devices\HeaterHandler.h
11404;0x2c8c;SWITCH_ALREADY_ON;LOW;;mission\devices\HeaterHandler.h
11405;0x2c8d;SWITCH_ALREADY_OFF;LOW;;mission\devices\HeaterHandler.h
11406;0x2c8e;MAIN_SWITCH_TIMEOUT;MEDIUM;;mission\devices\HeaterHandler.h
11407;0x2c8f;FAULTY_HEATER_WAS_ON;LOW;;mission\devices\HeaterHandler.h
11500;0x2cec;MAIN_SWITCH_ON_TIMEOUT;LOW;;mission\devices\SolarArrayDeploymentHandler.h
11501;0x2ced;MAIN_SWITCH_OFF_TIMEOUT;LOW;;mission\devices\SolarArrayDeploymentHandler.h
11502;0x2cee;DEPLOYMENT_FAILED;HIGH;;mission\devices\SolarArrayDeploymentHandler.h
11503;0x2cef;DEPL_SA1_GPIO_SWTICH_ON_FAILED;HIGH;;mission\devices\SolarArrayDeploymentHandler.h
11504;0x2cf0;DEPL_SA2_GPIO_SWTICH_ON_FAILED;HIGH;;mission\devices\SolarArrayDeploymentHandler.h
11601;0x2d51;MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC crc failure in telemetry packet;linux\devices\ploc\PlocMPSoCHandler.h
11602;0x2d52;ACK_FAILURE;LOW;PLOC receive acknowledgment failure report P1: Command Id which leads the acknowledgment failure report P2: The status field inserted by the MPSoC into the data field;linux\devices\ploc\PlocMPSoCHandler.h
11603;0x2d53;EXE_FAILURE;LOW;PLOC receive execution failure report P1: Command Id which leads the execution failure report P2: The status field inserted by the MPSoC into the data field;linux\devices\ploc\PlocMPSoCHandler.h
11604;0x2d54;MPSOC_HANDLER_CRC_FAILURE;LOW;PLOC reply has invalid crc;linux\devices\ploc\PlocMPSoCHandler.h
11605;0x2d55;MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH;LOW;Packet sequence count in received space packet does not match expected count P1: Expected sequence count P2: Received sequence count;linux\devices\ploc\PlocMPSoCHandler.h
11606;0x2d56;MPSOC_SHUTDOWN_FAILED;HIGH;Supervisor fails to shutdown MPSoC. Requires to power off the PLOC and thus also to shutdown the supervisor.;linux\devices\ploc\PlocMPSoCHandler.h
11701;0x2db5;SELF_TEST_I2C_FAILURE;LOW;Get self test result returns I2C failure P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission\devices\IMTQHandler.h
11702;0x2db6;SELF_TEST_SPI_FAILURE;LOW;Get self test result returns SPI failure. This concerns the MTM connectivity. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission\devices\IMTQHandler.h
11703;0x2db7;SELF_TEST_ADC_FAILURE;LOW;Get self test result returns failure in measurement of current and temperature. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission\devices\IMTQHandler.h
11704;0x2db8;SELF_TEST_PWM_FAILURE;LOW;Get self test result returns PWM failure which concerns the coil actuation. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission\devices\IMTQHandler.h
11705;0x2db9;SELF_TEST_TC_FAILURE;LOW;Get self test result returns TC failure (system failure) P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission\devices\IMTQHandler.h
11706;0x2dba;SELF_TEST_MTM_RANGE_FAILURE;LOW;Get self test result returns failure that MTM values were outside of the expected range. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission\devices\IMTQHandler.h
11707;0x2dbb;SELF_TEST_COIL_CURRENT_FAILURE;LOW;Get self test result returns failure indicating that the coil current was outside of the expected range P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission\devices\IMTQHandler.h
11708;0x2dbc;INVALID_ERROR_BYTE;LOW;Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC.;mission\devices\IMTQHandler.h
11801;0x2e19;ERROR_STATE;HIGH;Reaction wheel signals an error state;mission\devices\devicedefinitions\RwDefinitions.h
11802;0x2e1a;RESET_OCCURED;LOW;;mission\devices\devicedefinitions\RwDefinitions.h
11901;0x2e7d;BOOTING_FIRMWARE_FAILED;LOW;Failed to boot firmware;linux\devices\startracker\StarTrackerHandler.h
11902;0x2e7e;BOOTING_BOOTLOADER_FAILED;LOW;Failed to boot star tracker into bootloader mode;linux\devices\startracker\StarTrackerHandler.h
12001;0x2ee1;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;linux\devices\ploc\PlocSupervisorHandler.h
12002;0x2ee2;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;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
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
12101;0x2f45;MOUNTED_SD_CARD;INFO;;bsp_q7s\memory\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
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
12401;0x3071;INVALID_TC_FRAME;HIGH;;linux\obc\PdecHandler.h
12402;0x3072;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;linux\obc\PdecHandler.h
12403;0x3073;CARRIER_LOCK;INFO;Carrier lock detected;linux\obc\PdecHandler.h
12404;0x3074;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);linux\obc\PdecHandler.h
12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux\devices\startracker\StrHelper.h
12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux\devices\startracker\StrHelper.h
12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux\devices\startracker\StrHelper.h
12503;0x30d7;IMAGE_DOWNLOAD_SUCCESSFUL;LOW;Image download was successful;linux\devices\startracker\StrHelper.h
12504;0x30d8;FLASH_WRITE_SUCCESSFUL;LOW;Finished flash write procedure successfully;linux\devices\startracker\StrHelper.h
12505;0x30d9;FLASH_READ_SUCCESSFUL;LOW;Finished flash read procedure successfully;linux\devices\startracker\StrHelper.h
12506;0x30da;FLASH_READ_FAILED;LOW;Flash read procedure failed;linux\devices\startracker\StrHelper.h
12507;0x30db;FIRMWARE_UPDATE_SUCCESSFUL;LOW;Firmware update was successful;linux\devices\startracker\StrHelper.h
12508;0x30dc;FIRMWARE_UPDATE_FAILED;LOW;Firmware update failed;linux\devices\startracker\StrHelper.h
12509;0x30dd;STR_HELPER_READING_REPLY_FAILED;LOW;Failed to read communication interface reply data P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;linux\devices\startracker\StrHelper.h
12510;0x30de;STR_HELPER_COM_ERROR;LOW;Unexpected stop of decoding sequence P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;linux\devices\startracker\StrHelper.h
12511;0x30df;STR_HELPER_NO_REPLY;LOW;Star tracker did not send replies (maybe device is powered off) P1: Position of upload or download packet for which no reply was sent;linux\devices\startracker\StrHelper.h
12512;0x30e0;STR_HELPER_DEC_ERROR;LOW;Error during decoding of received reply occurred P1: Return value of decoding function P2: Position of upload/download packet, or address of flash write/read request;linux\devices\startracker\StrHelper.h
12513;0x30e1;POSITION_MISMATCH;LOW;Position mismatch P1: The expected position and thus the position for which the image upload/download failed;linux\devices\startracker\StrHelper.h
12514;0x30e2;STR_HELPER_FILE_NOT_EXISTS;LOW;Specified file does not exist P1: Internal state of str helper;linux\devices\startracker\StrHelper.h
12515;0x30e3;STR_HELPER_SENDING_PACKET_FAILED;LOW;;linux\devices\startracker\StrHelper.h
12516;0x30e4;STR_HELPER_REQUESTING_MSG_FAILED;LOW;;linux\devices\startracker\StrHelper.h
12600;0x3138;MPSOC_FLASH_WRITE_FAILED;LOW;Flash write fails;linux\devices\ploc\PlocMPSoCHelper.h
12601;0x3139;MPSOC_FLASH_WRITE_SUCCESSFUL;LOW;Flash write successful;linux\devices\ploc\PlocMPSoCHelper.h
12602;0x313a;MPSOC_SENDING_COMMAND_FAILED;LOW;;linux\devices\ploc\PlocMPSoCHelper.h
12603;0x313b;MPSOC_HELPER_REQUESTING_REPLY_FAILED;LOW;Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of MPSoC helper;linux\devices\ploc\PlocMPSoCHelper.h
12604;0x313c;MPSOC_HELPER_READING_REPLY_FAILED;LOW;Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of MPSoC helper;linux\devices\ploc\PlocMPSoCHelper.h
12605;0x313d;MPSOC_MISSING_ACK;LOW;Did not receive acknowledgment report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux\devices\ploc\PlocMPSoCHelper.h
12606;0x313e;MPSOC_MISSING_EXE;LOW;Did not receive execution report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux\devices\ploc\PlocMPSoCHelper.h
12607;0x313f;MPSOC_ACK_FAILURE_REPORT;LOW;Received acknowledgment failure report P1: Internal state of MPSoC;linux\devices\ploc\PlocMPSoCHelper.h
12608;0x3140;MPSOC_EXE_FAILURE_REPORT;LOW;Received execution failure report P1: Internal state of MPSoC;linux\devices\ploc\PlocMPSoCHelper.h
12609;0x3141;MPSOC_ACK_INVALID_APID;LOW;Expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux\devices\ploc\PlocMPSoCHelper.h
12610;0x3142;MPSOC_EXE_INVALID_APID;LOW;Expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux\devices\ploc\PlocMPSoCHelper.h
12611;0x3143;MPSOC_HELPER_SEQ_CNT_MISMATCH;LOW;Received sequence count does not match expected sequence count P1: Expected sequence count P2: Received sequence count;linux\devices\ploc\PlocMPSoCHelper.h
12700;0x319c;TRANSITION_BACK_TO_OFF;MEDIUM;Could not transition properly and went back to ALL OFF;mission\devices\PayloadPcduHandler.h
12701;0x319d;NEG_V_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12702;0x319e;U_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12703;0x319f;I_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12704;0x31a0;U_X8_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12705;0x31a1;I_X8_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12706;0x31a2;U_TX_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12707;0x31a3;I_TX_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12708;0x31a4;U_MPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12709;0x31a5;I_MPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12710;0x31a6;U_HPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12711;0x31a7;I_HPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12800;0x3200;TRANSITION_OTHER_SIDE_FAILED;HIGH;;mission\system\AcsBoardAssembly.h
12801;0x3201;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;;mission\system\AcsBoardAssembly.h
12802;0x3202;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;;mission\system\AcsBoardAssembly.h
12803;0x3203;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission\system\AcsBoardAssembly.h
12900;0x3264;TRANSITION_OTHER_SIDE_FAILED;HIGH;;mission\system\SusAssembly.h
12901;0x3265;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;;mission\system\SusAssembly.h
12902;0x3266;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;;mission\system\SusAssembly.h
12903;0x3267;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission\system\SusAssembly.h
13000;0x32c8;CHILDREN_LOST_MODE;MEDIUM;;mission\system\TcsBoardAssembly.h
13100;0x332c;GPS_FIX_CHANGE;INFO;Fix has changed. P1: Old fix. P2: New fix 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix;mission\devices\devicedefinitions\GPSDefinitions.h
13200;0x3390;P60_BOOT_COUNT;INFO;P60 boot count is broadcasted once at SW startup. P1: Boot count;mission\devices\P60DockHandler.h
13201;0x3391;BATT_MODE;INFO;Battery mode is broadcasted at startup. P1: Mode;mission\devices\P60DockHandler.h
13202;0x3392;BATT_MODE_CHANGED;MEDIUM;Battery mode has changed. P1: Old mode. P2: New mode;mission\devices\P60DockHandler.h
13600;0x3520;SUPV_UPDATE_FAILED;LOW;update failed;linux\devices\ploc\PlocSupvHelper.h
13601;0x3521;SUPV_UPDATE_SUCCESSFUL;LOW;update successful;linux\devices\ploc\PlocSupvHelper.h
13602;0x3522;SUPV_CONTINUE_UPDATE_FAILED;LOW;Continue update command failed;linux\devices\ploc\PlocSupvHelper.h
13603;0x3523;SUPV_CONTINUE_UPDATE_SUCCESSFUL;LOW;Continue update command successful;linux\devices\ploc\PlocSupvHelper.h
13604;0x3524;TERMINATED_UPDATE_PROCEDURE;LOW;Terminated update procedure by command;linux\devices\ploc\PlocSupvHelper.h
13605;0x3525;SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL;LOW;Requesting event buffer was successful;linux\devices\ploc\PlocSupvHelper.h
13606;0x3526;SUPV_EVENT_BUFFER_REQUEST_FAILED;LOW;Requesting event buffer failed;linux\devices\ploc\PlocSupvHelper.h
13607;0x3527;SUPV_EVENT_BUFFER_REQUEST_TERMINATED;LOW;Terminated event buffer request by command P1: Number of packets read before process was terminated;linux\devices\ploc\PlocSupvHelper.h
13608;0x3528;SUPV_SENDING_COMMAND_FAILED;LOW;;linux\devices\ploc\PlocSupvHelper.h
13609;0x3529;SUPV_HELPER_REQUESTING_REPLY_FAILED;LOW;Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h
13610;0x352a;SUPV_HELPER_READING_REPLY_FAILED;LOW;Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h
13611;0x352b;SUPV_MISSING_ACK;LOW;Did not receive acknowledgement report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux\devices\ploc\PlocSupvHelper.h
13612;0x352c;SUPV_MISSING_EXE;LOW;Supervisor did not receive execution report P1: Number of bytes missing P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h
13613;0x352d;SUPV_ACK_FAILURE_REPORT;LOW;Supervisor received acknowledgment failure report P1: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h
13614;0x352e;SUPV_EXE_FAILURE_REPORT;LOW;Execution report failure P1:;linux\devices\ploc\PlocSupvHelper.h
13615;0x352f;SUPV_ACK_INVALID_APID;LOW;Supervisor expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h
13616;0x3530;SUPV_EXE_INVALID_APID;LOW;Supervisor helper expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h
13617;0x3531;ACK_RECEPTION_FAILURE;LOW;Failed to receive acknowledgment report P1: Return value P2: Apid of command for which the reception of the acknowledgment report failed;linux\devices\ploc\PlocSupvHelper.h
13618;0x3532;EXE_RECEPTION_FAILURE;LOW;Failed to receive execution report P1: Return value P2: Apid of command for which the reception of the execution report failed;linux\devices\ploc\PlocSupvHelper.h
13619;0x3533;WRITE_MEMORY_FAILED;LOW;Update procedure failed when sending packet with number P1 P1: Packet number for which the memory write command fails;linux\devices\ploc\PlocSupvHelper.h
13700;0x3584;ALLOC_FAILURE;MEDIUM;;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
13703;0x3587;REBOOT_HW;MEDIUM;;bsp_q7s\core\CoreController.h

1 Event ID (dec) 2200 Event ID (hex) 0x0898 Name STORE_SEND_WRITE_FAILED Severity LOW Description File Path fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2 2200 2201 0x0898 0x0899 STORE_SEND_WRITE_FAILED STORE_WRITE_FAILED LOW LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
3 2201 2202 0x0899 0x089a STORE_WRITE_FAILED STORE_SEND_READ_FAILED LOW LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
4 2202 2203 0x089a 0x089b STORE_SEND_READ_FAILED STORE_READ_FAILED LOW LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
5 2203 2204 0x089b 0x089c STORE_READ_FAILED UNEXPECTED_MSG LOW LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
6 2204 2205 0x089c 0x089d UNEXPECTED_MSG STORING_FAILED LOW LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
7 2205 2206 0x089d 0x089e STORING_FAILED TM_DUMP_FAILED LOW LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
8 2206 2207 0x089e 0x089f TM_DUMP_FAILED STORE_INIT_FAILED LOW LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
9 2207 2208 0x089f 0x08a0 STORE_INIT_FAILED STORE_INIT_EMPTY LOW INFO fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
10 2208 2209 0x08a0 0x08a1 STORE_INIT_EMPTY STORE_CONTENT_CORRUPTED INFO LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
11 2209 2210 0x08a1 0x08a2 STORE_CONTENT_CORRUPTED STORE_INITIALIZE LOW INFO fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
12 2210 2211 0x08a2 0x08a3 STORE_INITIALIZE INIT_DONE INFO INFO fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
13 2211 2212 0x08a3 0x08a4 INIT_DONE DUMP_FINISHED INFO INFO fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
14 2212 2213 0x08a4 0x08a5 DUMP_FINISHED DELETION_FINISHED INFO INFO fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
15 2213 2214 0x08a5 0x08a6 DELETION_FINISHED DELETION_FAILED INFO LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
16 2214 2215 0x08a6 0x08a7 DELETION_FAILED AUTO_CATALOGS_SENDING_FAILED LOW INFO fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
17 2215 2600 0x08a7 0x0a28 AUTO_CATALOGS_SENDING_FAILED GET_DATA_FAILED INFO LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\storagemanager\StorageManagerIF.h
18 2600 2601 0x0a28 0x0a29 GET_DATA_FAILED STORE_DATA_FAILED LOW LOW fsfw/src/fsfw/storagemanager/StorageManagerIF.h fsfw\src\fsfw\storagemanager\StorageManagerIF.h
19 2601 2800 0x0a29 0x0af0 STORE_DATA_FAILED DEVICE_BUILDING_COMMAND_FAILED LOW LOW fsfw/src/fsfw/storagemanager/StorageManagerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
20 2800 2801 0x0af0 0x0af1 DEVICE_BUILDING_COMMAND_FAILED DEVICE_SENDING_COMMAND_FAILED LOW LOW fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
21 2801 2802 0x0af1 0x0af2 DEVICE_SENDING_COMMAND_FAILED DEVICE_REQUESTING_REPLY_FAILED LOW LOW fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
22 2802 2803 0x0af2 0x0af3 DEVICE_REQUESTING_REPLY_FAILED DEVICE_READING_REPLY_FAILED LOW LOW fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
23 2803 2804 0x0af3 0x0af4 DEVICE_READING_REPLY_FAILED DEVICE_INTERPRETING_REPLY_FAILED LOW LOW fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
24 2804 2805 0x0af4 0x0af5 DEVICE_INTERPRETING_REPLY_FAILED DEVICE_MISSED_REPLY LOW LOW fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
25 2805 2806 0x0af5 0x0af6 DEVICE_MISSED_REPLY DEVICE_UNKNOWN_REPLY LOW LOW fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
26 2806 2807 0x0af6 0x0af7 DEVICE_UNKNOWN_REPLY DEVICE_UNREQUESTED_REPLY LOW LOW fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
27 2807 2808 0x0af7 0x0af8 DEVICE_UNREQUESTED_REPLY INVALID_DEVICE_COMMAND LOW LOW Indicates a SW bug in child class. fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
28 2808 2809 0x0af8 0x0af9 INVALID_DEVICE_COMMAND MONITORING_LIMIT_EXCEEDED LOW LOW Indicates a SW bug in child class. fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
29 2809 2810 0x0af9 0x0afa MONITORING_LIMIT_EXCEEDED MONITORING_AMBIGUOUS LOW HIGH fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
30 2810 2811 0x0afa 0x0afb MONITORING_AMBIGUOUS DEVICE_WANTS_HARD_REBOOT HIGH HIGH fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
31 2811 4201 0x0afb 0x1069 DEVICE_WANTS_HARD_REBOOT FUSE_CURRENT_HIGH HIGH LOW fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\power\Fuse.h
32 4201 4202 0x1069 0x106a FUSE_CURRENT_HIGH FUSE_WENT_OFF LOW LOW fsfw/src/fsfw/power/Fuse.h fsfw\src\fsfw\power\Fuse.h
33 4202 4204 0x106a 0x106c FUSE_WENT_OFF POWER_ABOVE_HIGH_LIMIT LOW LOW fsfw/src/fsfw/power/Fuse.h fsfw\src\fsfw\power\Fuse.h
34 4204 4205 0x106c 0x106d POWER_ABOVE_HIGH_LIMIT POWER_BELOW_LOW_LIMIT LOW LOW fsfw/src/fsfw/power/Fuse.h fsfw\src\fsfw\power\Fuse.h
35 4205 4300 0x106d 0x10cc POWER_BELOW_LOW_LIMIT SWITCH_WENT_OFF LOW LOW fsfw/src/fsfw/power/Fuse.h fsfw\src\fsfw\power\PowerSwitchIF.h
36 4300 5000 0x10cc 0x1388 SWITCH_WENT_OFF HEATER_ON LOW INFO fsfw/src/fsfw/power/PowerSwitchIF.h fsfw\src\fsfw\thermal\Heater.h
37 5000 5001 0x1388 0x1389 HEATER_ON HEATER_OFF INFO INFO fsfw/src/fsfw/thermal/Heater.h fsfw\src\fsfw\thermal\Heater.h
38 5001 5002 0x1389 0x138a HEATER_OFF HEATER_TIMEOUT INFO LOW fsfw/src/fsfw/thermal/Heater.h fsfw\src\fsfw\thermal\Heater.h
39 5002 5003 0x138a 0x138b HEATER_TIMEOUT HEATER_STAYED_ON LOW LOW fsfw/src/fsfw/thermal/Heater.h fsfw\src\fsfw\thermal\Heater.h
40 5003 5004 0x138b 0x138c HEATER_STAYED_ON HEATER_STAYED_OFF LOW LOW fsfw/src/fsfw/thermal/Heater.h fsfw\src\fsfw\thermal\Heater.h
41 5004 5200 0x138c 0x1450 HEATER_STAYED_OFF TEMP_SENSOR_HIGH LOW LOW fsfw/src/fsfw/thermal/Heater.h fsfw\src\fsfw\thermal\AbstractTemperatureSensor.h
42 5200 5201 0x1450 0x1451 TEMP_SENSOR_HIGH TEMP_SENSOR_LOW LOW LOW fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h fsfw\src\fsfw\thermal\AbstractTemperatureSensor.h
43 5201 5202 0x1451 0x1452 TEMP_SENSOR_LOW TEMP_SENSOR_GRADIENT LOW LOW fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h fsfw\src\fsfw\thermal\AbstractTemperatureSensor.h
44 5202 5901 0x1452 0x170d TEMP_SENSOR_GRADIENT COMPONENT_TEMP_LOW LOW LOW fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h fsfw\src\fsfw\thermal\ThermalComponentIF.h
45 5901 5902 0x170d 0x170e COMPONENT_TEMP_LOW COMPONENT_TEMP_HIGH LOW LOW fsfw/src/fsfw/thermal/ThermalComponentIF.h fsfw\src\fsfw\thermal\ThermalComponentIF.h
46 5902 5903 0x170e 0x170f COMPONENT_TEMP_HIGH COMPONENT_TEMP_OOL_LOW LOW LOW fsfw/src/fsfw/thermal/ThermalComponentIF.h fsfw\src\fsfw\thermal\ThermalComponentIF.h
47 5903 5904 0x170f 0x1710 COMPONENT_TEMP_OOL_LOW COMPONENT_TEMP_OOL_HIGH LOW LOW fsfw/src/fsfw/thermal/ThermalComponentIF.h fsfw\src\fsfw\thermal\ThermalComponentIF.h
48 5904 5905 0x1710 0x1711 COMPONENT_TEMP_OOL_HIGH TEMP_NOT_IN_OP_RANGE LOW LOW fsfw/src/fsfw/thermal/ThermalComponentIF.h fsfw\src\fsfw\thermal\ThermalComponentIF.h
49 5905 7101 0x1711 0x1bbd TEMP_NOT_IN_OP_RANGE FDIR_CHANGED_STATE LOW INFO fsfw/src/fsfw/thermal/ThermalComponentIF.h fsfw\src\fsfw\fdir\FailureIsolationBase.h
50 7101 7102 0x1bbd 0x1bbe FDIR_CHANGED_STATE FDIR_STARTS_RECOVERY INFO MEDIUM fsfw/src/fsfw/fdir/FailureIsolationBase.h fsfw\src\fsfw\fdir\FailureIsolationBase.h
51 7102 7103 0x1bbe 0x1bbf FDIR_STARTS_RECOVERY FDIR_TURNS_OFF_DEVICE MEDIUM MEDIUM fsfw/src/fsfw/fdir/FailureIsolationBase.h fsfw\src\fsfw\fdir\FailureIsolationBase.h
52 7103 7201 0x1bbf 0x1c21 FDIR_TURNS_OFF_DEVICE MONITOR_CHANGED_STATE MEDIUM LOW fsfw/src/fsfw/fdir/FailureIsolationBase.h fsfw\src\fsfw\monitoring\MonitoringIF.h
53 7201 7202 0x1c21 0x1c22 MONITOR_CHANGED_STATE VALUE_BELOW_LOW_LIMIT LOW LOW fsfw/src/fsfw/monitoring/MonitoringIF.h fsfw\src\fsfw\monitoring\MonitoringIF.h
54 7202 7203 0x1c22 0x1c23 VALUE_BELOW_LOW_LIMIT VALUE_ABOVE_HIGH_LIMIT LOW LOW fsfw/src/fsfw/monitoring/MonitoringIF.h fsfw\src\fsfw\monitoring\MonitoringIF.h
55 7203 7204 0x1c23 0x1c24 VALUE_ABOVE_HIGH_LIMIT VALUE_OUT_OF_RANGE LOW LOW fsfw/src/fsfw/monitoring/MonitoringIF.h fsfw\src\fsfw\monitoring\MonitoringIF.h
56 7204 7400 0x1c24 0x1ce8 VALUE_OUT_OF_RANGE CHANGING_MODE LOW INFO fsfw/src/fsfw/monitoring/MonitoringIF.h fsfw\src\fsfw\modes\HasModesIF.h
57 7400 7401 0x1ce8 0x1ce9 CHANGING_MODE MODE_INFO INFO INFO fsfw/src/fsfw/modes/HasModesIF.h fsfw\src\fsfw\modes\HasModesIF.h
58 7401 7402 0x1ce9 0x1cea MODE_INFO FALLBACK_FAILED INFO HIGH fsfw/src/fsfw/modes/HasModesIF.h fsfw\src\fsfw\modes\HasModesIF.h
59 7402 7403 0x1cea 0x1ceb FALLBACK_FAILED MODE_TRANSITION_FAILED HIGH LOW fsfw/src/fsfw/modes/HasModesIF.h fsfw\src\fsfw\modes\HasModesIF.h
60 7403 7404 0x1ceb 0x1cec MODE_TRANSITION_FAILED CANT_KEEP_MODE LOW HIGH fsfw/src/fsfw/modes/HasModesIF.h fsfw\src\fsfw\modes\HasModesIF.h
61 7404 7405 0x1cec 0x1ced CANT_KEEP_MODE OBJECT_IN_INVALID_MODE HIGH LOW fsfw/src/fsfw/modes/HasModesIF.h fsfw\src\fsfw\modes\HasModesIF.h
62 7405 7406 0x1ced 0x1cee OBJECT_IN_INVALID_MODE FORCING_MODE LOW MEDIUM fsfw/src/fsfw/modes/HasModesIF.h fsfw\src\fsfw\modes\HasModesIF.h
63 7406 7407 0x1cee 0x1cef FORCING_MODE MODE_CMD_REJECTED MEDIUM LOW fsfw/src/fsfw/modes/HasModesIF.h fsfw\src\fsfw\modes\HasModesIF.h
64 7407 7506 0x1cef 0x1d52 MODE_CMD_REJECTED HEALTH_INFO LOW INFO fsfw/src/fsfw/modes/HasModesIF.h fsfw\src\fsfw\health\HasHealthIF.h
65 7506 7507 0x1d52 0x1d53 HEALTH_INFO CHILD_CHANGED_HEALTH INFO INFO fsfw/src/fsfw/health/HasHealthIF.h fsfw\src\fsfw\health\HasHealthIF.h
66 7507 7508 0x1d53 0x1d54 CHILD_CHANGED_HEALTH CHILD_PROBLEMS INFO LOW fsfw/src/fsfw/health/HasHealthIF.h fsfw\src\fsfw\health\HasHealthIF.h
67 7508 7509 0x1d54 0x1d55 CHILD_PROBLEMS OVERWRITING_HEALTH LOW LOW fsfw/src/fsfw/health/HasHealthIF.h fsfw\src\fsfw\health\HasHealthIF.h
68 7509 7510 0x1d55 0x1d56 OVERWRITING_HEALTH TRYING_RECOVERY LOW MEDIUM fsfw/src/fsfw/health/HasHealthIF.h fsfw\src\fsfw\health\HasHealthIF.h
69 7510 7511 0x1d56 0x1d57 TRYING_RECOVERY RECOVERY_STEP MEDIUM MEDIUM fsfw/src/fsfw/health/HasHealthIF.h fsfw\src\fsfw\health\HasHealthIF.h
70 7511 7512 0x1d57 0x1d58 RECOVERY_STEP RECOVERY_DONE MEDIUM MEDIUM fsfw/src/fsfw/health/HasHealthIF.h fsfw\src\fsfw\health\HasHealthIF.h
71 7512 7900 0x1d58 0x1edc RECOVERY_DONE RF_AVAILABLE MEDIUM INFO A RF available signal was detected. P1: raw RFA state, P2: 0 fsfw/src/fsfw/health/HasHealthIF.h fsfw\src\fsfw\datalinklayer\DataLinkLayer.h
72 7600 7901 0x1db0 0x1edd HANDLE_PACKET_FAILED RF_LOST LOW INFO A previously found RF available signal was lost. P1: raw RFA state, P2: 0 fsfw/src/fsfw/tcdistribution/definitions.h fsfw\src\fsfw\datalinklayer\DataLinkLayer.h
73 7900 7902 0x1edc 0x1ede RF_AVAILABLE BIT_LOCK INFO INFO A RF available signal was detected. P1: raw RFA state, P2: 0 A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0 fsfw/src/fsfw/datalinklayer/DataLinkLayer.h fsfw\src\fsfw\datalinklayer\DataLinkLayer.h
74 7901 7903 0x1edd 0x1edf RF_LOST BIT_LOCK_LOST INFO INFO A previously found RF available signal was lost. P1: raw RFA state, P2: 0 A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0 fsfw/src/fsfw/datalinklayer/DataLinkLayer.h fsfw\src\fsfw\datalinklayer\DataLinkLayer.h
75 7902 7905 0x1ede 0x1ee1 BIT_LOCK FRAME_PROCESSING_FAILED INFO LOW A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0 The CCSDS Board could not interpret a TC fsfw/src/fsfw/datalinklayer/DataLinkLayer.h fsfw\src\fsfw\datalinklayer\DataLinkLayer.h
76 7903 8900 0x1edf 0x22c4 BIT_LOCK_LOST CLOCK_SET INFO INFO A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0 fsfw/src/fsfw/datalinklayer/DataLinkLayer.h fsfw\src\fsfw\pus\Service9TimeManagement.h
77 7905 8901 0x1ee1 0x22c5 FRAME_PROCESSING_FAILED CLOCK_SET_FAILURE LOW LOW The CCSDS Board could not interpret a TC fsfw/src/fsfw/datalinklayer/DataLinkLayer.h fsfw\src\fsfw\pus\Service9TimeManagement.h
78 8900 9700 0x22c4 0x25e4 CLOCK_SET TEST INFO INFO fsfw/src/fsfw/pus/Service9TimeManagement.h fsfw\src\fsfw\pus\Service17Test.h
79 8901 10600 0x22c5 0x2968 CLOCK_SET_FAILURE CHANGE_OF_SETUP_PARAMETER LOW LOW fsfw/src/fsfw/pus/Service9TimeManagement.h fsfw\hal\src\fsfw_hal\devicehandlers\MgmLIS3MDLHandler.h
80 9100 11300 0x238c 0x2c24 TC_DELETION_FAILED SWITCH_CMD_SENT MEDIUM INFO Deletion of a TC from the map failed. P1: First 32 bit of request ID, P2. Last 32 bit of Request ID Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index fsfw/src/fsfw/pus/Service11TelecommandScheduling.h mission\devices\devicedefinitions\powerDefinitions.h
81 9700 11301 0x25e4 0x2c25 TEST SWITCH_HAS_CHANGED INFO INFO Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index fsfw/src/fsfw/pus/Service17Test.h mission\devices\devicedefinitions\powerDefinitions.h
82 10600 11302 0x2968 0x2c26 CHANGE_OF_SETUP_PARAMETER SWITCHING_Q7S_DENIED LOW MEDIUM fsfw/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h mission\devices\devicedefinitions\powerDefinitions.h
83 10800 11303 0x2a30 0x2c27 STORE_ERROR FDIR_REACTION_IGNORED LOW MEDIUM fsfw/src/fsfw/cfdp/handler/defs.h mission\devices\devicedefinitions\powerDefinitions.h
84 10801 11400 0x2a31 0x2c88 MSG_QUEUE_ERROR GPIO_PULL_HIGH_FAILED LOW LOW fsfw/src/fsfw/cfdp/handler/defs.h mission\devices\HeaterHandler.h
85 10802 11401 0x2a32 0x2c89 SERIALIZATION_ERROR GPIO_PULL_LOW_FAILED LOW LOW fsfw/src/fsfw/cfdp/handler/defs.h mission\devices\HeaterHandler.h
86 11300 11402 0x2c24 0x2c8a SWITCH_CMD_SENT HEATER_WENT_ON INFO INFO Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index mission/devices/devicedefinitions/powerDefinitions.h mission\devices\HeaterHandler.h
87 11301 11403 0x2c25 0x2c8b SWITCH_HAS_CHANGED HEATER_WENT_OFF INFO INFO Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index mission/devices/devicedefinitions/powerDefinitions.h mission\devices\HeaterHandler.h
88 11302 11404 0x2c26 0x2c8c SWITCHING_Q7S_DENIED SWITCH_ALREADY_ON MEDIUM LOW mission/devices/devicedefinitions/powerDefinitions.h mission\devices\HeaterHandler.h
89 11303 11405 0x2c27 0x2c8d FDIR_REACTION_IGNORED SWITCH_ALREADY_OFF MEDIUM LOW mission/devices/devicedefinitions/powerDefinitions.h mission\devices\HeaterHandler.h
90 11400 11406 0x2c88 0x2c8e GPIO_PULL_HIGH_FAILED MAIN_SWITCH_TIMEOUT LOW MEDIUM mission/devices/HeaterHandler.h mission\devices\HeaterHandler.h
91 11401 11407 0x2c89 0x2c8f GPIO_PULL_LOW_FAILED FAULTY_HEATER_WAS_ON LOW LOW mission/devices/HeaterHandler.h mission\devices\HeaterHandler.h
92 11402 11500 0x2c8a 0x2cec HEATER_WENT_ON MAIN_SWITCH_ON_TIMEOUT INFO LOW mission/devices/HeaterHandler.h mission\devices\SolarArrayDeploymentHandler.h
93 11403 11501 0x2c8b 0x2ced HEATER_WENT_OFF MAIN_SWITCH_OFF_TIMEOUT INFO LOW mission/devices/HeaterHandler.h mission\devices\SolarArrayDeploymentHandler.h
94 11404 11502 0x2c8c 0x2cee SWITCH_ALREADY_ON DEPLOYMENT_FAILED LOW HIGH mission/devices/HeaterHandler.h mission\devices\SolarArrayDeploymentHandler.h
95 11405 11503 0x2c8d 0x2cef SWITCH_ALREADY_OFF DEPL_SA1_GPIO_SWTICH_ON_FAILED LOW HIGH mission/devices/HeaterHandler.h mission\devices\SolarArrayDeploymentHandler.h
96 11406 11504 0x2c8e 0x2cf0 MAIN_SWITCH_TIMEOUT DEPL_SA2_GPIO_SWTICH_ON_FAILED MEDIUM HIGH mission/devices/HeaterHandler.h mission\devices\SolarArrayDeploymentHandler.h
97 11407 11601 0x2c8f 0x2d51 FAULTY_HEATER_WAS_ON MEMORY_READ_RPT_CRC_FAILURE LOW LOW PLOC crc failure in telemetry packet mission/devices/HeaterHandler.h linux\devices\ploc\PlocMPSoCHandler.h
98 11500 11602 0x2cec 0x2d52 BURN_PHASE_START ACK_FAILURE INFO LOW P1: Burn duration in milliseconds, P2: Dry run flag PLOC receive acknowledgment failure report P1: Command Id which leads the acknowledgment failure report P2: The status field inserted by the MPSoC into the data field mission/devices/SolarArrayDeploymentHandler.h linux\devices\ploc\PlocMPSoCHandler.h
99 11501 11603 0x2ced 0x2d53 BURN_PHASE_DONE EXE_FAILURE INFO LOW P1: Burn duration in milliseconds, P2: Dry run flag PLOC receive execution failure report P1: Command Id which leads the execution failure report P2: The status field inserted by the MPSoC into the data field mission/devices/SolarArrayDeploymentHandler.h linux\devices\ploc\PlocMPSoCHandler.h
100 11502 11604 0x2cee 0x2d54 MAIN_SWITCH_ON_TIMEOUT MPSOC_HANDLER_CRC_FAILURE LOW LOW PLOC reply has invalid crc mission/devices/SolarArrayDeploymentHandler.h linux\devices\ploc\PlocMPSoCHandler.h
101 11503 11605 0x2cef 0x2d55 MAIN_SWITCH_OFF_TIMEOUT MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH LOW LOW Packet sequence count in received space packet does not match expected count P1: Expected sequence count P2: Received sequence count mission/devices/SolarArrayDeploymentHandler.h linux\devices\ploc\PlocMPSoCHandler.h
102 11504 11606 0x2cf0 0x2d56 DEPL_SA1_GPIO_SWTICH_ON_FAILED MPSOC_SHUTDOWN_FAILED HIGH HIGH Supervisor fails to shutdown MPSoC. Requires to power off the PLOC and thus also to shutdown the supervisor. mission/devices/SolarArrayDeploymentHandler.h linux\devices\ploc\PlocMPSoCHandler.h
103 11505 11701 0x2cf1 0x2db5 DEPL_SA2_GPIO_SWTICH_ON_FAILED SELF_TEST_I2C_FAILURE HIGH LOW Get self test result returns I2C failure P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA mission/devices/SolarArrayDeploymentHandler.h mission\devices\IMTQHandler.h
104 11506 11702 0x2cf2 0x2db6 DEPL_SA1_GPIO_SWTICH_OFF_FAILED SELF_TEST_SPI_FAILURE HIGH LOW Get self test result returns SPI failure. This concerns the MTM connectivity. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA mission/devices/SolarArrayDeploymentHandler.h mission\devices\IMTQHandler.h
105 11507 11703 0x2cf3 0x2db7 DEPL_SA2_GPIO_SWTICH_OFF_FAILED SELF_TEST_ADC_FAILURE HIGH LOW Get self test result returns failure in measurement of current and temperature. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA mission/devices/SolarArrayDeploymentHandler.h mission\devices\IMTQHandler.h
106 11508 11704 0x2cf4 0x2db8 AUTONOMOUS_DEPLOYMENT_COMPLETED SELF_TEST_PWM_FAILURE INFO LOW Get self test result returns PWM failure which concerns the coil actuation. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA mission/devices/SolarArrayDeploymentHandler.h mission\devices\IMTQHandler.h
107 11601 11705 0x2d51 0x2db9 MEMORY_READ_RPT_CRC_FAILURE SELF_TEST_TC_FAILURE LOW LOW PLOC crc failure in telemetry packet Get self test result returns TC failure (system failure) P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA linux/devices/ploc/PlocMPSoCHandler.h mission\devices\IMTQHandler.h
108 11602 11706 0x2d52 0x2dba ACK_FAILURE SELF_TEST_MTM_RANGE_FAILURE LOW LOW PLOC receive acknowledgment failure report P1: Command Id which leads the acknowledgment failure report P2: The status field inserted by the MPSoC into the data field Get self test result returns failure that MTM values were outside of the expected range. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA linux/devices/ploc/PlocMPSoCHandler.h mission\devices\IMTQHandler.h
109 11603 11707 0x2d53 0x2dbb EXE_FAILURE SELF_TEST_COIL_CURRENT_FAILURE LOW LOW PLOC receive execution failure report P1: Command Id which leads the execution failure report P2: The status field inserted by the MPSoC into the data field Get self test result returns failure indicating that the coil current was outside of the expected range P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA linux/devices/ploc/PlocMPSoCHandler.h mission\devices\IMTQHandler.h
110 11604 11708 0x2d54 0x2dbc MPSOC_HANDLER_CRC_FAILURE INVALID_ERROR_BYTE LOW LOW PLOC reply has invalid crc Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC. linux/devices/ploc/PlocMPSoCHandler.h mission\devices\IMTQHandler.h
111 11605 11801 0x2d55 0x2e19 MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH ERROR_STATE LOW HIGH Packet sequence count in received space packet does not match expected count P1: Expected sequence count P2: Received sequence count Reaction wheel signals an error state linux/devices/ploc/PlocMPSoCHandler.h mission\devices\devicedefinitions\RwDefinitions.h
112 11606 11802 0x2d56 0x2e1a MPSOC_SHUTDOWN_FAILED RESET_OCCURED HIGH LOW Supervisor fails to shutdown MPSoC. Requires to power off the PLOC and thus also to shutdown the supervisor. linux/devices/ploc/PlocMPSoCHandler.h mission\devices\devicedefinitions\RwDefinitions.h
113 11701 11901 0x2db5 0x2e7d SELF_TEST_I2C_FAILURE BOOTING_FIRMWARE_FAILED LOW LOW Get self test result returns I2C failure P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA Failed to boot firmware mission/devices/ImtqHandler.h linux\devices\startracker\StarTrackerHandler.h
114 11702 11902 0x2db6 0x2e7e SELF_TEST_SPI_FAILURE BOOTING_BOOTLOADER_FAILED LOW LOW Get self test result returns SPI failure. This concerns the MTM connectivity. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA Failed to boot star tracker into bootloader mode mission/devices/ImtqHandler.h linux\devices\startracker\StarTrackerHandler.h
115 11703 12001 0x2db7 0x2ee1 SELF_TEST_ADC_FAILURE SUPV_MEMORY_READ_RPT_CRC_FAILURE LOW LOW Get self test result returns failure in measurement of current and temperature. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA PLOC supervisor crc failure in telemetry packet mission/devices/ImtqHandler.h linux\devices\ploc\PlocSupervisorHandler.h
116 11704 12002 0x2db8 0x2ee2 SELF_TEST_PWM_FAILURE SUPV_ACK_FAILURE LOW LOW Get self test result returns PWM failure which concerns the coil actuation. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA PLOC supervisor received acknowledgment failure report mission/devices/ImtqHandler.h linux\devices\ploc\PlocSupervisorHandler.h
117 11705 12003 0x2db9 0x2ee3 SELF_TEST_TC_FAILURE SUPV_EXE_FAILURE LOW LOW Get self test result returns TC failure (system failure) P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA PLOC received execution failure report P1: ID of command for which the execution failed P2: Status code sent by the supervisor handler mission/devices/ImtqHandler.h linux\devices\ploc\PlocSupervisorHandler.h
118 11706 12004 0x2dba 0x2ee4 SELF_TEST_MTM_RANGE_FAILURE SUPV_CRC_FAILURE_EVENT LOW LOW Get self test result returns failure that MTM values were outside of the expected range. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA PLOC supervisor reply has invalid crc mission/devices/ImtqHandler.h linux\devices\ploc\PlocSupervisorHandler.h
119 11707 12005 0x2dbb 0x2ee5 SELF_TEST_COIL_CURRENT_FAILURE SUPV_MPSOC_SHUWDOWN_BUILD_FAILED LOW LOW Get self test result returns failure indicating that the coil current was outside of the expected range P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA Failed to build the command to shutdown the MPSoC mission/devices/ImtqHandler.h linux\devices\ploc\PlocSupervisorHandler.h
120 11708 12100 0x2dbc 0x2f44 INVALID_ERROR_BYTE SANITIZATION_FAILED LOW LOW Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC. mission/devices/ImtqHandler.h bsp_q7s\memory\SdCardManager.h
121 11801 12101 0x2e19 0x2f45 ERROR_STATE MOUNTED_SD_CARD HIGH INFO Reaction wheel signals an error state mission/devices/devicedefinitions/RwDefinitions.h bsp_q7s\memory\SdCardManager.h
122 11802 12300 0x2e1a 0x300c RESET_OCCURED SEND_MRAM_DUMP_FAILED LOW 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 mission/devices/devicedefinitions/RwDefinitions.h linux\devices\ploc\PlocMemoryDumper.h
123 11901 12301 0x2e7d 0x300d BOOTING_FIRMWARE_FAILED MRAM_DUMP_FAILED LOW LOW Failed to boot firmware Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command linux/devices/startracker/StarTrackerHandler.h linux\devices\ploc\PlocMemoryDumper.h
124 11902 12302 0x2e7e 0x300e BOOTING_BOOTLOADER_FAILED MRAM_DUMP_FINISHED LOW LOW Failed to boot star tracker into bootloader mode MRAM dump finished successfully linux/devices/startracker/StarTrackerHandler.h linux\devices\ploc\PlocMemoryDumper.h
125 12001 12401 0x2ee1 0x3071 SUPV_MEMORY_READ_RPT_CRC_FAILURE INVALID_TC_FRAME LOW HIGH PLOC supervisor crc failure in telemetry packet linux/devices/ploc/PlocSupervisorHandler.h linux\obc\PdecHandler.h
126 12002 12402 0x2ee2 0x3072 SUPV_ACK_FAILURE INVALID_FAR LOW HIGH PLOC supervisor received acknowledgment failure report Read invalid FAR from PDEC after startup linux/devices/ploc/PlocSupervisorHandler.h linux\obc\PdecHandler.h
127 12003 12403 0x2ee3 0x3073 SUPV_EXE_FAILURE CARRIER_LOCK LOW INFO PLOC received execution failure report P1: ID of command for which the execution failed P2: Status code sent by the supervisor handler Carrier lock detected linux/devices/ploc/PlocSupervisorHandler.h linux\obc\PdecHandler.h
128 12004 12404 0x2ee4 0x3074 SUPV_CRC_FAILURE_EVENT BIT_LOCK_PDEC LOW INFO PLOC supervisor reply has invalid crc Bit lock detected (data valid) linux/devices/ploc/PlocSupervisorHandler.h linux\obc\PdecHandler.h
129 12005 12500 0x2ee5 0x30d4 SUPV_MPSOC_SHUWDOWN_BUILD_FAILED IMAGE_UPLOAD_FAILED LOW LOW Failed to build the command to shutdown the MPSoC Image upload failed linux/devices/ploc/PlocSupervisorHandler.h linux\devices\startracker\StrHelper.h
130 12100 12501 0x2f44 0x30d5 SANITIZATION_FAILED IMAGE_DOWNLOAD_FAILED LOW LOW Image download failed bsp_q7s/fs/SdCardManager.h linux\devices\startracker\StrHelper.h
131 12101 12502 0x2f45 0x30d6 MOUNTED_SD_CARD IMAGE_UPLOAD_SUCCESSFUL INFO LOW Uploading image to star tracker was successfulop bsp_q7s/fs/SdCardManager.h linux\devices\startracker\StrHelper.h
132 12300 12503 0x300c 0x30d7 SEND_MRAM_DUMP_FAILED IMAGE_DOWNLOAD_SUCCESSFUL LOW 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 Image download was successful linux/devices/ploc/PlocMemoryDumper.h linux\devices\startracker\StrHelper.h
133 12301 12504 0x300d 0x30d8 MRAM_DUMP_FAILED FLASH_WRITE_SUCCESSFUL LOW LOW Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command Finished flash write procedure successfully linux/devices/ploc/PlocMemoryDumper.h linux\devices\startracker\StrHelper.h
134 12302 12505 0x300e 0x30d9 MRAM_DUMP_FINISHED FLASH_READ_SUCCESSFUL LOW LOW MRAM dump finished successfully Finished flash read procedure successfully linux/devices/ploc/PlocMemoryDumper.h linux\devices\startracker\StrHelper.h
135 12401 12506 0x3071 0x30da INVALID_TC_FRAME FLASH_READ_FAILED HIGH LOW Flash read procedure failed linux/obc/PdecHandler.h linux\devices\startracker\StrHelper.h
136 12402 12507 0x3072 0x30db INVALID_FAR FIRMWARE_UPDATE_SUCCESSFUL HIGH LOW Read invalid FAR from PDEC after startup Firmware update was successful linux/obc/PdecHandler.h linux\devices\startracker\StrHelper.h
137 12403 12508 0x3073 0x30dc CARRIER_LOCK FIRMWARE_UPDATE_FAILED INFO LOW Carrier lock detected Firmware update failed linux/obc/PdecHandler.h linux\devices\startracker\StrHelper.h
138 12404 12509 0x3074 0x30dd BIT_LOCK_PDEC STR_HELPER_READING_REPLY_FAILED INFO LOW Bit lock detected (data valid) Failed to read communication interface reply data P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed linux/obc/PdecHandler.h linux\devices\startracker\StrHelper.h
139 12405 12510 0x3075 0x30de LOST_CARRIER_LOCK_PDEC STR_HELPER_COM_ERROR INFO LOW Lost carrier lock Unexpected stop of decoding sequence P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed linux/obc/PdecHandler.h linux\devices\startracker\StrHelper.h
140 12406 12511 0x3076 0x30df LOST_BIT_LOCK_PDEC STR_HELPER_NO_REPLY INFO LOW Lost bit lock Star tracker did not send replies (maybe device is powered off) P1: Position of upload or download packet for which no reply was sent linux/obc/PdecHandler.h linux\devices\startracker\StrHelper.h
141 12500 12512 0x30d4 0x30e0 IMAGE_UPLOAD_FAILED STR_HELPER_DEC_ERROR LOW LOW Image upload failed Error during decoding of received reply occurred P1: Return value of decoding function P2: Position of upload/download packet, or address of flash write/read request linux/devices/startracker/StrHelper.h linux\devices\startracker\StrHelper.h
142 12501 12513 0x30d5 0x30e1 IMAGE_DOWNLOAD_FAILED POSITION_MISMATCH LOW LOW Image download failed Position mismatch P1: The expected position and thus the position for which the image upload/download failed linux/devices/startracker/StrHelper.h linux\devices\startracker\StrHelper.h
143 12502 12514 0x30d6 0x30e2 IMAGE_UPLOAD_SUCCESSFUL STR_HELPER_FILE_NOT_EXISTS LOW LOW Uploading image to star tracker was successfulop Specified file does not exist P1: Internal state of str helper linux/devices/startracker/StrHelper.h linux\devices\startracker\StrHelper.h
144 12503 12515 0x30d7 0x30e3 IMAGE_DOWNLOAD_SUCCESSFUL STR_HELPER_SENDING_PACKET_FAILED LOW LOW Image download was successful linux/devices/startracker/StrHelper.h linux\devices\startracker\StrHelper.h
145 12504 12516 0x30d8 0x30e4 FLASH_WRITE_SUCCESSFUL STR_HELPER_REQUESTING_MSG_FAILED LOW LOW Finished flash write procedure successfully linux/devices/startracker/StrHelper.h linux\devices\startracker\StrHelper.h
146 12505 12600 0x30d9 0x3138 FLASH_READ_SUCCESSFUL MPSOC_FLASH_WRITE_FAILED LOW LOW Finished flash read procedure successfully Flash write fails linux/devices/startracker/StrHelper.h linux\devices\ploc\PlocMPSoCHelper.h
147 12506 12601 0x30da 0x3139 FLASH_READ_FAILED MPSOC_FLASH_WRITE_SUCCESSFUL LOW LOW Flash read procedure failed Flash write successful linux/devices/startracker/StrHelper.h linux\devices\ploc\PlocMPSoCHelper.h
148 12507 12602 0x30db 0x313a FIRMWARE_UPDATE_SUCCESSFUL MPSOC_SENDING_COMMAND_FAILED LOW LOW Firmware update was successful linux/devices/startracker/StrHelper.h linux\devices\ploc\PlocMPSoCHelper.h
149 12508 12603 0x30dc 0x313b FIRMWARE_UPDATE_FAILED MPSOC_HELPER_REQUESTING_REPLY_FAILED LOW LOW Firmware update failed Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of MPSoC helper linux/devices/startracker/StrHelper.h linux\devices\ploc\PlocMPSoCHelper.h
150 12509 12604 0x30dd 0x313c STR_HELPER_READING_REPLY_FAILED MPSOC_HELPER_READING_REPLY_FAILED LOW LOW Failed to read communication interface reply data P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of MPSoC helper linux/devices/startracker/StrHelper.h linux\devices\ploc\PlocMPSoCHelper.h
151 12510 12605 0x30de 0x313d STR_HELPER_COM_ERROR MPSOC_MISSING_ACK LOW LOW Unexpected stop of decoding sequence P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed Did not receive acknowledgment report P1: Number of bytes missing P2: Internal state of MPSoC helper linux/devices/startracker/StrHelper.h linux\devices\ploc\PlocMPSoCHelper.h
152 12511 12606 0x30df 0x313e STR_HELPER_NO_REPLY MPSOC_MISSING_EXE LOW LOW Star tracker did not send replies (maybe device is powered off) P1: Position of upload or download packet for which no reply was sent Did not receive execution report P1: Number of bytes missing P2: Internal state of MPSoC helper linux/devices/startracker/StrHelper.h linux\devices\ploc\PlocMPSoCHelper.h
153 12512 12607 0x30e0 0x313f STR_HELPER_DEC_ERROR MPSOC_ACK_FAILURE_REPORT LOW LOW Error during decoding of received reply occurred P1: Return value of decoding function P2: Position of upload/download packet, or address of flash write/read request Received acknowledgment failure report P1: Internal state of MPSoC linux/devices/startracker/StrHelper.h linux\devices\ploc\PlocMPSoCHelper.h
154 12513 12608 0x30e1 0x3140 POSITION_MISMATCH MPSOC_EXE_FAILURE_REPORT LOW LOW Position mismatch P1: The expected position and thus the position for which the image upload/download failed Received execution failure report P1: Internal state of MPSoC linux/devices/startracker/StrHelper.h linux\devices\ploc\PlocMPSoCHelper.h
155 12514 12609 0x30e2 0x3141 STR_HELPER_FILE_NOT_EXISTS MPSOC_ACK_INVALID_APID LOW LOW Specified file does not exist P1: Internal state of str helper Expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC linux/devices/startracker/StrHelper.h linux\devices\ploc\PlocMPSoCHelper.h
156 12515 12610 0x30e3 0x3142 STR_HELPER_SENDING_PACKET_FAILED MPSOC_EXE_INVALID_APID LOW LOW Expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC linux/devices/startracker/StrHelper.h linux\devices\ploc\PlocMPSoCHelper.h
157 12516 12611 0x30e4 0x3143 STR_HELPER_REQUESTING_MSG_FAILED MPSOC_HELPER_SEQ_CNT_MISMATCH LOW LOW Received sequence count does not match expected sequence count P1: Expected sequence count P2: Received sequence count linux/devices/startracker/StrHelper.h linux\devices\ploc\PlocMPSoCHelper.h
158 12600 12700 0x3138 0x319c MPSOC_FLASH_WRITE_FAILED TRANSITION_BACK_TO_OFF LOW MEDIUM Flash write fails Could not transition properly and went back to ALL OFF linux/devices/ploc/PlocMPSoCHelper.h mission\devices\PayloadPcduHandler.h
159 12601 12701 0x3139 0x319d MPSOC_FLASH_WRITE_SUCCESSFUL NEG_V_OUT_OF_BOUNDS LOW MEDIUM Flash write successful P1: 0 -> too low, 1 -> too high P2: Float value linux/devices/ploc/PlocMPSoCHelper.h mission\devices\PayloadPcduHandler.h
160 12602 12702 0x313a 0x319e MPSOC_SENDING_COMMAND_FAILED U_DRO_OUT_OF_BOUNDS LOW MEDIUM P1: 0 -> too low, 1 -> too high P2: Float value linux/devices/ploc/PlocMPSoCHelper.h mission\devices\PayloadPcduHandler.h
161 12603 12703 0x313b 0x319f MPSOC_HELPER_REQUESTING_REPLY_FAILED I_DRO_OUT_OF_BOUNDS LOW MEDIUM Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of MPSoC helper P1: 0 -> too low, 1 -> too high P2: Float value linux/devices/ploc/PlocMPSoCHelper.h mission\devices\PayloadPcduHandler.h
162 12604 12704 0x313c 0x31a0 MPSOC_HELPER_READING_REPLY_FAILED U_X8_OUT_OF_BOUNDS LOW MEDIUM Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of MPSoC helper P1: 0 -> too low, 1 -> too high P2: Float value linux/devices/ploc/PlocMPSoCHelper.h mission\devices\PayloadPcduHandler.h
163 12605 12705 0x313d 0x31a1 MPSOC_MISSING_ACK I_X8_OUT_OF_BOUNDS LOW MEDIUM Did not receive acknowledgment report P1: Number of bytes missing P2: Internal state of MPSoC helper P1: 0 -> too low, 1 -> too high P2: Float value linux/devices/ploc/PlocMPSoCHelper.h mission\devices\PayloadPcduHandler.h
164 12606 12706 0x313e 0x31a2 MPSOC_MISSING_EXE U_TX_OUT_OF_BOUNDS LOW MEDIUM Did not receive execution report P1: Number of bytes missing P2: Internal state of MPSoC helper P1: 0 -> too low, 1 -> too high P2: Float value linux/devices/ploc/PlocMPSoCHelper.h mission\devices\PayloadPcduHandler.h
165 12607 12707 0x313f 0x31a3 MPSOC_ACK_FAILURE_REPORT I_TX_OUT_OF_BOUNDS LOW MEDIUM Received acknowledgment failure report P1: Internal state of MPSoC P1: 0 -> too low, 1 -> too high P2: Float value linux/devices/ploc/PlocMPSoCHelper.h mission\devices\PayloadPcduHandler.h
166 12608 12708 0x3140 0x31a4 MPSOC_EXE_FAILURE_REPORT U_MPA_OUT_OF_BOUNDS LOW MEDIUM Received execution failure report P1: Internal state of MPSoC P1: 0 -> too low, 1 -> too high P2: Float value linux/devices/ploc/PlocMPSoCHelper.h mission\devices\PayloadPcduHandler.h
167 12609 12709 0x3141 0x31a5 MPSOC_ACK_INVALID_APID I_MPA_OUT_OF_BOUNDS LOW MEDIUM Expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC P1: 0 -> too low, 1 -> too high P2: Float value linux/devices/ploc/PlocMPSoCHelper.h mission\devices\PayloadPcduHandler.h
168 12610 12710 0x3142 0x31a6 MPSOC_EXE_INVALID_APID U_HPA_OUT_OF_BOUNDS LOW MEDIUM Expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC P1: 0 -> too low, 1 -> too high P2: Float value linux/devices/ploc/PlocMPSoCHelper.h mission\devices\PayloadPcduHandler.h
169 12611 12711 0x3143 0x31a7 MPSOC_HELPER_SEQ_CNT_MISMATCH I_HPA_OUT_OF_BOUNDS LOW MEDIUM Received sequence count does not match expected sequence count P1: Expected sequence count P2: Received sequence count P1: 0 -> too low, 1 -> too high P2: Float value linux/devices/ploc/PlocMPSoCHelper.h mission\devices\PayloadPcduHandler.h
170 12612 12800 0x3144 0x3200 MPSOC_TM_SIZE_ERROR TRANSITION_OTHER_SIDE_FAILED LOW HIGH linux/devices/ploc/PlocMPSoCHelper.h mission\system\AcsBoardAssembly.h
171 12613 12801 0x3145 0x3201 MPSOC_TM_CRC_MISSMATCH NOT_ENOUGH_DEVICES_DUAL_MODE LOW HIGH linux/devices/ploc/PlocMPSoCHelper.h mission\system\AcsBoardAssembly.h
172 12700 12802 0x319c 0x3202 TRANSITION_BACK_TO_OFF POWER_STATE_MACHINE_TIMEOUT MEDIUM MEDIUM Could not transition properly and went back to ALL OFF mission/devices/PayloadPcduHandler.h mission\system\AcsBoardAssembly.h
173 12701 12803 0x319d 0x3203 NEG_V_OUT_OF_BOUNDS SIDE_SWITCH_TRANSITION_NOT_ALLOWED MEDIUM LOW P1: 0 -> too low, 1 -> too high P2: Float value Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination mission/devices/PayloadPcduHandler.h mission\system\AcsBoardAssembly.h
174 12702 12900 0x319e 0x3264 U_DRO_OUT_OF_BOUNDS TRANSITION_OTHER_SIDE_FAILED MEDIUM HIGH P1: 0 -> too low, 1 -> too high P2: Float value mission/devices/PayloadPcduHandler.h mission\system\SusAssembly.h
175 12703 12901 0x319f 0x3265 I_DRO_OUT_OF_BOUNDS NOT_ENOUGH_DEVICES_DUAL_MODE MEDIUM HIGH P1: 0 -> too low, 1 -> too high P2: Float value mission/devices/PayloadPcduHandler.h mission\system\SusAssembly.h
176 12704 12902 0x31a0 0x3266 U_X8_OUT_OF_BOUNDS POWER_STATE_MACHINE_TIMEOUT MEDIUM MEDIUM P1: 0 -> too low, 1 -> too high P2: Float value mission/devices/PayloadPcduHandler.h mission\system\SusAssembly.h
177 12705 12903 0x31a1 0x3267 I_X8_OUT_OF_BOUNDS SIDE_SWITCH_TRANSITION_NOT_ALLOWED MEDIUM LOW P1: 0 -> too low, 1 -> too high P2: Float value Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination mission/devices/PayloadPcduHandler.h mission\system\SusAssembly.h
178 12706 13000 0x31a2 0x32c8 U_TX_OUT_OF_BOUNDS CHILDREN_LOST_MODE MEDIUM MEDIUM P1: 0 -> too low, 1 -> too high P2: Float value mission/devices/PayloadPcduHandler.h mission\system\TcsBoardAssembly.h
179 12707 13100 0x31a3 0x332c I_TX_OUT_OF_BOUNDS GPS_FIX_CHANGE MEDIUM INFO P1: 0 -> too low, 1 -> too high P2: Float value Fix has changed. P1: Old fix. P2: New fix 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix mission/devices/PayloadPcduHandler.h mission\devices\devicedefinitions\GPSDefinitions.h
180 12708 13200 0x31a4 0x3390 U_MPA_OUT_OF_BOUNDS P60_BOOT_COUNT MEDIUM INFO P1: 0 -> too low, 1 -> too high P2: Float value P60 boot count is broadcasted once at SW startup. P1: Boot count mission/devices/PayloadPcduHandler.h mission\devices\P60DockHandler.h
181 12709 13201 0x31a5 0x3391 I_MPA_OUT_OF_BOUNDS BATT_MODE MEDIUM INFO P1: 0 -> too low, 1 -> too high P2: Float value Battery mode is broadcasted at startup. P1: Mode mission/devices/PayloadPcduHandler.h mission\devices\P60DockHandler.h
182 12710 13202 0x31a6 0x3392 U_HPA_OUT_OF_BOUNDS BATT_MODE_CHANGED MEDIUM MEDIUM P1: 0 -> too low, 1 -> too high P2: Float value Battery mode has changed. P1: Old mode. P2: New mode mission/devices/PayloadPcduHandler.h mission\devices\P60DockHandler.h
183 12711 13600 0x31a7 0x3520 I_HPA_OUT_OF_BOUNDS SUPV_UPDATE_FAILED MEDIUM LOW P1: 0 -> too low, 1 -> too high P2: Float value update failed mission/devices/PayloadPcduHandler.h linux\devices\ploc\PlocSupvHelper.h
184 12800 13601 0x3200 0x3521 TRANSITION_OTHER_SIDE_FAILED SUPV_UPDATE_SUCCESSFUL HIGH LOW update successful mission/system/AcsBoardAssembly.h linux\devices\ploc\PlocSupvHelper.h
185 12801 13602 0x3201 0x3522 NOT_ENOUGH_DEVICES_DUAL_MODE SUPV_CONTINUE_UPDATE_FAILED HIGH LOW Continue update command failed mission/system/AcsBoardAssembly.h linux\devices\ploc\PlocSupvHelper.h
186 12802 13603 0x3202 0x3523 POWER_STATE_MACHINE_TIMEOUT SUPV_CONTINUE_UPDATE_SUCCESSFUL MEDIUM LOW Continue update command successful mission/system/AcsBoardAssembly.h linux\devices\ploc\PlocSupvHelper.h
187 12803 13604 0x3203 0x3524 SIDE_SWITCH_TRANSITION_NOT_ALLOWED TERMINATED_UPDATE_PROCEDURE LOW LOW Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination Terminated update procedure by command mission/system/AcsBoardAssembly.h linux\devices\ploc\PlocSupvHelper.h
188 12900 13605 0x3264 0x3525 TRANSITION_OTHER_SIDE_FAILED SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL HIGH LOW Requesting event buffer was successful mission/system/SusAssembly.h linux\devices\ploc\PlocSupvHelper.h
189 12901 13606 0x3265 0x3526 NOT_ENOUGH_DEVICES_DUAL_MODE SUPV_EVENT_BUFFER_REQUEST_FAILED HIGH LOW Requesting event buffer failed mission/system/SusAssembly.h linux\devices\ploc\PlocSupvHelper.h
190 12902 13607 0x3266 0x3527 POWER_STATE_MACHINE_TIMEOUT SUPV_EVENT_BUFFER_REQUEST_TERMINATED MEDIUM LOW Terminated event buffer request by command P1: Number of packets read before process was terminated mission/system/SusAssembly.h linux\devices\ploc\PlocSupvHelper.h
191 12903 13608 0x3267 0x3528 SIDE_SWITCH_TRANSITION_NOT_ALLOWED SUPV_SENDING_COMMAND_FAILED LOW LOW Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination mission/system/SusAssembly.h linux\devices\ploc\PlocSupvHelper.h
192 13000 13609 0x32c8 0x3529 CHILDREN_LOST_MODE SUPV_HELPER_REQUESTING_REPLY_FAILED MEDIUM LOW Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of supervisor helper mission/system/TcsBoardAssembly.h linux\devices\ploc\PlocSupvHelper.h
193 13100 13610 0x332c 0x352a GPS_FIX_CHANGE SUPV_HELPER_READING_REPLY_FAILED INFO LOW Fix has changed. P1: Old fix. P2: New fix 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of supervisor helper mission/devices/devicedefinitions/GPSDefinitions.h linux\devices\ploc\PlocSupvHelper.h
194 13200 13611 0x3390 0x352b P60_BOOT_COUNT SUPV_MISSING_ACK INFO LOW P60 boot count is broadcasted once at SW startup. P1: Boot count Did not receive acknowledgement report P1: Number of bytes missing P2: Internal state of MPSoC helper mission/devices/P60DockHandler.h linux\devices\ploc\PlocSupvHelper.h
195 13201 13612 0x3391 0x352c BATT_MODE SUPV_MISSING_EXE INFO LOW Battery mode is broadcasted at startup. P1: Mode Supervisor did not receive execution report P1: Number of bytes missing P2: Internal state of supervisor helper mission/devices/P60DockHandler.h linux\devices\ploc\PlocSupvHelper.h
196 13202 13613 0x3392 0x352d BATT_MODE_CHANGED SUPV_ACK_FAILURE_REPORT MEDIUM LOW Battery mode has changed. P1: Old mode. P2: New mode Supervisor received acknowledgment failure report P1: Internal state of supervisor helper mission/devices/P60DockHandler.h linux\devices\ploc\PlocSupvHelper.h
197 13600 13614 0x3520 0x352e SUPV_UPDATE_FAILED SUPV_EXE_FAILURE_REPORT LOW LOW update failed Execution report failure P1: linux/devices/ploc/PlocSupvHelper.h linux\devices\ploc\PlocSupvHelper.h
198 13601 13615 0x3521 0x352f SUPV_UPDATE_SUCCESSFUL SUPV_ACK_INVALID_APID LOW LOW update successful Supervisor expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper linux/devices/ploc/PlocSupvHelper.h linux\devices\ploc\PlocSupvHelper.h
199 13602 13616 0x3522 0x3530 SUPV_CONTINUE_UPDATE_FAILED SUPV_EXE_INVALID_APID LOW LOW Continue update command failed Supervisor helper expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper linux/devices/ploc/PlocSupvHelper.h linux\devices\ploc\PlocSupvHelper.h
200 13603 13617 0x3523 0x3531 SUPV_CONTINUE_UPDATE_SUCCESSFUL ACK_RECEPTION_FAILURE LOW LOW Continue update command successful Failed to receive acknowledgment report P1: Return value P2: Apid of command for which the reception of the acknowledgment report failed linux/devices/ploc/PlocSupvHelper.h linux\devices\ploc\PlocSupvHelper.h
201 13604 13618 0x3524 0x3532 TERMINATED_UPDATE_PROCEDURE EXE_RECEPTION_FAILURE LOW LOW Terminated update procedure by command Failed to receive execution report P1: Return value P2: Apid of command for which the reception of the execution report failed linux/devices/ploc/PlocSupvHelper.h linux\devices\ploc\PlocSupvHelper.h
202 13605 13619 0x3525 0x3533 SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL WRITE_MEMORY_FAILED LOW LOW Requesting event buffer was successful Update procedure failed when sending packet with number P1 P1: Packet number for which the memory write command fails linux/devices/ploc/PlocSupvHelper.h linux\devices\ploc\PlocSupvHelper.h
203 13606 13700 0x3526 0x3584 SUPV_EVENT_BUFFER_REQUEST_FAILED ALLOC_FAILURE LOW MEDIUM Requesting event buffer failed linux/devices/ploc/PlocSupvHelper.h bsp_q7s\core\CoreController.h
204 13607 13701 0x3527 0x3585 SUPV_EVENT_BUFFER_REQUEST_TERMINATED REBOOT_SW LOW MEDIUM Terminated event buffer request by command P1: Number of packets read before process was terminated Software reboot occurred. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy linux/devices/ploc/PlocSupvHelper.h bsp_q7s\core\CoreController.h
205 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
206 13703 0x3587 REBOOT_HW MEDIUM bsp_q7s\core\CoreController.h

View File

@ -71,6 +71,7 @@
0x49010005;GPIO_IF
0x49020004;SPI_MAIN_COM_IF
0x49020005;SPI_RW_COM_IF
0x49020006;SPI_RTD_COM_IF
0x49030003;UART_COM_IF
0x49040002;I2C_COM_IF
0x49050001;CSP_COM_IF
@ -91,6 +92,7 @@
0x53000005;PUS_SERVICE_5_EVENT_REPORTING
0x53000008;PUS_SERVICE_8_FUNCTION_MGMT
0x53000009;PUS_SERVICE_9_TIME_MGMT
0x53000011;PUS_SERVICE_11_TC_SCHEDULER
0x53000017;PUS_SERVICE_17_TEST
0x53000020;PUS_SERVICE_20_PARAMETERS
0x53000200;PUS_SERVICE_200_MODE_MGMT

1 0x00005060 P60DOCK_TEST_TASK
71 0x445300A3 0x49010005 SYRLINKS_HK_HANDLER GPIO_IF
72 0x49000000 0x49020004 ARDUINO_COM_IF SPI_MAIN_COM_IF
73 0x49010005 0x49020005 GPIO_IF SPI_RW_COM_IF
74 0x49020006 SPI_RTD_COM_IF
75 0x49010006 0x49030003 SCEX_UART_READER UART_COM_IF
76 0x49020004 0x49040002 SPI_MAIN_COM_IF I2C_COM_IF
77 0x49020005 0x49050001 SPI_RW_COM_IF CSP_COM_IF
92 0x53000000 0x53000005 FSFW_OBJECTS_START PUS_SERVICE_5_EVENT_REPORTING
93 0x53000001 0x53000008 PUS_SERVICE_1_VERIFICATION PUS_SERVICE_8_FUNCTION_MGMT
94 0x53000002 0x53000009 PUS_SERVICE_2_DEVICE_ACCESS PUS_SERVICE_9_TIME_MGMT
95 0x53000011 PUS_SERVICE_11_TC_SCHEDULER
96 0x53000003 0x53000017 PUS_SERVICE_3_HOUSEKEEPING PUS_SERVICE_17_TEST
97 0x53000005 0x53000020 PUS_SERVICE_5_EVENT_REPORTING PUS_SERVICE_20_PARAMETERS
98 0x53000008 0x53000200 PUS_SERVICE_8_FUNCTION_MGMT PUS_SERVICE_200_MODE_MGMT

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 204 translations.
* @brief Auto-generated event translation file. Contains 206 translations.
* @details
* Generated on: 2022-05-13 18:40:51
* Generated on: 2022-05-23 16:46:55
*/
#include "translateEvents.h"
@ -185,6 +185,8 @@ const char *BATT_MODE_STRING = "BATT_MODE";
const char *BATT_MODE_CHANGED_STRING = "BATT_MODE_CHANGED";
const char *SUPV_UPDATE_FAILED_STRING = "SUPV_UPDATE_FAILED";
const char *SUPV_UPDATE_SUCCESSFUL_STRING = "SUPV_UPDATE_SUCCESSFUL";
const char *SUPV_CONTINUE_UPDATE_FAILED_STRING = "SUPV_CONTINUE_UPDATE_FAILED";
const char *SUPV_CONTINUE_UPDATE_SUCCESSFUL_STRING = "SUPV_CONTINUE_UPDATE_SUCCESSFUL";
const char *TERMINATED_UPDATE_PROCEDURE_STRING = "TERMINATED_UPDATE_PROCEDURE";
const char *SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL_STRING = "SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL";
const char *SUPV_EVENT_BUFFER_REQUEST_FAILED_STRING = "SUPV_EVENT_BUFFER_REQUEST_FAILED";
@ -569,36 +571,40 @@ const char *translateEvents(Event event) {
case (13601):
return SUPV_UPDATE_SUCCESSFUL_STRING;
case (13602):
return TERMINATED_UPDATE_PROCEDURE_STRING;
return SUPV_CONTINUE_UPDATE_FAILED_STRING;
case (13603):
return SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL_STRING;
return SUPV_CONTINUE_UPDATE_SUCCESSFUL_STRING;
case (13604):
return SUPV_EVENT_BUFFER_REQUEST_FAILED_STRING;
return TERMINATED_UPDATE_PROCEDURE_STRING;
case (13605):
return SUPV_EVENT_BUFFER_REQUEST_TERMINATED_STRING;
return SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL_STRING;
case (13606):
return SUPV_SENDING_COMMAND_FAILED_STRING;
return SUPV_EVENT_BUFFER_REQUEST_FAILED_STRING;
case (13607):
return SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING;
return SUPV_EVENT_BUFFER_REQUEST_TERMINATED_STRING;
case (13608):
return SUPV_HELPER_READING_REPLY_FAILED_STRING;
return SUPV_SENDING_COMMAND_FAILED_STRING;
case (13609):
return SUPV_MISSING_ACK_STRING;
return SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING;
case (13610):
return SUPV_MISSING_EXE_STRING;
return SUPV_HELPER_READING_REPLY_FAILED_STRING;
case (13611):
return SUPV_ACK_FAILURE_REPORT_STRING;
return SUPV_MISSING_ACK_STRING;
case (13612):
return SUPV_EXE_FAILURE_REPORT_STRING;
return SUPV_MISSING_EXE_STRING;
case (13613):
return SUPV_ACK_INVALID_APID_STRING;
return SUPV_ACK_FAILURE_REPORT_STRING;
case (13614):
return SUPV_EXE_INVALID_APID_STRING;
return SUPV_EXE_FAILURE_REPORT_STRING;
case (13615):
return ACK_RECEPTION_FAILURE_STRING;
return SUPV_ACK_INVALID_APID_STRING;
case (13616):
return EXE_RECEPTION_FAILURE_STRING;
return SUPV_EXE_INVALID_APID_STRING;
case (13617):
return ACK_RECEPTION_FAILURE_STRING;
case (13618):
return EXE_RECEPTION_FAILURE_STRING;
case (13619):
return WRITE_MEMORY_FAILED_STRING;
case (13700):
return ALLOC_FAILURE_STRING;

View File

@ -1,8 +1,8 @@
/**
* @brief Auto-generated object translation file.
* @details
* Contains 129 translations.
* Generated on: 2022-05-12 20:45:27
* Contains 131 translations.
* Generated on: 2022-05-23 16:46:58
*/
#include "translateObjects.h"
@ -79,6 +79,7 @@ const char *ARDUINO_COM_IF_STRING = "ARDUINO_COM_IF";
const char *GPIO_IF_STRING = "GPIO_IF";
const char *SPI_MAIN_COM_IF_STRING = "SPI_MAIN_COM_IF";
const char *SPI_RW_COM_IF_STRING = "SPI_RW_COM_IF";
const char *SPI_RTD_COM_IF_STRING = "SPI_RTD_COM_IF";
const char *UART_COM_IF_STRING = "UART_COM_IF";
const char *I2C_COM_IF_STRING = "I2C_COM_IF";
const char *CSP_COM_IF_STRING = "CSP_COM_IF";
@ -99,6 +100,7 @@ const char *PUS_SERVICE_3_HOUSEKEEPING_STRING = "PUS_SERVICE_3_HOUSEKEEPING";
const char *PUS_SERVICE_5_EVENT_REPORTING_STRING = "PUS_SERVICE_5_EVENT_REPORTING";
const char *PUS_SERVICE_8_FUNCTION_MGMT_STRING = "PUS_SERVICE_8_FUNCTION_MGMT";
const char *PUS_SERVICE_9_TIME_MGMT_STRING = "PUS_SERVICE_9_TIME_MGMT";
const char *PUS_SERVICE_11_TC_SCHEDULER_STRING = "PUS_SERVICE_11_TC_SCHEDULER";
const char *PUS_SERVICE_17_TEST_STRING = "PUS_SERVICE_17_TEST";
const char *PUS_SERVICE_20_PARAMETERS_STRING = "PUS_SERVICE_20_PARAMETERS";
const char *PUS_SERVICE_200_MODE_MGMT_STRING = "PUS_SERVICE_200_MODE_MGMT";
@ -284,6 +286,8 @@ const char *translateObject(object_id_t object) {
return SPI_MAIN_COM_IF_STRING;
case 0x49020005:
return SPI_RW_COM_IF_STRING;
case 0x49020006:
return SPI_RTD_COM_IF_STRING;
case 0x49030003:
return UART_COM_IF_STRING;
case 0x49040002:
@ -324,6 +328,8 @@ const char *translateObject(object_id_t object) {
return PUS_SERVICE_8_FUNCTION_MGMT_STRING;
case 0x53000009:
return PUS_SERVICE_9_TIME_MGMT_STRING;
case 0x53000011:
return PUS_SERVICE_11_TC_SCHEDULER_STRING;
case 0x53000017:
return PUS_SERVICE_17_TEST_STRING;
case 0x53000020:

View File

@ -6,6 +6,4 @@ add_subdirectory(devices)
add_subdirectory(fsfwconfig)
add_subdirectory(obc)
target_sources(${OBSW_NAME} PUBLIC
ObjectFactory.cpp
)
target_sources(${OBSW_NAME} PUBLIC ObjectFactory.cpp)

View File

@ -7,6 +7,8 @@
#include <fsfw_hal/linux/spi/SpiComIF.h>
#include <fsfw_hal/linux/spi/SpiCookie.h>
#include <linux/callbacks/gpioCallbacks.h>
#include <linux/devices/Max31865RtdLowlevelHandler.h>
#include <mission/devices/Max31865EiveHandler.h>
#include <mission/devices/Max31865PT1000Handler.h>
#include <mission/devices/SusHandler.h>
#include <mission/system/fdir/RtdFdir.h>
@ -189,7 +191,7 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
}
void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
PowerSwitchIF* pwrSwitcher) {
PowerSwitchIF* pwrSwitcher, SpiComIF* comIF) {
using namespace gpio;
GpioCookie* rtdGpioCookie = new GpioCookie;
@ -245,8 +247,8 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
gpioChecker(gpioComIF->addGpios(rtdGpioCookie), "RTDs");
#if OBSW_ADD_RTD_DEVICES == 1
static constexpr uint8_t NUMBER_RTDS = 16;
std::array<std::pair<address_t, gpioId_t>, NUMBER_RTDS> cookieArgs = {{
using namespace EiveMax31855;
std::array<std::pair<address_t, gpioId_t>, NUM_RTDS> cookieArgs = {{
{addresses::RTD_IC_3, gpioIds::RTD_IC_3},
{addresses::RTD_IC_4, gpioIds::RTD_IC_4},
{addresses::RTD_IC_5, gpioIds::RTD_IC_5},
@ -264,48 +266,52 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
{addresses::RTD_IC_17, gpioIds::RTD_IC_17},
{addresses::RTD_IC_18, gpioIds::RTD_IC_18},
}};
std::array<object_id_t, NUMBER_RTDS> rtdIds = {objects::RTD_0_IC3_PLOC_HEATSPREADER,
objects::RTD_1_IC4_PLOC_MISSIONBOARD,
objects::RTD_2_IC5_4K_CAMERA,
objects::RTD_3_IC6_DAC_HEATSPREADER,
objects::RTD_4_IC7_STARTRACKER,
objects::RTD_5_IC8_RW1_MX_MY,
objects::RTD_6_IC9_DRO,
objects::RTD_7_IC10_SCEX,
objects::RTD_8_IC11_X8,
objects::RTD_9_IC12_HPA,
objects::RTD_10_IC13_PL_TX,
objects::RTD_11_IC14_MPA,
objects::RTD_12_IC15_ACU,
objects::RTD_13_IC16_PLPCDU_HEATSPREADER,
objects::RTD_14_IC17_TCS_BOARD,
objects::RTD_15_IC18_IMTQ};
std::array<SpiCookie*, NUMBER_RTDS> rtdCookies = {};
std::array<Max31865PT1000Handler*, NUMBER_RTDS> rtds = {};
// HSPD: Heatspreader
std::array<std::pair<object_id_t, std::string>, NUM_RTDS> rtdInfos = {{
{objects::RTD_0_IC3_PLOC_HEATSPREADER, "RTD_0_PLOC_HSPD"},
{objects::RTD_1_IC4_PLOC_MISSIONBOARD, "RTD_1_PLOC_MISSIONBRD"},
{objects::RTD_2_IC5_4K_CAMERA, "RTD_2_4K_CAMERA"},
{objects::RTD_3_IC6_DAC_HEATSPREADER, "RTD_3_DAC_HSPD"},
{objects::RTD_4_IC7_STARTRACKER, "RTD_4_STARTRACKER"},
{objects::RTD_5_IC8_RW1_MX_MY, "RTD_5_RW1_MX_MY"},
{objects::RTD_6_IC9_DRO, "RTD_6_DRO"},
{objects::RTD_7_IC10_SCEX, "RTD_7_SCEX"},
{objects::RTD_8_IC11_X8, "RTD_8_X8"},
{objects::RTD_9_IC12_HPA, "RTD_9_HPA"},
{objects::RTD_10_IC13_PL_TX, "RTD_10_PL_TX,"},
{objects::RTD_11_IC14_MPA, "RTD_11_MPA"},
{objects::RTD_12_IC15_ACU, "RTD_12_ACU"},
{objects::RTD_13_IC16_PLPCDU_HEATSPREADER, "RTD_13_PLPCDU_HSPD"},
{objects::RTD_14_IC17_TCS_BOARD, "RTD_14_TCS_BOARD"},
{objects::RTD_15_IC18_IMTQ, "RTD_15_IMTQ"},
}};
std::array<SpiCookie*, NUM_RTDS> rtdCookies = {};
std::array<Max31865EiveHandler*, NUM_RTDS> rtds = {};
RtdFdir* rtdFdir = nullptr;
for (uint8_t idx = 0; idx < NUMBER_RTDS; idx++) {
rtdCookies[idx] =
new SpiCookie(cookieArgs[idx].first, cookieArgs[idx].second,
Max31865Definitions::MAX_REPLY_SIZE, spi::RTD_MODE, spi::RTD_SPEED);
rtds[idx] = new Max31865PT1000Handler(rtdIds[idx], objects::SPI_MAIN_COM_IF, rtdCookies[idx]);
// Create special low level reader communication interface
new Max31865RtdReader(objects::SPI_RTD_COM_IF, comIF, gpioComIF);
for (uint8_t idx = 0; idx < NUM_RTDS; idx++) {
rtdCookies[idx] = new SpiCookie(cookieArgs[idx].first, cookieArgs[idx].second,
MAX31865::MAX_REPLY_SIZE, spi::RTD_MODE, spi::RTD_SPEED);
rtdCookies[idx]->setMutexParams(MutexIF::TimeoutType::WAITING, spi::RTD_CS_TIMEOUT);
Max31865ReaderCookie* rtdLowLevelCookie =
new Max31865ReaderCookie(rtdInfos[idx].first, idx, rtdInfos[idx].second, rtdCookies[idx]);
rtds[idx] =
new Max31865EiveHandler(rtdInfos[idx].first, objects::SPI_RTD_COM_IF, rtdLowLevelCookie);
rtds[idx]->setDeviceInfo(idx, rtdInfos[idx].second);
rtds[idx]->setParent(objects::TCS_BOARD_ASS);
rtdFdir = new RtdFdir(rtdIds[idx]);
rtdFdir = new RtdFdir(rtdInfos[idx].first);
rtds[idx]->setCustomFdir(rtdFdir);
rtds[idx]->setDeviceIdx(idx + 3);
#if OBSW_DEBUG_RTD == 1
rtds[idx]->setDebugMode(true);
rtds[idx]->setDebugMode(true, 5);
#endif
#if OBSW_TEST_RTD == 1
rtds[idx]->setInstantNormal(true);
rtds[idx]->setStartUpImmediately();
#endif
}
#if OBSW_TEST_RTD == 1
for (auto& rtd : rtds) {
if (rtd != nullptr) {
rtd->setStartUpImmediately();
rtd->setInstantNormal(true);
}
}
#endif // OBSW_TEST_RTD == 1
TcsBoardHelper helper(rtdIds);
TcsBoardHelper helper(rtdInfos);
TcsBoardAssembly* tcsBoardAss =
new TcsBoardAssembly(objects::TCS_BOARD_ASS, objects::NO_OBJECT, pwrSwitcher,
pcdu::Switches::PDU1_CH0_TCS_BOARD_3V3, helper);

View File

@ -12,7 +12,8 @@ namespace ObjectFactory {
void createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiComIF, PowerSwitchIF* pwrSwitcher,
std::string spiDev);
void createRtdComponents(std::string spiDev, GpioIF* gpioComIF, PowerSwitchIF* pwrSwitcher);
void createRtdComponents(std::string spiDev, GpioIF* gpioComIF, PowerSwitchIF* pwrSwitcher,
SpiComIF* comIF);
void gpioChecker(ReturnValue_t result, std::string output);

View File

@ -1,10 +1,2 @@
target_sources(${OBSW_NAME} PRIVATE
LibgpiodTest.cpp
I2cTestClass.cpp
SpiTestClass.cpp
UartTestClass.cpp
)
target_sources(${OBSW_NAME} PRIVATE LibgpiodTest.cpp I2cTestClass.cpp
SpiTestClass.cpp UartTestClass.cpp)

View File

@ -1,3 +1 @@
target_sources(${OBSW_NAME} PRIVATE
gpioCallbacks.cpp
)
target_sources(${OBSW_NAME} PRIVATE gpioCallbacks.cpp)

View File

@ -1,8 +1 @@
target_sources(${OBSW_NAME} PUBLIC
CspComIF.cpp
CspCookie.cpp
)
target_sources(${OBSW_NAME} PUBLIC CspComIF.cpp CspCookie.cpp)

View File

@ -1,8 +1,8 @@
if(EIVE_BUILD_GPSD_GPS_HANDLER)
target_sources(${OBSW_NAME} PRIVATE
GPSHyperionLinuxController.cpp
)
target_sources(${OBSW_NAME} PRIVATE GPSHyperionLinuxController.cpp)
endif()
target_sources(${OBSW_NAME} PRIVATE Max31865RtdLowlevelHandler.cpp)
add_subdirectory(ploc)
add_subdirectory(startracker)

View File

@ -0,0 +1,465 @@
#include "Max31865RtdLowlevelHandler.h"
#include <fsfw/tasks/TaskFactory.h>
#include <fsfw/timemanager/Stopwatch.h>
#include <fsfw_hal/linux/spi/ManualCsLockGuard.h>
#define OBSW_RTD_AUTO_MODE 1
#if OBSW_RTD_AUTO_MODE == 1
static constexpr uint8_t BASE_CFG = (MAX31865::Bias::ON << MAX31865::CfgBitPos::BIAS_SEL) |
(MAX31865::Wires::FOUR_WIRE << MAX31865::CfgBitPos::WIRE_SEL) |
(MAX31865::ConvMode::AUTO << MAX31865::CfgBitPos::CONV_MODE);
#else
static constexpr uint8_t BASE_CFG =
(MAX31865::Bias::OFF << MAX31865::CfgBitPos::BIAS_SEL) |
(MAX31865::Wires::FOUR_WIRE << MAX31865::CfgBitPos::WIRE_SEL) |
(MAX31865::ConvMode::NORM_OFF << MAX31865::CfgBitPos::CONV_MODE);
#endif
Max31865RtdReader::Max31865RtdReader(object_id_t objectId, SpiComIF* lowLevelComIF, GpioIF* gpioIF)
: SystemObject(objectId), rtds(EiveMax31855::NUM_RTDS), comIF(lowLevelComIF), gpioIF(gpioIF) {
readerMutex = MutexFactory::instance()->createMutex();
}
ReturnValue_t Max31865RtdReader::performOperation(uint8_t operationCode) {
using namespace MAX31865;
ReturnValue_t result = RETURN_OK;
static_cast<void>(result);
// Stopwatch watch;
if (periodicInitHandling()) {
#if OBSW_RTD_AUTO_MODE == 0
// 10 ms delay for VBIAS startup
TaskFactory::delayTask(10);
#endif
} else {
// No devices usable (e.g. TCS board off)
return RETURN_OK;
}
#if OBSW_RTD_AUTO_MODE == 0
result = periodicReadReqHandling();
if (result != RETURN_OK) {
return result;
}
// After requesting, 65 milliseconds delay required
TaskFactory::delayTask(65);
#endif
return periodicReadHandling();
}
bool Max31865RtdReader::rtdIsActive(uint8_t idx) {
if (rtds[idx]->on and rtds[idx]->active and rtds[idx]->configured) {
return true;
}
return false;
}
bool Max31865RtdReader::periodicInitHandling() {
using namespace MAX31865;
MutexGuard mg(readerMutex);
ReturnValue_t result = RETURN_OK;
if (mg.getLockResult() != RETURN_OK) {
sif::warning << "Max31865RtdReader::periodicInitHandling: Mutex lock failed" << std::endl;
return false;
}
for (auto& rtd : rtds) {
if (rtd == nullptr) {
continue;
}
if ((rtd->on or rtd->active) and not rtd->configured and rtd->cd.hasTimedOut()) {
ManualCsLockWrapper mg(csLock, gpioIF, rtd->spiCookie, csTimeoutType, csTimeoutMs);
if (mg.lockResult != RETURN_OK or mg.gpioResult != RETURN_OK) {
sif::error << "Max31865RtdReader::periodicInitHandling: Manual CS lock failed" << std::endl;
break;
}
result = writeCfgReg(rtd->spiCookie, BASE_CFG);
if (result != HasReturnvaluesIF::RETURN_OK) {
handleSpiError(rtd, result, "writeCfgReg");
}
if (rtd->writeLowThreshold) {
result = writeLowThreshold(rtd->spiCookie, rtd->lowThreshold);
if (result != HasReturnvaluesIF::RETURN_OK) {
handleSpiError(rtd, result, "writeLowThreshold");
}
}
if (rtd->writeHighThreshold) {
result = writeHighThreshold(rtd->spiCookie, rtd->highThreshold);
if (result != HasReturnvaluesIF::RETURN_OK) {
handleSpiError(rtd, result, "writeHighThreshold");
}
}
result = clearFaultStatus(rtd->spiCookie);
if (result != HasReturnvaluesIF::RETURN_OK) {
handleSpiError(rtd, result, "clearFaultStatus");
}
rtd->configured = true;
rtd->db.configured = true;
if (rtd->active) {
rtd->db.active = true;
}
}
if (rtd->active and rtd->configured and not rtd->db.active) {
rtd->db.active = true;
}
}
bool someRtdUsable = false;
for (auto& rtd : rtds) {
if (rtd == nullptr) {
continue;
}
if (rtdIsActive(rtd->idx)) {
#if OBSW_RTD_AUTO_MODE == 0
result = writeBiasSel(Bias::ON, rtd->spiCookie, BASE_CFG);
#endif
someRtdUsable = true;
}
}
return someRtdUsable;
}
ReturnValue_t Max31865RtdReader::periodicReadReqHandling() {
using namespace MAX31865;
MutexGuard mg(readerMutex);
if (mg.getLockResult() != RETURN_OK) {
sif::warning << "Max31865RtdReader::periodicReadReqHandling: Mutex lock failed" << std::endl;
return RETURN_FAILED;
}
// Now request one shot config for all active RTDs
for (auto& rtd : rtds) {
if (rtd == nullptr) {
continue;
}
if (rtdIsActive(rtd->idx)) {
ReturnValue_t result = writeCfgReg(rtd->spiCookie, BASE_CFG | (1 << CfgBitPos::ONE_SHOT));
if (result != RETURN_OK) {
handleSpiError(rtd, result, "writeCfgReg");
// Release mutex ASAP
return RETURN_FAILED;
}
}
}
return RETURN_OK;
}
ReturnValue_t Max31865RtdReader::periodicReadHandling() {
using namespace MAX31865;
auto result = RETURN_OK;
MutexGuard mg(readerMutex);
if (mg.getLockResult() != RETURN_OK) {
sif::warning << "Max31865RtdReader::periodicReadReqHandling: Mutex lock failed" << std::endl;
return RETURN_FAILED;
}
// Now read the RTD values
for (auto& rtd : rtds) {
if (rtd == nullptr) {
continue;
}
if (rtdIsActive(rtd->idx)) {
uint16_t rtdVal = 0;
bool faultBitSet = false;
result = readRtdVal(rtd->spiCookie, rtdVal, faultBitSet);
if (result != RETURN_OK) {
handleSpiError(rtd, result, "readRtdVal");
return RETURN_FAILED;
}
if (faultBitSet) {
rtd->db.faultBitSet = faultBitSet;
}
rtd->db.adcCode = rtdVal;
}
}
#if OBSW_RTD_AUTO_MODE == 0
for (auto& rtd : rtds) {
if (rtd == nullptr) {
continue;
}
// Even if a device was made inactive, turn off the bias here. If it was turned off, not
// necessary anymore..
if (rtd->on) {
result = writeBiasSel(Bias::OFF, rtd->spiCookie, BASE_CFG);
}
}
#endif
return RETURN_OK;
}
ReturnValue_t Max31865RtdReader::initializeInterface(CookieIF* cookie) {
if (cookie == nullptr) {
throw std::invalid_argument("Invalid MAX31865 Reader Cookie");
}
auto* rtdCookie = dynamic_cast<Max31865ReaderCookie*>(cookie);
ReturnValue_t result = comIF->initializeInterface(rtdCookie->spiCookie);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
if (rtdCookie->idx > EiveMax31855::NUM_RTDS) {
throw std::invalid_argument("Invalid RTD index");
}
rtds[rtdCookie->idx] = rtdCookie;
MutexGuard mg(readerMutex);
if (dbLen == 0) {
dbLen = rtdCookie->db.getSerializedSize();
}
return RETURN_OK;
}
ReturnValue_t Max31865RtdReader::sendMessage(CookieIF* cookie, const uint8_t* sendData,
size_t sendLen) {
if (cookie == nullptr) {
return RETURN_FAILED;
}
// Empty command.. don't fail for now
if (sendLen < 1) {
return RETURN_OK;
}
MutexGuard mg(readerMutex);
if (mg.getLockResult() != RETURN_OK) {
sif::warning << "Max31865RtdReader::sendMessage: Mutex lock failed" << std::endl;
return RETURN_FAILED;
}
auto* rtdCookie = dynamic_cast<Max31865ReaderCookie*>(cookie);
uint8_t cmdRaw = sendData[0];
if (cmdRaw > EiveMax31855::RtdCommands::NUM_CMDS) {
sif::warning << "Max31865RtdReader::sendMessage: Invalid command" << std::endl;
return RETURN_FAILED;
}
auto thresholdHandler = [](Max31865ReaderCookie* rtdCookie, const uint8_t* sendData) {
rtdCookie->lowThreshold = (sendData[1] << 8) | sendData[2];
rtdCookie->highThreshold = (sendData[3] << 8) | sendData[4];
rtdCookie->writeLowThreshold = true;
rtdCookie->writeHighThreshold = true;
};
auto cmd = static_cast<EiveMax31855::RtdCommands>(sendData[0]);
switch (cmd) {
case (EiveMax31855::RtdCommands::ON): {
if (not rtdCookie->on) {
rtdCookie->cd.setTimeout(MAX31865::WARMUP_MS);
rtdCookie->cd.resetTimer();
rtdCookie->on = true;
rtdCookie->active = false;
rtdCookie->configured = false;
if (sendLen == 5) {
thresholdHandler(rtdCookie, sendData);
}
}
break;
}
case (EiveMax31855::RtdCommands::ACTIVE): {
if (not rtdCookie->on) {
rtdCookie->cd.setTimeout(MAX31865::WARMUP_MS);
rtdCookie->cd.resetTimer();
rtdCookie->on = true;
rtdCookie->active = true;
rtdCookie->configured = false;
} else {
rtdCookie->active = true;
}
if (sendLen == 5) {
thresholdHandler(rtdCookie, sendData);
}
break;
}
case (EiveMax31855::RtdCommands::OFF): {
rtdCookie->on = false;
rtdCookie->active = false;
rtdCookie->configured = false;
break;
}
case (EiveMax31855::RtdCommands::HIGH_TRESHOLD): {
if (sendLen == 3) {
rtdCookie->highThreshold = (sendData[1] << 8) | sendData[2];
rtdCookie->writeHighThreshold = true;
} else {
return RETURN_FAILED;
}
break;
}
case (EiveMax31855::RtdCommands::LOW_THRESHOLD): {
if (sendLen == 3) {
rtdCookie->lowThreshold = (sendData[1] << 8) | sendData[2];
rtdCookie->writeLowThreshold = true;
} else {
return RETURN_FAILED;
}
break;
}
case (EiveMax31855::RtdCommands::CFG):
default: {
// TODO: Only implement if needed
break;
}
}
return RETURN_OK;
}
ReturnValue_t Max31865RtdReader::getSendSuccess(CookieIF* cookie) { return RETURN_OK; }
ReturnValue_t Max31865RtdReader::requestReceiveMessage(CookieIF* cookie, size_t requestLen) {
return RETURN_OK;
}
ReturnValue_t Max31865RtdReader::readReceivedMessage(CookieIF* cookie, uint8_t** buffer,
size_t* size) {
MutexGuard mg(readerMutex);
if (mg.getLockResult() != RETURN_OK) {
// TODO: Emit warning
return RETURN_FAILED;
}
auto* rtdCookie = dynamic_cast<Max31865ReaderCookie*>(cookie);
uint8_t* exchangePtr = rtdCookie->exchangeBuf.data();
size_t serLen = 0;
auto result = rtdCookie->db.serialize(&exchangePtr, &serLen, rtdCookie->exchangeBuf.size(),
SerializeIF::Endianness::MACHINE);
if (result != RETURN_OK) {
// TODO: Emit warning
return RETURN_FAILED;
}
*buffer = reinterpret_cast<uint8_t*>(rtdCookie->exchangeBuf.data());
*size = serLen;
return RETURN_OK;
}
ReturnValue_t Max31865RtdReader::writeCfgReg(SpiCookie* cookie, uint8_t cfg) {
using namespace MAX31865;
return writeNToReg(cookie, CONFIG, 1, &cfg, nullptr);
}
ReturnValue_t Max31865RtdReader::writeBiasSel(MAX31865::Bias bias, SpiCookie* cookie,
uint8_t baseCfg) {
using namespace MAX31865;
if (bias == MAX31865::Bias::OFF) {
baseCfg &= ~(1 << CfgBitPos::BIAS_SEL);
} else {
baseCfg |= (1 << CfgBitPos::BIAS_SEL);
}
return writeCfgReg(cookie, baseCfg);
}
ReturnValue_t Max31865RtdReader::clearFaultStatus(SpiCookie* cookie) {
using namespace MAX31865;
// Read back the current configuration to avoid overwriting it when clearing te fault status
uint8_t currentCfg = 0;
auto result = readCfgReg(cookie, currentCfg);
if (result != RETURN_OK) {
return result;
}
// Clear bytes 5, 3 and 2 which need to be 0
currentCfg &= ~0x2C;
currentCfg |= (1 << CfgBitPos::FAULT_STATUS_CLEAR);
return writeCfgReg(cookie, currentCfg);
}
ReturnValue_t Max31865RtdReader::readCfgReg(SpiCookie* cookie, uint8_t& cfg) {
using namespace MAX31865;
uint8_t* replyPtr = nullptr;
auto result = readNFromReg(cookie, CONFIG, 1, &replyPtr);
if (result == RETURN_OK) {
cfg = replyPtr[0];
}
return result;
}
ReturnValue_t Max31865RtdReader::writeLowThreshold(SpiCookie* cookie, uint16_t val) {
using namespace MAX31865;
uint8_t cmd[2] = {static_cast<uint8_t>((val >> 8) & 0xff), static_cast<uint8_t>(val & 0xff)};
return writeNToReg(cookie, LOW_THRESHOLD, 2, cmd, nullptr);
}
ReturnValue_t Max31865RtdReader::writeHighThreshold(SpiCookie* cookie, uint16_t val) {
using namespace MAX31865;
uint8_t cmd[2] = {static_cast<uint8_t>((val >> 8) & 0xff), static_cast<uint8_t>(val & 0xff)};
return writeNToReg(cookie, HIGH_THRESHOLD, 2, cmd, nullptr);
}
ReturnValue_t Max31865RtdReader::readLowThreshold(SpiCookie* cookie, uint16_t& lowThreshold) {
using namespace MAX31865;
uint8_t* replyPtr = nullptr;
auto result = readNFromReg(cookie, LOW_THRESHOLD, 2, &replyPtr);
if (result == RETURN_OK) {
lowThreshold = (replyPtr[0] << 8) | replyPtr[1];
}
return result;
}
ReturnValue_t Max31865RtdReader::readHighThreshold(SpiCookie* cookie, uint16_t& highThreshold) {
using namespace MAX31865;
uint8_t* replyPtr = nullptr;
auto result = readNFromReg(cookie, HIGH_THRESHOLD, 2, &replyPtr);
if (result == RETURN_OK) {
highThreshold = (replyPtr[0] << 8) | replyPtr[1];
}
return result;
}
ReturnValue_t Max31865RtdReader::writeNToReg(SpiCookie* cookie, uint8_t reg, size_t n, uint8_t* cmd,
uint8_t** reply) {
using namespace MAX31865;
if (n > cmdBuf.size() - 1) {
return HasReturnvaluesIF::RETURN_FAILED;
}
cmdBuf[0] = reg | WRITE_BIT;
for (size_t idx = 0; idx < n; idx++) {
cmdBuf[idx + 1] = cmd[idx];
}
return comIF->sendMessage(cookie, cmdBuf.data(), n + 1);
}
ReturnValue_t Max31865RtdReader::readRtdVal(SpiCookie* cookie, uint16_t& val, bool& faultBitSet) {
using namespace MAX31865;
uint8_t* replyPtr = nullptr;
auto result = readNFromReg(cookie, RTD, 2, &replyPtr);
if (result != RETURN_OK) {
return result;
}
if (replyPtr[1] & 0b0000'0001) {
faultBitSet = true;
}
// Shift 1 to the right to remove fault bit
val = ((replyPtr[0] << 8) | replyPtr[1]) >> 1;
return result;
}
ReturnValue_t Max31865RtdReader::readNFromReg(SpiCookie* cookie, uint8_t reg, size_t n,
uint8_t** reply) {
using namespace MAX31865;
if (n > 4) {
return HasReturnvaluesIF::RETURN_FAILED;
}
// Clear write bit in any case
reg &= ~WRITE_BIT;
cmdBuf[0] = reg;
std::memset(cmdBuf.data() + 1, 0, n);
ReturnValue_t result = comIF->sendMessage(cookie, cmdBuf.data(), n + 1);
if (result != RETURN_OK) {
return RETURN_FAILED;
}
size_t dummyLen = 0;
uint8_t* replyPtr = nullptr;
result = comIF->readReceivedMessage(cookie, &replyPtr, &dummyLen);
if (result != RETURN_OK) {
return result;
}
if (reply != nullptr) {
*reply = replyPtr + 1;
}
return RETURN_OK;
}
ReturnValue_t Max31865RtdReader::handleSpiError(Max31865ReaderCookie* cookie, ReturnValue_t result,
const char* ctx) {
cookie->db.spiErrorCount.value += 1;
sif::warning << "Max31865RtdReader::handleSpiError: " << ctx << " | Failed with result " << result
<< std::endl;
return result;
}
ReturnValue_t Max31865RtdReader::initialize() {
csLock = comIF->getCsMutex();
return SystemObject::initialize();
}

View File

@ -0,0 +1,87 @@
#ifndef LINUX_DEVICES_MAX31865RTDREADER_H_
#define LINUX_DEVICES_MAX31865RTDREADER_H_
#include <fsfw/ipc/MutexIF.h>
#include <fsfw/tasks/ExecutableObjectIF.h>
#include <fsfw_hal/linux/spi/SpiComIF.h>
#include <fsfw_hal/linux/spi/SpiCookie.h>
#include "fsfw/devicehandlers/DeviceCommunicationIF.h"
#include "mission/devices/devicedefinitions/Max31865Definitions.h"
struct Max31865ReaderCookie : public CookieIF {
Max31865ReaderCookie(){};
Max31865ReaderCookie(object_id_t handlerId_, uint8_t idx_, const std::string& locString_,
SpiCookie* spiCookie_)
: idx(idx_), handlerId(handlerId_), locString(locString_), spiCookie(spiCookie_) {}
uint8_t idx = 0;
object_id_t handlerId = objects::NO_OBJECT;
std::string locString = "";
std::array<uint8_t, 12> exchangeBuf{};
Countdown cd = Countdown(MAX31865::WARMUP_MS);
bool on = false;
bool configured = false;
bool active = false;
bool writeLowThreshold = false;
bool writeHighThreshold = false;
uint16_t lowThreshold = 0;
uint16_t highThreshold = 0;
SpiCookie* spiCookie = nullptr;
// Exchange data buffer struct
EiveMax31855::ReadOutStruct db;
};
class Max31865RtdReader : public SystemObject,
public ExecutableObjectIF,
public DeviceCommunicationIF {
public:
Max31865RtdReader(object_id_t objectId, SpiComIF* lowLevelComIF, GpioIF* gpioIF);
ReturnValue_t performOperation(uint8_t operationCode) override;
ReturnValue_t initialize() override;
private:
std::vector<Max31865ReaderCookie*> rtds;
std::array<uint8_t, 4> cmdBuf = {};
size_t dbLen = 0;
MutexIF* readerMutex;
SpiComIF* comIF;
GpioIF* gpioIF;
MutexIF::TimeoutType csTimeoutType = MutexIF::TimeoutType::BLOCKING;
uint32_t csTimeoutMs = 0;
MutexIF* csLock = nullptr;
bool periodicInitHandling();
ReturnValue_t periodicReadReqHandling();
ReturnValue_t periodicReadHandling();
bool rtdIsActive(uint8_t idx);
ReturnValue_t writeCfgReg(SpiCookie* cookie, uint8_t cfg);
ReturnValue_t writeBiasSel(MAX31865::Bias bias, SpiCookie* cookie, uint8_t baseCfg);
ReturnValue_t readCfgReg(SpiCookie* cookie, uint8_t& cfg);
ReturnValue_t readRtdVal(SpiCookie* cookie, uint16_t& val, bool& faultBitSet);
ReturnValue_t writeLowThreshold(SpiCookie* cookie, uint16_t val);
ReturnValue_t writeHighThreshold(SpiCookie* cookie, uint16_t val);
ReturnValue_t readLowThreshold(SpiCookie* cookie, uint16_t& val);
ReturnValue_t readHighThreshold(SpiCookie* cookie, uint16_t& val);
ReturnValue_t clearFaultStatus(SpiCookie* cookie);
ReturnValue_t readNFromReg(SpiCookie* cookie, uint8_t reg, size_t n, uint8_t** reply);
ReturnValue_t writeNToReg(SpiCookie* cookie, uint8_t reg, size_t n, uint8_t* cmd,
uint8_t** reply);
ReturnValue_t initializeInterface(CookieIF* cookie) override;
ReturnValue_t sendMessage(CookieIF* cookie, const uint8_t* sendData, size_t sendLen) override;
ReturnValue_t getSendSuccess(CookieIF* cookie) override;
ReturnValue_t requestReceiveMessage(CookieIF* cookie, size_t requestLen) override;
ReturnValue_t readReceivedMessage(CookieIF* cookie, uint8_t** buffer, size_t* size) override;
ReturnValue_t handleSpiError(Max31865ReaderCookie* cookie, ReturnValue_t result, const char* ctx);
};
#endif /* LINUX_DEVICES_MAX31865RTDREADER_H_ */

View File

@ -56,6 +56,7 @@ static const DeviceCommandId_t LOGGING_SET_TOPIC = 56;
static const DeviceCommandId_t REQUEST_ADC_REPORT = 57;
static const DeviceCommandId_t RESET_PL = 58;
static const DeviceCommandId_t ENABLE_NVMS = 59;
static const DeviceCommandId_t CONTINUE_UPDATE = 60;
/** Reply IDs */
static const DeviceCommandId_t ACK_REPORT = 100;
@ -309,9 +310,8 @@ class ApidOnlyPacket : public SpacePacket {
*/
class MPSoCBootSelect : public SpacePacket {
public:
static const uint8_t NVM0 = 0;
static const uint8_t NVM1 = 1;
static const uint8_t NVM0 = 0;
static const uint8_t NVM1 = 1;
/**
* @brief Constructor
@ -320,6 +320,8 @@ class MPSoCBootSelect : public SpacePacket {
* @param bp0 Partition pin 0
* @param bp1 Partition pin 1
* @param bp2 Partition pin 2
*
* @note Selection of partitions is currently not supported.
*/
MPSoCBootSelect(uint8_t mem = 0, uint8_t bp0 = 0, uint8_t bp1 = 0, uint8_t bp2 = 0)
: SpacePacket(DATA_FIELD_LENGTH - 1, true, APID_SEL_MPSOC_BOOT_IMAGE, DEFAULT_SEQUENCE_COUNT),

View File

@ -1,7 +1,4 @@
target_sources(${OBSW_NAME} PRIVATE
PlocSupervisorHandler.cpp
PlocMemoryDumper.cpp
PlocMPSoCHandler.cpp
PlocMPSoCHelper.cpp
PlocSupvHelper.cpp
)
target_sources(
${OBSW_NAME}
PRIVATE PlocSupervisorHandler.cpp PlocMemoryDumper.cpp PlocMPSoCHandler.cpp
PlocMPSoCHelper.cpp PlocSupvHelper.cpp)

View File

@ -118,6 +118,11 @@ ReturnValue_t PlocSupervisorHandler::executeAction(ActionId_t actionId,
plocSupvHelperExecuting = true;
return EXECUTION_FINISHED;
}
case CONTINUE_UPDATE: {
supvHelper->initiateUpdateContinuation();
plocSupvHelperExecuting = true;
return EXECUTION_FINISHED;
}
case LOGGING_REQUEST_EVENT_BUFFERS: {
if (size > config::MAX_PATH_SIZE) {
return SupvReturnValuesIF::FILENAME_TOO_LONG;
@ -436,8 +441,9 @@ void PlocSupervisorHandler::fillCommandAndReplyMap() {
&mramDumpTimeout);
this->insertInCommandAndReplyMap(CONSECUTIVE_MRAM_DUMP, 0, nullptr, 0, false, false,
CONSECUTIVE_MRAM_DUMP, &mramDumpTimeout);
this->insertInReplyMap(ACK_REPORT, 3, nullptr, SIZE_ACK_REPORT);
this->insertInReplyMap(EXE_REPORT, 0, nullptr, SIZE_EXE_REPORT, false, &executionTimeout);
this->insertInReplyMap(ACK_REPORT, 3, nullptr, SIZE_ACK_REPORT, false,
&acknowledgementReportTimeout);
this->insertInReplyMap(EXE_REPORT, 0, nullptr, SIZE_EXE_REPORT, false, &executionReportTimeout);
this->insertInReplyMap(HK_REPORT, 3, &hkset, SIZE_HK_REPORT);
this->insertInReplyMap(BOOT_STATUS_REPORT, 3, &bootStatusReport, SIZE_BOOT_STATUS_REPORT);
this->insertInReplyMap(LATCHUP_REPORT, 3, &latchupStatusReport, SIZE_LATCHUP_STATUS_REPORT);
@ -572,14 +578,14 @@ ReturnValue_t PlocSupervisorHandler::enableReplyInReplyMap(DeviceCommandMap::ite
<< " not in replyMap" << std::endl;
}
setExecutionTimeout(command->first);
result = DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true, EXE_REPORT);
if (result != RETURN_OK) {
sif::debug << "PlocSupervisorHandler::enableReplyInReplyMap: Reply with id " << EXE_REPORT
<< " not in replyMap" << std::endl;
}
setExecutionTimeout(command->first);
return RETURN_OK;
}
@ -814,7 +820,9 @@ void PlocSupervisorHandler::handleEvent(EventMessage* eventMessage) {
// After execution of update procedure, PLOC is in a state where it draws approx. 700 mA of
// current. To leave this state the shutdown MPSoC command must be sent here.
if (event == PlocSupvHelper::SUPV_UPDATE_FAILED ||
event == PlocSupvHelper::SUPV_UPDATE_SUCCESSFUL) {
event == PlocSupvHelper::SUPV_UPDATE_SUCCESSFUL ||
event == PlocSupvHelper::SUPV_CONTINUE_UPDATE_FAILED ||
event == PlocSupvHelper::SUPV_CONTINUE_UPDATE_SUCCESSFUL) {
result = this->executeAction(supv::SHUTDOWN_MPSOC, NO_COMMANDER, nullptr, 0);
if (result != RETURN_OK) {
triggerEvent(SUPV_MPSOC_SHUWDOWN_BUILD_FAILED);
@ -837,13 +845,13 @@ void PlocSupervisorHandler::setExecutionTimeout(DeviceCommandId_t command) {
switch (command) {
case FIRST_MRAM_DUMP:
case CONSECUTIVE_MRAM_DUMP:
executionTimeout.setTimeout(MRAM_DUMP_EXECUTION_TIMEOUT);
executionReportTimeout.setTimeout(MRAM_DUMP_EXECUTION_TIMEOUT);
break;
case COPY_ADC_DATA_TO_MRAM:
executionTimeout.setTimeout(COPY_ADC_TO_MRAM_TIMEOUT);
executionReportTimeout.setTimeout(COPY_ADC_TO_MRAM_TIMEOUT);
break;
default:
executionTimeout.setTimeout(EXECUTION_DEFAULT_TIMEOUT);
executionReportTimeout.setTimeout(EXECUTION_DEFAULT_TIMEOUT);
break;
}
}
@ -957,6 +965,7 @@ ReturnValue_t PlocSupervisorHandler::handleHkReport(const uint8_t* data) {
if (result == SupvReturnValuesIF::CRC_FAILURE) {
sif::error << "PlocSupervisorHandler::handleHkReport: Hk report has invalid crc" << std::endl;
return result;
}
uint16_t offset = supv::DATA_FIELD_OFFSET;
@ -1062,7 +1071,8 @@ ReturnValue_t PlocSupervisorHandler::handleBootStatusReport(const uint8_t* data)
nextReplyId = supv::EXE_REPORT;
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_PLOC_SUPERVISOR == 1
sif::info << "PlocSupervisorHandler::handleBootStatusReport: SoC State (0 - off, 1 - booting, 2 - Update, 3 "
sif::info << "PlocSupervisorHandler::handleBootStatusReport: SoC State (0 - off, 1 - booting, 2 "
"- Update, 3 "
"- operating, 4 - Shutdown, 5 - Reset): "
<< static_cast<unsigned int>(bootStatusReport.socState.value) << std::endl;
sif::info << "PlocSupervisorHandler::handleBootStatusReport: Power Cycles: "

View File

@ -83,6 +83,8 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
static const uint8_t SIZE_NULL_TERMINATOR = 1;
// 5 s
static const uint32_t EXECUTION_DEFAULT_TIMEOUT = 5000;
// 70 S
static const uint32_t ACKNOWLEDGE_DEFAULT_TIMEOUT = 70000;
// 60 s
static const uint32_t MRAM_DUMP_EXECUTION_TIMEOUT = 60000;
// 70 s
@ -141,7 +143,8 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
// Supervisor helper class currently executing a command
bool plocSupvHelperExecuting = false;
Countdown executionTimeout = Countdown(EXECUTION_DEFAULT_TIMEOUT, false);
Countdown executionReportTimeout = Countdown(EXECUTION_DEFAULT_TIMEOUT, false);
Countdown acknowledgementReportTimeout = Countdown(ACKNOWLEDGE_DEFAULT_TIMEOUT, false);
// Vorago nees some time to boot properly
Countdown bootTimeout = Countdown(BOOT_TIMEOUT);
Countdown mramDumpTimeout = Countdown(MRAM_DUMP_TIMEOUT);

View File

@ -52,6 +52,18 @@ ReturnValue_t PlocSupvHelper::performOperation(uint8_t operationCode) {
internalState = InternalState::IDLE;
break;
}
case InternalState::CONTINUE_UPDATE: {
result = continueUpdate();
if (result == RETURN_OK) {
triggerEvent(SUPV_CONTINUE_UPDATE_SUCCESSFUL, result);
} else if (result == PROCESS_TERMINATED) {
// Event already triggered
} else {
triggerEvent(SUPV_CONTINUE_UPDATE_FAILED, result);
}
internalState = InternalState::IDLE;
break;
}
case InternalState::REQUEST_EVENT_BUFFER: {
result = performEventBufferRequest();
if (result == RETURN_OK) {
@ -110,12 +122,21 @@ ReturnValue_t PlocSupvHelper::startUpdate(std::string file, uint8_t memoryId,
update.length = getFileSize(update.file);
update.memoryId = memoryId;
update.startAddress = startAddress;
update.remainingSize = update.length;
update.bytesWritten = 0;
update.packetNum = 1;
update.sequenceCount = 1;
internalState = InternalState::UPDATE;
uartComIF->flushUartTxAndRxBuf(comCookie);
semaphore.release();
return result;
}
void PlocSupvHelper::initiateUpdateContinuation() {
internalState = InternalState::CONTINUE_UPDATE;
semaphore.release();
}
ReturnValue_t PlocSupvHelper::startEventbBufferRequest(std::string path) {
#ifdef XIPHOS_Q7S
ReturnValue_t result = FilesystemHelper::checkPath(path);
@ -141,6 +162,10 @@ ReturnValue_t PlocSupvHelper::performUpdate() {
if (result != RETURN_OK) {
return result;
}
result = selectMemory();
if (result != RETURN_OK) {
return result;
}
result = prepareUpdate();
if (result != RETURN_OK) {
return result;
@ -149,66 +174,88 @@ ReturnValue_t PlocSupvHelper::performUpdate() {
if (result != RETURN_OK) {
return result;
}
result = writeUpdatePackets();
if (result != RETURN_OK) {
return result;
}
result = handleCheckMemoryCommand();
if (result != RETURN_OK) {
return result;
}
return result;
}
ReturnValue_t PlocSupvHelper::continueUpdate() {
ReturnValue_t result = prepareUpdate();
if (result != RETURN_OK) {
return result;
}
result = writeUpdatePackets();
if (result != RETURN_OK) {
return result;
}
result = handleCheckMemoryCommand();
if (result != RETURN_OK) {
return result;
}
return result;
}
ReturnValue_t PlocSupvHelper::writeUpdatePackets() {
ReturnValue_t result = RETURN_OK;
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
ProgressPrinter progressPrinter("Supervisor update", update.length,
ProgressPrinter::HALF_PERCENT);
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
uint8_t tempData[supv::WriteMemory::CHUNK_MAX];
std::ifstream file(update.file, std::ifstream::binary);
size_t remainingSize = update.length;
uint16_t dataLength = 0;
size_t bytesWritten = 0;
uint16_t sequenceCount = 1;
uint32_t packetNum = 1;
supv::SequenceFlags seqFlags = supv::SequenceFlags::FIRST_PKT;
while (remainingSize > 0) {
supv::SequenceFlags seqFlags;
while (update.remainingSize > 0) {
if (terminate) {
terminate = false;
triggerEvent(TERMINATED_UPDATE_PROCEDURE);
return PROCESS_TERMINATED;
}
if (remainingSize > supv::WriteMemory::CHUNK_MAX) {
if (update.remainingSize > supv::WriteMemory::CHUNK_MAX) {
dataLength = supv::WriteMemory::CHUNK_MAX;
} else {
dataLength = static_cast<uint16_t>(remainingSize);
dataLength = static_cast<uint16_t>(update.remainingSize);
}
if (file.is_open()) {
file.seekg(bytesWritten, file.beg);
file.seekg(update.bytesWritten, file.beg);
file.read(reinterpret_cast<char*>(tempData), dataLength);
if (!file) {
sif::warning << "PlocSupvHelper::performUpdate: Read only " << file.gcount() << " of "
<< dataLength << " bytes" << std::endl;
sif::info << "PlocSupvHelper::performUpdate: Failed when trying to read byte "
<< bytesWritten << std::endl;
<< update.bytesWritten << std::endl;
}
remainingSize -= dataLength;
} else {
return FILE_CLOSED_ACCIDENTALLY;
}
if (bytesWritten == 0) {
if (update.bytesWritten == 0) {
seqFlags = supv::SequenceFlags::FIRST_PKT;
} else if (remainingSize == 0) {
} else if (update.remainingSize == 0) {
seqFlags = supv::SequenceFlags::LAST_PKT;
} else {
seqFlags = supv::SequenceFlags::CONTINUED_PKT;
}
supv::WriteMemory packet(seqFlags, sequenceCount++, update.memoryId,
update.startAddress + bytesWritten, dataLength, tempData);
supv::WriteMemory packet(seqFlags, update.sequenceCount++, update.memoryId,
update.startAddress + update.bytesWritten, dataLength, tempData);
result = handlePacketTransmission(packet);
if (result != RETURN_OK) {
triggerEvent(WRITE_MEMORY_FAILED, packetNum);
update.sequenceCount--;
triggerEvent(WRITE_MEMORY_FAILED, update.packetNum);
return result;
}
packetNum += 1;
bytesWritten += dataLength;
update.remainingSize -= dataLength;
update.packetNum += 1;
update.bytesWritten += dataLength;
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
progressPrinter.print(bytesWritten);
progressPrinter.print(update.bytesWritten);
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
}
result = handleCheckMemoryCommand();
if (result != RETURN_OK) {
return result;
}
return result;
}
@ -235,6 +282,16 @@ ReturnValue_t PlocSupvHelper::performEventBufferRequest() {
return result;
}
ReturnValue_t PlocSupvHelper::selectMemory() {
ReturnValue_t result = RETURN_OK;
supv::MPSoCBootSelect packet(update.memoryId);
result = handlePacketTransmission(packet);
if (result != RETURN_OK) {
return result;
}
return RETURN_OK;
}
ReturnValue_t PlocSupvHelper::prepareUpdate() {
ReturnValue_t result = RETURN_OK;
supv::ApidOnlyPacket packet(supv::APID_PREPARE_UPDATE);

View File

@ -28,59 +28,63 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
static const Event SUPV_UPDATE_FAILED = MAKE_EVENT(0, severity::LOW);
//! [EXPORT] : [COMMENT] update successful
static const Event SUPV_UPDATE_SUCCESSFUL = MAKE_EVENT(1, severity::LOW);
//! [EXPORT] : [COMMENT] Continue update command failed
static const Event SUPV_CONTINUE_UPDATE_FAILED = MAKE_EVENT(2, severity::LOW);
//! [EXPORT] : [COMMENT] Continue update command successful
static const Event SUPV_CONTINUE_UPDATE_SUCCESSFUL = MAKE_EVENT(3, severity::LOW);
//! [EXPORT] : [COMMENT] Terminated update procedure by command
static const Event TERMINATED_UPDATE_PROCEDURE = MAKE_EVENT(2, severity::LOW);
static const Event TERMINATED_UPDATE_PROCEDURE = MAKE_EVENT(4, severity::LOW);
//! [EXPORT] : [COMMENT] Requesting event buffer was successful
static const Event SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL = MAKE_EVENT(3, severity::LOW);
static const Event SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL = MAKE_EVENT(5, severity::LOW);
//! [EXPORT] : [COMMENT] Requesting event buffer failed
static const Event SUPV_EVENT_BUFFER_REQUEST_FAILED = MAKE_EVENT(4, severity::LOW);
static const Event SUPV_EVENT_BUFFER_REQUEST_FAILED = MAKE_EVENT(6, severity::LOW);
//! [EXPORT] : [COMMENT] Terminated event buffer request by command
//! P1: Number of packets read before process was terminated
static const Event SUPV_EVENT_BUFFER_REQUEST_TERMINATED = MAKE_EVENT(5, severity::LOW);
static const Event SUPV_EVENT_BUFFER_REQUEST_TERMINATED = MAKE_EVENT(7, severity::LOW);
//! [EXPORT] : [COMMENT] Communication interface returned failure when trying to send the command
//! to the supervisor
//! P1: Return value returned by the communication interface sendMessage function
//! P2: Internal state of supervisor helper
static const Event SUPV_SENDING_COMMAND_FAILED = MAKE_EVENT(6, severity::LOW);
static const Event SUPV_SENDING_COMMAND_FAILED = MAKE_EVENT(8, severity::LOW);
//! [EXPORT] : [COMMENT] Request receive message of communication interface failed
//! P1: Return value returned by the communication interface requestReceiveMessage function
//! P2: Internal state of supervisor helper
static const Event SUPV_HELPER_REQUESTING_REPLY_FAILED = MAKE_EVENT(7, severity::LOW);
static const Event SUPV_HELPER_REQUESTING_REPLY_FAILED = MAKE_EVENT(9, severity::LOW);
//! [EXPORT] : [COMMENT] Reading receive message of communication interface failed
//! P1: Return value returned by the communication interface readingReceivedMessage function
//! P2: Internal state of supervisor helper
static const Event SUPV_HELPER_READING_REPLY_FAILED = MAKE_EVENT(8, severity::LOW);
static const Event SUPV_HELPER_READING_REPLY_FAILED = MAKE_EVENT(10, severity::LOW);
//! [EXPORT] : [COMMENT] Did not receive acknowledgement report
//! P1: Number of bytes missing
//! P2: Internal state of MPSoC helper
static const Event SUPV_MISSING_ACK = MAKE_EVENT(9, severity::LOW);
static const Event SUPV_MISSING_ACK = MAKE_EVENT(11, severity::LOW);
//! [EXPORT] : [COMMENT] Supervisor did not receive execution report
//! P1: Number of bytes missing
//! P2: Internal state of supervisor helper
static const Event SUPV_MISSING_EXE = MAKE_EVENT(10, severity::LOW);
static const Event SUPV_MISSING_EXE = MAKE_EVENT(12, severity::LOW);
//! [EXPORT] : [COMMENT] Supervisor received acknowledgment failure report
//! P1: Internal state of supervisor helper
static const Event SUPV_ACK_FAILURE_REPORT = MAKE_EVENT(11, severity::LOW);
static const Event SUPV_ACK_FAILURE_REPORT = MAKE_EVENT(13, severity::LOW);
//! [EXPORT] : [COMMENT] Execution report failure
//! P1:
static const Event SUPV_EXE_FAILURE_REPORT = MAKE_EVENT(12, severity::LOW);
static const Event SUPV_EXE_FAILURE_REPORT = MAKE_EVENT(14, severity::LOW);
//! [EXPORT] : [COMMENT] Supervisor expected acknowledgment report but received space packet with
//! other apid P1: Apid of received space packet P2: Internal state of supervisor helper
static const Event SUPV_ACK_INVALID_APID = MAKE_EVENT(13, severity::LOW);
static const Event SUPV_ACK_INVALID_APID = MAKE_EVENT(15, severity::LOW);
//! [EXPORT] : [COMMENT] Supervisor helper expected execution report but received space packet
//! with other apid P1: Apid of received space packet P2: Internal state of supervisor helper
static const Event SUPV_EXE_INVALID_APID = MAKE_EVENT(14, severity::LOW);
static const Event SUPV_EXE_INVALID_APID = MAKE_EVENT(16, severity::LOW);
//! [EXPORT] : [COMMENT] Failed to receive acknowledgment report
//! P1: Return value
//! P2: Apid of command for which the reception of the acknowledgment report failed
static const Event ACK_RECEPTION_FAILURE = MAKE_EVENT(15, severity::LOW);
static const Event ACK_RECEPTION_FAILURE = MAKE_EVENT(17, severity::LOW);
//! [EXPORT] : [COMMENT] Failed to receive execution report
//! P1: Return value
//! P2: Apid of command for which the reception of the execution report failed
static const Event EXE_RECEPTION_FAILURE = MAKE_EVENT(16, severity::LOW);
static const Event EXE_RECEPTION_FAILURE = MAKE_EVENT(18, severity::LOW);
//! [EXPORT] : [COMMENT] Update procedure failed when sending packet with number P1
//! P1: Packet number for which the memory write command fails
static const Event WRITE_MEMORY_FAILED = MAKE_EVENT(17, severity::LOW);
static const Event WRITE_MEMORY_FAILED = MAKE_EVENT(19, severity::LOW);
PlocSupvHelper(object_id_t objectId);
virtual ~PlocSupvHelper();
@ -102,6 +106,11 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
*/
ReturnValue_t startUpdate(std::string file, uint8_t memoryId, uint32_t startAddress);
/**
* @brief This initiate the continuation of a failed update.
*/
void initiateUpdateContinuation();
/**
* @brief Calling this function will initiate the procedure to request the event buffer
*/
@ -141,6 +150,10 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
// Size of update
uint32_t length;
uint32_t crc;
size_t remainingSize;
size_t bytesWritten;
uint32_t packetNum;
uint16_t sequenceCount;
};
struct Update update;
@ -154,7 +167,7 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
EventBufferRequest eventBufferReq;
enum class InternalState { IDLE, UPDATE, REQUEST_EVENT_BUFFER };
enum class InternalState { IDLE, UPDATE, CONTINUE_UPDATE, REQUEST_EVENT_BUFFER };
InternalState internalState = InternalState::IDLE;
@ -179,9 +192,11 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
uint16_t rememberApid = 0;
ReturnValue_t performUpdate();
ReturnValue_t continueUpdate();
ReturnValue_t writeUpdatePackets();
ReturnValue_t performEventBufferRequest();
ReturnValue_t handlePacketTransmission(SpacePacket& packet,
uint32_t timeoutExecutionReport = 2000);
uint32_t timeoutExecutionReport = 60000);
ReturnValue_t sendCommand(SpacePacket& packet);
/**
* @brief Function which reads form the communication interface
@ -199,9 +214,13 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
* @param tmPacket Pointer to space packet where received data will be written to
* @param reaminingBytes Number of bytes to read in the space packet
* @param timeout Receive timeout in milliseconds
*
* @note It can take up to 70 seconds until the supervisor replies with an acknowledgment
* failure report.
*/
ReturnValue_t handleTmReception(supv::TmPacket* tmPacket, size_t remainingBytes,
uint32_t timeout = 1000);
uint32_t timeout = 70000);
ReturnValue_t selectMemory();
ReturnValue_t prepareUpdate();
ReturnValue_t eraseMemory();
// Calculates CRC over image. Will be used for verification after update writing has

View File

@ -1,7 +1,4 @@
target_sources(${OBSW_NAME} PRIVATE
StarTrackerHandler.cpp
StarTrackerJsonCommands.cpp
ArcsecDatalinkLayer.cpp
ArcsecJsonParamBase.cpp
StrHelper.cpp
)
target_sources(
${OBSW_NAME}
PRIVATE StarTrackerHandler.cpp StarTrackerJsonCommands.cpp
ArcsecDatalinkLayer.cpp ArcsecJsonParamBase.cpp StrHelper.cpp)

View File

@ -1,28 +1,16 @@
target_sources(${OBSW_NAME} PRIVATE
ipc/MissionMessageTypes.cpp
pollingsequence/pollingSequenceFactory.cpp
)
target_sources(${OBSW_NAME} PRIVATE ipc/MissionMessageTypes.cpp
pollingsequence/pollingSequenceFactory.cpp)
target_include_directories(${OBSW_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
# If a special translation file for object IDs exists, compile it.
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp")
target_sources(${OBSW_NAME} PRIVATE
objects/translateObjects.cpp
)
target_sources(${UNITTEST_NAME} PRIVATE
objects/translateObjects.cpp
)
target_sources(${OBSW_NAME} PRIVATE objects/translateObjects.cpp)
target_sources(${UNITTEST_NAME} PRIVATE objects/translateObjects.cpp)
endif()
# If a special translation file for events exists, compile it.
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp")
target_sources(${OBSW_NAME} PRIVATE
events/translateEvents.cpp
)
target_sources(${UNITTEST_NAME} PRIVATE
events/translateEvents.cpp
)
target_sources(${OBSW_NAME} PRIVATE events/translateEvents.cpp)
target_sources(${UNITTEST_NAME} PRIVATE events/translateEvents.cpp)
endif()

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 204 translations.
* @brief Auto-generated event translation file. Contains 206 translations.
* @details
* Generated on: 2022-05-13 18:40:51
* Generated on: 2022-05-23 16:46:55
*/
#include "translateEvents.h"
@ -185,6 +185,8 @@ const char *BATT_MODE_STRING = "BATT_MODE";
const char *BATT_MODE_CHANGED_STRING = "BATT_MODE_CHANGED";
const char *SUPV_UPDATE_FAILED_STRING = "SUPV_UPDATE_FAILED";
const char *SUPV_UPDATE_SUCCESSFUL_STRING = "SUPV_UPDATE_SUCCESSFUL";
const char *SUPV_CONTINUE_UPDATE_FAILED_STRING = "SUPV_CONTINUE_UPDATE_FAILED";
const char *SUPV_CONTINUE_UPDATE_SUCCESSFUL_STRING = "SUPV_CONTINUE_UPDATE_SUCCESSFUL";
const char *TERMINATED_UPDATE_PROCEDURE_STRING = "TERMINATED_UPDATE_PROCEDURE";
const char *SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL_STRING = "SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL";
const char *SUPV_EVENT_BUFFER_REQUEST_FAILED_STRING = "SUPV_EVENT_BUFFER_REQUEST_FAILED";
@ -569,36 +571,40 @@ const char *translateEvents(Event event) {
case (13601):
return SUPV_UPDATE_SUCCESSFUL_STRING;
case (13602):
return TERMINATED_UPDATE_PROCEDURE_STRING;
return SUPV_CONTINUE_UPDATE_FAILED_STRING;
case (13603):
return SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL_STRING;
return SUPV_CONTINUE_UPDATE_SUCCESSFUL_STRING;
case (13604):
return SUPV_EVENT_BUFFER_REQUEST_FAILED_STRING;
return TERMINATED_UPDATE_PROCEDURE_STRING;
case (13605):
return SUPV_EVENT_BUFFER_REQUEST_TERMINATED_STRING;
return SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL_STRING;
case (13606):
return SUPV_SENDING_COMMAND_FAILED_STRING;
return SUPV_EVENT_BUFFER_REQUEST_FAILED_STRING;
case (13607):
return SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING;
return SUPV_EVENT_BUFFER_REQUEST_TERMINATED_STRING;
case (13608):
return SUPV_HELPER_READING_REPLY_FAILED_STRING;
return SUPV_SENDING_COMMAND_FAILED_STRING;
case (13609):
return SUPV_MISSING_ACK_STRING;
return SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING;
case (13610):
return SUPV_MISSING_EXE_STRING;
return SUPV_HELPER_READING_REPLY_FAILED_STRING;
case (13611):
return SUPV_ACK_FAILURE_REPORT_STRING;
return SUPV_MISSING_ACK_STRING;
case (13612):
return SUPV_EXE_FAILURE_REPORT_STRING;
return SUPV_MISSING_EXE_STRING;
case (13613):
return SUPV_ACK_INVALID_APID_STRING;
return SUPV_ACK_FAILURE_REPORT_STRING;
case (13614):
return SUPV_EXE_INVALID_APID_STRING;
return SUPV_EXE_FAILURE_REPORT_STRING;
case (13615):
return ACK_RECEPTION_FAILURE_STRING;
return SUPV_ACK_INVALID_APID_STRING;
case (13616):
return EXE_RECEPTION_FAILURE_STRING;
return SUPV_EXE_INVALID_APID_STRING;
case (13617):
return ACK_RECEPTION_FAILURE_STRING;
case (13618):
return EXE_RECEPTION_FAILURE_STRING;
case (13619):
return WRITE_MEMORY_FAILED_STRING;
case (13700):
return ALLOC_FAILURE_STRING;

View File

@ -50,6 +50,7 @@ enum sourceObjects : uint32_t {
SPI_MAIN_COM_IF = 0x49020004,
GPIO_IF = 0x49010005,
SPI_RW_COM_IF = 0x49020005,
SPI_RTD_COM_IF = 0x49020006,
/* 0x54 ('T') for test handlers */
TEST_TASK = 0x54694269,

View File

@ -1,8 +1,8 @@
/**
* @brief Auto-generated object translation file.
* @details
* Contains 129 translations.
* Generated on: 2022-05-12 20:45:27
* Contains 131 translations.
* Generated on: 2022-05-23 16:46:58
*/
#include "translateObjects.h"
@ -79,6 +79,7 @@ const char *ARDUINO_COM_IF_STRING = "ARDUINO_COM_IF";
const char *GPIO_IF_STRING = "GPIO_IF";
const char *SPI_MAIN_COM_IF_STRING = "SPI_MAIN_COM_IF";
const char *SPI_RW_COM_IF_STRING = "SPI_RW_COM_IF";
const char *SPI_RTD_COM_IF_STRING = "SPI_RTD_COM_IF";
const char *UART_COM_IF_STRING = "UART_COM_IF";
const char *I2C_COM_IF_STRING = "I2C_COM_IF";
const char *CSP_COM_IF_STRING = "CSP_COM_IF";
@ -99,6 +100,7 @@ const char *PUS_SERVICE_3_HOUSEKEEPING_STRING = "PUS_SERVICE_3_HOUSEKEEPING";
const char *PUS_SERVICE_5_EVENT_REPORTING_STRING = "PUS_SERVICE_5_EVENT_REPORTING";
const char *PUS_SERVICE_8_FUNCTION_MGMT_STRING = "PUS_SERVICE_8_FUNCTION_MGMT";
const char *PUS_SERVICE_9_TIME_MGMT_STRING = "PUS_SERVICE_9_TIME_MGMT";
const char *PUS_SERVICE_11_TC_SCHEDULER_STRING = "PUS_SERVICE_11_TC_SCHEDULER";
const char *PUS_SERVICE_17_TEST_STRING = "PUS_SERVICE_17_TEST";
const char *PUS_SERVICE_20_PARAMETERS_STRING = "PUS_SERVICE_20_PARAMETERS";
const char *PUS_SERVICE_200_MODE_MGMT_STRING = "PUS_SERVICE_200_MODE_MGMT";
@ -284,6 +286,8 @@ const char *translateObject(object_id_t object) {
return SPI_MAIN_COM_IF_STRING;
case 0x49020005:
return SPI_RW_COM_IF_STRING;
case 0x49020006:
return SPI_RTD_COM_IF_STRING;
case 0x49030003:
return UART_COM_IF_STRING;
case 0x49040002:
@ -324,6 +328,8 @@ const char *translateObject(object_id_t object) {
return PUS_SERVICE_8_FUNCTION_MGMT_STRING;
case 0x53000009:
return PUS_SERVICE_9_TIME_MGMT_STRING;
case 0x53000011:
return PUS_SERVICE_11_TC_SCHEDULER_STRING;
case 0x53000017:
return PUS_SERVICE_17_TEST_STRING;
case 0x53000020:

View File

@ -5,6 +5,8 @@
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
#include "mission/devices/devicedefinitions/Max31865Definitions.h"
#ifndef RPI_TEST_ADIS16507
#define RPI_TEST_ADIS16507 0
#endif
@ -64,157 +66,34 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
static_cast<void>(length);
#if OBSW_ADD_PL_PCDU == 1
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
#endif
#if OBSW_ADD_TMP_DEVICES == 1
thisSequence->addSlot(objects::TMP1075_HANDLER_1, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
#endif
#if OBSW_ADD_RTD_DEVICES == 1
thisSequence->addSlot(objects::RTD_0_IC3_PLOC_HEATSPREADER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_1_IC4_PLOC_MISSIONBOARD, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_2_IC5_4K_CAMERA, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_3_IC6_DAC_HEATSPREADER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_4_IC7_STARTRACKER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_5_IC8_RW1_MX_MY, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_6_IC9_DRO, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_7_IC10_SCEX, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_8_IC11_X8, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_9_IC12_HPA, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_10_IC13_PL_TX, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_11_IC14_MPA, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_12_IC15_ACU, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_13_IC16_PLPCDU_HEATSPREADER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_14_IC17_TCS_BOARD, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RTD_15_IC18_IMTQ, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
#endif /* OBSW_ADD_RTD_DEVICES */
#if OBSW_ADD_TMP_DEVICES == 1
thisSequence->addSlot(objects::TMP1075_HANDLER_1, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.2, DeviceHandlerIF::SEND_WRITE);
#endif
#if OBSW_ADD_RTD_DEVICES == 1
thisSequence->addSlot(objects::RTD_0_IC3_PLOC_HEATSPREADER, length * 0.2,
DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_1_IC4_PLOC_MISSIONBOARD, length * 0.2,
DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_2_IC5_4K_CAMERA, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_3_IC6_DAC_HEATSPREADER, length * 0.2,
DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_4_IC7_STARTRACKER, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_5_IC8_RW1_MX_MY, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_6_IC9_DRO, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_7_IC10_SCEX, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_8_IC11_X8, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_9_IC12_HPA, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_10_IC13_PL_TX, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_11_IC14_MPA, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_12_IC15_ACU, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_13_IC16_PLPCDU_HEATSPREADER, length * 0.2,
DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_14_IC17_TCS_BOARD, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RTD_15_IC18_IMTQ, length * 0.2, DeviceHandlerIF::SEND_WRITE);
#endif /* OBSW_ADD_RTD_DEVICES */
#if OBSW_ADD_TMP_DEVICES == 1
thisSequence->addSlot(objects::TMP1075_HANDLER_1, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::TMP1075_HANDLER_1, length * 0.2, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.2, DeviceHandlerIF::GET_WRITE);
#endif
#if OBSW_ADD_RTD_DEVICES == 1
thisSequence->addSlot(objects::RTD_0_IC3_PLOC_HEATSPREADER, length * 0.4,
DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_1_IC4_PLOC_MISSIONBOARD, length * 0.4,
DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_2_IC5_4K_CAMERA, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_3_IC6_DAC_HEATSPREADER, length * 0.4,
DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_4_IC7_STARTRACKER, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_5_IC8_RW1_MX_MY, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_6_IC9_DRO, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_7_IC10_SCEX, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_8_IC11_X8, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_9_IC12_HPA, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_10_IC13_PL_TX, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_11_IC14_MPA, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_12_IC15_ACU, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_13_IC16_PLPCDU_HEATSPREADER, length * 0.4,
DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_14_IC17_TCS_BOARD, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RTD_15_IC18_IMTQ, length * 0.4, DeviceHandlerIF::GET_WRITE);
#endif /* OBSW_ADD_RTD_DEVICES */
#if OBSW_ADD_TMP_DEVICES == 1
thisSequence->addSlot(objects::TMP1075_HANDLER_1, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::TMP1075_HANDLER_1, length * 0.2, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.2, DeviceHandlerIF::SEND_READ);
#endif
#if OBSW_ADD_RTD_DEVICES == 1
thisSequence->addSlot(objects::RTD_0_IC3_PLOC_HEATSPREADER, length * 0.6,
DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_1_IC4_PLOC_MISSIONBOARD, length * 0.6,
DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_2_IC5_4K_CAMERA, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_3_IC6_DAC_HEATSPREADER, length * 0.6,
DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_4_IC7_STARTRACKER, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_5_IC8_RW1_MX_MY, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_6_IC9_DRO, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_7_IC10_SCEX, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_8_IC11_X8, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_9_IC12_HPA, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_10_IC13_PL_TX, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_11_IC14_MPA, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_12_IC15_ACU, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_13_IC16_PLPCDU_HEATSPREADER, length * 0.6,
DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_14_IC17_TCS_BOARD, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RTD_15_IC18_IMTQ, length * 0.6, DeviceHandlerIF::SEND_READ);
#endif /* OBSW_ADD_RTD_DEVICES */
#if OBSW_ADD_TMP_DEVICES == 1
thisSequence->addSlot(objects::TMP1075_HANDLER_1, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.8, DeviceHandlerIF::GET_READ);
#endif
#if OBSW_ADD_RTD_DEVICES == 1
thisSequence->addSlot(objects::RTD_0_IC3_PLOC_HEATSPREADER, length * 0.8,
DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_1_IC4_PLOC_MISSIONBOARD, length * 0.8,
DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_2_IC5_4K_CAMERA, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_3_IC6_DAC_HEATSPREADER, length * 0.8,
DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_4_IC7_STARTRACKER, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_5_IC8_RW1_MX_MY, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_6_IC9_DRO, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_7_IC10_SCEX, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_8_IC11_X8, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_9_IC12_HPA, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_10_IC13_PL_TX, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_11_IC14_MPA, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_12_IC15_ACU, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_13_IC16_PLPCDU_HEATSPREADER, length * 0.8,
DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_14_IC17_TCS_BOARD, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::RTD_15_IC18_IMTQ, length * 0.8, DeviceHandlerIF::GET_READ);
#endif /* OBSW_ADD_RTD_DEVICES */
#if OBSW_ADD_RAD_SENSORS == 1
/* Radiation sensor */
thisSequence->addSlot(objects::RAD_SENSOR, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.8, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::TMP1075_HANDLER_1, length * 0.2, DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.2, DeviceHandlerIF::GET_READ);
#endif
#if OBSW_ADD_SUN_SENSORS == 1
@ -482,6 +361,15 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
}
#endif /* OBSW_ADD_SUN_SENSORS == 1 */
#if OBSW_ADD_RAD_SENSORS == 1
/* Radiation sensor */
thisSequence->addSlot(objects::RAD_SENSOR, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.8, DeviceHandlerIF::GET_READ);
#endif
#if OBSW_ADD_ACS_BOARD == 1 && OBSW_ADD_ACS_HANDLERS == 1
bool enableAside = true;
bool enableBside = true;

View File

@ -1,10 +1,3 @@
target_sources(${OBSW_NAME} PUBLIC
PapbVcInterface.cpp
Ptme.cpp
PdecHandler.cpp
PdecConfig.cpp
PtmeConfig.cpp
AxiPtmeConfig.cpp
)
target_sources(
${OBSW_NAME} PUBLIC PapbVcInterface.cpp Ptme.cpp PdecHandler.cpp
PdecConfig.cpp PtmeConfig.cpp AxiPtmeConfig.cpp)

View File

@ -1,7 +1 @@
target_sources(${OBSW_NAME} PUBLIC
utility.cpp
)
target_sources(${OBSW_NAME} PUBLIC utility.cpp)

View File

@ -1,3 +1 @@
target_sources(${LIB_EIVE_MISSION} PRIVATE
ThermalController.cpp
)
target_sources(${LIB_EIVE_MISSION} PRIVATE ThermalController.cpp)

View File

@ -1,5 +1 @@
target_sources(${LIB_EIVE_MISSION} PRIVATE
GenericFactory.cpp
)
target_sources(${LIB_EIVE_MISSION} PRIVATE GenericFactory.cpp)

View File

@ -49,7 +49,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_) {
// Framework objects
new EventManager(objects::EVENT_MANAGER);
auto healthTable = new HealthTable(objects::HEALTH_TABLE);
if (healthTable != nullptr) {
if (healthTable_ != nullptr) {
*healthTable_ = healthTable;
}
new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER);

View File

@ -1,21 +1,22 @@
target_sources(${LIB_EIVE_MISSION} PRIVATE
GomspaceDeviceHandler.cpp
BpxBatteryHandler.cpp
Tmp1075Handler.cpp
PCDUHandler.cpp
P60DockHandler.cpp
PDU1Handler.cpp
PDU2Handler.cpp
ACUHandler.cpp
SyrlinksHkHandler.cpp
Max31865PT1000Handler.cpp
IMTQHandler.cpp
HeaterHandler.cpp
RadiationSensorHandler.cpp
GyroADIS1650XHandler.cpp
RwHandler.cpp
max1227.cpp
SusHandler.cpp
PayloadPcduHandler.cpp
SolarArrayDeploymentHandler.cpp
)
target_sources(
${LIB_EIVE_MISSION}
PRIVATE GomspaceDeviceHandler.cpp
BpxBatteryHandler.cpp
Tmp1075Handler.cpp
PCDUHandler.cpp
P60DockHandler.cpp
PDU1Handler.cpp
PDU2Handler.cpp
ACUHandler.cpp
SyrlinksHkHandler.cpp
Max31865PT1000Handler.cpp
Max31865EiveHandler.cpp
IMTQHandler.cpp
HeaterHandler.cpp
RadiationSensorHandler.cpp
GyroADIS1650XHandler.cpp
RwHandler.cpp
max1227.cpp
SusHandler.cpp
PayloadPcduHandler.cpp
SolarArrayDeploymentHandler.cpp)

View File

@ -424,7 +424,8 @@ ReturnValue_t GyroADIS1650XHandler::spiSendCallback(SpiComIF *comIf, SpiCookie *
GpioIF *gpioIF = comIf->getGpioInterface();
MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING;
uint32_t timeoutMs = 0;
MutexIF *mutex = comIf->getMutex(&timeoutType, &timeoutMs);
MutexIF *mutex = comIf->getCsMutex();
cookie->getMutexParams(timeoutType, timeoutMs);
if (mutex == nullptr or gpioIF == nullptr) {
#if OBSW_VERBOSE_LEVEL >= 1
sif::warning << "GyroADIS16507Handler::spiSendCallback: "

View File

@ -0,0 +1,183 @@
#include "Max31865EiveHandler.h"
Max31865EiveHandler::Max31865EiveHandler(object_id_t objectId, object_id_t comIF,
CookieIF* comCookie)
: DeviceHandlerBase(objectId, comIF, comCookie, nullptr),
sensorDataset(this, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
debugDivider(5) {
structLen = exchangeStruct.getSerializedSize();
}
void Max31865EiveHandler::doStartUp() {
updatePeriodicReply(true, EiveMax31855::RtdCommands::EXCHANGE_SET_ID);
if (state == InternalState::NONE or state == InternalState::INACTIVE) {
if (instantNormal) {
state = InternalState::ACTIVE;
} else {
state = InternalState::ON;
}
transitionOk = false;
}
if ((state == InternalState::ON or state == InternalState::ACTIVE) and transitionOk) {
if (instantNormal) {
setMode(MODE_NORMAL);
} else {
setMode(MODE_ON);
}
}
}
void Max31865EiveHandler::doShutDown() {
updatePeriodicReply(false, EiveMax31855::RtdCommands::EXCHANGE_SET_ID);
if (state == InternalState::NONE or state == InternalState::ACTIVE or
state == InternalState::ON) {
state = InternalState::INACTIVE;
transitionOk = false;
} else {
transitionOk = true;
}
if (state == InternalState::INACTIVE and transitionOk) {
setMode(_MODE_POWER_DOWN);
}
}
ReturnValue_t Max31865EiveHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
//*id = EiveMax31855::RtdCommands::EXCHANGE_SET_ID;
return NOTHING_TO_SEND;
}
ReturnValue_t Max31865EiveHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
ReturnValue_t result = NOTHING_TO_SEND;
if (state == InternalState::ON) {
*id = EiveMax31855::RtdCommands::ON;
result = buildCommandFromCommand(*id, nullptr, 0);
}
if (state == InternalState::ACTIVE) {
*id = EiveMax31855::RtdCommands::ACTIVE;
result = buildCommandFromCommand(*id, nullptr, 0);
}
if (state == InternalState::INACTIVE) {
*id = EiveMax31855::RtdCommands::OFF;
result = buildCommandFromCommand(*id, nullptr, 0);
}
return result;
}
ReturnValue_t Max31865EiveHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t* commandData,
size_t commandDataLen) {
auto cmdTyped = static_cast<EiveMax31855::RtdCommands>(deviceCommand);
switch (cmdTyped) {
case (EiveMax31855::RtdCommands::ON):
case (EiveMax31855::RtdCommands::ACTIVE):
case (EiveMax31855::RtdCommands::OFF): {
simpleCommand(cmdTyped);
break;
}
case (EiveMax31855::RtdCommands::LOW_THRESHOLD):
case (EiveMax31855::RtdCommands::HIGH_TRESHOLD): {
break;
}
case (EiveMax31855::RtdCommands::CFG): {
break;
}
default:
return NOTHING_TO_SEND;
}
return RETURN_OK;
}
void Max31865EiveHandler::setInstantNormal(bool instantNormal) {
this->instantNormal = instantNormal;
}
void Max31865EiveHandler::setDebugMode(bool enable, uint32_t divider) {
this->debugMode = enable;
debugDivider.setDivider(divider);
}
void Max31865EiveHandler::simpleCommand(EiveMax31855::RtdCommands cmd) {
cmdBuf[0] = static_cast<uint8_t>(cmd);
rawPacket = cmdBuf.data();
rawPacketLen = 1;
}
void Max31865EiveHandler::doTransition(Mode_t modeFrom, Submode_t subModeFrom) {
if (mode == _MODE_TO_NORMAL) {
if (state != InternalState::ACTIVE) {
state = InternalState::ACTIVE;
transitionOk = false;
} else if (transitionOk) {
setMode(MODE_NORMAL);
}
} else {
DeviceHandlerBase::doTransition(modeFrom, subModeFrom);
}
}
void Max31865EiveHandler::fillCommandAndReplyMap() {
insertInCommandMap(EiveMax31855::RtdCommands::ON);
insertInCommandMap(EiveMax31855::RtdCommands::ACTIVE);
insertInCommandMap(EiveMax31855::RtdCommands::OFF);
insertInReplyMap(EiveMax31855::RtdCommands::EXCHANGE_SET_ID, 200, &sensorDataset, 0, true);
}
ReturnValue_t Max31865EiveHandler::scanForReply(const uint8_t* start, size_t remainingSize,
DeviceCommandId_t* foundId, size_t* foundLen) {
if (mode == _MODE_POWER_ON or mode == _MODE_WAIT_ON) {
return IGNORE_FULL_PACKET;
}
if (remainingSize != structLen) {
sif::error << "Invalid reply from RTD reader detected, reply size " << remainingSize
<< " not equal to exchange struct size " << structLen << std::endl;
return DeviceHandlerIF::INVALID_DATA;
}
*foundId = EiveMax31855::RtdCommands::EXCHANGE_SET_ID;
*foundLen = remainingSize;
return RETURN_OK;
}
ReturnValue_t Max31865EiveHandler::interpretDeviceReply(DeviceCommandId_t id,
const uint8_t* packet) {
size_t deserTmp = structLen;
auto result = exchangeStruct.deSerialize(&packet, &deserTmp, SerializeIF::Endianness::MACHINE);
if (result != RETURN_OK) {
return result;
}
if (mode == _MODE_TO_NORMAL and exchangeStruct.active and state == InternalState::ACTIVE) {
transitionOk = true;
}
if (mode == _MODE_START_UP and exchangeStruct.configured and state == InternalState::ON) {
transitionOk = true;
}
// Calculate resistance
float rtdValue = exchangeStruct.adcCode * EiveMax31855::RTD_RREF_PT1000 / INT16_MAX;
// calculate approximation
float approxTemp = exchangeStruct.adcCode / 32.0 - 256.0;
if (debugMode) {
if (debugDivider.checkAndIncrement()) {
sif::info << "Max31865: " << std::setw(20) << std::left << locString << std::right
<< " | R[Ohm] " << rtdValue << " Ohms | Approx T[C]: " << approxTemp << std::endl;
}
}
return RETURN_OK;
}
uint32_t Max31865EiveHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 2000; }
ReturnValue_t Max31865EiveHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) {
using namespace MAX31865;
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::RTD_VALUE), new PoolEntry<float>({0}));
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::TEMPERATURE_C), new PoolEntry<float>({0}));
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::FAULT_BYTE), new PoolEntry<uint8_t>({0}));
poolManager.subscribeForPeriodicPacket(sensorDataset.getSid(), false, 30.0, false);
return RETURN_OK;
}
void Max31865EiveHandler::setDeviceInfo(uint8_t idx_, std::string location_) {
idx = idx_;
locString = std::move(location_);
}
ReturnValue_t Max31865EiveHandler::initialize() { return DeviceHandlerBase::initialize(); }

View File

@ -0,0 +1,47 @@
#ifndef MISSION_DEVICES_MAX31865EIVEHANDLER_H_
#define MISSION_DEVICES_MAX31865EIVEHANDLER_H_
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
#include "devicedefinitions/Max31865Definitions.h"
class Max31865EiveHandler : public DeviceHandlerBase {
public:
Max31865EiveHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie);
void setInstantNormal(bool instantNormal);
void setDebugMode(bool enable, uint32_t divider);
void setDeviceInfo(uint8_t idx, std::string location);
private:
void doStartUp() override;
void doShutDown() override;
void doTransition(Mode_t modeFrom, Submode_t subModeFrom) override;
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t* id) override;
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t* id) override;
void fillCommandAndReplyMap() override;
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t* commandData,
size_t commandDataLen) override;
ReturnValue_t scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId,
size_t* foundLen) override;
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) override;
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) override;
ReturnValue_t initialize() override;
void simpleCommand(EiveMax31855::RtdCommands cmd);
std::array<uint8_t, 12> cmdBuf = {};
uint8_t idx = 0;
std::string locString = "Unknown";
EiveMax31855::ReadOutStruct exchangeStruct;
bool debugMode = false;
size_t structLen = 0;
bool instantNormal = false;
MAX31865::Max31865Set sensorDataset;
PeriodicOperationDivider debugDivider;
enum class InternalState { NONE, ON, ACTIVE, INACTIVE } state = InternalState::NONE;
bool transitionOk = false;
};
#endif /* MISSION_DEVICES_MAX31865EIVEHANDLER_H_ */

View File

@ -8,7 +8,7 @@
Max31865PT1000Handler::Max31865PT1000Handler(object_id_t objectId, object_id_t comIF,
CookieIF *comCookie)
: DeviceHandlerBase(objectId, comIF, comCookie),
sensorDataset(this),
sensorDataset(this, MAX31865::REQUEST_RTD),
sensorDatasetSid(sensorDataset.getSid()) {
#if OBSW_VERBOSE_LEVEL >= 1
debugDivider = new PeriodicOperationDivider(10);
@ -93,13 +93,13 @@ void Max31865PT1000Handler::doShutDown() {
ReturnValue_t Max31865PT1000Handler::buildNormalDeviceCommand(DeviceCommandId_t *id) {
if (internalState == InternalState::RUNNING) {
*id = Max31865Definitions::REQUEST_RTD;
*id = MAX31865::REQUEST_RTD;
return buildCommandFromCommand(*id, nullptr, 0);
} else if (internalState == InternalState::REQUEST_FAULT_BYTE) {
*id = Max31865Definitions::REQUEST_FAULT_BYTE;
*id = MAX31865::REQUEST_FAULT_BYTE;
return buildCommandFromCommand(*id, nullptr, 0);
} else if (internalState == InternalState::CLEAR_FAULT_BYTE) {
*id = Max31865Definitions::CLEAR_FAULT_BYTE;
*id = MAX31865::CLEAR_FAULT_BYTE;
return buildCommandFromCommand(*id, nullptr, 0);
} else {
return DeviceHandlerBase::NOTHING_TO_SEND;
@ -113,32 +113,32 @@ ReturnValue_t Max31865PT1000Handler::buildTransitionDeviceCommand(DeviceCommandI
case (InternalState::RUNNING):
return DeviceHandlerBase::NOTHING_TO_SEND;
case (InternalState::CONFIGURE): {
*id = Max31865Definitions::CONFIG_CMD;
*id = MAX31865::CONFIG_CMD;
uint8_t config[1] = {DEFAULT_CONFIG};
return buildCommandFromCommand(*id, config, 1);
}
case (InternalState::REQUEST_CONFIG): {
*id = Max31865Definitions::REQUEST_CONFIG;
*id = MAX31865::REQUEST_CONFIG;
return buildCommandFromCommand(*id, nullptr, 0);
}
case (InternalState::CONFIG_HIGH_THRESHOLD): {
*id = Max31865Definitions::WRITE_HIGH_THRESHOLD;
*id = MAX31865::WRITE_HIGH_THRESHOLD;
return buildCommandFromCommand(*id, nullptr, 0);
}
case (InternalState::REQUEST_HIGH_THRESHOLD): {
*id = Max31865Definitions::REQUEST_HIGH_THRESHOLD;
*id = MAX31865::REQUEST_HIGH_THRESHOLD;
return buildCommandFromCommand(*id, nullptr, 0);
}
case (InternalState::CONFIG_LOW_THRESHOLD): {
*id = Max31865Definitions::WRITE_LOW_THRESHOLD;
*id = MAX31865::WRITE_LOW_THRESHOLD;
return buildCommandFromCommand(*id, nullptr, 0);
}
case (InternalState::REQUEST_LOW_THRESHOLD): {
*id = Max31865Definitions::REQUEST_LOW_THRESHOLD;
*id = MAX31865::REQUEST_LOW_THRESHOLD;
return buildCommandFromCommand(*id, nullptr, 0);
}
case (InternalState::CLEAR_FAULT_BYTE): {
*id = Max31865Definitions::CLEAR_FAULT_BYTE;
*id = MAX31865::CLEAR_FAULT_BYTE;
return buildCommandFromCommand(*id, nullptr, 0);
}
@ -156,10 +156,11 @@ ReturnValue_t Max31865PT1000Handler::buildCommandFromCommand(DeviceCommandId_t d
const uint8_t *commandData,
size_t commandDataLen) {
switch (deviceCommand) {
case (Max31865Definitions::CONFIG_CMD): {
commandBuffer[0] = static_cast<uint8_t>(Max31865Definitions::CONFIG_CMD);
case (MAX31865::CONFIG_CMD): {
commandBuffer[0] = static_cast<uint8_t>(MAX31865::CONFIG_CMD);
if (commandDataLen == 1) {
commandBuffer[1] = commandData[0];
currentCfg = commandData[0];
DeviceHandlerBase::rawPacketLen = 2;
DeviceHandlerBase::rawPacket = commandBuffer.data();
return HasReturnvaluesIF::RETURN_OK;
@ -167,54 +168,54 @@ ReturnValue_t Max31865PT1000Handler::buildCommandFromCommand(DeviceCommandId_t d
return DeviceHandlerIF::NO_COMMAND_DATA;
}
}
case (Max31865Definitions::CLEAR_FAULT_BYTE): {
commandBuffer[0] = static_cast<uint8_t>(Max31865Definitions::CONFIG_CMD);
commandBuffer[1] = Max31865Definitions::CLEAR_FAULT_BIT_VAL;
case (MAX31865::CLEAR_FAULT_BYTE): {
commandBuffer[0] = static_cast<uint8_t>(MAX31865::CONFIG_CMD);
commandBuffer[1] = currentCfg | MAX31865::CLEAR_FAULT_BIT_VAL;
DeviceHandlerBase::rawPacketLen = 2;
DeviceHandlerBase::rawPacket = commandBuffer.data();
return HasReturnvaluesIF::RETURN_OK;
}
case (Max31865Definitions::REQUEST_CONFIG): {
commandBuffer[0] = static_cast<uint8_t>(Max31865Definitions::REQUEST_CONFIG);
case (MAX31865::REQUEST_CONFIG): {
commandBuffer[0] = static_cast<uint8_t>(MAX31865::REQUEST_CONFIG);
commandBuffer[1] = 0x00; // dummy byte
DeviceHandlerBase::rawPacketLen = 2;
DeviceHandlerBase::rawPacket = commandBuffer.data();
return HasReturnvaluesIF::RETURN_OK;
}
case (Max31865Definitions::WRITE_HIGH_THRESHOLD): {
commandBuffer[0] = static_cast<uint8_t>(Max31865Definitions::WRITE_HIGH_THRESHOLD);
case (MAX31865::WRITE_HIGH_THRESHOLD): {
commandBuffer[0] = static_cast<uint8_t>(MAX31865::WRITE_HIGH_THRESHOLD);
commandBuffer[1] = static_cast<uint8_t>(HIGH_THRESHOLD >> 8);
commandBuffer[2] = static_cast<uint8_t>(HIGH_THRESHOLD & 0xFF);
DeviceHandlerBase::rawPacketLen = 3;
DeviceHandlerBase::rawPacket = commandBuffer.data();
return HasReturnvaluesIF::RETURN_OK;
}
case (Max31865Definitions::REQUEST_HIGH_THRESHOLD): {
commandBuffer[0] = static_cast<uint8_t>(Max31865Definitions::REQUEST_HIGH_THRESHOLD);
case (MAX31865::REQUEST_HIGH_THRESHOLD): {
commandBuffer[0] = static_cast<uint8_t>(MAX31865::REQUEST_HIGH_THRESHOLD);
commandBuffer[1] = 0x00; // dummy byte
commandBuffer[2] = 0x00; // dummy byte
DeviceHandlerBase::rawPacketLen = 3;
DeviceHandlerBase::rawPacket = commandBuffer.data();
return HasReturnvaluesIF::RETURN_OK;
}
case (Max31865Definitions::WRITE_LOW_THRESHOLD): {
commandBuffer[0] = static_cast<uint8_t>(Max31865Definitions::WRITE_LOW_THRESHOLD);
case (MAX31865::WRITE_LOW_THRESHOLD): {
commandBuffer[0] = static_cast<uint8_t>(MAX31865::WRITE_LOW_THRESHOLD);
commandBuffer[1] = static_cast<uint8_t>(LOW_THRESHOLD >> 8);
commandBuffer[2] = static_cast<uint8_t>(LOW_THRESHOLD & 0xFF);
DeviceHandlerBase::rawPacketLen = 3;
DeviceHandlerBase::rawPacket = commandBuffer.data();
return HasReturnvaluesIF::RETURN_OK;
}
case (Max31865Definitions::REQUEST_LOW_THRESHOLD): {
commandBuffer[0] = static_cast<uint8_t>(Max31865Definitions::REQUEST_LOW_THRESHOLD);
case (MAX31865::REQUEST_LOW_THRESHOLD): {
commandBuffer[0] = static_cast<uint8_t>(MAX31865::REQUEST_LOW_THRESHOLD);
commandBuffer[1] = 0x00; // dummy byte
commandBuffer[2] = 0x00; // dummy byte
DeviceHandlerBase::rawPacketLen = 3;
DeviceHandlerBase::rawPacket = commandBuffer.data();
return HasReturnvaluesIF::RETURN_OK;
}
case (Max31865Definitions::REQUEST_RTD): {
commandBuffer[0] = static_cast<uint8_t>(Max31865Definitions::REQUEST_RTD);
case (MAX31865::REQUEST_RTD): {
commandBuffer[0] = static_cast<uint8_t>(MAX31865::REQUEST_RTD);
// two dummy bytes
commandBuffer[1] = 0x00;
commandBuffer[2] = 0x00;
@ -222,8 +223,8 @@ ReturnValue_t Max31865PT1000Handler::buildCommandFromCommand(DeviceCommandId_t d
DeviceHandlerBase::rawPacket = commandBuffer.data();
return HasReturnvaluesIF::RETURN_OK;
}
case (Max31865Definitions::REQUEST_FAULT_BYTE): {
commandBuffer[0] = static_cast<uint8_t>(Max31865Definitions::REQUEST_FAULT_BYTE);
case (MAX31865::REQUEST_FAULT_BYTE): {
commandBuffer[0] = static_cast<uint8_t>(MAX31865::REQUEST_FAULT_BYTE);
commandBuffer[1] = 0x00;
DeviceHandlerBase::rawPacketLen = 2;
DeviceHandlerBase::rawPacket = commandBuffer.data();
@ -236,15 +237,15 @@ ReturnValue_t Max31865PT1000Handler::buildCommandFromCommand(DeviceCommandId_t d
}
void Max31865PT1000Handler::fillCommandAndReplyMap() {
insertInCommandAndReplyMap(Max31865Definitions::CONFIG_CMD, 3);
insertInCommandAndReplyMap(Max31865Definitions::REQUEST_CONFIG, 3);
insertInCommandAndReplyMap(Max31865Definitions::WRITE_LOW_THRESHOLD, 3);
insertInCommandAndReplyMap(Max31865Definitions::REQUEST_LOW_THRESHOLD, 3);
insertInCommandAndReplyMap(Max31865Definitions::WRITE_HIGH_THRESHOLD, 3);
insertInCommandAndReplyMap(Max31865Definitions::REQUEST_HIGH_THRESHOLD, 3);
insertInCommandAndReplyMap(Max31865Definitions::REQUEST_RTD, 3, &sensorDataset);
insertInCommandAndReplyMap(Max31865Definitions::REQUEST_FAULT_BYTE, 3);
insertInCommandAndReplyMap(Max31865Definitions::CLEAR_FAULT_BYTE, 3);
insertInCommandAndReplyMap(MAX31865::CONFIG_CMD, 3);
insertInCommandAndReplyMap(MAX31865::REQUEST_CONFIG, 3);
insertInCommandAndReplyMap(MAX31865::WRITE_LOW_THRESHOLD, 3);
insertInCommandAndReplyMap(MAX31865::REQUEST_LOW_THRESHOLD, 3);
insertInCommandAndReplyMap(MAX31865::WRITE_HIGH_THRESHOLD, 3);
insertInCommandAndReplyMap(MAX31865::REQUEST_HIGH_THRESHOLD, 3);
insertInCommandAndReplyMap(MAX31865::REQUEST_RTD, 3, &sensorDataset);
insertInCommandAndReplyMap(MAX31865::REQUEST_FAULT_BYTE, 3);
insertInCommandAndReplyMap(MAX31865::CLEAR_FAULT_BYTE, 3);
}
ReturnValue_t Max31865PT1000Handler::scanForReply(const uint8_t *start, size_t remainingSize,
@ -253,7 +254,7 @@ ReturnValue_t Max31865PT1000Handler::scanForReply(const uint8_t *start, size_t r
size_t configReplySize = 2;
if (remainingSize == rtdReplySize and internalState == InternalState::RUNNING) {
*foundId = Max31865Definitions::REQUEST_RTD;
*foundId = MAX31865::REQUEST_RTD;
*foundLen = rtdReplySize;
return RETURN_OK;
}
@ -262,24 +263,24 @@ ReturnValue_t Max31865PT1000Handler::scanForReply(const uint8_t *start, size_t r
switch (internalState) {
case (InternalState::CONFIG_HIGH_THRESHOLD): {
*foundLen = 3;
*foundId = Max31865Definitions::WRITE_HIGH_THRESHOLD;
*foundId = MAX31865::WRITE_HIGH_THRESHOLD;
commandExecuted = true;
return RETURN_OK;
}
case (InternalState::REQUEST_HIGH_THRESHOLD): {
*foundLen = 3;
*foundId = Max31865Definitions::REQUEST_HIGH_THRESHOLD;
*foundId = MAX31865::REQUEST_HIGH_THRESHOLD;
return RETURN_OK;
}
case (InternalState::CONFIG_LOW_THRESHOLD): {
*foundLen = 3;
*foundId = Max31865Definitions::WRITE_LOW_THRESHOLD;
*foundId = MAX31865::WRITE_LOW_THRESHOLD;
commandExecuted = true;
return RETURN_OK;
}
case (InternalState::REQUEST_LOW_THRESHOLD): {
*foundLen = 3;
*foundId = Max31865Definitions::REQUEST_LOW_THRESHOLD;
*foundId = MAX31865::REQUEST_LOW_THRESHOLD;
return RETURN_OK;
}
default: {
@ -293,13 +294,13 @@ ReturnValue_t Max31865PT1000Handler::scanForReply(const uint8_t *start, size_t r
if (internalState == InternalState::CONFIGURE) {
commandExecuted = true;
*foundLen = configReplySize;
*foundId = Max31865Definitions::CONFIG_CMD;
*foundId = MAX31865::CONFIG_CMD;
} else if (internalState == InternalState::REQUEST_FAULT_BYTE) {
*foundId = Max31865Definitions::REQUEST_FAULT_BYTE;
*foundId = MAX31865::REQUEST_FAULT_BYTE;
*foundLen = 2;
internalState = InternalState::RUNNING;
} else if (internalState == InternalState::CLEAR_FAULT_BYTE) {
*foundId = Max31865Definitions::CLEAR_FAULT_BYTE;
*foundId = MAX31865::CLEAR_FAULT_BYTE;
*foundLen = 2;
if (mode == _MODE_START_UP) {
commandExecuted = true;
@ -307,7 +308,7 @@ ReturnValue_t Max31865PT1000Handler::scanForReply(const uint8_t *start, size_t r
internalState = InternalState::RUNNING;
}
} else {
*foundId = Max31865Definitions::REQUEST_CONFIG;
*foundId = MAX31865::REQUEST_CONFIG;
*foundLen = configReplySize;
}
}
@ -318,7 +319,7 @@ ReturnValue_t Max31865PT1000Handler::scanForReply(const uint8_t *start, size_t r
ReturnValue_t Max31865PT1000Handler::interpretDeviceReply(DeviceCommandId_t id,
const uint8_t *packet) {
switch (id) {
case (Max31865Definitions::REQUEST_CONFIG): {
case (MAX31865::REQUEST_CONFIG): {
if (packet[1] != DEFAULT_CONFIG) {
if (warningSwitch) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
@ -342,7 +343,7 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply(DeviceCommandId_t id,
}
break;
}
case (Max31865Definitions::REQUEST_LOW_THRESHOLD): {
case (MAX31865::REQUEST_LOW_THRESHOLD): {
uint16_t readLowThreshold = packet[1] << 8 | packet[2];
if (readLowThreshold != LOW_THRESHOLD) {
#if FSFW_VERBOSE_LEVEL >= 1
@ -360,8 +361,8 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply(DeviceCommandId_t id,
commandExecuted = true;
break;
}
case (Max31865Definitions::REQUEST_HIGH_THRESHOLD): {
uint16_t readHighThreshold = packet[1] << 8 | packet[2];
case (MAX31865::REQUEST_HIGH_THRESHOLD): {
uint16_t readHighThreshold = (packet[1] << 8) | packet[2];
if (readHighThreshold != HIGH_THRESHOLD) {
#if FSFW_VERBOSE_LEVEL >= 1
#if FSFW_CPP_OSTREAM_ENABLED == 1
@ -378,13 +379,13 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply(DeviceCommandId_t id,
commandExecuted = true;
break;
}
case (Max31865Definitions::REQUEST_RTD): {
case (MAX31865::REQUEST_RTD): {
// first bit of LSB reply byte is the fault bit
uint8_t faultBit = packet[2] & 0b0000'0001;
bool faultBit = packet[2] & 0b0000'0001;
if (resetFaultBit) {
internalState = InternalState::CLEAR_FAULT_BYTE;
resetFaultBit = false;
} else if (faultBit == 1) {
} else if (shouldFaultStatusBeRequested(faultBit)) {
// Maybe we should attempt to restart it?
internalState = InternalState::REQUEST_FAULT_BYTE;
resetFaultBit = true;
@ -393,9 +394,8 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply(DeviceCommandId_t id,
// RTD value consists of last seven bits of the LSB reply byte and
// the MSB reply byte
uint16_t adcCode = ((packet[1] << 8) | packet[2]) >> 1;
// do something with rtd value, will propably be stored in
// dataset.
float rtdValue = adcCode * RTD_RREF_PT1000 / INT16_MAX;
// Calculate resistance
float rtdValue = adcCode * EiveMax31855::RTD_RREF_PT1000 / INT16_MAX;
// calculate approximation
float approxTemp = adcCode / 32.0 - 256.0;
@ -403,9 +403,9 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply(DeviceCommandId_t id,
#if OBSW_VERBOSE_LEVEL >= 1
if (debugDivider->checkAndIncrement()) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "Max31865: ObjID " << std::hex << this->getObjectId() << " | RTD "
<< std::dec << static_cast<int>(deviceIdx) << ": R[Ohm] " << rtdValue
<< " Ohms | Approx T[C]: " << approxTemp << std::endl;
sif::info << "Max31865: " << std::setw(24) << std::left << locString << std::right
<< " | R[Ohm] " << rtdValue << " Ohms | Approx T[C]: " << approxTemp
<< std::endl;
#else
sif::printInfo("Max31685: Measured resistance is %f Ohms\n", rtdValue);
sif::printInfo("Approximated temperature is %f C\n", approxTemp);
@ -438,58 +438,57 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply(DeviceCommandId_t id,
sensorDataset.temperatureCelcius = approxTemp;
break;
}
case (Max31865Definitions::REQUEST_FAULT_BYTE): {
faultByte = packet[1];
case (MAX31865::REQUEST_FAULT_BYTE): {
currentFaultStatus = packet[1];
bool faultStatusChanged = (currentFaultStatus != lastFaultStatus);
// Spam protection
if (faultStatusChanged or
((currentFaultStatus == lastFaultStatus) and (sameFaultStatusCounter < 3))) {
// TODO: Think about triggering an event here
#if OBSW_VERBOSE_LEVEL >= 1
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "Max31865PT1000Handler::interpretDeviceReply: Object ID: " << std::hex
<< this->getObjectId()
<< ": Fault byte"
" is: 0b"
<< std::bitset<8>(faultByte) << std::endl;
sif::warning << "Max31865PT1000Handler::interpretDeviceReply: Object ID: " << std::hex
<< this->getObjectId() << ": Fault byte is: 0b"
<< std::bitset<8>(currentFaultStatus) << std::endl;
#else
sif::printWarning(
"Max31865PT1000Handler::interpretDeviceReply: Fault byte"
" is: 0b" BYTE_TO_BINARY_PATTERN "\n",
BYTE_TO_BINARY(faultByte));
sif::printWarning(
"Max31865PT1000Handler::interpretDeviceReply: Fault byte"
" is: 0b" BYTE_TO_BINARY_PATTERN "\n",
BYTE_TO_BINARY(faultByte));
#endif
#endif
ReturnValue_t result = sensorDataset.read();
if (faultStatusChanged) {
sameFaultStatusCounter = 0;
} else {
sameFaultStatusCounter++;
}
}
if (faultStatusChanged) {
lastFaultStatus = currentFaultStatus;
}
PoolReadGuard pg(&sensorDataset);
auto result = pg.getReadResult();
if (result != HasReturnvaluesIF::RETURN_OK) {
// Configuration error
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Max31865PT1000Handler::interpretDeviceReply: Object ID: " << std::hex
<< this->getObjectId()
<< ":"
"Error reading dataset!"
<< std::endl;
sif::warning << "Max31865PT1000Handler::interpretDeviceReply: Object ID: " << std::hex
<< this->getObjectId() << ": Error reading dataset" << std::endl;
#else
sif::printDebug(
"Max31865PT1000Handler::interpretDeviceReply: "
"Error reading dataset!\n");
sif::printWarning("Max31865PT1000Handler::interpretDeviceReply: Error reading dataset\n");
#endif
return result;
}
if (faultStatusChanged) {
sensorDataset.lastErrorByte.setValid(true);
sensorDataset.lastErrorByte = lastFaultStatus;
}
sensorDataset.errorByte.setValid(true);
sensorDataset.errorByte = faultByte;
if (faultByte != 0) {
sensorDataset.errorByte = currentFaultStatus;
if (currentFaultStatus != 0) {
sensorDataset.temperatureCelcius.setValid(false);
}
result = sensorDataset.commit();
if (result != HasReturnvaluesIF::RETURN_OK) {
// Configuration error
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Max31865PT1000Handler::interpretDeviceReply: Object ID: " << std::hex
<< this->getObjectId() << ": Error commiting dataset!" << std::endl;
#else
sif::printDebug(
"Max31865PT1000Handler::interpretDeviceReply: "
"Error commiting dataset!\n");
#endif
return result;
}
break;
}
default:
@ -498,11 +497,8 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply(DeviceCommandId_t id,
return HasReturnvaluesIF::RETURN_OK;
}
void Max31865PT1000Handler::debugInterface(uint8_t positionTracker, object_id_t objectId,
uint32_t parameter) {}
uint32_t Max31865PT1000Handler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) {
return 25000;
return 5000;
}
ReturnValue_t Max31865PT1000Handler::getSwitches(const uint8_t **switches,
@ -512,10 +508,12 @@ ReturnValue_t Max31865PT1000Handler::getSwitches(const uint8_t **switches,
ReturnValue_t Max31865PT1000Handler::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(Max31865Definitions::PoolIds::RTD_VALUE, new PoolEntry<float>({0}));
localDataPoolMap.emplace(Max31865Definitions::PoolIds::TEMPERATURE_C,
new PoolEntry<float>({0}, 1, true));
localDataPoolMap.emplace(Max31865Definitions::PoolIds::FAULT_BYTE, new PoolEntry<uint8_t>({0}));
using namespace MAX31865;
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::RTD_VALUE), new PoolEntry<float>({0}));
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::TEMPERATURE_C), new PoolEntry<float>({0}));
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::LAST_FAULT_BYTE),
new PoolEntry<uint8_t>({0}));
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::FAULT_BYTE), new PoolEntry<uint8_t>({0}));
poolManager.subscribeForPeriodicPacket(sensorDataset.getSid(), false, 30.0, false);
return HasReturnvaluesIF::RETURN_OK;
}
@ -526,10 +524,23 @@ void Max31865PT1000Handler::setInstantNormal(bool instantNormal) {
void Max31865PT1000Handler::modeChanged() {
if (mode == MODE_OFF) {
lastFaultStatus = 0;
currentFaultStatus = 0;
sameFaultStatusCounter = 0;
internalState = InternalState::NONE;
}
}
void Max31865PT1000Handler::setDeviceIdx(uint8_t idx) { deviceIdx = idx; }
void Max31865PT1000Handler::setDeviceInfo(uint8_t idx, std::string locString_) {
deviceIdx = idx;
locString = std::move(locString_);
}
void Max31865PT1000Handler::setDebugMode(bool enable) { this->debugMode = enable; }
bool Max31865PT1000Handler::shouldFaultStatusBeRequested(bool faultBit) {
if ((sameFaultStatusCounter < 3) and faultBit) {
return true;
}
return false;
}

View File

@ -48,7 +48,7 @@ class Max31865PT1000Handler : public DeviceHandlerBase {
static constexpr uint8_t DEFAULT_CONFIG = 0b11000001;
void setInstantNormal(bool instantNormal);
void setDeviceIdx(uint8_t idx);
void setDeviceInfo(uint8_t idx, std::string locString);
/**
* Expected temperature range is -100 C and 100 C.
@ -61,7 +61,6 @@ class Max31865PT1000Handler : public DeviceHandlerBase {
static constexpr uint16_t HIGH_THRESHOLD = 11298; // = 100 C
static constexpr uint16_t LOW_THRESHOLD = 4902; // = -100 C
static constexpr float RTD_RREF_PT1000 = 4020.0; //!< Ohm
static constexpr float RTD_RESISTANCE0_PT1000 = 1000.0; //!< Ohm
protected:
// DeviceHandlerBase abstract function implementation
@ -77,12 +76,10 @@ class Max31865PT1000Handler : public DeviceHandlerBase {
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) override;
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
ReturnValue_t getSwitches(const uint8_t **switches, uint8_t *numberOfSwitches) override;
void debugInterface(uint8_t positionTracker = 0, object_id_t objectId = 0,
uint32_t parameter = 0) override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) override;
void modeChanged() override;
bool shouldFaultStatusBeRequested(bool faultBit);
private:
uint8_t switchId = 0;
@ -109,11 +106,15 @@ class Max31865PT1000Handler : public DeviceHandlerBase {
bool resetFaultBit = false;
dur_millis_t startTime = 0;
uint8_t faultByte = 0;
uint8_t currentCfg = 0;
uint8_t currentFaultStatus = 0;
uint8_t lastFaultStatus = 0;
uint16_t sameFaultStatusCounter = 0;
std::string locString;
uint8_t deviceIdx = 0;
std::array<uint8_t, 3> commandBuffer{0};
Max31865Definitions::Max31865Set sensorDataset;
MAX31865::Max31865Set sensorDataset;
sid_t sensorDatasetSid;
#if OBSW_VERBOSE_LEVEL >= 1

View File

@ -716,7 +716,7 @@ ReturnValue_t PayloadPcduHandler::transferAsTwo(SpiComIF* comIf, SpiCookie* cook
GpioIF* gpioIF = comIf->getGpioInterface();
MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING;
uint32_t timeoutMs = 0;
MutexIF* mutex = comIf->getMutex(&timeoutType, &timeoutMs);
MutexIF* mutex = comIf->getCsMutex();
if (mutex == nullptr or gpioIF == nullptr) {
#if OBSW_VERBOSE_LEVEL >= 1
sif::warning << "GyroADIS16507Handler::spiSendCallback: "
@ -727,6 +727,7 @@ ReturnValue_t PayloadPcduHandler::transferAsTwo(SpiComIF* comIf, SpiCookie* cook
}
if (gpioId != gpio::NO_GPIO) {
cookie->getMutexParams(timeoutType, timeoutMs);
result = mutex->lockMutex(timeoutType, timeoutMs);
if (result != RETURN_OK) {
#if FSFW_CPP_OSTREAM_ENABLED == 1

View File

@ -7,20 +7,48 @@
#include "objects/systemObjectList.h"
namespace Max31865Definitions {
namespace MAX31865 {
enum PoolIds : lp_id_t { RTD_VALUE, TEMPERATURE_C, FAULT_BYTE };
enum class PoolIds : lp_id_t { RTD_VALUE, TEMPERATURE_C, LAST_FAULT_BYTE, FAULT_BYTE };
enum Wires : unsigned int { TWO_WIRE = 0, THREE_WIRE = 1, FOUR_WIRE = 0 };
enum ConvMode : unsigned int { NORM_OFF = 0, AUTO = 1 };
enum Bias : unsigned int { OFF = 0, ON = 1 };
enum FilterSel : unsigned int { FIFTY_HERTZ = 1, SIXTY_HERTZ = 0 };
enum CfgBitPos {
FILTER_SEL = 0,
FAULT_STATUS_CLEAR = 1,
FDCC = 2,
WIRE_SEL = 4,
ONE_SHOT = 5,
CONV_MODE = 6,
BIAS_SEL = 7
};
static constexpr uint32_t WARMUP_MS = 100;
static constexpr uint8_t WRITE_BIT = 0b10000000;
enum Regs : uint8_t {
CONFIG = 0x00,
RTD = 0x01,
HIGH_THRESHOLD = 0x03,
LOW_THRESHOLD = 0x05,
FAULT_BYTE = 0x07
};
static constexpr DeviceCommandId_t CONFIG_CMD = 0x80;
static constexpr DeviceCommandId_t WRITE_HIGH_THRESHOLD = 0x83;
static constexpr DeviceCommandId_t WRITE_LOW_THRESHOLD = 0x85;
static constexpr DeviceCommandId_t REQUEST_CONFIG = 0x00;
static constexpr DeviceCommandId_t REQUEST_RTD = 0x01;
static constexpr DeviceCommandId_t REQUEST_HIGH_THRESHOLD = 0x03;
static constexpr DeviceCommandId_t REQUEST_LOW_THRESHOLD = 0x05;
static constexpr DeviceCommandId_t REQUEST_FAULT_BYTE = 0x07;
static constexpr DeviceCommandId_t REQUEST_CONFIG = CONFIG;
static constexpr DeviceCommandId_t REQUEST_RTD = RTD;
static constexpr DeviceCommandId_t REQUEST_HIGH_THRESHOLD = HIGH_THRESHOLD;
static constexpr DeviceCommandId_t REQUEST_LOW_THRESHOLD = LOW_THRESHOLD;
static constexpr DeviceCommandId_t REQUEST_FAULT_BYTE = FAULT_BYTE;
static constexpr DeviceCommandId_t CLEAR_FAULT_BYTE = 0x08;
static constexpr uint32_t MAX31865_SET_ID = REQUEST_RTD;
@ -28,26 +56,82 @@ static constexpr uint8_t CLEAR_FAULT_BIT_VAL = 0b0000'0010;
static constexpr size_t MAX_REPLY_SIZE = 5;
class Max31865Set : public StaticLocalDataSet<sizeof(float) + sizeof(uint8_t)> {
class Max31865Set : public StaticLocalDataSet<4> {
public:
/**
* Constructor used by owner and data creators like device handlers.
* @param owner
* @param setId
*/
Max31865Set(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, MAX31865_SET_ID) {}
Max31865Set(HasLocalDataPoolIF* owner, uint32_t setId) : StaticLocalDataSet(owner, setId) {}
/**
* Constructor used by data users like controllers.
* @param sid
*/
Max31865Set(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, MAX31865_SET_ID)) {}
Max31865Set(object_id_t objectId, uint32_t setId) : StaticLocalDataSet(sid_t(objectId, setId)) {}
lp_var_t<float> rtdValue = lp_var_t<float>(sid.objectId, PoolIds::RTD_VALUE, this);
lp_var_t<float> temperatureCelcius = lp_var_t<float>(sid.objectId, PoolIds::TEMPERATURE_C, this);
lp_var_t<uint8_t> errorByte = lp_var_t<uint8_t>(sid.objectId, PoolIds::FAULT_BYTE, this);
lp_var_t<float> rtdValue =
lp_var_t<float>(sid.objectId, static_cast<lp_id_t>(PoolIds::RTD_VALUE), this);
lp_var_t<float> temperatureCelcius =
lp_var_t<float>(sid.objectId, static_cast<lp_id_t>(PoolIds::TEMPERATURE_C), this);
lp_var_t<uint8_t> lastErrorByte =
lp_var_t<uint8_t>(sid.objectId, static_cast<lp_id_t>(PoolIds::LAST_FAULT_BYTE), this);
lp_var_t<uint8_t> errorByte =
lp_var_t<uint8_t>(sid.objectId, static_cast<lp_id_t>(PoolIds::FAULT_BYTE), this);
};
} // namespace Max31865Definitions
} // namespace MAX31865
namespace EiveMax31855 {
static constexpr float RTD_RREF_PT1000 = 4020.0; //!< Ohm
static constexpr uint8_t NUM_RTDS = 16;
enum RtdCommands : DeviceCommandId_t {
ON = 0,
EXCHANGE_SET_ID = MAX31865::REQUEST_RTD,
ACTIVE = 2,
LOW_THRESHOLD = 3,
HIGH_TRESHOLD = 4,
OFF = 5,
CFG = 6,
NUM_CMDS
};
class ReadOutStruct : public SerialLinkedListAdapter<SerializeIF> {
public:
ReadOutStruct() { setLinks(); }
ReadOutStruct(bool active, uint32_t spiErrCnt, bool faultBitSet, uint8_t faultVal,
uint16_t rtdVal)
: active(active),
adcCode(rtdVal),
faultBitSet(faultBitSet),
faultValue(faultVal),
spiErrorCount(spiErrCnt) {
setLinks();
}
//! RTD was set on and is configured, but is not periodically polled
SerializeElement<bool> configured = false;
//! RTD is active and polled periodically
SerializeElement<bool> active = false;
SerializeElement<uint16_t> adcCode = 0;
SerializeElement<bool> faultBitSet = false;
SerializeElement<uint8_t> faultValue = 0;
SerializeElement<uint32_t> spiErrorCount = 0;
private:
void setLinks() {
setStart(&configured);
configured.setNext(&active);
active.setNext(&adcCode);
adcCode.setNext(&faultBitSet);
faultBitSet.setNext(&faultValue);
faultValue.setNext(&spiErrorCount);
};
};
}; // namespace EiveMax31855
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_MAX13865DEFINITIONS_H_ */

View File

@ -1,5 +1 @@
target_sources(${LIB_EIVE_MISSION} PRIVATE
NVMParameterBase.cpp
)
target_sources(${LIB_EIVE_MISSION} PRIVATE NVMParameterBase.cpp)

View File

@ -1,7 +1,3 @@
target_sources(${LIB_EIVE_MISSION} PRIVATE
AcsBoardFdir.cpp
RtdFdir.cpp
SusFdir.cpp
SyrlinksFdir.cpp
GomspacePowerFdir.cpp
)
target_sources(
${LIB_EIVE_MISSION} PRIVATE AcsBoardFdir.cpp RtdFdir.cpp SusFdir.cpp
SyrlinksFdir.cpp GomspacePowerFdir.cpp)

View File

@ -10,7 +10,7 @@ TcsBoardAssembly::TcsBoardAssembly(object_id_t objectId, object_id_t parentId,
eventQueue = QueueFactory::instance()->createMessageQueue(24);
ModeListEntry entry;
for (uint8_t idx = 0; idx < NUMBER_RTDS; idx++) {
entry.setObject(helper.rtdIds[idx]);
entry.setObject(helper.rtdInfos[idx].first);
entry.setMode(MODE_OFF);
entry.setSubmode(SUBMODE_NONE);
entry.setInheritSubmode(false);
@ -56,7 +56,7 @@ ReturnValue_t TcsBoardAssembly::checkChildrenStateOn(Mode_t wantedMode, Submode_
int devsInWrongMode = 0;
try {
for (uint8_t idx = 0; idx < NUMBER_RTDS; idx++) {
if (childrenMap.at(helper.rtdIds[idx]).mode != wantedMode) {
if (childrenMap.at(helper.rtdInfos[idx].first).mode != wantedMode) {
devsInWrongMode++;
}
}
@ -92,8 +92,8 @@ ReturnValue_t TcsBoardAssembly::isModeCombinationValid(Mode_t mode, Submode_t su
ReturnValue_t TcsBoardAssembly::initialize() {
ReturnValue_t result = RETURN_OK;
for (const auto& obj : helper.rtdIds) {
result = registerChild(obj);
for (const auto& obj : helper.rtdInfos) {
result = registerChild(obj.first);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
@ -125,8 +125,8 @@ ReturnValue_t TcsBoardAssembly::handleNormalOrOnModeCmd(Mode_t mode, Submode_t s
object_id_t objId = 0;
try {
for (uint8_t idx = 0; idx < NUMBER_RTDS; idx++) {
devMode = childrenMap.at(helper.rtdIds[idx]).mode;
objId = helper.rtdIds[idx];
devMode = childrenMap.at(helper.rtdInfos[idx].first).mode;
objId = helper.rtdInfos[idx].first;
if (mode == devMode) {
modeTable[idx].setMode(mode);
} else if (mode == DeviceHandlerIF::MODE_NORMAL) {

View File

@ -6,9 +6,10 @@
#include <fsfw/power/PowerSwitcher.h>
struct TcsBoardHelper {
TcsBoardHelper(std::array<object_id_t, 16> rtdIds) : rtdIds(rtdIds) {}
TcsBoardHelper(std::array<std::pair<object_id_t, std::string>, 16> rtdInfos)
: rtdInfos(std::move(rtdInfos)) {}
std::array<object_id_t, 16> rtdIds = {};
std::array<std::pair<object_id_t, std::string>, 16> rtdInfos = {};
};
class TcsBoardAssembly : public AssemblyBase, public ConfirmsFailuresIF {

View File

@ -1,6 +1 @@
target_sources(${LIB_EIVE_MISSION} PRIVATE
CCSDSHandler.cpp
VirtualChannel.cpp
)
target_sources(${LIB_EIVE_MISSION} PRIVATE CCSDSHandler.cpp VirtualChannel.cpp)

View File

@ -1,8 +1,2 @@
target_sources(${LIB_EIVE_MISSION} PRIVATE
TmFunnel.cpp
Timestamp.cpp
ProgressPrinter.cpp
Filenaming.cpp
)
target_sources(${LIB_EIVE_MISSION} PRIVATE TmFunnel.cpp Timestamp.cpp
ProgressPrinter.cpp Filenaming.cpp)

View File

@ -1,5 +1,6 @@
#include "ProgressPrinter.h"
#include <cmath>
#include <iomanip>
#include "fsfw/serviceinterface/ServiceInterfaceStream.h"
@ -16,4 +17,9 @@ void ProgressPrinter::print(uint32_t currentStep) {
<< std::endl;
nextProgressPrint += percentageResolution;
}
if (nextProgressPrint - progressInPercent < 0) {
nextProgressPrint =
(std::floor(progressInPercent / percentageResolution) * percentageResolution) +
percentageResolution;
}
}

View File

@ -1,14 +0,0 @@
#!/bin/bash
if [[ ! -f README.md ]]; then
cd ..
fi
find ./mission -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
find ./linux -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
find ./bsp_q7s -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
find ./bsp_linux_board -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
find ./bsp_hosted -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
find ./bsp_egse -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
find ./test -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
find ./unittest -iname *.h -o -iname *.cpp -o -iname *.c -o -type d -name build -prune | \
xargs clang-format --style=file -i

40
scripts/auto-formatter.sh Executable file
View File

@ -0,0 +1,40 @@
#!/bin/bash
if [[ ! -f README.md ]]; then
cd ..
fi
folder_list=(
"./mission"
"./linux"
"./bsp_q7s"
"./bsp_linux_board"
"./bsp_hosted"
"./bsp_egse"
"./test"
"./common"
)
cmake_fmt="cmake-format"
file_selectors="-iname CMakeLists.txt"
if command -v ${cmake_fmt} &> /dev/null; then
echo "Auto-formatting all CMakeLists.txt files"
${cmake_fmt} -i CMakeLists.txt
for dir in ${folder_list[@]}; do
find ${dir} ${file_selectors} | xargs ${cmake_fmt} -i
done
else
echo "No ${cmake_fmt} tool found, not formatting CMake files"
fi
cpp_format="clang-format"
file_selectors="-iname *.h -o -iname *.cpp -o -iname *.c -o -iname *.tpp"
if command -v ${cpp_format} &> /dev/null; then
for dir in ${folder_list[@]}; do
echo "Auto-formatting C/C++ files in ${dir} recursively"
find ${dir} ${file_selectors} | xargs ${cpp_format} --style=file -i
done
find ./unittest ${file_selectors} -o -type d -name build -prune | \
xargs clang-format --style=file -i
else
echo "No ${cpp_format} tool found, not formatting C++/C files"
fi

View File

@ -1,9 +1,16 @@
#!/bin/bash
# This is a helper script to install the compiles EIVE OBSW files
# into the yocto repository to re-generate the mission root filesystem
build_dir=cmake-build-release-q7s
if [ ! -z ${1} ]; then
if [[ "${1}" == "em" ]]; then
echo "-I- Installing EM binaries"
build_dir=cmake-build-release-q7s-em
fi
fi
init_dir=$(pwd)
build_dir=cmake-build-release-q7s
obsw_root=""
q7s_yocto_dir="q7s-yocto"
q7s_package_path="q7s-package/${q7s_yocto_dir}"

View File

@ -1,7 +1,3 @@
target_sources(${OBSW_NAME} PUBLIC
DummyGpioIF.cpp
)
target_sources(${OBSW_NAME} PUBLIC DummyGpioIF.cpp)
target_include_directories(${OBSW_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -1,7 +1,3 @@
target_sources(${OBSW_NAME} PUBLIC
TestTask.cpp
)
target_sources(${OBSW_NAME} PUBLIC TestTask.cpp)
target_include_directories(${OBSW_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

2
tmtc

@ -1 +1 @@
Subproject commit b81f756e4b70e55a443cba50bab0a519a0dc3591
Subproject commit 6a209e1a0badc0db91a03e1ef32d43de54d58958