Payload Subsystem #231
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -22,3 +22,6 @@
|
|||||||
[submodule "thirdparty/rapidcsv"]
|
[submodule "thirdparty/rapidcsv"]
|
||||||
path = thirdparty/rapidcsv
|
path = thirdparty/rapidcsv
|
||||||
url = https://github.com/d99kris/rapidcsv.git
|
url = https://github.com/d99kris/rapidcsv.git
|
||||||
|
[submodule "thirdparty/gomspace-sw"]
|
||||||
|
path = thirdparty/gomspace-sw
|
||||||
|
url = https://egit.irs.uni-stuttgart.de/eive/gomspace-sw.git
|
||||||
|
13
CHANGELOG.md
13
CHANGELOG.md
@ -10,6 +10,19 @@ list yields a list of all related PRs for each release.
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
|
# [v1.14.0]
|
||||||
|
|
||||||
|
- Update for FSFW: `HasReturnvaluesIF` class replaced by namespace `returnvalue`
|
||||||
|
- Add some GomSpace clients as a submodule dependency. Use this dependency to deserialize the
|
||||||
|
GomSpace TM tables
|
||||||
|
- Add API to retrieve GomSpace device parameter tables
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/287
|
||||||
|
|
||||||
|
# [v1.13.0] 24.08.2022
|
||||||
|
|
||||||
|
- Added first version of ACS Controller with gathers MGM data in a set
|
||||||
|
- Some tweaks for IMTQ handler
|
||||||
|
|
||||||
# [v1.12.1] 05.07.2022
|
# [v1.12.1] 05.07.2022
|
||||||
|
|
||||||
- Disable periodic TCS controller HK generation by default
|
- Disable periodic TCS controller HK generation by default
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
# ##############################################################################
|
# ##############################################################################
|
||||||
cmake_minimum_required(VERSION 3.13)
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
|
||||||
set(OBSW_VERSION_MAJOR_IF_GIT_FAILS 0)
|
set(OBSW_VERSION_MAJOR_IF_GIT_FAILS 1)
|
||||||
set(OBSW_VERSION_MINOR_IF_GIT_FAILS 0)
|
set(OBSW_VERSION_MINOR_IF_GIT_FAILS 13)
|
||||||
set(OBSW_VERSION_REVISION_IF_GIT_FAILS 0)
|
set(OBSW_VERSION_REVISION_IF_GIT_FAILS 0)
|
||||||
|
|
||||||
# set(CMAKE_VERBOSE TRUE)
|
# set(CMAKE_VERBOSE TRUE)
|
||||||
@ -170,6 +170,9 @@ set(LIB_ETL_TARGET etl::etl)
|
|||||||
set(LIB_CSP_NAME libcsp)
|
set(LIB_CSP_NAME libcsp)
|
||||||
set(LIB_LWGPS_NAME lwgps)
|
set(LIB_LWGPS_NAME lwgps)
|
||||||
set(LIB_ARCSEC wire)
|
set(LIB_ARCSEC wire)
|
||||||
|
set(LIB_GOMSPACE_CLIENTS gs_clients)
|
||||||
|
set(LIB_GOMSPACE_CSP gs_csp)
|
||||||
|
|
||||||
set(THIRD_PARTY_FOLDER thirdparty)
|
set(THIRD_PARTY_FOLDER thirdparty)
|
||||||
set(LIB_CXX_FS -lstdc++fs)
|
set(LIB_CXX_FS -lstdc++fs)
|
||||||
set(LIB_CATCH2 Catch2)
|
set(LIB_CATCH2 Catch2)
|
||||||
@ -182,6 +185,7 @@ set(FSFW_PATH fsfw)
|
|||||||
set(TEST_PATH test)
|
set(TEST_PATH test)
|
||||||
set(UNITTEST_PATH unittest)
|
set(UNITTEST_PATH unittest)
|
||||||
set(LINUX_PATH linux)
|
set(LINUX_PATH linux)
|
||||||
|
set(LIB_GOMSPACE_PATH ${THIRD_PARTY_FOLDER}/gomspace-sw)
|
||||||
set(COMMON_PATH common)
|
set(COMMON_PATH common)
|
||||||
set(DUMMY_PATH dummies)
|
set(DUMMY_PATH dummies)
|
||||||
set(WATCHDOG_PATH watchdog)
|
set(WATCHDOG_PATH watchdog)
|
||||||
@ -189,7 +193,6 @@ set(COMMON_CONFIG_PATH ${COMMON_PATH}/config)
|
|||||||
set(UNITTEST_CFG_PATH ${UNITTEST_PATH}/testcfg)
|
set(UNITTEST_CFG_PATH ${UNITTEST_PATH}/testcfg)
|
||||||
|
|
||||||
set(LIB_EIVE_MISSION_PATH mission)
|
set(LIB_EIVE_MISSION_PATH mission)
|
||||||
set(LIB_CSP_PATH ${THIRD_PARTY_FOLDER}/libcsp)
|
|
||||||
set(LIB_ETL_PATH ${THIRD_PARTY_FOLDER}/etl)
|
set(LIB_ETL_PATH ${THIRD_PARTY_FOLDER}/etl)
|
||||||
set(LIB_CATCH2_PATH ${THIRD_PARTY_FOLDER}/Catch2)
|
set(LIB_CATCH2_PATH ${THIRD_PARTY_FOLDER}/Catch2)
|
||||||
set(LIB_LWGPS_PATH ${THIRD_PARTY_FOLDER}/lwgps)
|
set(LIB_LWGPS_PATH ${THIRD_PARTY_FOLDER}/lwgps)
|
||||||
@ -217,8 +220,11 @@ if(TGT_BSP)
|
|||||||
set(FSFW_CONFIG_PATH "linux/fsfwconfig")
|
set(FSFW_CONFIG_PATH "linux/fsfwconfig")
|
||||||
if(NOT BUILD_Q7S_SIMPLE_MODE)
|
if(NOT BUILD_Q7S_SIMPLE_MODE)
|
||||||
set(EIVE_ADD_LINUX_FILES TRUE)
|
set(EIVE_ADD_LINUX_FILES TRUE)
|
||||||
set(ADD_CSP_LIB TRUE)
|
set(ADD_GOMSPACE_CSP TRUE)
|
||||||
|
set(ADD_GOMSPACE_CLIENTS TRUE)
|
||||||
set(FSFW_HAL_ADD_LINUX ON)
|
set(FSFW_HAL_ADD_LINUX ON)
|
||||||
|
set(FSFW_HAL_LINUX_ADD_LIBGPIOD ON)
|
||||||
|
set(FSFW_HAL_LINUX_ADD_PERIPHERAL_DRIVERS ON)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -278,7 +284,25 @@ set(FSFW_ADDITIONAL_INC_PATHS "${COMMON_PATH}/config"
|
|||||||
|
|
||||||
# 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")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
add_compile_options(
|
# Remove unused sections.
|
||||||
|
add_compile_options("-ffunction-sections" "-fdata-sections")
|
||||||
|
|
||||||
|
# Removed unused sections.
|
||||||
|
add_link_options("-Wl,--gc-sections")
|
||||||
|
|
||||||
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
|
set(COMPILER_FLAGS "/permissive-")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_library(${LIB_EIVE_MISSION})
|
||||||
|
add_library(${LIB_DUMMIES})
|
||||||
|
|
||||||
|
# Add main executable
|
||||||
|
add_executable(${OBSW_NAME})
|
||||||
|
set(OBSW_BIN_NAME ${CMAKE_PROJECT_NAME})
|
||||||
|
|
||||||
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
|
set(WARNING_FLAGS
|
||||||
"-Wall"
|
"-Wall"
|
||||||
"-Wextra"
|
"-Wextra"
|
||||||
"-Wimplicit-fallthrough=1"
|
"-Wimplicit-fallthrough=1"
|
||||||
@ -299,27 +323,15 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|||||||
"-Wcast-qual" # Warn if the constness is cast away
|
"-Wcast-qual" # Warn if the constness is cast away
|
||||||
"-Wstringop-overflow=4"
|
"-Wstringop-overflow=4"
|
||||||
# -Wstack-protector # Emits a few false positives for low level access
|
# -Wstack-protector # Emits a few false positives for low level access
|
||||||
# -Wconversion # Creates many false positives -Warith-conversion # Use with
|
# -Wconversion # Creates many false positives -Warith-conversion # Use
|
||||||
# Wconversion to find more implicit conversions -fanalyzer # Should be used
|
# with Wconversion to find more implicit conversions -fanalyzer # Should
|
||||||
# to look through problems
|
# be used to look through problems
|
||||||
)
|
)
|
||||||
# Remove unused sections.
|
target_compile_options(${OBSW_NAME} PRIVATE ${WARNING_FLAGS})
|
||||||
add_compile_options("-ffunction-sections" "-fdata-sections")
|
target_compile_options(${LIB_EIVE_MISSION} PRIVATE ${WARNING_FLAGS})
|
||||||
|
target_compile_options(${LIB_DUMMIES} PRIVATE ${WARNING_FLAGS})
|
||||||
# Removed unused sections.
|
|
||||||
add_link_options("-Wl,--gc-sections")
|
|
||||||
|
|
||||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|
||||||
set(COMPILER_FLAGS "/permissive-")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(${LIB_EIVE_MISSION})
|
|
||||||
add_library(${LIB_DUMMIES})
|
|
||||||
|
|
||||||
# Add main executable
|
|
||||||
add_executable(${OBSW_NAME})
|
|
||||||
set(OBSW_BIN_NAME ${CMAKE_PROJECT_NAME})
|
|
||||||
|
|
||||||
set_target_properties(${OBSW_NAME} PROPERTIES OUTPUT_NAME ${OBSW_BIN_NAME})
|
set_target_properties(${OBSW_NAME} PROPERTIES OUTPUT_NAME ${OBSW_BIN_NAME})
|
||||||
|
|
||||||
# Watchdog
|
# Watchdog
|
||||||
@ -355,10 +367,7 @@ if(EIVE_ADD_LINUX_FILES)
|
|||||||
add_subdirectory(${LINUX_PATH})
|
add_subdirectory(${LINUX_PATH})
|
||||||
endif()
|
endif()
|
||||||
add_subdirectory(${BSP_PATH})
|
add_subdirectory(${BSP_PATH})
|
||||||
if(ADD_CSP_LIB)
|
add_subdirectory(${LIB_GOMSPACE_PATH})
|
||||||
add_subdirectory(${LIB_CSP_PATH})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_subdirectory(${COMMON_PATH})
|
add_subdirectory(${COMMON_PATH})
|
||||||
add_subdirectory(${DUMMY_PATH})
|
add_subdirectory(${DUMMY_PATH})
|
||||||
|
|
||||||
@ -443,15 +452,15 @@ if(TGT_BSP MATCHES "arm/q7s")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(${UNITTEST_NAME} PRIVATE Catch2 ${LIB_EIVE_MISSION}
|
target_link_libraries(${UNITTEST_NAME} PRIVATE Catch2 ${LIB_EIVE_MISSION}
|
||||||
rapidcsv ${LIB_DUMMIES})
|
rapidcsv ${LIB_DUMMIES} ${LIB_GOMSPACE_CLIENTS})
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/egse")
|
if(TGT_BSP MATCHES "arm/egse")
|
||||||
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_ARCSEC})
|
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_ARCSEC})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ADD_CSP_LIB)
|
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_GOMSPACE_CLIENTS})
|
||||||
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_CSP_NAME})
|
target_link_libraries(${LIB_EIVE_MISSION} PRIVATE ${LIB_GOMSPACE_CLIENTS})
|
||||||
endif()
|
target_link_libraries(${LIB_DUMMIES} PRIVATE ${LIB_GOMSPACE_CLIENTS})
|
||||||
|
|
||||||
if(EIVE_ADD_ETL_LIB)
|
if(EIVE_ADD_ETL_LIB)
|
||||||
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_ETL_TARGET})
|
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_ETL_TARGET})
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <fsfw/objectmanager/ObjectManager.h>
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
||||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
#include <fsfw/returnvalues/returnvalue.h>
|
||||||
#include <fsfw/serviceinterface/ServiceInterface.h>
|
#include <fsfw/serviceinterface/ServiceInterface.h>
|
||||||
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
|
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
|
||||||
#include <fsfw/tasks/PeriodicTaskIF.h>
|
#include <fsfw/tasks/PeriodicTaskIF.h>
|
||||||
@ -40,7 +40,7 @@ void initmission::initMission() {
|
|||||||
|
|
||||||
void initmission::initTasks() {
|
void initmission::initTasks() {
|
||||||
TaskFactory* factory = TaskFactory::instance();
|
TaskFactory* factory = TaskFactory::instance();
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
if (factory == nullptr) {
|
if (factory == nullptr) {
|
||||||
/* Should never happen ! */
|
/* Should never happen ! */
|
||||||
return;
|
return;
|
||||||
@ -55,28 +55,28 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* tmtcDistributor = factory->createPeriodicTask(
|
PeriodicTaskIF* tmtcDistributor = factory->createPeriodicTask(
|
||||||
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
result = tmtcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
|
result = tmtcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Object add component failed" << std::endl;
|
sif::error << "Object add component failed" << std::endl;
|
||||||
}
|
}
|
||||||
result = tmtcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
|
result = tmtcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Object add component failed" << std::endl;
|
sif::error << "Object add component failed" << std::endl;
|
||||||
}
|
}
|
||||||
result = tmtcDistributor->addComponent(objects::TM_FUNNEL);
|
result = tmtcDistributor->addComponent(objects::TM_FUNNEL);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Object add component failed" << std::endl;
|
sif::error << "Object add component failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
|
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
|
||||||
"TMTC_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"TMTC_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
|
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Add component TMTC Bridge failed" << std::endl;
|
sif::error << "Add component TMTC Bridge failed" << std::endl;
|
||||||
}
|
}
|
||||||
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
|
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
|
||||||
"TMTC_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
"TMTC_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||||
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
|
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Add component TMTC Polling failed" << std::endl;
|
sif::error << "Add component TMTC Polling failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ void initmission::initTasks() {
|
|||||||
FixedTimeslotTaskIF* pst = factory->createFixedTimeslotTask(
|
FixedTimeslotTaskIF* pst = factory->createFixedTimeslotTask(
|
||||||
"STAR_TRACKER_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
|
"STAR_TRACKER_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
|
||||||
result = pst::pstUart(pst);
|
result = pst::pstUart(pst);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
|
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
|
||||||
}
|
}
|
||||||
pstTasks.push_back(pst);
|
pstTasks.push_back(pst);
|
||||||
@ -96,7 +96,7 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* strHelperTask = factory->createPeriodicTask(
|
PeriodicTaskIF* strHelperTask = factory->createPeriodicTask(
|
||||||
"STR_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"STR_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
result = strHelperTask->addComponent(objects::STR_HELPER);
|
result = strHelperTask->addComponent(objects::STR_HELPER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("STR_HELPER", objects::STR_HELPER);
|
initmission::printAddObjectError("STR_HELPER", objects::STR_HELPER);
|
||||||
}
|
}
|
||||||
pstTasks.push_back(strHelperTask);
|
pstTasks.push_back(strHelperTask);
|
||||||
@ -125,11 +125,11 @@ void initmission::initTasks() {
|
|||||||
void initmission::createPusTasks(TaskFactory& factory,
|
void initmission::createPusTasks(TaskFactory& factory,
|
||||||
TaskDeadlineMissedFunction missedDeadlineFunc,
|
TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||||
std::vector<PeriodicTaskIF*>& taskVec) {
|
std::vector<PeriodicTaskIF*>& taskVec) {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
PeriodicTaskIF* pusVerification = factory.createPeriodicTask(
|
PeriodicTaskIF* pusVerification = factory.createPeriodicTask(
|
||||||
"PUS_VERIF", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
"PUS_VERIF", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
result = pusVerification->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
|
result = pusVerification->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Object add component failed" << std::endl;
|
sif::error << "Object add component failed" << std::endl;
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusVerification);
|
taskVec.push_back(pusVerification);
|
||||||
@ -137,11 +137,11 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
PeriodicTaskIF* pusEvents = factory.createPeriodicTask(
|
PeriodicTaskIF* pusEvents = factory.createPeriodicTask(
|
||||||
"PUS_EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
"PUS_EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
result = pusEvents->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
|
result = pusEvents->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_EVENTS", objects::PUS_SERVICE_5_EVENT_REPORTING);
|
initmission::printAddObjectError("PUS_EVENTS", objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||||
}
|
}
|
||||||
result = pusEvents->addComponent(objects::EVENT_MANAGER);
|
result = pusEvents->addComponent(objects::EVENT_MANAGER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_MGMT", objects::EVENT_MANAGER);
|
initmission::printAddObjectError("PUS_MGMT", objects::EVENT_MANAGER);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusEvents);
|
taskVec.push_back(pusEvents);
|
||||||
@ -149,11 +149,11 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
PeriodicTaskIF* pusHighPrio = factory.createPeriodicTask(
|
PeriodicTaskIF* pusHighPrio = factory.createPeriodicTask(
|
||||||
"PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
"PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
initmission::printAddObjectError("PUS2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||||
}
|
}
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS9", objects::PUS_SERVICE_9_TIME_MGMT);
|
initmission::printAddObjectError("PUS9", objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusHighPrio);
|
taskVec.push_back(pusHighPrio);
|
||||||
@ -161,19 +161,19 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
PeriodicTaskIF* pusMedPrio = factory.createPeriodicTask(
|
PeriodicTaskIF* pusMedPrio = factory.createPeriodicTask(
|
||||||
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
initmission::printAddObjectError("PUS8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS200", objects::PUS_SERVICE_200_MODE_MGMT);
|
initmission::printAddObjectError("PUS200", objects::PUS_SERVICE_200_MODE_MGMT);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS20", objects::PUS_SERVICE_20_PARAMETERS);
|
initmission::printAddObjectError("PUS20", objects::PUS_SERVICE_20_PARAMETERS);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
initmission::printAddObjectError("PUS3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusMedPrio);
|
taskVec.push_back(pusMedPrio);
|
||||||
@ -181,11 +181,11 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
PeriodicTaskIF* pusLowPrio = factory.createPeriodicTask(
|
PeriodicTaskIF* pusLowPrio = factory.createPeriodicTask(
|
||||||
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
|
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
|
||||||
result = pusLowPrio->addComponent(objects::PUS_SERVICE_17_TEST);
|
result = pusLowPrio->addComponent(objects::PUS_SERVICE_17_TEST);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS17", objects::PUS_SERVICE_17_TEST);
|
initmission::printAddObjectError("PUS17", objects::PUS_SERVICE_17_TEST);
|
||||||
}
|
}
|
||||||
result = pusLowPrio->addComponent(objects::INTERNAL_ERROR_REPORTER);
|
result = pusLowPrio->addComponent(objects::INTERNAL_ERROR_REPORTER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("INT_ERR_RPRT", objects::INTERNAL_ERROR_REPORTER);
|
initmission::printAddObjectError("INT_ERR_RPRT", objects::INTERNAL_ERROR_REPORTER);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusLowPrio);
|
taskVec.push_back(pusLowPrio);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include <bsp_hosted/fsfwconfig/pollingsequence/DummyPst.h>
|
#include <bsp_hosted/fsfwconfig/pollingsequence/DummyPst.h>
|
||||||
#include <fsfw/objectmanager/ObjectManager.h>
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
||||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
#include <fsfw/returnvalues/returnvalue.h>
|
||||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
||||||
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
|
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
|
||||||
#include <fsfw/tasks/PeriodicTaskIF.h>
|
#include <fsfw/tasks/PeriodicTaskIF.h>
|
||||||
@ -56,15 +56,15 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
|
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
|
||||||
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
ReturnValue_t result = tmTcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
|
ReturnValue_t result = tmTcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Object add component failed" << std::endl;
|
sif::error << "Object add component failed" << std::endl;
|
||||||
}
|
}
|
||||||
result = tmTcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
|
result = tmTcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Object add component failed" << std::endl;
|
sif::error << "Object add component failed" << std::endl;
|
||||||
}
|
}
|
||||||
result = tmTcDistributor->addComponent(objects::TM_FUNNEL);
|
result = tmTcDistributor->addComponent(objects::TM_FUNNEL);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Object add component failed" << std::endl;
|
sif::error << "Object add component failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,13 +72,13 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
|
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
|
||||||
"TMTC_UNIX_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"TMTC_UNIX_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
|
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Add component UDP Unix Bridge failed" << std::endl;
|
sif::error << "Add component UDP Unix Bridge failed" << std::endl;
|
||||||
}
|
}
|
||||||
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
|
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
|
||||||
"UDP_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
"UDP_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||||
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
|
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Add component UDP Polling failed" << std::endl;
|
sif::error << "Add component UDP Polling failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,89 +86,89 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* pusVerification = factory->createPeriodicTask(
|
PeriodicTaskIF* pusVerification = factory->createPeriodicTask(
|
||||||
"PUS_VERIF", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
"PUS_VERIF", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
result = pusVerification->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
|
result = pusVerification->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Object add component failed" << std::endl;
|
sif::error << "Object add component failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
PeriodicTaskIF* eventHandling = factory->createPeriodicTask(
|
PeriodicTaskIF* eventHandling = factory->createPeriodicTask(
|
||||||
"EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
"EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
result = eventHandling->addComponent(objects::EVENT_MANAGER);
|
result = eventHandling->addComponent(objects::EVENT_MANAGER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("EVENT_MNGR", objects::EVENT_MANAGER);
|
initmission::printAddObjectError("EVENT_MNGR", objects::EVENT_MANAGER);
|
||||||
}
|
}
|
||||||
result = eventHandling->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
|
result = eventHandling->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS5", objects::PUS_SERVICE_5_EVENT_REPORTING);
|
initmission::printAddObjectError("PUS5", objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||||
}
|
}
|
||||||
|
|
||||||
PeriodicTaskIF* pusHighPrio = factory->createPeriodicTask(
|
PeriodicTaskIF* pusHighPrio = factory->createPeriodicTask(
|
||||||
"PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
"PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
initmission::printAddObjectError("PUS2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||||
}
|
}
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS9", objects::PUS_SERVICE_9_TIME_MGMT);
|
initmission::printAddObjectError("PUS9", objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
}
|
}
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
initmission::printAddObjectError("PUS3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
}
|
}
|
||||||
|
|
||||||
PeriodicTaskIF* pusMedPrio = factory->createPeriodicTask(
|
PeriodicTaskIF* pusMedPrio = factory->createPeriodicTask(
|
||||||
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
initmission::printAddObjectError("PUS8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS200", objects::PUS_SERVICE_200_MODE_MGMT);
|
initmission::printAddObjectError("PUS200", objects::PUS_SERVICE_200_MODE_MGMT);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS20", objects::PUS_SERVICE_20_PARAMETERS);
|
initmission::printAddObjectError("PUS20", objects::PUS_SERVICE_20_PARAMETERS);
|
||||||
}
|
}
|
||||||
|
|
||||||
PeriodicTaskIF* pusLowPrio = factory->createPeriodicTask(
|
PeriodicTaskIF* pusLowPrio = factory->createPeriodicTask(
|
||||||
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
|
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
|
||||||
result = pusLowPrio->addComponent(objects::PUS_SERVICE_17_TEST);
|
result = pusLowPrio->addComponent(objects::PUS_SERVICE_17_TEST);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS17", objects::PUS_SERVICE_17_TEST);
|
initmission::printAddObjectError("PUS17", objects::PUS_SERVICE_17_TEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
PeriodicTaskIF* thermalTask = factory->createPeriodicTask(
|
PeriodicTaskIF* thermalTask = factory->createPeriodicTask(
|
||||||
"THERMAL_CTL_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
"THERMAL_CTL_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||||
result = thermalTask->addComponent(objects::RTD_0_IC3_PLOC_HEATSPREADER);
|
result = thermalTask->addComponent(objects::RTD_0_IC3_PLOC_HEATSPREADER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("RTD_0_dummy", objects::RTD_0_IC3_PLOC_HEATSPREADER);
|
initmission::printAddObjectError("RTD_0_dummy", objects::RTD_0_IC3_PLOC_HEATSPREADER);
|
||||||
}
|
}
|
||||||
result = thermalTask->addComponent(objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
result = thermalTask->addComponent(objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("SUS_0_dummy", objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
initmission::printAddObjectError("SUS_0_dummy", objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
||||||
}
|
}
|
||||||
|
|
||||||
result = thermalTask->addComponent(objects::CORE_CONTROLLER);
|
result = thermalTask->addComponent(objects::CORE_CONTROLLER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("Core controller dummy", objects::CORE_CONTROLLER);
|
initmission::printAddObjectError("Core controller dummy", objects::CORE_CONTROLLER);
|
||||||
}
|
}
|
||||||
|
|
||||||
result = thermalTask->addComponent(objects::THERMAL_CONTROLLER);
|
result = thermalTask->addComponent(objects::THERMAL_CONTROLLER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER);
|
initmission::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER);
|
||||||
}
|
}
|
||||||
|
|
||||||
FixedTimeslotTaskIF* pstTask = factory->createFixedTimeslotTask(
|
FixedTimeslotTaskIF* pstTask = factory->createFixedTimeslotTask(
|
||||||
"DUMMY_PST", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
|
"DUMMY_PST", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
|
||||||
result = dummy_pst::pst(pstTask);
|
result = dummy_pst::pst(pstTask);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Failed to add dummy pst to fixed timeslot task" << std::endl;
|
sif::error << "Failed to add dummy pst to fixed timeslot task" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OBSW_ADD_TEST_CODE == 1
|
#if OBSW_ADD_TEST_CODE == 1
|
||||||
result = testTask->addComponent(objects::TEST_TASK);
|
result = testTask->addComponent(objects::TEST_TASK);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
|
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
||||||
|
@ -45,8 +45,8 @@
|
|||||||
#include <dummies/TemperatureSensorsDummy.h>
|
#include <dummies/TemperatureSensorsDummy.h>
|
||||||
|
|
||||||
void Factory::setStaticFrameworkObjectIds() {
|
void Factory::setStaticFrameworkObjectIds() {
|
||||||
PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR;
|
PusServiceBase::PUS_DISTRIBUTOR = objects::PUS_PACKET_DISTRIBUTOR;
|
||||||
PusServiceBase::packetDestination = objects::TM_FUNNEL;
|
PusServiceBase::PACKET_DESTINATION = objects::TM_FUNNEL;
|
||||||
|
|
||||||
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
|
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
|
||||||
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
|
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
|
||||||
@ -55,8 +55,7 @@ void Factory::setStaticFrameworkObjectIds() {
|
|||||||
// No storage object for now.
|
// No storage object for now.
|
||||||
TmFunnel::storageDestination = objects::NO_OBJECT;
|
TmFunnel::storageDestination = objects::NO_OBJECT;
|
||||||
|
|
||||||
VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION;
|
VerificationReporter::DEFAULT_RECEIVER = objects::PUS_SERVICE_1_VERIFICATION;
|
||||||
TmPacketBase::timeStamperId = objects::TIME_STAMPER;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::produce(void* args) {
|
void ObjectFactory::produce(void* args) {
|
||||||
|
@ -129,9 +129,7 @@ ArduinoComIF::~ArduinoComIF() {
|
|||||||
CloseHandle(hCom);
|
CloseHandle(hCom);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
ReturnValue_t ArduinoComIF::initializeInterface(CookieIF *cookie) {
|
ReturnValue_t ArduinoComIF::initializeInterface(CookieIF *cookie) { return returnvalue::OK; }
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t ArduinoComIF::sendMessage(CookieIF *cookie, const uint8_t *data, size_t len) {
|
ReturnValue_t ArduinoComIF::sendMessage(CookieIF *cookie, const uint8_t *data, size_t len) {
|
||||||
ArduinoCookie *arduinoCookie = dynamic_cast<ArduinoCookie *>(cookie);
|
ArduinoCookie *arduinoCookie = dynamic_cast<ArduinoCookie *>(cookie);
|
||||||
@ -142,10 +140,10 @@ ReturnValue_t ArduinoComIF::sendMessage(CookieIF *cookie, const uint8_t *data, s
|
|||||||
return sendMessage(arduinoCookie->command, arduinoCookie->address, data, len);
|
return sendMessage(arduinoCookie->command, arduinoCookie->address, data, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t ArduinoComIF::getSendSuccess(CookieIF *cookie) { return RETURN_OK; }
|
ReturnValue_t ArduinoComIF::getSendSuccess(CookieIF *cookie) { return returnvalue::OK; }
|
||||||
|
|
||||||
ReturnValue_t ArduinoComIF::requestReceiveMessage(CookieIF *cookie, size_t requestLen) {
|
ReturnValue_t ArduinoComIF::requestReceiveMessage(CookieIF *cookie, size_t requestLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t ArduinoComIF::readReceivedMessage(CookieIF *cookie, uint8_t **buffer, size_t *size) {
|
ReturnValue_t ArduinoComIF::readReceivedMessage(CookieIF *cookie, uint8_t **buffer, size_t *size) {
|
||||||
@ -158,7 +156,7 @@ ReturnValue_t ArduinoComIF::readReceivedMessage(CookieIF *cookie, uint8_t **buff
|
|||||||
|
|
||||||
*buffer = arduinoCookie->replyBuffer.data();
|
*buffer = arduinoCookie->replyBuffer.data();
|
||||||
*size = arduinoCookie->receivedDataLen;
|
*size = arduinoCookie->receivedDataLen;
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t ArduinoComIF::sendMessage(uint8_t command, uint8_t address, const uint8_t *data,
|
ReturnValue_t ArduinoComIF::sendMessage(uint8_t command, uint8_t address, const uint8_t *data,
|
||||||
@ -178,14 +176,14 @@ ReturnValue_t ArduinoComIF::sendMessage(uint8_t command, uint8_t address, const
|
|||||||
|
|
||||||
ReturnValue_t result =
|
ReturnValue_t result =
|
||||||
DleEncoder::encode(&command, 1, currentPosition, remainingLen, &encodedLen, false);
|
DleEncoder::encode(&command, 1, currentPosition, remainingLen, &encodedLen, false);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
currentPosition += encodedLen;
|
currentPosition += encodedLen;
|
||||||
remainingLen -= encodedLen; // DleEncoder will never return encodedLen > remainingLen
|
remainingLen -= encodedLen; // DleEncoder will never return encodedLen > remainingLen
|
||||||
|
|
||||||
result = DleEncoder::encode(&address, 1, currentPosition, remainingLen, &encodedLen, false);
|
result = DleEncoder::encode(&address, 1, currentPosition, remainingLen, &encodedLen, false);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
currentPosition += encodedLen;
|
currentPosition += encodedLen;
|
||||||
@ -199,7 +197,7 @@ ReturnValue_t ArduinoComIF::sendMessage(uint8_t command, uint8_t address, const
|
|||||||
|
|
||||||
result =
|
result =
|
||||||
DleEncoder::encode(temporaryBuffer, 2, currentPosition, remainingLen, &encodedLen, false);
|
DleEncoder::encode(temporaryBuffer, 2, currentPosition, remainingLen, &encodedLen, false);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
currentPosition += encodedLen;
|
currentPosition += encodedLen;
|
||||||
@ -207,7 +205,7 @@ ReturnValue_t ArduinoComIF::sendMessage(uint8_t command, uint8_t address, const
|
|||||||
|
|
||||||
// encoding the actual data
|
// encoding the actual data
|
||||||
result = DleEncoder::encode(data, dataLen, currentPosition, remainingLen, &encodedLen, false);
|
result = DleEncoder::encode(data, dataLen, currentPosition, remainingLen, &encodedLen, false);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
currentPosition += encodedLen;
|
currentPosition += encodedLen;
|
||||||
@ -224,7 +222,7 @@ ReturnValue_t ArduinoComIF::sendMessage(uint8_t command, uint8_t address, const
|
|||||||
|
|
||||||
result =
|
result =
|
||||||
DleEncoder::encode(temporaryBuffer, 2, currentPosition, remainingLen, &encodedLen, false);
|
DleEncoder::encode(temporaryBuffer, 2, currentPosition, remainingLen, &encodedLen, false);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
currentPosition += encodedLen;
|
currentPosition += encodedLen;
|
||||||
@ -241,16 +239,16 @@ ReturnValue_t ArduinoComIF::sendMessage(uint8_t command, uint8_t address, const
|
|||||||
ssize_t writtenlen = ::write(serialPort, sendBuffer, encodedLen);
|
ssize_t writtenlen = ::write(serialPort, sendBuffer, encodedLen);
|
||||||
if (writtenlen < 0) {
|
if (writtenlen < 0) {
|
||||||
// we could try to find out what happened...
|
// we could try to find out what happened...
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
if (writtenlen != encodedLen) {
|
if (writtenlen != encodedLen) {
|
||||||
// the OS failed us, we do not try to block until everything is written, as
|
// the OS failed us, we do not try to block until everything is written, as
|
||||||
// we can not block the whole system here
|
// we can not block the whole system here
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
#elif WIN32
|
#elif WIN32
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,7 +295,7 @@ void ArduinoComIF::handleSerialPortRx() {
|
|||||||
packet, sizeof(packet), &packetLen);
|
packet, sizeof(packet), &packetLen);
|
||||||
|
|
||||||
size_t toDelete = firstSTXinRawData;
|
size_t toDelete = firstSTXinRawData;
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
handlePacket(packet, packetLen);
|
handlePacket(packet, packetLen);
|
||||||
|
|
||||||
// after handling the packet, we can delete it from the raw stream,
|
// after handling the packet, we can delete it from the raw stream,
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include <fsfw/container/SimpleRingBuffer.h>
|
#include <fsfw/container/SimpleRingBuffer.h>
|
||||||
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
|
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
|
||||||
#include <fsfw/objectmanager/SystemObject.h>
|
#include <fsfw/objectmanager/SystemObject.h>
|
||||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
#include <fsfw/returnvalues/returnvalue.h>
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
@ -129,12 +129,12 @@ ReturnValue_t dummy_pst::pst(FixedTimeslotTaskIF *thisSequence) {
|
|||||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
|
||||||
|
|
||||||
if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) {
|
if (thisSequence->checkSequence() == returnvalue::OK) {
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
} else {
|
} else {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "pst::pollingSequenceInitDefault: Sequence invalid!" << std::endl;
|
sif::error << "pst::pollingSequenceInitDefault: Sequence invalid!" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef POLLINGSEQUENCEFACTORY_H_
|
#ifndef POLLINGSEQUENCEFACTORY_H_
|
||||||
#define POLLINGSEQUENCEFACTORY_H_
|
#define POLLINGSEQUENCEFACTORY_H_
|
||||||
|
|
||||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
#include <fsfw/returnvalues/returnvalue.h>
|
||||||
|
|
||||||
class FixedTimeslotTaskIF;
|
class FixedTimeslotTaskIF;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <fsfw/objectmanager/ObjectManager.h>
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
||||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
#include <fsfw/returnvalues/returnvalue.h>
|
||||||
#include <fsfw/serviceinterface/ServiceInterface.h>
|
#include <fsfw/serviceinterface/ServiceInterface.h>
|
||||||
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
|
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
|
||||||
#include <fsfw/tasks/PeriodicTaskIF.h>
|
#include <fsfw/tasks/PeriodicTaskIF.h>
|
||||||
@ -36,7 +36,7 @@ void initmission::initMission() {
|
|||||||
|
|
||||||
void initmission::initTasks() {
|
void initmission::initTasks() {
|
||||||
TaskFactory* factory = TaskFactory::instance();
|
TaskFactory* factory = TaskFactory::instance();
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
if (factory == nullptr) {
|
if (factory == nullptr) {
|
||||||
/* Should never happen ! */
|
/* Should never happen ! */
|
||||||
return;
|
return;
|
||||||
@ -51,15 +51,15 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
|
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
|
||||||
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
result = tmTcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
|
result = tmTcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Object add component failed" << std::endl;
|
sif::error << "Object add component failed" << std::endl;
|
||||||
}
|
}
|
||||||
result = tmTcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
|
result = tmTcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Object add component failed" << std::endl;
|
sif::error << "Object add component failed" << std::endl;
|
||||||
}
|
}
|
||||||
result = tmTcDistributor->addComponent(objects::TM_FUNNEL);
|
result = tmTcDistributor->addComponent(objects::TM_FUNNEL);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Object add component failed" << std::endl;
|
sif::error << "Object add component failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,13 +67,13 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
|
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
|
||||||
"TMTC_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"TMTC_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
|
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Add component TMTC Bridge failed" << std::endl;
|
sif::error << "Add component TMTC Bridge failed" << std::endl;
|
||||||
}
|
}
|
||||||
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
|
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
|
||||||
"TMTC_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
"TMTC_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||||
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
|
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Add component TMTC Polling failed" << std::endl;
|
sif::error << "Add component TMTC Polling failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,11 +120,11 @@ void initmission::initTasks() {
|
|||||||
void initmission::createPusTasks(TaskFactory& factory,
|
void initmission::createPusTasks(TaskFactory& factory,
|
||||||
TaskDeadlineMissedFunction missedDeadlineFunc,
|
TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||||
std::vector<PeriodicTaskIF*>& taskVec) {
|
std::vector<PeriodicTaskIF*>& taskVec) {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
PeriodicTaskIF* pusVerification = factory.createPeriodicTask(
|
PeriodicTaskIF* pusVerification = factory.createPeriodicTask(
|
||||||
"PUS_VERIF", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
"PUS_VERIF", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
result = pusVerification->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
|
result = pusVerification->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Object add component failed" << std::endl;
|
sif::error << "Object add component failed" << std::endl;
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusVerification);
|
taskVec.push_back(pusVerification);
|
||||||
@ -132,11 +132,11 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
PeriodicTaskIF* pusEvents = factory.createPeriodicTask(
|
PeriodicTaskIF* pusEvents = factory.createPeriodicTask(
|
||||||
"PUS_EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
"PUS_EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
result = pusEvents->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
|
result = pusEvents->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_EVENTS", objects::PUS_SERVICE_5_EVENT_REPORTING);
|
initmission::printAddObjectError("PUS_EVENTS", objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||||
}
|
}
|
||||||
result = pusEvents->addComponent(objects::EVENT_MANAGER);
|
result = pusEvents->addComponent(objects::EVENT_MANAGER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_MGMT", objects::EVENT_MANAGER);
|
initmission::printAddObjectError("PUS_MGMT", objects::EVENT_MANAGER);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusEvents);
|
taskVec.push_back(pusEvents);
|
||||||
@ -144,11 +144,11 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
PeriodicTaskIF* pusHighPrio = factory.createPeriodicTask(
|
PeriodicTaskIF* pusHighPrio = factory.createPeriodicTask(
|
||||||
"PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
"PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
initmission::printAddObjectError("PUS2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||||
}
|
}
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS9", objects::PUS_SERVICE_9_TIME_MGMT);
|
initmission::printAddObjectError("PUS9", objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusHighPrio);
|
taskVec.push_back(pusHighPrio);
|
||||||
@ -156,19 +156,19 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
PeriodicTaskIF* pusMedPrio = factory.createPeriodicTask(
|
PeriodicTaskIF* pusMedPrio = factory.createPeriodicTask(
|
||||||
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
initmission::printAddObjectError("PUS8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS200", objects::PUS_SERVICE_200_MODE_MGMT);
|
initmission::printAddObjectError("PUS200", objects::PUS_SERVICE_200_MODE_MGMT);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS20", objects::PUS_SERVICE_20_PARAMETERS);
|
initmission::printAddObjectError("PUS20", objects::PUS_SERVICE_20_PARAMETERS);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
initmission::printAddObjectError("PUS3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusMedPrio);
|
taskVec.push_back(pusMedPrio);
|
||||||
@ -176,11 +176,11 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
PeriodicTaskIF* pusLowPrio = factory.createPeriodicTask(
|
PeriodicTaskIF* pusLowPrio = factory.createPeriodicTask(
|
||||||
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
|
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
|
||||||
result = pusLowPrio->addComponent(objects::PUS_SERVICE_17_TEST);
|
result = pusLowPrio->addComponent(objects::PUS_SERVICE_17_TEST);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS17", objects::PUS_SERVICE_17_TEST);
|
initmission::printAddObjectError("PUS17", objects::PUS_SERVICE_17_TEST);
|
||||||
}
|
}
|
||||||
result = pusLowPrio->addComponent(objects::INTERNAL_ERROR_REPORTER);
|
result = pusLowPrio->addComponent(objects::INTERNAL_ERROR_REPORTER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("INT_ERR_RPRT", objects::INTERNAL_ERROR_REPORTER);
|
initmission::printAddObjectError("INT_ERR_RPRT", objects::INTERNAL_ERROR_REPORTER);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusLowPrio);
|
taskVec.push_back(pusLowPrio);
|
||||||
@ -189,12 +189,12 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
void initmission::createPstTasks(TaskFactory& factory,
|
void initmission::createPstTasks(TaskFactory& factory,
|
||||||
TaskDeadlineMissedFunction missedDeadlineFunc,
|
TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||||
std::vector<PeriodicTaskIF*>& taskVec) {
|
std::vector<PeriodicTaskIF*>& taskVec) {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
#if OBSW_ADD_SPI_TEST_CODE == 0
|
#if OBSW_ADD_SPI_TEST_CODE == 0
|
||||||
FixedTimeslotTaskIF* spiPst = factory.createFixedTimeslotTask(
|
FixedTimeslotTaskIF* spiPst = factory.createFixedTimeslotTask(
|
||||||
"SPI_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 1.0, missedDeadlineFunc);
|
"SPI_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 1.0, missedDeadlineFunc);
|
||||||
result = pst::pstSpi(spiPst);
|
result = pst::pstSpi(spiPst);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
|
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
|
||||||
}
|
}
|
||||||
taskVec.push_back(spiPst);
|
taskVec.push_back(spiPst);
|
||||||
@ -204,28 +204,28 @@ void initmission::createPstTasks(TaskFactory& factory,
|
|||||||
void initmission::createTestTasks(TaskFactory& factory,
|
void initmission::createTestTasks(TaskFactory& factory,
|
||||||
TaskDeadlineMissedFunction missedDeadlineFunc,
|
TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||||
std::vector<PeriodicTaskIF*>& taskVec) {
|
std::vector<PeriodicTaskIF*>& taskVec) {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
PeriodicTaskIF* testTask = factory.createPeriodicTask(
|
PeriodicTaskIF* testTask = factory.createPeriodicTask(
|
||||||
"TEST_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
"TEST_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||||
result = testTask->addComponent(objects::TEST_TASK);
|
result = testTask->addComponent(objects::TEST_TASK);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
|
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
|
||||||
}
|
}
|
||||||
#if OBSW_ADD_SPI_TEST_CODE == 1
|
#if OBSW_ADD_SPI_TEST_CODE == 1
|
||||||
result = testTask->addComponent(objects::SPI_TEST);
|
result = testTask->addComponent(objects::SPI_TEST);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("SPI_TEST", objects::SPI_TEST);
|
initmission::printAddObjectError("SPI_TEST", objects::SPI_TEST);
|
||||||
}
|
}
|
||||||
#endif /* RPI_ADD_SPI_TEST == 1 */
|
#endif /* RPI_ADD_SPI_TEST == 1 */
|
||||||
#if RPI_ADD_GPIO_TEST == 1
|
#if RPI_ADD_GPIO_TEST == 1
|
||||||
result = testTask->addComponent(objects::LIBGPIOD_TEST);
|
result = testTask->addComponent(objects::LIBGPIOD_TEST);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("GPIOD_TEST", objects::LIBGPIOD_TEST);
|
initmission::printAddObjectError("GPIOD_TEST", objects::LIBGPIOD_TEST);
|
||||||
}
|
}
|
||||||
#endif /* RPI_ADD_GPIO_TEST == 1 */
|
#endif /* RPI_ADD_GPIO_TEST == 1 */
|
||||||
#if OBSW_ADD_UART_TEST_CODE == 1
|
#if OBSW_ADD_UART_TEST_CODE == 1
|
||||||
result = testTask->addComponent(objects::UART_TEST);
|
result = testTask->addComponent(objects::UART_TEST);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("UART_TEST", objects::UART_TEST);
|
initmission::printAddObjectError("UART_TEST", objects::UART_TEST);
|
||||||
}
|
}
|
||||||
#endif /* RPI_ADD_GPIO_TEST == 1 */
|
#endif /* RPI_ADD_GPIO_TEST == 1 */
|
||||||
@ -237,7 +237,7 @@ void initmission::createTestTasks(TaskFactory& factory,
|
|||||||
FixedTimeslotTaskIF* pstTestTask = factory->createFixedTimeslotTask(
|
FixedTimeslotTaskIF* pstTestTask = factory->createFixedTimeslotTask(
|
||||||
"TEST_PST", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 2.0, missedDeadlineFunc);
|
"TEST_PST", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 2.0, missedDeadlineFunc);
|
||||||
result = pst::pstTest(pstTestTask);
|
result = pst::pstTest(pstTestTask);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::info << "initmission::initTasks: ACS PST empty or invalid" << std::endl;
|
sif::info << "initmission::initTasks: ACS PST empty or invalid" << std::endl;
|
||||||
startTestPst = false;
|
startTestPst = false;
|
||||||
}
|
}
|
||||||
|
@ -40,14 +40,14 @@ void rpi::gpio::initSpiCsDecoder(GpioIF* gpioComIF) {
|
|||||||
for (const auto& info : muxInfo) {
|
for (const auto& info : muxInfo) {
|
||||||
result = createRpiGpioConfig(spiMuxGpios, info.gpioId, info.bcmNum, info.consumer,
|
result = createRpiGpioConfig(spiMuxGpios, info.gpioId, info.bcmNum, info.consumer,
|
||||||
Direction::OUT, Levels::LOW);
|
Direction::OUT, Levels::LOW);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Creating Raspberry Pi SPI Mux GPIO failed with code " << result << std::endl;
|
sif::error << "Creating Raspberry Pi SPI Mux GPIO failed with code " << result << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
result = gpioComIF->addGpios(spiMuxGpios);
|
result = gpioComIF->addGpios(spiMuxGpios);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "initSpiCsDecoder: Failed to add mux bit gpios to gpioComIF" << std::endl;
|
sif::error << "initSpiCsDecoder: Failed to add mux bit gpios to gpioComIF" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,6 @@
|
|||||||
#cmakedefine LIBGPS_VERSION_MAJOR @LIBGPS_VERSION_MAJOR@
|
#cmakedefine LIBGPS_VERSION_MAJOR @LIBGPS_VERSION_MAJOR@
|
||||||
#cmakedefine LIBGPS_VERSION_MINOR @LIBGPS_VERSION_MINOR@
|
#cmakedefine LIBGPS_VERSION_MINOR @LIBGPS_VERSION_MINOR@
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
||||||
#include "objects/systemObjectList.h"
|
#include "objects/systemObjectList.h"
|
||||||
|
@ -3,9 +3,12 @@
|
|||||||
#include <bsp_q7s/core/CoreController.h>
|
#include <bsp_q7s/core/CoreController.h>
|
||||||
#include <bsp_q7s/memory/FileSystemHandler.h>
|
#include <bsp_q7s/memory/FileSystemHandler.h>
|
||||||
#include <bsp_q7s/xadc/Xadc.h>
|
#include <bsp_q7s/xadc/Xadc.h>
|
||||||
|
#include <fsfw/globalfunctions/arrayprinter.h>
|
||||||
#include <fsfw/objectmanager/ObjectManager.h>
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
#include <gps.h>
|
#include <gps.h>
|
||||||
#include <libgpsmm.h>
|
#include <libgpsmm.h>
|
||||||
|
#include <param/param_string.h>
|
||||||
|
#include <param/rparam_client.h>
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
@ -18,6 +21,7 @@
|
|||||||
#include "bsp_q7s/memory/scratchApi.h"
|
#include "bsp_q7s/memory/scratchApi.h"
|
||||||
#include "fsfw/tasks/TaskFactory.h"
|
#include "fsfw/tasks/TaskFactory.h"
|
||||||
#include "fsfw/timemanager/Stopwatch.h"
|
#include "fsfw/timemanager/Stopwatch.h"
|
||||||
|
#include "p60pdu.h"
|
||||||
#include "test/DummyParameter.h"
|
#include "test/DummyParameter.h"
|
||||||
|
|
||||||
Q7STestTask::Q7STestTask(object_id_t objectId) : TestTask(objectId) {
|
Q7STestTask::Q7STestTask(object_id_t objectId) : TestTask(objectId) {
|
||||||
@ -35,6 +39,33 @@ ReturnValue_t Q7STestTask::performOneShotAction() {
|
|||||||
if (doTestScratchApi) {
|
if (doTestScratchApi) {
|
||||||
testScratchApi();
|
testScratchApi();
|
||||||
}
|
}
|
||||||
|
if (DO_TEST_GOMSPACE_API) {
|
||||||
|
uint8_t p60pdu_node = 3;
|
||||||
|
uint8_t hk_mem[P60PDU_HK_SIZE];
|
||||||
|
param_index_t p60pdu_hk{};
|
||||||
|
p60pdu_hk.physaddr = hk_mem;
|
||||||
|
if (!p60pdu_get_hk(&p60pdu_hk, p60pdu_node, 1000)) {
|
||||||
|
printf("Error getting p60pdu hk\n");
|
||||||
|
} else {
|
||||||
|
param_list(&p60pdu_hk, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DO_TEST_GOMSPACE_GET_CONFIG) {
|
||||||
|
uint8_t p60pdu_node = 3;
|
||||||
|
param_index_t requestStruct{};
|
||||||
|
requestStruct.table = p60pdu_config;
|
||||||
|
requestStruct.mem_id = P60PDU_PARAM;
|
||||||
|
uint8_t hk_mem[P60PDU_PARAM_SIZE];
|
||||||
|
requestStruct.count = p60pdu_config_count;
|
||||||
|
requestStruct.size = P60PDU_PARAM_SIZE;
|
||||||
|
requestStruct.physaddr = hk_mem;
|
||||||
|
int result = rparam_get_full_table(&requestStruct, p60pdu_node, P60_PORT_RPARAM,
|
||||||
|
requestStruct.mem_id, 1000);
|
||||||
|
param_list(&requestStruct, 1);
|
||||||
|
return (result == 0);
|
||||||
|
}
|
||||||
|
|
||||||
// testJsonLibDirect();
|
// testJsonLibDirect();
|
||||||
// testDummyParams();
|
// testDummyParams();
|
||||||
if (doTestProtHandler) {
|
if (doTestProtHandler) {
|
||||||
@ -95,23 +126,23 @@ void Q7STestTask::fileTests() {
|
|||||||
|
|
||||||
void Q7STestTask::testScratchApi() {
|
void Q7STestTask::testScratchApi() {
|
||||||
ReturnValue_t result = scratch::writeNumber("TEST", 1);
|
ReturnValue_t result = scratch::writeNumber("TEST", 1);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "Q7STestTask::scratchApiTest: Writing number failed" << std::endl;
|
sif::debug << "Q7STestTask::scratchApiTest: Writing number failed" << std::endl;
|
||||||
}
|
}
|
||||||
int number = 0;
|
int number = 0;
|
||||||
result = scratch::readNumber("TEST", number);
|
result = scratch::readNumber("TEST", number);
|
||||||
sif::info << "Q7STestTask::testScratchApi: Value for key \"TEST\": " << number << std::endl;
|
sif::info << "Q7STestTask::testScratchApi: Value for key \"TEST\": " << number << std::endl;
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "Q7STestTask::scratchApiTest: Reading number failed" << std::endl;
|
sif::debug << "Q7STestTask::scratchApiTest: Reading number failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = scratch::writeString("TEST2", "halloWelt");
|
result = scratch::writeString("TEST2", "halloWelt");
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "Q7STestTask::scratchApiTest: Writing string failed" << std::endl;
|
sif::debug << "Q7STestTask::scratchApiTest: Writing string failed" << std::endl;
|
||||||
}
|
}
|
||||||
std::string string;
|
std::string string;
|
||||||
result = scratch::readString("TEST2", string);
|
result = scratch::readString("TEST2", string);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "Q7STestTask::scratchApiTest: Reading number failed" << std::endl;
|
sif::debug << "Q7STestTask::scratchApiTest: Reading number failed" << std::endl;
|
||||||
}
|
}
|
||||||
sif::info << "Q7STestTask::testScratchApi: Value for key \"TEST2\": " << string << std::endl;
|
sif::info << "Q7STestTask::testScratchApi: Value for key \"TEST2\": " << string << std::endl;
|
||||||
@ -143,7 +174,7 @@ void Q7STestTask::testDummyParams() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t result = param.readJsonFile();
|
ReturnValue_t result = param.readJsonFile();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
}
|
}
|
||||||
|
|
||||||
param.setValue(DummyParameter::DUMMY_KEY_PARAM_1, 3);
|
param.setValue(DummyParameter::DUMMY_KEY_PARAM_1, 3);
|
||||||
@ -154,13 +185,13 @@ void Q7STestTask::testDummyParams() {
|
|||||||
|
|
||||||
int test = 0;
|
int test = 0;
|
||||||
result = param.getValue<int>(DummyParameter::DUMMY_KEY_PARAM_1, test);
|
result = param.getValue<int>(DummyParameter::DUMMY_KEY_PARAM_1, test);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "Q7STestTask::testDummyParams: Key " << DummyParameter::DUMMY_KEY_PARAM_1
|
sif::warning << "Q7STestTask::testDummyParams: Key " << DummyParameter::DUMMY_KEY_PARAM_1
|
||||||
<< " does not exist" << std::endl;
|
<< " does not exist" << std::endl;
|
||||||
}
|
}
|
||||||
std::string test2;
|
std::string test2;
|
||||||
result = param.getValue<std::string>(DummyParameter::DUMMY_KEY_PARAM_2, test2);
|
result = param.getValue<std::string>(DummyParameter::DUMMY_KEY_PARAM_2, test2);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "Q7STestTask::testDummyParams: Key " << DummyParameter::DUMMY_KEY_PARAM_1
|
sif::warning << "Q7STestTask::testDummyParams: Key " << DummyParameter::DUMMY_KEY_PARAM_1
|
||||||
<< " does not exist" << std::endl;
|
<< " does not exist" << std::endl;
|
||||||
}
|
}
|
||||||
@ -179,18 +210,18 @@ ReturnValue_t Q7STestTask::initialize() {
|
|||||||
|
|
||||||
void Q7STestTask::testProtHandler() {
|
void Q7STestTask::testProtHandler() {
|
||||||
bool opPerformed = false;
|
bool opPerformed = false;
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
// If any chips are unlocked, lock them here
|
// If any chips are unlocked, lock them here
|
||||||
result = coreController->setBootCopyProtection(xsc::Chip::ALL_CHIP, xsc::Copy::ALL_COPY, true,
|
result = coreController->setBootCopyProtection(xsc::Chip::ALL_CHIP, xsc::Copy::ALL_COPY, true,
|
||||||
opPerformed, true);
|
opPerformed, true);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
|
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// unlock own copy
|
// unlock own copy
|
||||||
result = coreController->setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, false,
|
result = coreController->setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, false,
|
||||||
opPerformed, true);
|
opPerformed, true);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
|
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
|
||||||
}
|
}
|
||||||
if (not opPerformed) {
|
if (not opPerformed) {
|
||||||
@ -204,7 +235,7 @@ void Q7STestTask::testProtHandler() {
|
|||||||
// lock own copy
|
// lock own copy
|
||||||
result = coreController->setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, true,
|
result = coreController->setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, true,
|
||||||
opPerformed, true);
|
opPerformed, true);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
|
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
|
||||||
}
|
}
|
||||||
if (not opPerformed) {
|
if (not opPerformed) {
|
||||||
@ -218,7 +249,7 @@ void Q7STestTask::testProtHandler() {
|
|||||||
// unlock specific copy
|
// unlock specific copy
|
||||||
result = coreController->setBootCopyProtection(xsc::Chip::CHIP_1, xsc::Copy::COPY_1, false,
|
result = coreController->setBootCopyProtection(xsc::Chip::CHIP_1, xsc::Copy::COPY_1, false,
|
||||||
opPerformed, true);
|
opPerformed, true);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
|
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
|
||||||
}
|
}
|
||||||
if (not opPerformed) {
|
if (not opPerformed) {
|
||||||
@ -232,7 +263,7 @@ void Q7STestTask::testProtHandler() {
|
|||||||
// lock specific copy
|
// lock specific copy
|
||||||
result = coreController->setBootCopyProtection(xsc::Chip::CHIP_1, xsc::Copy::COPY_1, true,
|
result = coreController->setBootCopyProtection(xsc::Chip::CHIP_1, xsc::Copy::COPY_1, true,
|
||||||
opPerformed, true);
|
opPerformed, true);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
|
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
|
||||||
}
|
}
|
||||||
if (not opPerformed) {
|
if (not opPerformed) {
|
||||||
@ -341,24 +372,24 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
|
|||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
FileSystemHandler::FsCommandCfg cfg = {};
|
FileSystemHandler::FsCommandCfg cfg = {};
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
|
||||||
// Lambda for common code
|
// Lambda for common code
|
||||||
auto createNonEmptyTmpDir = [&]() {
|
auto createNonEmptyTmpDir = [&]() {
|
||||||
if (not std::filesystem::exists("/tmp/test")) {
|
if (not std::filesystem::exists("/tmp/test")) {
|
||||||
result = fsHandler->createDirectory("/tmp", "test", false, &cfg);
|
result = fsHandler->createDirectory("/tmp", "test", false, &cfg);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Creating sample files
|
// Creating sample files
|
||||||
sif::info << "Creating sample files in directory" << std::endl;
|
sif::info << "Creating sample files in directory" << std::endl;
|
||||||
result = fsHandler->createFile("/tmp/test", "test1.txt", nullptr, 0, &cfg);
|
result = fsHandler->createFile("/tmp/test", "test1.txt", nullptr, 0, &cfg);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = fsHandler->createFile("/tmp/test", "test2.txt", nullptr, 0, &cfg);
|
result = fsHandler->createFile("/tmp/test", "test2.txt", nullptr, 0, &cfg);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@ -383,7 +414,7 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
|
|||||||
fsHandler->createFile("/tmp/", "test.txt", nullptr, 0, &cfg);
|
fsHandler->createFile("/tmp/", "test.txt", nullptr, 0, &cfg);
|
||||||
}
|
}
|
||||||
result = fsHandler->removeFile("/tmp", "test.txt", &cfg);
|
result = fsHandler->removeFile("/tmp", "test.txt", &cfg);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
sif::info << "File removed successfully" << std::endl;
|
sif::info << "File removed successfully" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
sif::warning << "File removal failed!" << std::endl;
|
sif::warning << "File removal failed!" << std::endl;
|
||||||
@ -396,7 +427,7 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
|
|||||||
sif::info << "Creating empty file in /tmp folder" << std::endl;
|
sif::info << "Creating empty file in /tmp folder" << std::endl;
|
||||||
// Do not delete file, user can check existence in shell
|
// Do not delete file, user can check existence in shell
|
||||||
ReturnValue_t result = fsHandler->createDirectory("/tmp/", "test", false, &cfg);
|
ReturnValue_t result = fsHandler->createDirectory("/tmp/", "test", false, &cfg);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
sif::info << "Directory created successfully" << std::endl;
|
sif::info << "Directory created successfully" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
sif::warning << "Directory creation failed!" << std::endl;
|
sif::warning << "Directory creation failed!" << std::endl;
|
||||||
@ -413,7 +444,7 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
|
|||||||
std::remove("/tmp/test/*");
|
std::remove("/tmp/test/*");
|
||||||
}
|
}
|
||||||
result = fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
|
result = fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
sif::info << "Directory removed successfully" << std::endl;
|
sif::info << "Directory removed successfully" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
sif::warning << "Directory removal failed!" << std::endl;
|
sif::warning << "Directory removal failed!" << std::endl;
|
||||||
@ -422,11 +453,11 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
|
|||||||
}
|
}
|
||||||
case (FsOpCodes::REMOVE_FILLED_DIR_IN_TMP): {
|
case (FsOpCodes::REMOVE_FILLED_DIR_IN_TMP): {
|
||||||
result = createNonEmptyTmpDir();
|
result = createNonEmptyTmpDir();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
result = fsHandler->removeDirectory("/tmp/", "test", true, &cfg);
|
result = fsHandler->removeDirectory("/tmp/", "test", true, &cfg);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
sif::info << "Directory removed recursively successfully" << std::endl;
|
sif::info << "Directory removed recursively successfully" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
sif::warning << "Recursive directory removal failed!" << std::endl;
|
sif::warning << "Recursive directory removal failed!" << std::endl;
|
||||||
@ -435,11 +466,11 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
|
|||||||
}
|
}
|
||||||
case (FsOpCodes::ATTEMPT_DIR_REMOVAL_NON_EMPTY): {
|
case (FsOpCodes::ATTEMPT_DIR_REMOVAL_NON_EMPTY): {
|
||||||
result = createNonEmptyTmpDir();
|
result = createNonEmptyTmpDir();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
result = fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
|
result = fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::info << "Directory removal attempt failed as expected" << std::endl;
|
sif::info << "Directory removal attempt failed as expected" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
sif::warning << "Directory removal worked when it should not have!" << std::endl;
|
sif::warning << "Directory removal worked when it should not have!" << std::endl;
|
||||||
@ -478,7 +509,7 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Q7STestTask::xadcTest() {
|
void Q7STestTask::xadcTest() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
float temperature = 0;
|
float temperature = 0;
|
||||||
float vccPint = 0;
|
float vccPint = 0;
|
||||||
float vccPaux = 0;
|
float vccPaux = 0;
|
||||||
@ -490,39 +521,39 @@ void Q7STestTask::xadcTest() {
|
|||||||
float vrefn = 0;
|
float vrefn = 0;
|
||||||
Xadc xadc;
|
Xadc xadc;
|
||||||
result = xadc.getTemperature(temperature);
|
result = xadc.getTemperature(temperature);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
sif::info << "Q7STestTask::xadcTest: Chip Temperature: " << temperature << " °C" << std::endl;
|
sif::info << "Q7STestTask::xadcTest: Chip Temperature: " << temperature << " °C" << std::endl;
|
||||||
}
|
}
|
||||||
result = xadc.getVccPint(vccPint);
|
result = xadc.getVccPint(vccPint);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
sif::info << "Q7STestTask::xadcTest: VCC PS internal: " << vccPint << " mV" << std::endl;
|
sif::info << "Q7STestTask::xadcTest: VCC PS internal: " << vccPint << " mV" << std::endl;
|
||||||
}
|
}
|
||||||
result = xadc.getVccPaux(vccPaux);
|
result = xadc.getVccPaux(vccPaux);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
sif::info << "Q7STestTask::xadcTest: VCC PS auxilliary: " << vccPaux << " mV" << std::endl;
|
sif::info << "Q7STestTask::xadcTest: VCC PS auxilliary: " << vccPaux << " mV" << std::endl;
|
||||||
}
|
}
|
||||||
result = xadc.getVccInt(vccInt);
|
result = xadc.getVccInt(vccInt);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
sif::info << "Q7STestTask::xadcTest: VCC PL internal: " << vccInt << " mV" << std::endl;
|
sif::info << "Q7STestTask::xadcTest: VCC PL internal: " << vccInt << " mV" << std::endl;
|
||||||
}
|
}
|
||||||
result = xadc.getVccAux(vccAux);
|
result = xadc.getVccAux(vccAux);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
sif::info << "Q7STestTask::xadcTest: VCC PL auxilliary: " << vccAux << " mV" << std::endl;
|
sif::info << "Q7STestTask::xadcTest: VCC PL auxilliary: " << vccAux << " mV" << std::endl;
|
||||||
}
|
}
|
||||||
result = xadc.getVccBram(vccBram);
|
result = xadc.getVccBram(vccBram);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
sif::info << "Q7STestTask::xadcTest: VCC BRAM: " << vccBram << " mV" << std::endl;
|
sif::info << "Q7STestTask::xadcTest: VCC BRAM: " << vccBram << " mV" << std::endl;
|
||||||
}
|
}
|
||||||
result = xadc.getVccOddr(vccOddr);
|
result = xadc.getVccOddr(vccOddr);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
sif::info << "Q7STestTask::xadcTest: VCC PS I/O DDR : " << vccOddr << " mV" << std::endl;
|
sif::info << "Q7STestTask::xadcTest: VCC PS I/O DDR : " << vccOddr << " mV" << std::endl;
|
||||||
}
|
}
|
||||||
result = xadc.getVrefp(vrefp);
|
result = xadc.getVrefp(vrefp);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
sif::info << "Q7STestTask::xadcTest: Vrefp : " << vrefp << " mV" << std::endl;
|
sif::info << "Q7STestTask::xadcTest: Vrefp : " << vrefp << " mV" << std::endl;
|
||||||
}
|
}
|
||||||
result = xadc.getVrefn(vrefn);
|
result = xadc.getVrefn(vrefn);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
sif::info << "Q7STestTask::xadcTest: Vrefn : " << vrefn << " mV" << std::endl;
|
sif::info << "Q7STestTask::xadcTest: Vrefn : " << vrefn << " mV" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,8 @@ class Q7STestTask : public TestTask {
|
|||||||
private:
|
private:
|
||||||
bool doTestSdCard = false;
|
bool doTestSdCard = false;
|
||||||
bool doTestScratchApi = false;
|
bool doTestScratchApi = false;
|
||||||
|
static constexpr bool DO_TEST_GOMSPACE_API = false;
|
||||||
|
static constexpr bool DO_TEST_GOMSPACE_GET_CONFIG = false;
|
||||||
bool doTestGpsShm = false;
|
bool doTestGpsShm = false;
|
||||||
bool doTestGpsSocket = false;
|
bool doTestGpsSocket = false;
|
||||||
bool doTestProtHandler = false;
|
bool doTestProtHandler = false;
|
||||||
|
@ -11,10 +11,10 @@ ReturnValue_t gps::triggerGpioResetPin(const uint8_t* actionData, size_t len, vo
|
|||||||
}
|
}
|
||||||
ResetArgs* resetArgs = reinterpret_cast<ResetArgs*>(args);
|
ResetArgs* resetArgs = reinterpret_cast<ResetArgs*>(args);
|
||||||
if (args == nullptr) {
|
if (args == nullptr) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
if (resetArgs->gpioComIF == nullptr) {
|
if (resetArgs->gpioComIF == nullptr) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
gpioId_t gpioId;
|
gpioId_t gpioId;
|
||||||
if (actionData[0] == 0) {
|
if (actionData[0] == 0) {
|
||||||
@ -25,5 +25,5 @@ ReturnValue_t gps::triggerGpioResetPin(const uint8_t* actionData, size_t len, vo
|
|||||||
resetArgs->gpioComIF->pullLow(gpioId);
|
resetArgs->gpioComIF->pullLow(gpioId);
|
||||||
TaskFactory::delayTask(resetArgs->waitPeriodMs);
|
TaskFactory::delayTask(resetArgs->waitPeriodMs);
|
||||||
resetArgs->gpioComIF->pullHigh(gpioId);
|
resetArgs->gpioComIF->pullHigh(gpioId);
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef BSP_Q7S_CALLBACKS_GNSSCALLBACK_H_
|
#ifndef BSP_Q7S_CALLBACKS_GNSSCALLBACK_H_
|
||||||
#define BSP_Q7S_CALLBACKS_GNSSCALLBACK_H_
|
#define BSP_Q7S_CALLBACKS_GNSSCALLBACK_H_
|
||||||
|
|
||||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
|
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
|
||||||
|
|
||||||
struct ResetArgs {
|
struct ResetArgs {
|
||||||
|
@ -47,7 +47,7 @@ void q7s::gpioCallbacks::initSpiCsDecoder(GpioIF* gpioComIF) {
|
|||||||
spiMuxGpios->addGpio(gpioIds::EN_RW_CS, enRwDecoder);
|
spiMuxGpios->addGpio(gpioIds::EN_RW_CS, enRwDecoder);
|
||||||
|
|
||||||
result = gpioComIF->addGpios(spiMuxGpios);
|
result = gpioComIF->addGpios(spiMuxGpios);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "initSpiCsDecoder: Failed to add SPI MUX bit GPIOs" << std::endl;
|
sif::error << "initSpiCsDecoder: Failed to add SPI MUX bit GPIOs" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -29,12 +29,12 @@ void closeSpi(int fd, gpioId_t gpioId, GpioIF* gpioIF, MutexIF* mutex);
|
|||||||
ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sendData,
|
ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sendData,
|
||||||
size_t sendLen, void* args) {
|
size_t sendLen, void* args) {
|
||||||
// Stopwatch watch;
|
// Stopwatch watch;
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
|
||||||
RwHandler* handler = reinterpret_cast<RwHandler*>(args);
|
RwHandler* handler = reinterpret_cast<RwHandler*>(args);
|
||||||
if (handler == nullptr) {
|
if (handler == nullptr) {
|
||||||
sif::error << "rwSpiCallback::spiCallback: Pointer to handler is invalid" << std::endl;
|
sif::error << "rwSpiCallback::spiCallback: Pointer to handler is invalid" << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t writeBuffer[2] = {};
|
uint8_t writeBuffer[2] = {};
|
||||||
@ -48,13 +48,13 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
|
|||||||
cookie->getMutexParams(timeoutType, timeoutMs);
|
cookie->getMutexParams(timeoutType, timeoutMs);
|
||||||
if (mutex == nullptr or gpioIF == nullptr) {
|
if (mutex == nullptr or gpioIF == nullptr) {
|
||||||
sif::debug << "rwSpiCallback::spiCallback: Mutex or GPIO interface invalid" << std::endl;
|
sif::debug << "rwSpiCallback::spiCallback: Mutex or GPIO interface invalid" << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
int fileDescriptor = 0;
|
int fileDescriptor = 0;
|
||||||
const std::string& dev = comIf->getSpiDev();
|
const std::string& dev = comIf->getSpiDev();
|
||||||
result = openSpi(dev, O_RDWR, gpioIF, gpioId, mutex, timeoutType, timeoutMs, fileDescriptor);
|
result = openSpi(dev, O_RDWR, gpioIF, gpioId, mutex, timeoutType, timeoutMs, fileDescriptor);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
|
|||||||
|
|
||||||
uint8_t* rxBuf = nullptr;
|
uint8_t* rxBuf = nullptr;
|
||||||
result = comIf->getReadBuffer(cookie->getSpiAddress(), &rxBuf);
|
result = comIf->getReadBuffer(cookie->getSpiAddress(), &rxBuf);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
|
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -130,7 +130,7 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
|
|||||||
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
|
closeSpi(fileDescriptor, gpioId, gpioIF, mutex);
|
||||||
usleep(RwDefinitions::SPI_REPLY_DELAY);
|
usleep(RwDefinitions::SPI_REPLY_DELAY);
|
||||||
result = openSpi(dev, O_RDWR, gpioIF, gpioId, mutex, timeoutType, timeoutMs, fileDescriptor);
|
result = openSpi(dev, O_RDWR, gpioIF, gpioId, mutex, timeoutType, timeoutMs, fileDescriptor);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result = HasReturnvaluesIF::RETURN_OK;
|
result = returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
cookie->setTransferSize(decodedFrameLen);
|
cookie->setTransferSize(decodedFrameLen);
|
||||||
@ -244,7 +244,7 @@ ReturnValue_t openSpi(const std::string& devname, int flags, GpioIF* gpioIF, gpi
|
|||||||
MutexIF* mutex, MutexIF::TimeoutType timeoutType, uint32_t timeoutMs,
|
MutexIF* mutex, MutexIF::TimeoutType timeoutType, uint32_t timeoutMs,
|
||||||
int& fd) {
|
int& fd) {
|
||||||
ReturnValue_t result = mutex->lockMutex(timeoutType, timeoutMs);
|
ReturnValue_t result = mutex->lockMutex(timeoutType, timeoutMs);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "rwSpiCallback::spiCallback: Failed to lock mutex" << std::endl;
|
sif::debug << "rwSpiCallback::spiCallback: Failed to lock mutex" << std::endl;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -258,21 +258,21 @@ ReturnValue_t openSpi(const std::string& devname, int flags, GpioIF* gpioIF, gpi
|
|||||||
// Pull SPI CS low. For now, no support for active high given
|
// Pull SPI CS low. For now, no support for active high given
|
||||||
if (gpioId != gpio::NO_GPIO) {
|
if (gpioId != gpio::NO_GPIO) {
|
||||||
result = gpioIF->pullLow(gpioId);
|
result = gpioIF->pullLow(gpioId);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "rwSpiCallback::spiCallback: Failed to pull chip select low" << std::endl;
|
sif::error << "rwSpiCallback::spiCallback: Failed to pull chip select low" << std::endl;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
void closeSpi(int fd, gpioId_t gpioId, GpioIF* gpioIF, MutexIF* mutex) {
|
void closeSpi(int fd, gpioId_t gpioId, GpioIF* gpioIF, MutexIF* mutex) {
|
||||||
close(fd);
|
close(fd);
|
||||||
if (gpioId != gpio::NO_GPIO) {
|
if (gpioId != gpio::NO_GPIO) {
|
||||||
if (gpioIF->pullHigh(gpioId) != HasReturnvaluesIF::RETURN_OK) {
|
if (gpioIF->pullHigh(gpioId) != returnvalue::OK) {
|
||||||
sif::error << "closeSpi: Failed to pull chip select high" << std::endl;
|
sif::error << "closeSpi: Failed to pull chip select high" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mutex->unlockMutex() != HasReturnvaluesIF::RETURN_OK) {
|
if (mutex->unlockMutex() != returnvalue::OK) {
|
||||||
sif::error << "rwSpiCallback::closeSpi: Failed to unlock mutex" << std::endl;
|
sif::error << "rwSpiCallback::closeSpi: Failed to unlock mutex" << std::endl;
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef BSP_Q7S_RW_SPI_CALLBACK_H_
|
#ifndef BSP_Q7S_RW_SPI_CALLBACK_H_
|
||||||
#define BSP_Q7S_RW_SPI_CALLBACK_H_
|
#define BSP_Q7S_RW_SPI_CALLBACK_H_
|
||||||
|
|
||||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
#include "fsfw_hal/common/gpio/GpioCookie.h"
|
#include "fsfw_hal/common/gpio/GpioCookie.h"
|
||||||
#include "fsfw_hal/linux/spi/SpiComIF.h"
|
#include "fsfw_hal/linux/spi/SpiComIF.h"
|
||||||
|
|
||||||
|
@ -33,10 +33,10 @@ CoreController::CoreController(object_id_t objectId)
|
|||||||
opDivider5(5),
|
opDivider5(5),
|
||||||
opDivider10(10),
|
opDivider10(10),
|
||||||
hkSet(this) {
|
hkSet(this) {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
try {
|
try {
|
||||||
result = initWatchdogFifo();
|
result = initWatchdogFifo();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "CoreController::CoreController: Watchdog FIFO init failed" << std::endl;
|
sif::warning << "CoreController::CoreController: Watchdog FIFO init failed" << std::endl;
|
||||||
}
|
}
|
||||||
sdcMan = SdCardManager::instance();
|
sdcMan = SdCardManager::instance();
|
||||||
@ -50,7 +50,7 @@ CoreController::CoreController(object_id_t objectId)
|
|||||||
sdStateMachine();
|
sdStateMachine();
|
||||||
|
|
||||||
result = initBootCopy();
|
result = initBootCopy();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "CoreController::CoreController: Boot copy init" << std::endl;
|
sif::warning << "CoreController::CoreController: Boot copy init" << std::endl;
|
||||||
}
|
}
|
||||||
} catch (const std::filesystem::filesystem_error &e) {
|
} catch (const std::filesystem::filesystem_error &e) {
|
||||||
@ -66,7 +66,7 @@ ReturnValue_t CoreController::handleCommandMessage(CommandMessage *message) {
|
|||||||
|
|
||||||
void CoreController::performControlOperation() {
|
void CoreController::performControlOperation() {
|
||||||
EventMessage event;
|
EventMessage event;
|
||||||
for (ReturnValue_t result = eventQueue->receiveMessage(&event); result == RETURN_OK;
|
for (ReturnValue_t result = eventQueue->receiveMessage(&event); result == returnvalue::OK;
|
||||||
result = eventQueue->receiveMessage(&event)) {
|
result = eventQueue->receiveMessage(&event)) {
|
||||||
switch (event.getEvent()) {
|
switch (event.getEvent()) {
|
||||||
case (GpsHyperion::GPS_FIX_CHANGE): {
|
case (GpsHyperion::GPS_FIX_CHANGE): {
|
||||||
@ -92,8 +92,8 @@ ReturnValue_t CoreController::initializeLocalDataPool(localpool::DataPool &local
|
|||||||
localDataPoolMap.emplace(core::TEMPERATURE, new PoolEntry<float>({0}));
|
localDataPoolMap.emplace(core::TEMPERATURE, new PoolEntry<float>({0}));
|
||||||
localDataPoolMap.emplace(core::PS_VOLTAGE, new PoolEntry<float>({0}));
|
localDataPoolMap.emplace(core::PS_VOLTAGE, new PoolEntry<float>({0}));
|
||||||
localDataPoolMap.emplace(core::PL_VOLTAGE, new PoolEntry<float>({0}));
|
localDataPoolMap.emplace(core::PL_VOLTAGE, new PoolEntry<float>({0}));
|
||||||
poolManager.subscribeForPeriodicPacket(hkSet.getSid(), false, 10.0, false);
|
poolManager.subscribeForRegularPeriodicPacket({hkSet.getSid(), false, 10.0});
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalPoolDataSetBase *CoreController::getDataSetHandle(sid_t sid) {
|
LocalPoolDataSetBase *CoreController::getDataSetHandle(sid_t sid) {
|
||||||
@ -105,11 +105,11 @@ LocalPoolDataSetBase *CoreController::getDataSetHandle(sid_t sid) {
|
|||||||
|
|
||||||
ReturnValue_t CoreController::initialize() {
|
ReturnValue_t CoreController::initialize() {
|
||||||
ReturnValue_t result = ExtendedControllerBase::initialize();
|
ReturnValue_t result = ExtendedControllerBase::initialize();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "CoreController::initialize: Base init failed" << std::endl;
|
sif::warning << "CoreController::initialize: Base init failed" << std::endl;
|
||||||
}
|
}
|
||||||
result = scratch::writeNumber(scratch::ALLOC_FAILURE_COUNT, 0);
|
result = scratch::writeNumber(scratch::ALLOC_FAILURE_COUNT, 0);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "CoreController::initialize: Setting up alloc failure "
|
sif::warning << "CoreController::initialize: Setting up alloc failure "
|
||||||
"count failed"
|
"count failed"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
@ -126,31 +126,31 @@ ReturnValue_t CoreController::initialize() {
|
|||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
result = eventManager->registerListener(eventQueue->getId());
|
result = eventManager->registerListener(eventQueue->getId());
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "CoreController::initialize: Registering as event listener failed" << std::endl;
|
sif::warning << "CoreController::initialize: Registering as event listener failed" << std::endl;
|
||||||
}
|
}
|
||||||
result = eventManager->subscribeToEvent(eventQueue->getId(),
|
result = eventManager->subscribeToEvent(eventQueue->getId(),
|
||||||
event::getEventId(GpsHyperion::GPS_FIX_CHANGE));
|
event::getEventId(GpsHyperion::GPS_FIX_CHANGE));
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "Subscribing for GPS GPS_FIX_CHANGE event failed" << std::endl;
|
sif::warning << "Subscribing for GPS GPS_FIX_CHANGE event failed" << std::endl;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::initializeAfterTaskCreation() {
|
ReturnValue_t CoreController::initializeAfterTaskCreation() {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
sdInfo.pref = sdcMan->getPreferredSdCard();
|
sdInfo.pref = sdcMan->getPreferredSdCard();
|
||||||
sdcMan->setActiveSdCard(sdInfo.pref);
|
sdcMan->setActiveSdCard(sdInfo.pref);
|
||||||
currMntPrefix = sdcMan->getCurrentMountPrefix();
|
currMntPrefix = sdcMan->getCurrentMountPrefix();
|
||||||
if (BLOCKING_SD_INIT) {
|
if (BLOCKING_SD_INIT) {
|
||||||
ReturnValue_t result = initSdCardBlocking();
|
ReturnValue_t result = initSdCardBlocking();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK and result != SdCardManager::ALREADY_MOUNTED) {
|
if (result != returnvalue::OK and result != SdCardManager::ALREADY_MOUNTED) {
|
||||||
sif::warning << "CoreController::CoreController: SD card init failed" << std::endl;
|
sif::warning << "CoreController::CoreController: SD card init failed" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sdStateMachine();
|
sdStateMachine();
|
||||||
performMountedSdCardOperations();
|
performMountedSdCardOperations();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "CoreController::initialize: Version initialization failed" << std::endl;
|
sif::warning << "CoreController::initialize: Version initialization failed" << std::endl;
|
||||||
}
|
}
|
||||||
// Add script folder to path
|
// Add script folder to path
|
||||||
@ -236,22 +236,22 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
|
|
||||||
ReturnValue_t CoreController::checkModeCommand(Mode_t mode, Submode_t submode,
|
ReturnValue_t CoreController::checkModeCommand(Mode_t mode, Submode_t submode,
|
||||||
uint32_t *msToReachTheMode) {
|
uint32_t *msToReachTheMode) {
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::initSdCardBlocking() {
|
ReturnValue_t CoreController::initSdCardBlocking() {
|
||||||
// Create update status file
|
// Create update status file
|
||||||
ReturnValue_t result = sdcMan->updateSdCardStateFile();
|
ReturnValue_t result = sdcMan->updateSdCardStateFile();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "CoreController::initialize: Updating SD card state file failed" << std::endl;
|
sif::warning << "CoreController::initialize: Updating SD card state file failed" << std::endl;
|
||||||
}
|
}
|
||||||
#if Q7S_SD_CARD_CONFIG == Q7S_SD_NONE
|
#if Q7S_SD_CARD_CONFIG == Q7S_SD_NONE
|
||||||
sif::info << "No SD card initialization will be performed" << std::endl;
|
sif::info << "No SD card initialization will be performed" << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
result = sdcMan->getSdCardsStatus(sdInfo.currentState);
|
result = sdcMan->getSdCardsStatus(sdInfo.currentState);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "Getting SD card activity status failed" << std::endl;
|
sif::warning << "Getting SD card activity status failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,14 +269,14 @@ ReturnValue_t CoreController::initSdCardBlocking() {
|
|||||||
sdCardSetup(sd::SdCard::SLOT_1, sd::SdState::MOUNTED, "1", false);
|
sdCardSetup(sd::SdCard::SLOT_1, sd::SdState::MOUNTED, "1", false);
|
||||||
// Update status file
|
// Update status file
|
||||||
sdcMan->updateSdCardStateFile();
|
sdcMan->updateSdCardStateFile();
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* Q7S_SD_CARD_CONFIG != Q7S_SD_NONE */
|
#endif /* Q7S_SD_CARD_CONFIG != Q7S_SD_NONE */
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::sdStateMachine() {
|
ReturnValue_t CoreController::sdStateMachine() {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
SdCardManager::Operations operation;
|
SdCardManager::Operations operation;
|
||||||
|
|
||||||
if (sdInfo.state == SdStates::IDLE) {
|
if (sdInfo.state == SdStates::IDLE) {
|
||||||
@ -324,7 +324,7 @@ ReturnValue_t CoreController::sdStateMachine() {
|
|||||||
if (not sdInfo.commandExecuted) {
|
if (not sdInfo.commandExecuted) {
|
||||||
// Create update status file
|
// Create update status file
|
||||||
result = sdcMan->updateSdCardStateFile();
|
result = sdcMan->updateSdCardStateFile();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "CoreController::initialize: Updating SD card state file failed"
|
sif::warning << "CoreController::initialize: Updating SD card state file failed"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
@ -343,7 +343,7 @@ ReturnValue_t CoreController::sdStateMachine() {
|
|||||||
sif::warning << "Preferred SD card invalid. Setting to card 0.." << std::endl;
|
sif::warning << "Preferred SD card invalid. Setting to card 0.." << std::endl;
|
||||||
sdInfo.pref = sd::SdCard::SLOT_0;
|
sdInfo.pref = sd::SdCard::SLOT_0;
|
||||||
}
|
}
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "Getting SD card activity status failed" << std::endl;
|
sif::warning << "Getting SD card activity status failed" << std::endl;
|
||||||
}
|
}
|
||||||
#if Q7S_SD_CARD_CONFIG == Q7S_SD_COLD_REDUNDANT
|
#if Q7S_SD_CARD_CONFIG == Q7S_SD_COLD_REDUNDANT
|
||||||
@ -473,7 +473,7 @@ ReturnValue_t CoreController::sdStateMachine() {
|
|||||||
sdcMan->setBlocking(true);
|
sdcMan->setBlocking(true);
|
||||||
// Update status file
|
// Update status file
|
||||||
result = sdcMan->updateSdCardStateFile();
|
result = sdcMan->updateSdCardStateFile();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "CoreController::initialize: Updating SD card state file failed" << std::endl;
|
sif::warning << "CoreController::initialize: Updating SD card state file failed" << std::endl;
|
||||||
}
|
}
|
||||||
sdInfo.commandExecuted = false;
|
sdInfo.commandExecuted = false;
|
||||||
@ -497,7 +497,7 @@ ReturnValue_t CoreController::sdStateMachine() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sdInfo.cycleCount++;
|
sdInfo.cycleCount++;
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::executeNextExternalSdCommand() {
|
void CoreController::executeNextExternalSdCommand() {
|
||||||
@ -628,28 +628,28 @@ ReturnValue_t CoreController::sdCardSetup(sd::SdCard sdCard, sd::SdState targetS
|
|||||||
} else {
|
} else {
|
||||||
sif::warning << "CoreController::sdCardSetup: Invalid state for this call" << std::endl;
|
sif::warning << "CoreController::sdCardSetup: Invalid state for this call" << std::endl;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::sdColdRedundantBlockingInit() {
|
ReturnValue_t CoreController::sdColdRedundantBlockingInit() {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
|
||||||
result = sdCardSetup(sdInfo.pref, sd::SdState::MOUNTED, sdInfo.prefChar);
|
result = sdCardSetup(sdInfo.pref, sd::SdState::MOUNTED, sdInfo.prefChar);
|
||||||
if (result != SdCardManager::ALREADY_MOUNTED and result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != SdCardManager::ALREADY_MOUNTED and result != returnvalue::OK) {
|
||||||
sif::warning << "Setting up preferred card " << sdInfo.otherChar
|
sif::warning << "Setting up preferred card " << sdInfo.otherChar
|
||||||
<< " in cold redundant mode failed" << std::endl;
|
<< " in cold redundant mode failed" << std::endl;
|
||||||
// Try other SD card and mark set up operation as failed
|
// Try other SD card and mark set up operation as failed
|
||||||
sdCardSetup(sdInfo.pref, sd::SdState::MOUNTED, sdInfo.prefChar);
|
sdCardSetup(sdInfo.pref, sd::SdState::MOUNTED, sdInfo.prefChar);
|
||||||
result = HasReturnvaluesIF::RETURN_FAILED;
|
result = returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result != HasReturnvaluesIF::RETURN_FAILED and sdInfo.otherState != sd::SdState::OFF) {
|
if (result != returnvalue::FAILED and sdInfo.otherState != sd::SdState::OFF) {
|
||||||
sif::info << "Switching off secondary SD card " << sdInfo.otherChar << std::endl;
|
sif::info << "Switching off secondary SD card " << sdInfo.otherChar << std::endl;
|
||||||
// Switch off other SD card in cold redundant mode if setting up preferred one worked
|
// Switch off other SD card in cold redundant mode if setting up preferred one worked
|
||||||
// without issues
|
// without issues
|
||||||
ReturnValue_t result2 =
|
ReturnValue_t result2 =
|
||||||
sdcMan->switchOffSdCard(sdInfo.other, sdInfo.otherState, &sdInfo.currentState);
|
sdcMan->switchOffSdCard(sdInfo.other, sdInfo.otherState, &sdInfo.currentState);
|
||||||
if (result2 != HasReturnvaluesIF::RETURN_OK and result2 != SdCardManager::ALREADY_OFF) {
|
if (result2 != returnvalue::OK and result2 != SdCardManager::ALREADY_OFF) {
|
||||||
sif::warning << "Switching off secondary SD card " << sdInfo.otherChar
|
sif::warning << "Switching off secondary SD card " << sdInfo.otherChar
|
||||||
<< " in cold redundant mode failed" << std::endl;
|
<< " in cold redundant mode failed" << std::endl;
|
||||||
}
|
}
|
||||||
@ -660,7 +660,7 @@ ReturnValue_t CoreController::sdColdRedundantBlockingInit() {
|
|||||||
ReturnValue_t CoreController::incrementAllocationFailureCount() {
|
ReturnValue_t CoreController::incrementAllocationFailureCount() {
|
||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
ReturnValue_t result = scratch::readNumber(scratch::ALLOC_FAILURE_COUNT, count);
|
ReturnValue_t result = scratch::readNumber(scratch::ALLOC_FAILURE_COUNT, count);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
count++;
|
count++;
|
||||||
@ -698,7 +698,7 @@ ReturnValue_t CoreController::initVersionFile() {
|
|||||||
versionFile << fullObswVersionString << std::endl;
|
versionFile << fullObswVersionString << std::endl;
|
||||||
versionFile << fullFsfwVersionString << std::endl;
|
versionFile << fullFsfwVersionString << std::endl;
|
||||||
versionFile << systemString << std::endl;
|
versionFile << systemString << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check whether any version has changed
|
// Check whether any version has changed
|
||||||
@ -745,7 +745,7 @@ ReturnValue_t CoreController::initVersionFile() {
|
|||||||
versionFile << systemString << std::endl;
|
versionFile << systemString << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::actionListDirectoryIntoFile(ActionId_t actionId,
|
ReturnValue_t CoreController::actionListDirectoryIntoFile(ActionId_t actionId,
|
||||||
@ -800,7 +800,7 @@ ReturnValue_t CoreController::actionListDirectoryIntoFile(ActionId_t actionId,
|
|||||||
utility::handleSystemError(result, "CoreController::actionListDirectoryIntoFile");
|
utility::handleSystemError(result, "CoreController::actionListDirectoryIntoFile");
|
||||||
actionHelper.finish(false, commandedBy, actionId);
|
actionHelper.finish(false, commandedBy, actionId);
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::initBootCopy() {
|
ReturnValue_t CoreController::initBootCopy() {
|
||||||
@ -815,7 +815,7 @@ ReturnValue_t CoreController::initBootCopy() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getCurrentBootCopy(CURRENT_CHIP, CURRENT_COPY);
|
getCurrentBootCopy(CURRENT_CHIP, CURRENT_COPY);
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::getCurrentBootCopy(xsc::Chip &chip, xsc::Copy ©) {
|
void CoreController::getCurrentBootCopy(xsc::Chip &chip, xsc::Copy ©) {
|
||||||
@ -829,10 +829,10 @@ void CoreController::getCurrentBootCopy(xsc::Chip &chip, xsc::Copy ©) {
|
|||||||
|
|
||||||
ReturnValue_t CoreController::initWatchdogFifo() {
|
ReturnValue_t CoreController::initWatchdogFifo() {
|
||||||
if (not std::filesystem::exists(watchdog::FIFO_NAME)) {
|
if (not std::filesystem::exists(watchdog::FIFO_NAME)) {
|
||||||
// Still return RETURN_OK for now
|
// Still return returnvalue::OK for now
|
||||||
sif::info << "Watchdog FIFO " << watchdog::FIFO_NAME << " does not exist, can't initiate"
|
sif::info << "Watchdog FIFO " << watchdog::FIFO_NAME << " does not exist, can't initiate"
|
||||||
<< " watchdog" << std::endl;
|
<< " watchdog" << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
// Open FIFO write only and non-blocking to prevent SW from killing itself.
|
// Open FIFO write only and non-blocking to prevent SW from killing itself.
|
||||||
watchdogFifoFd = open(watchdog::FIFO_NAME.c_str(), O_WRONLY | O_NONBLOCK);
|
watchdogFifoFd = open(watchdog::FIFO_NAME.c_str(), O_WRONLY | O_NONBLOCK);
|
||||||
@ -843,10 +843,10 @@ ReturnValue_t CoreController::initWatchdogFifo() {
|
|||||||
} else {
|
} else {
|
||||||
sif::error << "Opening pipe " << watchdog::FIFO_NAME << " write-only failed with " << errno
|
sif::error << "Opening pipe " << watchdog::FIFO_NAME << " write-only failed with " << errno
|
||||||
<< ": " << strerror(errno) << std::endl;
|
<< ": " << strerror(errno) << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::initPrint() {
|
void CoreController::initPrint() {
|
||||||
@ -872,7 +872,7 @@ ReturnValue_t CoreController::actionXscReboot(const uint8_t *data, size_t size)
|
|||||||
int result = std::system("xsc_boot_copy -r");
|
int result = std::system("xsc_boot_copy -r");
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
utility::handleSystemError(result, "CoreController::executeAction");
|
utility::handleSystemError(result, "CoreController::executeAction");
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return HasActionsIF::EXECUTION_FINISHED;
|
return HasActionsIF::EXECUTION_FINISHED;
|
||||||
}
|
}
|
||||||
@ -929,14 +929,14 @@ ReturnValue_t CoreController::actionXscReboot(const uint8_t *data, size_t size)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::actionReboot(const uint8_t *data, size_t size) {
|
ReturnValue_t CoreController::actionReboot(const uint8_t *data, size_t size) {
|
||||||
bool protOpPerformed = false;
|
bool protOpPerformed = false;
|
||||||
gracefulShutdownTasks(xsc::Chip::CHIP_0, xsc::Copy::COPY_0, protOpPerformed);
|
gracefulShutdownTasks(xsc::Chip::CHIP_0, xsc::Copy::COPY_0, protOpPerformed);
|
||||||
std::system("reboot");
|
std::system("reboot");
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::gracefulShutdownTasks(xsc::Chip chip, xsc::Copy copy,
|
ReturnValue_t CoreController::gracefulShutdownTasks(xsc::Chip chip, xsc::Copy copy,
|
||||||
@ -948,7 +948,7 @@ ReturnValue_t CoreController::gracefulShutdownTasks(xsc::Chip chip, xsc::Copy co
|
|||||||
// If any boot copies are unprotected
|
// If any boot copies are unprotected
|
||||||
ReturnValue_t result = setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, true,
|
ReturnValue_t result = setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, true,
|
||||||
protOpPerformed, false);
|
protOpPerformed, false);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK and protOpPerformed) {
|
if (result == returnvalue::OK and protOpPerformed) {
|
||||||
// TODO: Would be nice to notify operator. But we can't use the filesystem anymore
|
// TODO: Would be nice to notify operator. But we can't use the filesystem anymore
|
||||||
// and a reboot is imminent. Use scratch buffer?
|
// and a reboot is imminent. Use scratch buffer?
|
||||||
sif::info << "Running slot was writeprotected before reboot" << std::endl;
|
sif::info << "Running slot was writeprotected before reboot" << std::endl;
|
||||||
@ -983,9 +983,9 @@ ReturnValue_t CoreController::generateChipStateFile() {
|
|||||||
int result = std::system(CHIP_PROT_SCRIPT);
|
int result = std::system(CHIP_PROT_SCRIPT);
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
utility::handleSystemError(result, "CoreController::generateChipStateFile");
|
utility::handleSystemError(result, "CoreController::generateChipStateFile");
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::setBootCopyProtection(xsc::Chip targetChip, xsc::Copy targetCopy,
|
ReturnValue_t CoreController::setBootCopyProtection(xsc::Chip targetChip, xsc::Copy targetCopy,
|
||||||
@ -1003,7 +1003,7 @@ ReturnValue_t CoreController::setBootCopyProtection(xsc::Chip targetChip, xsc::C
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (xsc::Chip::NO_CHIP): {
|
case (xsc::Chip::NO_CHIP): {
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
case (xsc::Chip::SELF_CHIP): {
|
case (xsc::Chip::SELF_CHIP): {
|
||||||
selfChip = true;
|
selfChip = true;
|
||||||
@ -1020,7 +1020,7 @@ ReturnValue_t CoreController::setBootCopyProtection(xsc::Chip targetChip, xsc::C
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (xsc::Copy::NO_COPY): {
|
case (xsc::Copy::NO_COPY): {
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
case (xsc::Copy::SELF_COPY): {
|
case (xsc::Copy::SELF_COPY): {
|
||||||
selfCopy = true;
|
selfCopy = true;
|
||||||
@ -1042,7 +1042,7 @@ ReturnValue_t CoreController::setBootCopyProtection(xsc::Chip targetChip, xsc::C
|
|||||||
if (protOperationPerformed and updateProtFile) {
|
if (protOperationPerformed and updateProtFile) {
|
||||||
updateProtInfo();
|
updateProtInfo();
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CoreController::handleBootCopyProtAtIndex(xsc::Chip targetChip, xsc::Copy targetCopy,
|
int CoreController::handleBootCopyProtAtIndex(xsc::Chip targetChip, xsc::Copy targetCopy,
|
||||||
@ -1130,28 +1130,28 @@ int CoreController::handleBootCopyProtAtIndex(xsc::Chip targetChip, xsc::Copy ta
|
|||||||
|
|
||||||
ReturnValue_t CoreController::updateProtInfo(bool regenerateChipStateFile) {
|
ReturnValue_t CoreController::updateProtInfo(bool regenerateChipStateFile) {
|
||||||
using namespace std;
|
using namespace std;
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
if (regenerateChipStateFile) {
|
if (regenerateChipStateFile) {
|
||||||
result = generateChipStateFile();
|
result = generateChipStateFile();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "CoreController::updateProtInfo: Generating chip state file failed"
|
sif::warning << "CoreController::updateProtInfo: Generating chip state file failed"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (not filesystem::exists(CHIP_STATE_FILE)) {
|
if (not filesystem::exists(CHIP_STATE_FILE)) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
ifstream chipStateFile(CHIP_STATE_FILE);
|
ifstream chipStateFile(CHIP_STATE_FILE);
|
||||||
if (not chipStateFile.good()) {
|
if (not chipStateFile.good()) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
string nextLine;
|
string nextLine;
|
||||||
uint8_t lineCounter = 0;
|
uint8_t lineCounter = 0;
|
||||||
string word;
|
string word;
|
||||||
while (getline(chipStateFile, nextLine)) {
|
while (getline(chipStateFile, nextLine)) {
|
||||||
ReturnValue_t result = handleProtInfoUpdateLine(nextLine);
|
ReturnValue_t result = handleProtInfoUpdateLine(nextLine);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "CoreController::updateProtInfo: Protection info update failed!" << std::endl;
|
sif::warning << "CoreController::updateProtInfo: Protection info update failed!" << std::endl;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1162,7 +1162,7 @@ ReturnValue_t CoreController::updateProtInfo(bool regenerateChipStateFile) {
|
|||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::handleProtInfoUpdateLine(std::string nextLine) {
|
ReturnValue_t CoreController::handleProtInfoUpdateLine(std::string nextLine) {
|
||||||
@ -1207,7 +1207,7 @@ ReturnValue_t CoreController::handleProtInfoUpdateLine(std::string nextLine) {
|
|||||||
}
|
}
|
||||||
wordIdx++;
|
wordIdx++;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::performWatchdogControlOperation() {
|
void CoreController::performWatchdogControlOperation() {
|
||||||
@ -1274,7 +1274,7 @@ ReturnValue_t CoreController::performSdCardCheck() {
|
|||||||
sdcMan->getSdCardsStatus(active);
|
sdcMan->getSdCardsStatus(active);
|
||||||
auto sdCardCheck = [&](sd::SdCard sdCard) {
|
auto sdCardCheck = [&](sd::SdCard sdCard) {
|
||||||
ReturnValue_t result = sdcMan->isSdCardMountedReadOnly(sdCard, mountedReadOnly);
|
ReturnValue_t result = sdcMan->isSdCardMountedReadOnly(sdCard, mountedReadOnly);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "CoreController::performSdCardCheck: Could not check "
|
sif::error << "CoreController::performSdCardCheck: Could not check "
|
||||||
"read-only mount state"
|
"read-only mount state"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
@ -1283,13 +1283,13 @@ ReturnValue_t CoreController::performSdCardCheck() {
|
|||||||
if (mountedReadOnly) {
|
if (mountedReadOnly) {
|
||||||
int linuxErrno = 0;
|
int linuxErrno = 0;
|
||||||
result = sdcMan->performFsck(sdCard, true, linuxErrno);
|
result = sdcMan->performFsck(sdCard, true, linuxErrno);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "CoreController::performSdCardCheck: fsck command on SD Card "
|
sif::error << "CoreController::performSdCardCheck: fsck command on SD Card "
|
||||||
<< static_cast<uint8_t>(sdCard) << " failed with code " << linuxErrno << " | "
|
<< static_cast<uint8_t>(sdCard) << " failed with code " << linuxErrno << " | "
|
||||||
<< strerror(linuxErrno);
|
<< strerror(linuxErrno);
|
||||||
}
|
}
|
||||||
result = sdcMan->remountReadWrite(sdCard);
|
result = sdcMan->remountReadWrite(sdCard);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
sif::warning << "CoreController::performSdCardCheck: Remounted SD Card "
|
sif::warning << "CoreController::performSdCardCheck: Remounted SD Card "
|
||||||
<< static_cast<uint8_t>(sdCard) << " read-write";
|
<< static_cast<uint8_t>(sdCard) << " read-write";
|
||||||
} else {
|
} else {
|
||||||
@ -1305,7 +1305,7 @@ ReturnValue_t CoreController::performSdCardCheck() {
|
|||||||
sdCardCheck(sd::SdCard::SLOT_1);
|
sdCardCheck(sd::SdCard::SLOT_1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::performRebootFileHandling(bool recreateFile) {
|
void CoreController::performRebootFileHandling(bool recreateFile) {
|
||||||
@ -1759,7 +1759,7 @@ ReturnValue_t CoreController::timeFileHandler() {
|
|||||||
// It is assumed that the system time is set from the GPS time
|
// It is assumed that the system time is set from the GPS time
|
||||||
timeval currentTime = {};
|
timeval currentTime = {};
|
||||||
ReturnValue_t result = Clock::getClock_timeval(¤tTime);
|
ReturnValue_t result = Clock::getClock_timeval(¤tTime);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
std::string fileName = currMntPrefix + TIME_FILE;
|
std::string fileName = currMntPrefix + TIME_FILE;
|
||||||
@ -1767,11 +1767,11 @@ ReturnValue_t CoreController::timeFileHandler() {
|
|||||||
if (not timeFile.good()) {
|
if (not timeFile.good()) {
|
||||||
sif::error << "CoreController::timeFileHandler: Error opening time file: " << strerror(errno)
|
sif::error << "CoreController::timeFileHandler: Error opening time file: " << strerror(errno)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
timeFile << "UNIX SECONDS: " << currentTime.tv_sec << std::endl;
|
timeFile << "UNIX SECONDS: " << currentTime.tv_sec << std::endl;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::initClockFromTimeFile() {
|
ReturnValue_t CoreController::initClockFromTimeFile() {
|
||||||
@ -1787,18 +1787,18 @@ ReturnValue_t CoreController::initClockFromTimeFile() {
|
|||||||
istringstream iss(nextWord);
|
istringstream iss(nextWord);
|
||||||
iss >> nextWord;
|
iss >> nextWord;
|
||||||
if (iss.bad() or nextWord != "UNIX") {
|
if (iss.bad() or nextWord != "UNIX") {
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
iss >> nextWord;
|
iss >> nextWord;
|
||||||
if (iss.bad() or nextWord != "SECONDS:") {
|
if (iss.bad() or nextWord != "SECONDS:") {
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
iss >> nextWord;
|
iss >> nextWord;
|
||||||
timeval currentTime = {};
|
timeval currentTime = {};
|
||||||
char *checkPtr;
|
char *checkPtr;
|
||||||
currentTime.tv_sec = strtol(nextWord.c_str(), &checkPtr, 10);
|
currentTime.tv_sec = strtol(nextWord.c_str(), &checkPtr, 10);
|
||||||
if (iss.bad() or *checkPtr) {
|
if (iss.bad() or *checkPtr) {
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
#if OBSW_VERBOSE_LEVEL >= 1
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
time_t timeRaw = currentTime.tv_sec;
|
time_t timeRaw = currentTime.tv_sec;
|
||||||
@ -1808,30 +1808,30 @@ ReturnValue_t CoreController::initClockFromTimeFile() {
|
|||||||
#endif
|
#endif
|
||||||
return Clock::setClock(¤tTime);
|
return Clock::setClock(¤tTime);
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::readHkData() {
|
void CoreController::readHkData() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
result = hkSet.read(TIMEOUT_TYPE, MUTEX_TIMEOUT);
|
result = hkSet.read(TIMEOUT_TYPE, MUTEX_TIMEOUT);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Xadc xadc;
|
Xadc xadc;
|
||||||
result = xadc.getTemperature(hkSet.temperature.value);
|
result = xadc.getTemperature(hkSet.temperature.value);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
hkSet.temperature.setValid(false);
|
hkSet.temperature.setValid(false);
|
||||||
} else {
|
} else {
|
||||||
hkSet.temperature.setValid(true);
|
hkSet.temperature.setValid(true);
|
||||||
}
|
}
|
||||||
result = xadc.getVccPint(hkSet.psVoltage.value);
|
result = xadc.getVccPint(hkSet.psVoltage.value);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
hkSet.psVoltage.setValid(false);
|
hkSet.psVoltage.setValid(false);
|
||||||
} else {
|
} else {
|
||||||
hkSet.psVoltage.setValid(true);
|
hkSet.psVoltage.setValid(true);
|
||||||
}
|
}
|
||||||
result = xadc.getVccInt(hkSet.plVoltage.value);
|
result = xadc.getVccInt(hkSet.plVoltage.value);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
hkSet.plVoltage.setValid(false);
|
hkSet.plVoltage.setValid(false);
|
||||||
} else {
|
} else {
|
||||||
hkSet.plVoltage.setValid(true);
|
hkSet.plVoltage.setValid(true);
|
||||||
@ -1840,7 +1840,7 @@ void CoreController::readHkData() {
|
|||||||
hkSet.printSet();
|
hkSet.printSet();
|
||||||
#endif /* OBSW_PRINT_CORE_HK == 1 */
|
#endif /* OBSW_PRINT_CORE_HK == 1 */
|
||||||
result = hkSet.commit(TIMEOUT_TYPE, MUTEX_TIMEOUT);
|
result = hkSet.commit(TIMEOUT_TYPE, MUTEX_TIMEOUT);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "fsfw/objectmanager/ObjectManager.h"
|
#include "fsfw/objectmanager/ObjectManager.h"
|
||||||
#include "fsfw/objectmanager/ObjectManagerIF.h"
|
#include "fsfw/objectmanager/ObjectManagerIF.h"
|
||||||
#include "fsfw/platform.h"
|
#include "fsfw/platform.h"
|
||||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
#include "fsfw/serviceinterface/ServiceInterfaceStream.h"
|
#include "fsfw/serviceinterface/ServiceInterfaceStream.h"
|
||||||
#include "fsfw/tasks/FixedTimeslotTaskIF.h"
|
#include "fsfw/tasks/FixedTimeslotTaskIF.h"
|
||||||
#include "fsfw/tasks/PeriodicTaskIF.h"
|
#include "fsfw/tasks/PeriodicTaskIF.h"
|
||||||
@ -55,7 +55,7 @@ void initmission::initMission() {
|
|||||||
|
|
||||||
void initmission::initTasks() {
|
void initmission::initTasks() {
|
||||||
TaskFactory* factory = TaskFactory::instance();
|
TaskFactory* factory = TaskFactory::instance();
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
if (factory == nullptr) {
|
if (factory == nullptr) {
|
||||||
/* Should never happen ! */
|
/* Should never happen ! */
|
||||||
return;
|
return;
|
||||||
@ -69,7 +69,7 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* coreController = factory->createPeriodicTask(
|
PeriodicTaskIF* coreController = factory->createPeriodicTask(
|
||||||
"CORE_CTRL", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
"CORE_CTRL", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
||||||
result = coreController->addComponent(objects::CORE_CONTROLLER);
|
result = coreController->addComponent(objects::CORE_CONTROLLER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("CORE_CTRL", objects::CORE_CONTROLLER);
|
initmission::printAddObjectError("CORE_CTRL", objects::CORE_CONTROLLER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,15 +77,15 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
|
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
|
||||||
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
result = tmTcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
|
result = tmTcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("CCSDS_DISTRIB", objects::CCSDS_PACKET_DISTRIBUTOR);
|
initmission::printAddObjectError("CCSDS_DISTRIB", objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||||
}
|
}
|
||||||
result = tmTcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
|
result = tmTcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_PACKET_DISTRIB", objects::PUS_PACKET_DISTRIBUTOR);
|
initmission::printAddObjectError("PUS_PACKET_DISTRIB", objects::PUS_PACKET_DISTRIBUTOR);
|
||||||
}
|
}
|
||||||
result = tmTcDistributor->addComponent(objects::TM_FUNNEL);
|
result = tmTcDistributor->addComponent(objects::TM_FUNNEL);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("TM_FUNNEL", objects::TM_FUNNEL);
|
initmission::printAddObjectError("TM_FUNNEL", objects::TM_FUNNEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,13 +94,13 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
|
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
|
||||||
"TCPIP_TMTC_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"TCPIP_TMTC_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
|
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("TMTC_BRIDGE", objects::TMTC_BRIDGE);
|
initmission::printAddObjectError("TMTC_BRIDGE", objects::TMTC_BRIDGE);
|
||||||
}
|
}
|
||||||
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
|
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
|
||||||
"TMTC_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
"TMTC_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||||
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
|
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("UDP_POLLING", objects::TMTC_POLLING_TASK);
|
initmission::printAddObjectError("UDP_POLLING", objects::TMTC_POLLING_TASK);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -109,7 +109,7 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* ccsdsHandlerTask = factory->createPeriodicTask(
|
PeriodicTaskIF* ccsdsHandlerTask = factory->createPeriodicTask(
|
||||||
"CCSDS_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
"CCSDS_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||||
result = ccsdsHandlerTask->addComponent(objects::CCSDS_HANDLER);
|
result = ccsdsHandlerTask->addComponent(objects::CCSDS_HANDLER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("CCSDS Handler", objects::CCSDS_HANDLER);
|
initmission::printAddObjectError("CCSDS Handler", objects::CCSDS_HANDLER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* pdecHandlerTask = factory->createPeriodicTask(
|
PeriodicTaskIF* pdecHandlerTask = factory->createPeriodicTask(
|
||||||
"PDEC_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
"PDEC_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||||
result = pdecHandlerTask->addComponent(objects::PDEC_HANDLER);
|
result = pdecHandlerTask->addComponent(objects::PDEC_HANDLER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PDEC Handler", objects::PDEC_HANDLER);
|
initmission::printAddObjectError("PDEC Handler", objects::PDEC_HANDLER);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
|
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
|
||||||
@ -128,29 +128,34 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* acsTask = factory->createPeriodicTask(
|
PeriodicTaskIF* acsTask = factory->createPeriodicTask(
|
||||||
"ACS_TASK", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
"ACS_TASK", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||||
result = acsTask->addComponent(objects::GPS_CONTROLLER);
|
result = acsTask->addComponent(objects::GPS_CONTROLLER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("GPS_CTRL", objects::GPS_CONTROLLER);
|
initmission::printAddObjectError("GPS_CTRL", objects::GPS_CONTROLLER);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_ACS_HANDLERS */
|
#endif /* OBSW_ADD_ACS_HANDLERS */
|
||||||
|
|
||||||
|
acsTask->addComponent(objects::ACS_CONTROLLER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
initmission::printAddObjectError("ACS_CTRL", objects::ACS_CONTROLLER);
|
||||||
|
}
|
||||||
|
|
||||||
PeriodicTaskIF* sysTask = factory->createPeriodicTask(
|
PeriodicTaskIF* sysTask = factory->createPeriodicTask(
|
||||||
"SYS_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
"SYS_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||||
static_cast<void>(sysTask);
|
static_cast<void>(sysTask);
|
||||||
#if OBSW_ADD_ACS_HANDLERS == 1
|
#if OBSW_ADD_ACS_HANDLERS == 1
|
||||||
result = sysTask->addComponent(objects::ACS_BOARD_ASS);
|
result = sysTask->addComponent(objects::ACS_BOARD_ASS);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("ACS_BOARD_ASS", objects::ACS_BOARD_ASS);
|
initmission::printAddObjectError("ACS_BOARD_ASS", objects::ACS_BOARD_ASS);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_ACS_HANDLERS */
|
#endif /* OBSW_ADD_ACS_HANDLERS */
|
||||||
#if OBSW_ADD_RW == 1
|
#if OBSW_ADD_RW == 1
|
||||||
result = sysTask->addComponent(objects::RW_ASS);
|
result = sysTask->addComponent(objects::RW_ASS);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("RW_ASS", objects::RW_ASS);
|
initmission::printAddObjectError("RW_ASS", objects::RW_ASS);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if OBSW_ADD_SUS_BOARD_ASS == 1
|
#if OBSW_ADD_SUS_BOARD_ASS == 1
|
||||||
result = sysTask->addComponent(objects::SUS_BOARD_ASS);
|
result = sysTask->addComponent(objects::SUS_BOARD_ASS);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("SUS_BOARD_ASS", objects::SUS_BOARD_ASS);
|
initmission::printAddObjectError("SUS_BOARD_ASS", objects::SUS_BOARD_ASS);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -163,7 +168,7 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* tcsPollingTask = factory->createPeriodicTask(
|
PeriodicTaskIF* tcsPollingTask = factory->createPeriodicTask(
|
||||||
"TCS_POLLING_TASK", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.5, missedDeadlineFunc);
|
"TCS_POLLING_TASK", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.5, missedDeadlineFunc);
|
||||||
result = tcsPollingTask->addComponent(objects::SPI_RTD_COM_IF);
|
result = tcsPollingTask->addComponent(objects::SPI_RTD_COM_IF);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("SPI_RTD_POLLING", objects::SPI_RTD_COM_IF);
|
initmission::printAddObjectError("SPI_RTD_POLLING", objects::SPI_RTD_COM_IF);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,7 +208,7 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* fsTask = factory->createPeriodicTask(
|
PeriodicTaskIF* fsTask = factory->createPeriodicTask(
|
||||||
"FILE_SYSTEM_TASK", 25, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
"FILE_SYSTEM_TASK", 25, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
||||||
result = fsTask->addComponent(objects::FILE_SYSTEM_HANDLER);
|
result = fsTask->addComponent(objects::FILE_SYSTEM_HANDLER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("FILE_SYSTEM_TASK", objects::FILE_SYSTEM_HANDLER);
|
initmission::printAddObjectError("FILE_SYSTEM_TASK", objects::FILE_SYSTEM_HANDLER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,7 +216,7 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* strHelperTask = factory->createPeriodicTask(
|
PeriodicTaskIF* strHelperTask = factory->createPeriodicTask(
|
||||||
"STR_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"STR_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
result = strHelperTask->addComponent(objects::STR_HELPER);
|
result = strHelperTask->addComponent(objects::STR_HELPER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("STR_HELPER", objects::STR_HELPER);
|
initmission::printAddObjectError("STR_HELPER", objects::STR_HELPER);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||||
@ -220,7 +225,7 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* mpsocHelperTask = factory->createPeriodicTask(
|
PeriodicTaskIF* mpsocHelperTask = factory->createPeriodicTask(
|
||||||
"PLOC_MPSOC_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"PLOC_MPSOC_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
result = mpsocHelperTask->addComponent(objects::PLOC_MPSOC_HELPER);
|
result = mpsocHelperTask->addComponent(objects::PLOC_MPSOC_HELPER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PLOC_MPSOC_HELPER", objects::PLOC_MPSOC_HELPER);
|
initmission::printAddObjectError("PLOC_MPSOC_HELPER", objects::PLOC_MPSOC_HELPER);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_PLOC_MPSOC */
|
#endif /* OBSW_ADD_PLOC_MPSOC */
|
||||||
@ -229,7 +234,7 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* supvHelperTask = factory->createPeriodicTask(
|
PeriodicTaskIF* supvHelperTask = factory->createPeriodicTask(
|
||||||
"PLOC_SUPV_HELPER", 10, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
"PLOC_SUPV_HELPER", 10, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||||
result = supvHelperTask->addComponent(objects::PLOC_SUPERVISOR_HELPER);
|
result = supvHelperTask->addComponent(objects::PLOC_SUPERVISOR_HELPER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PLOC_SUPV_HELPER", objects::PLOC_SUPERVISOR_HELPER);
|
initmission::printAddObjectError("PLOC_SUPV_HELPER", objects::PLOC_SUPERVISOR_HELPER);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_PLOC_SUPERVISOR */
|
#endif /* OBSW_ADD_PLOC_SUPERVISOR */
|
||||||
@ -238,7 +243,7 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* ptmeTestTask = factory->createPeriodicTask(
|
PeriodicTaskIF* ptmeTestTask = factory->createPeriodicTask(
|
||||||
"PTME_TEST", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
"PTME_TEST", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||||
result = ptmeTestTask->addComponent(objects::CCSDS_IP_CORE_BRIDGE);
|
result = ptmeTestTask->addComponent(objects::CCSDS_IP_CORE_BRIDGE);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PTME_TEST", objects::CCSDS_IP_CORE_BRIDGE);
|
initmission::printAddObjectError("PTME_TEST", objects::CCSDS_IP_CORE_BRIDGE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -310,13 +315,13 @@ void initmission::initTasks() {
|
|||||||
void initmission::createPstTasks(TaskFactory& factory,
|
void initmission::createPstTasks(TaskFactory& factory,
|
||||||
TaskDeadlineMissedFunction missedDeadlineFunc,
|
TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||||
std::vector<PeriodicTaskIF*>& taskVec) {
|
std::vector<PeriodicTaskIF*>& taskVec) {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
/* Polling Sequence Table Default */
|
/* Polling Sequence Table Default */
|
||||||
#if OBSW_ADD_SPI_TEST_CODE == 0
|
#if OBSW_ADD_SPI_TEST_CODE == 0
|
||||||
FixedTimeslotTaskIF* spiPst = factory.createFixedTimeslotTask(
|
FixedTimeslotTaskIF* spiPst = factory.createFixedTimeslotTask(
|
||||||
"MAIN_SPI", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
|
"MAIN_SPI", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
|
||||||
result = pst::pstSpi(spiPst);
|
result = pst::pstSpi(spiPst);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||||
sif::warning << "InitMission::initTasks: SPI PST is empty" << std::endl;
|
sif::warning << "InitMission::initTasks: SPI PST is empty" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
@ -331,7 +336,7 @@ void initmission::createPstTasks(TaskFactory& factory,
|
|||||||
FixedTimeslotTaskIF* rwPstTask = factory.createFixedTimeslotTask(
|
FixedTimeslotTaskIF* rwPstTask = factory.createFixedTimeslotTask(
|
||||||
"RW_SPI", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 1.0, missedDeadlineFunc);
|
"RW_SPI", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 1.0, missedDeadlineFunc);
|
||||||
result = pst::pstSpiRw(rwPstTask);
|
result = pst::pstSpiRw(rwPstTask);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||||
sif::warning << "InitMission::initTasks: SPI PST is empty" << std::endl;
|
sif::warning << "InitMission::initTasks: SPI PST is empty" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
@ -345,7 +350,7 @@ void initmission::createPstTasks(TaskFactory& factory,
|
|||||||
FixedTimeslotTaskIF* uartPst = factory.createFixedTimeslotTask(
|
FixedTimeslotTaskIF* uartPst = factory.createFixedTimeslotTask(
|
||||||
"UART_PST", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
|
"UART_PST", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
|
||||||
result = pst::pstUart(uartPst);
|
result = pst::pstUart(uartPst);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||||
sif::warning << "InitMission::initTasks: UART PST is empty" << std::endl;
|
sif::warning << "InitMission::initTasks: UART PST is empty" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
@ -358,7 +363,7 @@ void initmission::createPstTasks(TaskFactory& factory,
|
|||||||
FixedTimeslotTaskIF* gpioPst = factory.createFixedTimeslotTask(
|
FixedTimeslotTaskIF* gpioPst = factory.createFixedTimeslotTask(
|
||||||
"GPIO_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.2, missedDeadlineFunc);
|
"GPIO_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.2, missedDeadlineFunc);
|
||||||
result = pst::pstGpio(gpioPst);
|
result = pst::pstGpio(gpioPst);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||||
sif::warning << "InitMission::initTasks: GPIO PST is empty" << std::endl;
|
sif::warning << "InitMission::initTasks: GPIO PST is empty" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
@ -371,7 +376,7 @@ void initmission::createPstTasks(TaskFactory& factory,
|
|||||||
FixedTimeslotTaskIF* i2cPst = factory.createFixedTimeslotTask(
|
FixedTimeslotTaskIF* i2cPst = factory.createFixedTimeslotTask(
|
||||||
"I2C_PST", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
|
"I2C_PST", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
|
||||||
result = pst::pstI2c(i2cPst);
|
result = pst::pstI2c(i2cPst);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||||
sif::warning << "InitMission::initTasks: I2C PST is empty" << std::endl;
|
sif::warning << "InitMission::initTasks: I2C PST is empty" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
@ -386,7 +391,7 @@ void initmission::createPstTasks(TaskFactory& factory,
|
|||||||
FixedTimeslotTaskIF* gomSpacePstTask = factory.createFixedTimeslotTask(
|
FixedTimeslotTaskIF* gomSpacePstTask = factory.createFixedTimeslotTask(
|
||||||
"GS_PST_TASK", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 1.0, missedDeadlineFunc);
|
"GS_PST_TASK", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 1.0, missedDeadlineFunc);
|
||||||
result = pst::pstGompaceCan(gomSpacePstTask);
|
result = pst::pstGompaceCan(gomSpacePstTask);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (result != FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
if (result != FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||||
sif::error << "InitMission::initTasks: GomSpace PST initialization failed!" << std::endl;
|
sif::error << "InitMission::initTasks: GomSpace PST initialization failed!" << std::endl;
|
||||||
}
|
}
|
||||||
@ -398,12 +403,12 @@ void initmission::createPstTasks(TaskFactory& factory,
|
|||||||
void initmission::createPusTasks(TaskFactory& factory,
|
void initmission::createPusTasks(TaskFactory& factory,
|
||||||
TaskDeadlineMissedFunction missedDeadlineFunc,
|
TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||||
std::vector<PeriodicTaskIF*>& taskVec) {
|
std::vector<PeriodicTaskIF*>& taskVec) {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
/* PUS Services */
|
/* PUS Services */
|
||||||
PeriodicTaskIF* pusVerification = factory.createPeriodicTask(
|
PeriodicTaskIF* pusVerification = factory.createPeriodicTask(
|
||||||
"PUS_VERIF", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
"PUS_VERIF", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
result = pusVerification->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
|
result = pusVerification->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_VERIF", objects::PUS_SERVICE_1_VERIFICATION);
|
initmission::printAddObjectError("PUS_VERIF", objects::PUS_SERVICE_1_VERIFICATION);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusVerification);
|
taskVec.push_back(pusVerification);
|
||||||
@ -411,11 +416,11 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
PeriodicTaskIF* pusEvents = factory.createPeriodicTask(
|
PeriodicTaskIF* pusEvents = factory.createPeriodicTask(
|
||||||
"PUS_EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
"PUS_EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
result = pusEvents->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
|
result = pusEvents->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_EVENTS", objects::PUS_SERVICE_5_EVENT_REPORTING);
|
initmission::printAddObjectError("PUS_EVENTS", objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||||
}
|
}
|
||||||
result = pusEvents->addComponent(objects::EVENT_MANAGER);
|
result = pusEvents->addComponent(objects::EVENT_MANAGER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_MGMT", objects::EVENT_MANAGER);
|
initmission::printAddObjectError("PUS_MGMT", objects::EVENT_MANAGER);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusEvents);
|
taskVec.push_back(pusEvents);
|
||||||
@ -423,11 +428,11 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
PeriodicTaskIF* pusHighPrio = factory.createPeriodicTask(
|
PeriodicTaskIF* pusHighPrio = factory.createPeriodicTask(
|
||||||
"PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
"PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
initmission::printAddObjectError("PUS_2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||||
}
|
}
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_9", objects::PUS_SERVICE_9_TIME_MGMT);
|
initmission::printAddObjectError("PUS_9", objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusHighPrio);
|
taskVec.push_back(pusHighPrio);
|
||||||
@ -436,27 +441,27 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
||||||
|
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
initmission::printAddObjectError("PUS_3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
initmission::printAddObjectError("PUS_8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_11_TC_SCHEDULER);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_11_TC_SCHEDULER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_11", objects::PUS_SERVICE_11_TC_SCHEDULER);
|
initmission::printAddObjectError("PUS_11", objects::PUS_SERVICE_11_TC_SCHEDULER);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_20", objects::PUS_SERVICE_20_PARAMETERS);
|
initmission::printAddObjectError("PUS_20", objects::PUS_SERVICE_20_PARAMETERS);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_200", objects::PUS_SERVICE_200_MODE_MGMT);
|
initmission::printAddObjectError("PUS_200", objects::PUS_SERVICE_200_MODE_MGMT);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_201_HEALTH);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_201_HEALTH);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_201", objects::PUS_SERVICE_201_HEALTH);
|
initmission::printAddObjectError("PUS_201", objects::PUS_SERVICE_201_HEALTH);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusMedPrio);
|
taskVec.push_back(pusMedPrio);
|
||||||
@ -464,11 +469,11 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
PeriodicTaskIF* pusLowPrio = factory.createPeriodicTask(
|
PeriodicTaskIF* pusLowPrio = factory.createPeriodicTask(
|
||||||
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
|
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
|
||||||
result = pusLowPrio->addComponent(objects::PUS_SERVICE_17_TEST);
|
result = pusLowPrio->addComponent(objects::PUS_SERVICE_17_TEST);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_17", objects::PUS_SERVICE_17_TEST);
|
initmission::printAddObjectError("PUS_17", objects::PUS_SERVICE_17_TEST);
|
||||||
}
|
}
|
||||||
result = pusLowPrio->addComponent(objects::INTERNAL_ERROR_REPORTER);
|
result = pusLowPrio->addComponent(objects::INTERNAL_ERROR_REPORTER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("ERROR_REPORTER", objects::INTERNAL_ERROR_REPORTER);
|
initmission::printAddObjectError("ERROR_REPORTER", objects::INTERNAL_ERROR_REPORTER);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusLowPrio);
|
taskVec.push_back(pusLowPrio);
|
||||||
@ -478,32 +483,32 @@ void initmission::createTestTasks(TaskFactory& factory,
|
|||||||
TaskDeadlineMissedFunction missedDeadlineFunc,
|
TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||||
std::vector<PeriodicTaskIF*>& taskVec) {
|
std::vector<PeriodicTaskIF*>& taskVec) {
|
||||||
#if OBSW_ADD_TEST_TASK == 1 && OBSW_ADD_TEST_CODE == 1
|
#if OBSW_ADD_TEST_TASK == 1 && OBSW_ADD_TEST_CODE == 1
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
static_cast<void>(result); // supress warning in case it is not used
|
static_cast<void>(result); // supress warning in case it is not used
|
||||||
|
|
||||||
PeriodicTaskIF* testTask = factory.createPeriodicTask(
|
PeriodicTaskIF* testTask = factory.createPeriodicTask(
|
||||||
"TEST_TASK", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1, missedDeadlineFunc);
|
"TEST_TASK", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1, missedDeadlineFunc);
|
||||||
|
|
||||||
result = testTask->addComponent(objects::TEST_TASK);
|
result = testTask->addComponent(objects::TEST_TASK);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
|
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OBSW_ADD_SPI_TEST_CODE == 1
|
#if OBSW_ADD_SPI_TEST_CODE == 1
|
||||||
result = testTask->addComponent(objects::SPI_TEST);
|
result = testTask->addComponent(objects::SPI_TEST);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("SPI_TEST", objects::SPI_TEST);
|
initmission::printAddObjectError("SPI_TEST", objects::SPI_TEST);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if OBSW_ADD_I2C_TEST_CODE == 1
|
#if OBSW_ADD_I2C_TEST_CODE == 1
|
||||||
result = testTask->addComponent(objects::I2C_TEST);
|
result = testTask->addComponent(objects::I2C_TEST);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("I2C_TEST", objects::I2C_TEST);
|
initmission::printAddObjectError("I2C_TEST", objects::I2C_TEST);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if OBSW_ADD_UART_TEST_CODE == 1
|
#if OBSW_ADD_UART_TEST_CODE == 1
|
||||||
result = testTask->addComponent(objects::UART_TEST);
|
result = testTask->addComponent(objects::UART_TEST);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("UART_TEST", objects::UART_TEST);
|
initmission::printAddObjectError("UART_TEST", objects::UART_TEST);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include "linux/boardtest/UartTestClass.h"
|
#include "linux/boardtest/UartTestClass.h"
|
||||||
#include "linux/callbacks/gpioCallbacks.h"
|
#include "linux/callbacks/gpioCallbacks.h"
|
||||||
#include "linux/csp/CspComIF.h"
|
#include "linux/csp/CspComIF.h"
|
||||||
#include "linux/csp/CspCookie.h"
|
|
||||||
#include "linux/devices/GPSHyperionLinuxController.h"
|
#include "linux/devices/GPSHyperionLinuxController.h"
|
||||||
#include "linux/devices/devicedefinitions/PlocMPSoCDefinitions.h"
|
#include "linux/devices/devicedefinitions/PlocMPSoCDefinitions.h"
|
||||||
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
||||||
@ -35,6 +34,7 @@
|
|||||||
#include "linux/obc/PdecHandler.h"
|
#include "linux/obc/PdecHandler.h"
|
||||||
#include "linux/obc/Ptme.h"
|
#include "linux/obc/Ptme.h"
|
||||||
#include "linux/obc/PtmeConfig.h"
|
#include "linux/obc/PtmeConfig.h"
|
||||||
|
#include "mission/csp/CspCookie.h"
|
||||||
#include "mission/system/objects/RwAssembly.h"
|
#include "mission/system/objects/RwAssembly.h"
|
||||||
#include "mission/system/fdir/AcsBoardFdir.h"
|
#include "mission/system/fdir/AcsBoardFdir.h"
|
||||||
#include "mission/system/fdir/GomspacePowerFdir.h"
|
#include "mission/system/fdir/GomspacePowerFdir.h"
|
||||||
@ -95,8 +95,8 @@
|
|||||||
ResetArgs RESET_ARGS_GNSS;
|
ResetArgs RESET_ARGS_GNSS;
|
||||||
|
|
||||||
void Factory::setStaticFrameworkObjectIds() {
|
void Factory::setStaticFrameworkObjectIds() {
|
||||||
PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR;
|
PusServiceBase::PUS_DISTRIBUTOR = objects::PUS_PACKET_DISTRIBUTOR;
|
||||||
PusServiceBase::packetDestination = objects::TM_FUNNEL;
|
PusServiceBase::PACKET_DESTINATION = objects::TM_FUNNEL;
|
||||||
|
|
||||||
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
|
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
|
||||||
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
|
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
|
||||||
@ -117,8 +117,7 @@ void Factory::setStaticFrameworkObjectIds() {
|
|||||||
|
|
||||||
LocalDataPoolManager::defaultHkDestination = objects::PUS_SERVICE_3_HOUSEKEEPING;
|
LocalDataPoolManager::defaultHkDestination = objects::PUS_SERVICE_3_HOUSEKEEPING;
|
||||||
|
|
||||||
VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION;
|
VerificationReporter::DEFAULT_RECEIVER = objects::PUS_SERVICE_1_VERIFICATION;
|
||||||
TmPacketBase::timeStamperId = objects::TIME_STAMPER;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::setStatics() { Factory::setStaticFrameworkObjectIds(); }
|
void ObjectFactory::setStatics() { Factory::setStaticFrameworkObjectIds(); }
|
||||||
@ -159,10 +158,10 @@ void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, Ua
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher) {
|
void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher) {
|
||||||
CspCookie* p60DockCspCookie = new CspCookie(P60Dock::MAX_REPLY_LENGTH, addresses::P60DOCK);
|
CspCookie* p60DockCspCookie = new CspCookie(P60Dock::MAX_REPLY_SIZE, addresses::P60DOCK, 500);
|
||||||
CspCookie* pdu1CspCookie = new CspCookie(PDU::MAX_REPLY_LENGTH, addresses::PDU1);
|
CspCookie* pdu1CspCookie = new CspCookie(PDU::MAX_REPLY_SIZE, addresses::PDU1, 500);
|
||||||
CspCookie* pdu2CspCookie = new CspCookie(PDU::MAX_REPLY_LENGTH, addresses::PDU2);
|
CspCookie* pdu2CspCookie = new CspCookie(PDU::MAX_REPLY_SIZE, addresses::PDU2, 500);
|
||||||
CspCookie* acuCspCookie = new CspCookie(ACU::MAX_REPLY_LENGTH, addresses::ACU);
|
CspCookie* acuCspCookie = new CspCookie(ACU::MAX_REPLY_SIZE, addresses::ACU, 500);
|
||||||
|
|
||||||
auto p60Fdir = new GomspacePowerFdir(objects::P60DOCK_HANDLER);
|
auto p60Fdir = new GomspacePowerFdir(objects::P60DOCK_HANDLER);
|
||||||
P60DockHandler* p60dockhandler =
|
P60DockHandler* p60dockhandler =
|
||||||
@ -919,7 +918,7 @@ void ObjectFactory::testAcsBrdAss(AcsBoardAssembly* acsAss) {
|
|||||||
ModeMessage::setModeMessage(&msg, ModeMessage::CMD_MODE_COMMAND, DeviceHandlerIF::MODE_NORMAL,
|
ModeMessage::setModeMessage(&msg, ModeMessage::CMD_MODE_COMMAND, DeviceHandlerIF::MODE_NORMAL,
|
||||||
duallane::A_SIDE);
|
duallane::A_SIDE);
|
||||||
ReturnValue_t result = MessageQueueSenderIF::sendMessage(acsAss->getCommandQueue(), &msg);
|
ReturnValue_t result = MessageQueueSenderIF::sendMessage(acsAss->getCommandQueue(), &msg);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "Sending mode command failed" << std::endl;
|
sif::warning << "Sending mode command failed" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef BSP_Q7S_OBJECTFACTORY_H_
|
#ifndef BSP_Q7S_OBJECTFACTORY_H_
|
||||||
#define BSP_Q7S_OBJECTFACTORY_H_
|
#define BSP_Q7S_OBJECTFACTORY_H_
|
||||||
|
|
||||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
#include <fsfw/returnvalues/returnvalue.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@ -64,5 +64,6 @@ void ObjectFactory::produce(void* args) {
|
|||||||
|
|
||||||
createMiscComponents();
|
createMiscComponents();
|
||||||
createThermalController();
|
createThermalController();
|
||||||
|
createAcsController();
|
||||||
satsystem::init();
|
satsystem::init();
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ ReturnValue_t FileSystemHandler::performOperation(uint8_t unsignedChar) {
|
|||||||
|
|
||||||
void FileSystemHandler::fileSystemHandlerLoop() {
|
void FileSystemHandler::fileSystemHandlerLoop() {
|
||||||
CommandMessage filemsg;
|
CommandMessage filemsg;
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
while (true) {
|
while (true) {
|
||||||
if (opCounter % 5 == 0) {
|
if (opCounter % 5 == 0) {
|
||||||
if (coreCtrl->sdInitFinished()) {
|
if (coreCtrl->sdInitFinished()) {
|
||||||
@ -45,7 +45,7 @@ void FileSystemHandler::fileSystemHandlerLoop() {
|
|||||||
result = mq->receiveMessage(&filemsg);
|
result = mq->receiveMessage(&filemsg);
|
||||||
if (result == MessageQueueIF::EMPTY) {
|
if (result == MessageQueueIF::EMPTY) {
|
||||||
break;
|
break;
|
||||||
} else if (result != HasReturnvaluesIF::RETURN_FAILED) {
|
} else if (result != returnvalue::FAILED) {
|
||||||
sif::warning << "FileSystemHandler::performOperation: Message reception failed!" << std::endl;
|
sif::warning << "FileSystemHandler::performOperation: Message reception failed!" << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -91,7 +91,7 @@ void FileSystemHandler::fileSystemCheckup() {
|
|||||||
<< " but does not appear to be mounted. Attempting fix.." << std::endl;
|
<< " but does not appear to be mounted. Attempting fix.." << std::endl;
|
||||||
// This function will appear to fix the inconsistent state
|
// This function will appear to fix the inconsistent state
|
||||||
ReturnValue_t result = sdcMan->sanitizeState(&statusPair, preferredSdCard);
|
ReturnValue_t result = sdcMan->sanitizeState(&statusPair, preferredSdCard);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
// Oh no.
|
// Oh no.
|
||||||
triggerEvent(SdCardManager::SANITIZATION_FAILED, 0, 0);
|
triggerEvent(SdCardManager::SANITIZATION_FAILED, 0, 0);
|
||||||
sif::error << "FileSystemHandler::fileSystemCheckup: Sanitization failed" << std::endl;
|
sif::error << "FileSystemHandler::fileSystemCheckup: Sanitization failed" << std::endl;
|
||||||
@ -114,7 +114,7 @@ ReturnValue_t FileSystemHandler::initialize() {
|
|||||||
} else if (preferredSdCard == sd::SdCard::SLOT_1) {
|
} else if (preferredSdCard == sd::SdCard::SLOT_1) {
|
||||||
currentMountPrefix = SdCardManager::SD_1_MOUNT_POINT;
|
currentMountPrefix = SdCardManager::SD_1_MOUNT_POINT;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t FileSystemHandler::appendToFile(const char* repositoryPath, const char* filename,
|
ReturnValue_t FileSystemHandler::appendToFile(const char* repositoryPath, const char* filename,
|
||||||
@ -129,7 +129,7 @@ ReturnValue_t FileSystemHandler::appendToFile(const char* repositoryPath, const
|
|||||||
if (not file.good()) {
|
if (not file.good()) {
|
||||||
return GENERIC_FILE_ERROR;
|
return GENERIC_FILE_ERROR;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t FileSystemHandler::createFile(const char* repositoryPath, const char* filename,
|
ReturnValue_t FileSystemHandler::createFile(const char* repositoryPath, const char* filename,
|
||||||
@ -144,7 +144,7 @@ ReturnValue_t FileSystemHandler::createFile(const char* repositoryPath, const ch
|
|||||||
if (not file.good()) {
|
if (not file.good()) {
|
||||||
return GENERIC_FILE_ERROR;
|
return GENERIC_FILE_ERROR;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t FileSystemHandler::removeFile(const char* repositoryPath, const char* filename,
|
ReturnValue_t FileSystemHandler::removeFile(const char* repositoryPath, const char* filename,
|
||||||
@ -158,7 +158,7 @@ ReturnValue_t FileSystemHandler::removeFile(const char* repositoryPath, const ch
|
|||||||
sif::warning << "FileSystemHandler::deleteFile: Failed with code " << result << std::endl;
|
sif::warning << "FileSystemHandler::deleteFile: Failed with code " << result << std::endl;
|
||||||
return GENERIC_FILE_ERROR;
|
return GENERIC_FILE_ERROR;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t FileSystemHandler::createDirectory(const char* repositoryPath, const char* dirname,
|
ReturnValue_t FileSystemHandler::createDirectory(const char* repositoryPath, const char* dirname,
|
||||||
@ -168,7 +168,7 @@ ReturnValue_t FileSystemHandler::createDirectory(const char* repositoryPath, con
|
|||||||
return DIRECTORY_ALREADY_EXISTS;
|
return DIRECTORY_ALREADY_EXISTS;
|
||||||
}
|
}
|
||||||
if (std::filesystem::create_directory(path)) {
|
if (std::filesystem::create_directory(path)) {
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
sif::warning << "Creating directory " << path << " failed" << std::endl;
|
sif::warning << "Creating directory " << path << " failed" << std::endl;
|
||||||
return GENERIC_FILE_ERROR;
|
return GENERIC_FILE_ERROR;
|
||||||
@ -183,7 +183,7 @@ ReturnValue_t FileSystemHandler::removeDirectory(const char* repositoryPath, con
|
|||||||
std::error_code err;
|
std::error_code err;
|
||||||
if (not deleteRecurively) {
|
if (not deleteRecurively) {
|
||||||
if (std::filesystem::remove(path, err)) {
|
if (std::filesystem::remove(path, err)) {
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
} else {
|
} else {
|
||||||
// Check error code. Most probably denied permissions because folder is not empty
|
// Check error code. Most probably denied permissions because folder is not empty
|
||||||
sif::warning << "FileSystemHandler::removeDirectory: Deleting directory failed with "
|
sif::warning << "FileSystemHandler::removeDirectory: Deleting directory failed with "
|
||||||
@ -197,7 +197,7 @@ ReturnValue_t FileSystemHandler::removeDirectory(const char* repositoryPath, con
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (std::filesystem::remove_all(path, err)) {
|
if (std::filesystem::remove_all(path, err)) {
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
} else {
|
} else {
|
||||||
sif::warning << "FileSystemHandler::removeDirectory: Deleting directory failed with "
|
sif::warning << "FileSystemHandler::removeDirectory: Deleting directory failed with "
|
||||||
"code "
|
"code "
|
||||||
@ -211,14 +211,14 @@ ReturnValue_t FileSystemHandler::removeDirectory(const char* repositoryPath, con
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t FileSystemHandler::renameFile(const char* repositoryPath, const char* oldFilename,
|
ReturnValue_t FileSystemHandler::renameFile(const char* repositoryPath, const char* oldFilename,
|
||||||
const char* newFilename, FileSystemArgsIF* args) {
|
const char* newFilename, FileSystemArgsIF* args) {
|
||||||
auto basepath = getInitPath(args) / repositoryPath;
|
auto basepath = getInitPath(args) / repositoryPath;
|
||||||
std::filesystem::rename(basepath / oldFilename, basepath / newFilename);
|
std::filesystem::rename(basepath / oldFilename, basepath / newFilename);
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileSystemHandler::parseCfg(FsCommandCfg* cfg, bool& useMountPrefix) {
|
void FileSystemHandler::parseCfg(FsCommandCfg* cfg, bool& useMountPrefix) {
|
||||||
|
@ -12,7 +12,7 @@ ReturnValue_t FilesystemHelper::checkPath(std::string path) {
|
|||||||
SdCardManager* sdcMan = SdCardManager::instance();
|
SdCardManager* sdcMan = SdCardManager::instance();
|
||||||
if (sdcMan == nullptr) {
|
if (sdcMan == nullptr) {
|
||||||
sif::warning << "FilesystemHelper::checkPath: Invalid SD card manager" << std::endl;
|
sif::warning << "FilesystemHelper::checkPath: Invalid SD card manager" << std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
if (path.substr(0, sizeof(SdCardManager::SD_0_MOUNT_POINT)) ==
|
if (path.substr(0, sizeof(SdCardManager::SD_0_MOUNT_POINT)) ==
|
||||||
std::string(SdCardManager::SD_0_MOUNT_POINT)) {
|
std::string(SdCardManager::SD_0_MOUNT_POINT)) {
|
||||||
@ -27,12 +27,12 @@ ReturnValue_t FilesystemHelper::checkPath(std::string path) {
|
|||||||
return SD_NOT_MOUNTED;
|
return SD_NOT_MOUNTED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t FilesystemHelper::fileExists(std::string file) {
|
ReturnValue_t FilesystemHelper::fileExists(std::string file) {
|
||||||
if (not std::filesystem::exists(file)) {
|
if (not std::filesystem::exists(file)) {
|
||||||
return FILE_NOT_EXISTS;
|
return FILE_NOT_EXISTS;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -4,14 +4,14 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "commonClassIds.h"
|
#include "commonClassIds.h"
|
||||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This class implements often used functions related to the file system management.
|
* @brief This class implements often used functions related to the file system management.
|
||||||
*
|
*
|
||||||
* @author J. Meier
|
* @author J. Meier
|
||||||
*/
|
*/
|
||||||
class FilesystemHelper : public HasReturnvaluesIF {
|
class FilesystemHelper {
|
||||||
public:
|
public:
|
||||||
static const uint8_t INTERFACE_ID = CLASS_ID::FILE_SYSTEM_HELPER;
|
static const uint8_t INTERFACE_ID = CLASS_ID::FILE_SYSTEM_HELPER;
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ class FilesystemHelper : public HasReturnvaluesIF {
|
|||||||
*
|
*
|
||||||
* @param path Path to check
|
* @param path Path to check
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if path points to SD card and the appropriate SD card is mounted or if
|
* @return returnvalue::OK if path points to SD card and the appropriate SD card is mounted or if
|
||||||
* path does not point to SD card.
|
* path does not point to SD card.
|
||||||
* Return error code if path points to SD card and the corresponding SD card is not
|
* Return error code if path points to SD card and the corresponding SD card is not
|
||||||
* mounted.
|
* mounted.
|
||||||
@ -38,7 +38,7 @@ class FilesystemHelper : public HasReturnvaluesIF {
|
|||||||
*
|
*
|
||||||
* @param file File to check
|
* @param file File to check
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if file exists, otherwise return error code.
|
* @return returnvalue::OK if file exists, otherwise return error code.
|
||||||
*/
|
*/
|
||||||
static ReturnValue_t fileExists(std::string file);
|
static ReturnValue_t fileExists(std::string file);
|
||||||
|
|
||||||
|
@ -21,17 +21,17 @@ SdCardManager* SdCardManager::INSTANCE = nullptr;
|
|||||||
SdCardManager::SdCardManager() : SystemObject(objects::SDC_MANAGER), cmdExecutor(256) {
|
SdCardManager::SdCardManager() : SystemObject(objects::SDC_MANAGER), cmdExecutor(256) {
|
||||||
mutex = MutexFactory::instance()->createMutex();
|
mutex = MutexFactory::instance()->createMutex();
|
||||||
ReturnValue_t result = mutex->lockMutex();
|
ReturnValue_t result = mutex->lockMutex();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "SdCardManager::SdCardManager: Mutex lock failed" << std::endl;
|
sif::error << "SdCardManager::SdCardManager: Mutex lock failed" << std::endl;
|
||||||
}
|
}
|
||||||
uint8_t prefSdRaw = 0;
|
uint8_t prefSdRaw = 0;
|
||||||
result = scratch::readNumber(scratch::PREFERED_SDC_KEY, prefSdRaw);
|
result = scratch::readNumber(scratch::PREFERED_SDC_KEY, prefSdRaw);
|
||||||
result = mutex->unlockMutex();
|
result = mutex->unlockMutex();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "SdCardManager::SdCardManager: Mutex unlock failed" << std::endl;
|
sif::error << "SdCardManager::SdCardManager: Mutex unlock failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (result == scratch::KEY_NOT_FOUND) {
|
if (result == scratch::KEY_NOT_FOUND) {
|
||||||
sif::warning << "CoreController::sdCardInit: "
|
sif::warning << "CoreController::sdCardInit: "
|
||||||
"Preferred SD card not set. Setting to 0"
|
"Preferred SD card not set. Setting to 0"
|
||||||
@ -65,7 +65,7 @@ SdCardManager* SdCardManager::instance() {
|
|||||||
|
|
||||||
ReturnValue_t SdCardManager::switchOnSdCard(sd::SdCard sdCard, bool doMountSdCard,
|
ReturnValue_t SdCardManager::switchOnSdCard(sd::SdCard sdCard, bool doMountSdCard,
|
||||||
SdStatePair* statusPair) {
|
SdStatePair* statusPair) {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
if (doMountSdCard) {
|
if (doMountSdCard) {
|
||||||
if (not blocking) {
|
if (not blocking) {
|
||||||
sif::warning << "SdCardManager::switchOnSdCard: Two-step command but manager is"
|
sif::warning << "SdCardManager::switchOnSdCard: Two-step command but manager is"
|
||||||
@ -80,7 +80,7 @@ ReturnValue_t SdCardManager::switchOnSdCard(sd::SdCard sdCard, bool doMountSdCar
|
|||||||
sdStatusPtr = std::make_unique<SdStatePair>();
|
sdStatusPtr = std::make_unique<SdStatePair>();
|
||||||
statusPair = sdStatusPtr.get();
|
statusPair = sdStatusPtr.get();
|
||||||
result = getSdCardsStatus(*statusPair);
|
result = getSdCardsStatus(*statusPair);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -89,7 +89,7 @@ ReturnValue_t SdCardManager::switchOnSdCard(sd::SdCard sdCard, bool doMountSdCar
|
|||||||
if (sdCard == sd::SdCard::BOTH) {
|
if (sdCard == sd::SdCard::BOTH) {
|
||||||
sif::warning << "SdCardManager::switchOffSdCard: API does not allow sd::SdStatus::BOTH"
|
sif::warning << "SdCardManager::switchOffSdCard: API does not allow sd::SdStatus::BOTH"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
sd::SdState currentState;
|
sd::SdState currentState;
|
||||||
@ -113,10 +113,10 @@ ReturnValue_t SdCardManager::switchOnSdCard(sd::SdCard sdCard, bool doMountSdCar
|
|||||||
} else if (currentState == sd::SdState::OFF) {
|
} else if (currentState == sd::SdState::OFF) {
|
||||||
result = setSdCardState(sdCard, true);
|
result = setSdCardState(sdCard, true);
|
||||||
} else {
|
} else {
|
||||||
result = HasReturnvaluesIF::RETURN_FAILED;
|
result = returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK or not doMountSdCard) {
|
if (result != returnvalue::OK or not doMountSdCard) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ ReturnValue_t SdCardManager::switchOffSdCard(sd::SdCard sdCard, bool doUnmountSd
|
|||||||
SdStatePair* statusPair) {
|
SdStatePair* statusPair) {
|
||||||
std::pair<sd::SdState, sd::SdState> active;
|
std::pair<sd::SdState, sd::SdState> active;
|
||||||
ReturnValue_t result = getSdCardsStatus(active);
|
ReturnValue_t result = getSdCardsStatus(active);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
if (doUnmountSdCard) {
|
if (doUnmountSdCard) {
|
||||||
@ -142,7 +142,7 @@ ReturnValue_t SdCardManager::switchOffSdCard(sd::SdCard sdCard, bool doUnmountSd
|
|||||||
if (sdCard == sd::SdCard::BOTH) {
|
if (sdCard == sd::SdCard::BOTH) {
|
||||||
sif::warning << "SdCardManager::switchOffSdCard: API does not allow sd::SdStatus::BOTH"
|
sif::warning << "SdCardManager::switchOffSdCard: API does not allow sd::SdStatus::BOTH"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
if (sdCard == sd::SdCard::SLOT_0) {
|
if (sdCard == sd::SdCard::SLOT_0) {
|
||||||
if (active.first == sd::SdState::OFF) {
|
if (active.first == sd::SdState::OFF) {
|
||||||
@ -156,7 +156,7 @@ ReturnValue_t SdCardManager::switchOffSdCard(sd::SdCard sdCard, bool doUnmountSd
|
|||||||
|
|
||||||
if (doUnmountSdCard) {
|
if (doUnmountSdCard) {
|
||||||
result = unmountSdCard(sdCard);
|
result = unmountSdCard(sdCard);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -187,7 +187,7 @@ ReturnValue_t SdCardManager::setSdCardState(sd::SdCard sdCard, bool on) {
|
|||||||
command << "q7hw sd set " << sdstring << " " << statestring;
|
command << "q7hw sd set " << sdstring << " " << statestring;
|
||||||
cmdExecutor.load(command.str(), blocking, printCmdOutput);
|
cmdExecutor.load(command.str(), blocking, printCmdOutput);
|
||||||
ReturnValue_t result = cmdExecutor.execute();
|
ReturnValue_t result = cmdExecutor.execute();
|
||||||
if (blocking and result != HasReturnvaluesIF::RETURN_OK) {
|
if (blocking and result != returnvalue::OK) {
|
||||||
utility::handleSystemError(cmdExecutor.getLastError(), "SdCardManager::setSdCardState");
|
utility::handleSystemError(cmdExecutor.getLastError(), "SdCardManager::setSdCardState");
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@ -212,7 +212,7 @@ ReturnValue_t SdCardManager::getSdCardsStatus(SdStatePair& active) {
|
|||||||
while (std::getline(sdStatus, line)) {
|
while (std::getline(sdStatus, line)) {
|
||||||
processSdStatusLine(active, line, idx, currentSd);
|
processSdStatusLine(active, line, idx, currentSd);
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t SdCardManager::mountSdCard(sd::SdCard sdCard) {
|
ReturnValue_t SdCardManager::mountSdCard(sd::SdCard sdCard) {
|
||||||
@ -223,7 +223,7 @@ ReturnValue_t SdCardManager::mountSdCard(sd::SdCard sdCard) {
|
|||||||
if (sdCard == sd::SdCard::BOTH) {
|
if (sdCard == sd::SdCard::BOTH) {
|
||||||
sif::warning << "SdCardManager::mountSdCard: API does not allow sd::SdStatus::BOTH"
|
sif::warning << "SdCardManager::mountSdCard: API does not allow sd::SdStatus::BOTH"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
string mountDev;
|
string mountDev;
|
||||||
string mountPoint;
|
string mountPoint;
|
||||||
@ -247,7 +247,7 @@ ReturnValue_t SdCardManager::mountSdCard(sd::SdCard sdCard) {
|
|||||||
string sdMountCommand = "mount " + mountDev + " " + mountPoint;
|
string sdMountCommand = "mount " + mountDev + " " + mountPoint;
|
||||||
cmdExecutor.load(sdMountCommand, blocking, printCmdOutput);
|
cmdExecutor.load(sdMountCommand, blocking, printCmdOutput);
|
||||||
ReturnValue_t result = cmdExecutor.execute();
|
ReturnValue_t result = cmdExecutor.execute();
|
||||||
if (blocking and result != HasReturnvaluesIF::RETURN_OK) {
|
if (blocking and result != returnvalue::OK) {
|
||||||
utility::handleSystemError(cmdExecutor.getLastError(), "SdCardManager::mountSdCard");
|
utility::handleSystemError(cmdExecutor.getLastError(), "SdCardManager::mountSdCard");
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@ -261,7 +261,7 @@ ReturnValue_t SdCardManager::unmountSdCard(sd::SdCard sdCard) {
|
|||||||
if (sdCard == sd::SdCard::BOTH) {
|
if (sdCard == sd::SdCard::BOTH) {
|
||||||
sif::warning << "SdCardManager::unmountSdCard: API does not allow sd::SdStatus::BOTH"
|
sif::warning << "SdCardManager::unmountSdCard: API does not allow sd::SdStatus::BOTH"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
string mountPoint;
|
string mountPoint;
|
||||||
if (sdCard == sd::SdCard::SLOT_0) {
|
if (sdCard == sd::SdCard::SLOT_0) {
|
||||||
@ -285,7 +285,7 @@ ReturnValue_t SdCardManager::unmountSdCard(sd::SdCard sdCard) {
|
|||||||
}
|
}
|
||||||
cmdExecutor.load(sdUnmountCommand, blocking, printCmdOutput);
|
cmdExecutor.load(sdUnmountCommand, blocking, printCmdOutput);
|
||||||
ReturnValue_t result = cmdExecutor.execute();
|
ReturnValue_t result = cmdExecutor.execute();
|
||||||
if (blocking and result != HasReturnvaluesIF::RETURN_OK) {
|
if (blocking and result != returnvalue::OK) {
|
||||||
utility::handleSystemError(cmdExecutor.getLastError(), "SdCardManager::unmountSdCard");
|
utility::handleSystemError(cmdExecutor.getLastError(), "SdCardManager::unmountSdCard");
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@ -293,7 +293,7 @@ ReturnValue_t SdCardManager::unmountSdCard(sd::SdCard sdCard) {
|
|||||||
|
|
||||||
ReturnValue_t SdCardManager::sanitizeState(SdStatePair* statusPair, sd::SdCard prefSdCard) {
|
ReturnValue_t SdCardManager::sanitizeState(SdStatePair* statusPair, sd::SdCard prefSdCard) {
|
||||||
std::unique_ptr<SdStatePair> sdStatusPtr;
|
std::unique_ptr<SdStatePair> sdStatusPtr;
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
// Enforce blocking operation for now. Be careful to reset it when returning prematurely!
|
// Enforce blocking operation for now. Be careful to reset it when returning prematurely!
|
||||||
bool resetNonBlockingState = false;
|
bool resetNonBlockingState = false;
|
||||||
if (not this->blocking) {
|
if (not this->blocking) {
|
||||||
@ -302,7 +302,7 @@ ReturnValue_t SdCardManager::sanitizeState(SdStatePair* statusPair, sd::SdCard p
|
|||||||
}
|
}
|
||||||
if (prefSdCard == sd::SdCard::NONE) {
|
if (prefSdCard == sd::SdCard::NONE) {
|
||||||
result = getPreferredSdCard();
|
result = getPreferredSdCard();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (statusPair == nullptr) {
|
if (statusPair == nullptr) {
|
||||||
@ -382,7 +382,7 @@ void SdCardManager::processSdStatusLine(std::pair<sd::SdState, sd::SdState>& act
|
|||||||
sd::SdCard SdCardManager::getPreferredSdCard() const {
|
sd::SdCard SdCardManager::getPreferredSdCard() const {
|
||||||
MutexGuard mg(mutex);
|
MutexGuard mg(mutex);
|
||||||
auto res = mg.getLockResult();
|
auto res = mg.getLockResult();
|
||||||
if (res != RETURN_OK) {
|
if (res != returnvalue::OK) {
|
||||||
sif::error << "SdCardManager::getPreferredSdCard: Lock error" << std::endl;
|
sif::error << "SdCardManager::getPreferredSdCard: Lock error" << std::endl;
|
||||||
}
|
}
|
||||||
return sdInfo.pref;
|
return sdInfo.pref;
|
||||||
@ -391,7 +391,7 @@ sd::SdCard SdCardManager::getPreferredSdCard() const {
|
|||||||
ReturnValue_t SdCardManager::setPreferredSdCard(sd::SdCard sdCard) {
|
ReturnValue_t SdCardManager::setPreferredSdCard(sd::SdCard sdCard) {
|
||||||
MutexGuard mg(mutex);
|
MutexGuard mg(mutex);
|
||||||
if (sdCard == sd::SdCard::BOTH) {
|
if (sdCard == sd::SdCard::BOTH) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
sdInfo.pref = sdCard;
|
sdInfo.pref = sdCard;
|
||||||
return scratch::writeNumber(scratch::PREFERED_SDC_KEY, static_cast<uint8_t>(sdCard));
|
return scratch::writeNumber(scratch::PREFERED_SDC_KEY, static_cast<uint8_t>(sdCard));
|
||||||
@ -406,7 +406,7 @@ ReturnValue_t SdCardManager::updateSdCardStateFile() {
|
|||||||
std::string updateCmd = "q7hw sd info all > " + std::string(SD_STATE_FILE);
|
std::string updateCmd = "q7hw sd info all > " + std::string(SD_STATE_FILE);
|
||||||
cmdExecutor.load(updateCmd, blocking, printCmdOutput);
|
cmdExecutor.load(updateCmd, blocking, printCmdOutput);
|
||||||
ReturnValue_t result = cmdExecutor.execute();
|
ReturnValue_t result = cmdExecutor.execute();
|
||||||
if (blocking and result != HasReturnvaluesIF::RETURN_OK) {
|
if (blocking and result != returnvalue::OK) {
|
||||||
utility::handleSystemError(cmdExecutor.getLastError(), "SdCardManager::mountSdCard");
|
utility::handleSystemError(cmdExecutor.getLastError(), "SdCardManager::mountSdCard");
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@ -448,10 +448,10 @@ SdCardManager::OpStatus SdCardManager::checkCurrentOp(Operations& currentOp) {
|
|||||||
case (CommandExecutor::EXECUTION_FINISHED): {
|
case (CommandExecutor::EXECUTION_FINISHED): {
|
||||||
return OpStatus::SUCCESS;
|
return OpStatus::SUCCESS;
|
||||||
}
|
}
|
||||||
case (HasReturnvaluesIF::RETURN_OK): {
|
case (returnvalue::OK): {
|
||||||
return OpStatus::ONGOING;
|
return OpStatus::ONGOING;
|
||||||
}
|
}
|
||||||
case (HasReturnvaluesIF::RETURN_FAILED): {
|
case (returnvalue::FAILED): {
|
||||||
return OpStatus::FAIL;
|
return OpStatus::FAIL;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
@ -469,7 +469,7 @@ bool SdCardManager::isSdCardMounted(sd::SdCard sdCard) {
|
|||||||
SdCardManager::SdStatePair active;
|
SdCardManager::SdStatePair active;
|
||||||
ReturnValue_t result = this->getSdCardsStatus(active);
|
ReturnValue_t result = this->getSdCardsStatus(active);
|
||||||
|
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "SdCardManager::isSdCardMounted: Failed to get SD card active state";
|
sif::debug << "SdCardManager::isSdCardMounted: Failed to get SD card active state";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -499,15 +499,15 @@ ReturnValue_t SdCardManager::isSdCardMountedReadOnly(sd::SdCard sdcard, bool& re
|
|||||||
command << "grep -q '" << SD_1_MOUNT_POINT << " vfat ro,' /proc/mounts";
|
command << "grep -q '" << SD_1_MOUNT_POINT << " vfat ro,' /proc/mounts";
|
||||||
}
|
}
|
||||||
ReturnValue_t result = cmdExecutor.load(command.str(), true, false);
|
ReturnValue_t result = cmdExecutor.load(command.str(), true, false);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = cmdExecutor.execute();
|
result = cmdExecutor.execute();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
int exitStatus = cmdExecutor.getLastError();
|
int exitStatus = cmdExecutor.getLastError();
|
||||||
if (exitStatus == 1) {
|
if (exitStatus == 1) {
|
||||||
readOnly = false;
|
readOnly = false;
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -517,7 +517,7 @@ ReturnValue_t SdCardManager::isSdCardMountedReadOnly(sd::SdCard sdcard, bool& re
|
|||||||
readOnly = false;
|
readOnly = false;
|
||||||
}
|
}
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t SdCardManager::remountReadWrite(sd::SdCard sdcard) {
|
ReturnValue_t SdCardManager::remountReadWrite(sd::SdCard sdcard) {
|
||||||
@ -528,7 +528,7 @@ ReturnValue_t SdCardManager::remountReadWrite(sd::SdCard sdcard) {
|
|||||||
command << "mount -o remount,rw " << SD_1_DEV_NAME << " " << SD_1_MOUNT_POINT;
|
command << "mount -o remount,rw " << SD_1_DEV_NAME << " " << SD_1_MOUNT_POINT;
|
||||||
}
|
}
|
||||||
ReturnValue_t result = cmdExecutor.load(command.str(), true, false);
|
ReturnValue_t result = cmdExecutor.load(command.str(), true, false);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return cmdExecutor.execute();
|
return cmdExecutor.execute();
|
||||||
@ -542,11 +542,11 @@ ReturnValue_t SdCardManager::performFsck(sd::SdCard sdcard, bool printOutput, in
|
|||||||
command << "fsck -y " << SD_1_DEV_NAME;
|
command << "fsck -y " << SD_1_DEV_NAME;
|
||||||
}
|
}
|
||||||
ReturnValue_t result = cmdExecutor.load(command.str(), true, printOutput);
|
ReturnValue_t result = cmdExecutor.load(command.str(), true, printOutput);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = cmdExecutor.execute();
|
result = cmdExecutor.execute();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
linuxError = cmdExecutor.getLastError();
|
linuxError = cmdExecutor.getLastError();
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include "events/subsystemIdRanges.h"
|
#include "events/subsystemIdRanges.h"
|
||||||
#include "fsfw/events/Event.h"
|
#include "fsfw/events/Event.h"
|
||||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
#include "fsfw_hal/linux/CommandExecutor.h"
|
#include "fsfw_hal/linux/CommandExecutor.h"
|
||||||
#include "mission/memory/SdCardMountedIF.h"
|
#include "mission/memory/SdCardMountedIF.h"
|
||||||
#include "mission/memory/definitions.h"
|
#include "mission/memory/definitions.h"
|
||||||
@ -24,7 +24,7 @@ class MutexIF;
|
|||||||
* @brief Manages handling of SD cards like switching them on or off or getting the current
|
* @brief Manages handling of SD cards like switching them on or off or getting the current
|
||||||
* state
|
* state
|
||||||
*/
|
*/
|
||||||
class SdCardManager : public SystemObject, public HasReturnvaluesIF, public SdCardMountedIF {
|
class SdCardManager : public SystemObject, public SdCardMountedIF {
|
||||||
friend class SdCardAccess;
|
friend class SdCardAccess;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -44,22 +44,17 @@ class SdCardManager : public SystemObject, public HasReturnvaluesIF, public SdCa
|
|||||||
|
|
||||||
static constexpr uint8_t INTERFACE_ID = CLASS_ID::SD_CARD_MANAGER;
|
static constexpr uint8_t INTERFACE_ID = CLASS_ID::SD_CARD_MANAGER;
|
||||||
|
|
||||||
static constexpr ReturnValue_t OP_ONGOING = HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 0);
|
static constexpr ReturnValue_t OP_ONGOING = returnvalue::makeCode(INTERFACE_ID, 0);
|
||||||
static constexpr ReturnValue_t ALREADY_ON = HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 1);
|
static constexpr ReturnValue_t ALREADY_ON = returnvalue::makeCode(INTERFACE_ID, 1);
|
||||||
static constexpr ReturnValue_t ALREADY_MOUNTED =
|
static constexpr ReturnValue_t ALREADY_MOUNTED = returnvalue::makeCode(INTERFACE_ID, 2);
|
||||||
HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 2);
|
static constexpr ReturnValue_t ALREADY_OFF = returnvalue::makeCode(INTERFACE_ID, 3);
|
||||||
static constexpr ReturnValue_t ALREADY_OFF = HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 3);
|
static constexpr ReturnValue_t STATUS_FILE_NEXISTS = returnvalue::makeCode(INTERFACE_ID, 10);
|
||||||
static constexpr ReturnValue_t STATUS_FILE_NEXISTS =
|
|
||||||
HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 10);
|
|
||||||
static constexpr ReturnValue_t STATUS_FILE_FORMAT_INVALID =
|
static constexpr ReturnValue_t STATUS_FILE_FORMAT_INVALID =
|
||||||
HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 11);
|
returnvalue::makeCode(INTERFACE_ID, 11);
|
||||||
static constexpr ReturnValue_t MOUNT_ERROR = HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 12);
|
static constexpr ReturnValue_t MOUNT_ERROR = returnvalue::makeCode(INTERFACE_ID, 12);
|
||||||
static constexpr ReturnValue_t UNMOUNT_ERROR =
|
static constexpr ReturnValue_t UNMOUNT_ERROR = returnvalue::makeCode(INTERFACE_ID, 13);
|
||||||
HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 13);
|
static constexpr ReturnValue_t SYSTEM_CALL_ERROR = returnvalue::makeCode(INTERFACE_ID, 14);
|
||||||
static constexpr ReturnValue_t SYSTEM_CALL_ERROR =
|
static constexpr ReturnValue_t POPEN_CALL_ERROR = returnvalue::makeCode(INTERFACE_ID, 15);
|
||||||
HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 14);
|
|
||||||
static constexpr ReturnValue_t POPEN_CALL_ERROR =
|
|
||||||
HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 15);
|
|
||||||
|
|
||||||
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::FILE_SYSTEM;
|
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::FILE_SYSTEM;
|
||||||
|
|
||||||
@ -105,7 +100,7 @@ class SdCardManager : public SystemObject, public HasReturnvaluesIF, public SdCa
|
|||||||
* @param doMountSdCard Mount the SD card after switching it on, which is necessary
|
* @param doMountSdCard Mount the SD card after switching it on, which is necessary
|
||||||
* to use it
|
* to use it
|
||||||
* @param statusPair If the status pair is already available, it can be passed here
|
* @param statusPair If the status pair is already available, it can be passed here
|
||||||
* @return - RETURN_OK on success, ALREADY_ON if it is already on,
|
* @return - returnvalue::OK on success, ALREADY_ON if it is already on,
|
||||||
* SYSTEM_CALL_ERROR on system error
|
* SYSTEM_CALL_ERROR on system error
|
||||||
*/
|
*/
|
||||||
ReturnValue_t switchOnSdCard(sd::SdCard sdCard, bool doMountSdCard = true,
|
ReturnValue_t switchOnSdCard(sd::SdCard sdCard, bool doMountSdCard = true,
|
||||||
@ -117,7 +112,7 @@ class SdCardManager : public SystemObject, public HasReturnvaluesIF, public SdCa
|
|||||||
* @param doUnmountSdCard Unmount the SD card before switching the card off, which makes
|
* @param doUnmountSdCard Unmount the SD card before switching the card off, which makes
|
||||||
* the operation safer
|
* the operation safer
|
||||||
* @param statusPair If the status pair is already available, it can be passed here
|
* @param statusPair If the status pair is already available, it can be passed here
|
||||||
* @return - RETURN_OK on success, ALREADY_ON if it is already on,
|
* @return - returnvalue::OK on success, ALREADY_ON if it is already on,
|
||||||
* SYSTEM_CALL_ERROR on system error
|
* SYSTEM_CALL_ERROR on system error
|
||||||
*/
|
*/
|
||||||
ReturnValue_t switchOffSdCard(sd::SdCard sdCard, bool doUnmountSdCard = true,
|
ReturnValue_t switchOffSdCard(sd::SdCard sdCard, bool doUnmountSdCard = true,
|
||||||
@ -127,9 +122,9 @@ class SdCardManager : public SystemObject, public HasReturnvaluesIF, public SdCa
|
|||||||
* Update the state file or creates one if it does not exist. You need to call this
|
* Update the state file or creates one if it does not exist. You need to call this
|
||||||
* function before calling #sdCardActive
|
* function before calling #sdCardActive
|
||||||
* @return
|
* @return
|
||||||
* - RETURN_OK if the state file was updated successfully
|
* - returnvalue::OK if the state file was updated successfully
|
||||||
* - CommandExecutor::COMMAND_PENDING: Non-blocking command is pending
|
* - CommandExecutor::COMMAND_PENDING: Non-blocking command is pending
|
||||||
* - RETURN_FAILED: blocking command failed
|
* - returnvalue::FAILED: blocking command failed
|
||||||
*/
|
*/
|
||||||
ReturnValue_t updateSdCardStateFile();
|
ReturnValue_t updateSdCardStateFile();
|
||||||
|
|
||||||
@ -139,7 +134,7 @@ class SdCardManager : public SystemObject, public HasReturnvaluesIF, public SdCa
|
|||||||
* the status of the SD cards and set the field of the provided boolean pair.
|
* the status of the SD cards and set the field of the provided boolean pair.
|
||||||
* @param active Pair of booleans, where the first entry is the state of the first SD card
|
* @param active Pair of booleans, where the first entry is the state of the first SD card
|
||||||
* and the second one the state of the second SD card
|
* and the second one the state of the second SD card
|
||||||
* @return - RETURN_OK if the state was read successfully
|
* @return - returnvalue::OK if the state was read successfully
|
||||||
* - STATUS_FILE_FORMAT_INVALID if there was an issue with the state file. The user
|
* - STATUS_FILE_FORMAT_INVALID if there was an issue with the state file. The user
|
||||||
* should call #updateSdCardStateFile again in that case
|
* should call #updateSdCardStateFile again in that case
|
||||||
* - STATUS_FILE_NEXISTS if the status file does not exist
|
* - STATUS_FILE_NEXISTS if the status file does not exist
|
||||||
|
@ -6,23 +6,23 @@ ReturnValue_t scratch::writeString(std::string name, std::string string) {
|
|||||||
int result = std::system(oss.str().c_str());
|
int result = std::system(oss.str().c_str());
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
utility::handleSystemError(result, "scratch::writeString");
|
utility::handleSystemError(result, "scratch::writeString");
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t scratch::readString(std::string key, std::string &string) {
|
ReturnValue_t scratch::readString(std::string key, std::string &string) {
|
||||||
std::ifstream file;
|
std::ifstream file;
|
||||||
std::string filename;
|
std::string filename;
|
||||||
ReturnValue_t result = readToFile(key, file, filename);
|
ReturnValue_t result = readToFile(key, file, filename);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string line;
|
std::string line;
|
||||||
if (not std::getline(file, line)) {
|
if (not std::getline(file, line)) {
|
||||||
std::remove(filename.c_str());
|
std::remove(filename.c_str());
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t pos = line.find("=");
|
size_t pos = line.find("=");
|
||||||
@ -35,7 +35,7 @@ ReturnValue_t scratch::readString(std::string key, std::string &string) {
|
|||||||
return KEY_NOT_FOUND;
|
return KEY_NOT_FOUND;
|
||||||
}
|
}
|
||||||
string = line.substr(pos + 1);
|
string = line.substr(pos + 1);
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t scratch::clearValue(std::string key) {
|
ReturnValue_t scratch::clearValue(std::string key) {
|
||||||
@ -44,7 +44,7 @@ ReturnValue_t scratch::clearValue(std::string key) {
|
|||||||
int result = std::system(oss.str().c_str());
|
int result = std::system(oss.str().c_str());
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
utility::handleSystemError(result, "scratch::clearValue");
|
utility::handleSystemError(result, "scratch::clearValue");
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||||
#include "linux/utility/utility.h"
|
#include "linux/utility/utility.h"
|
||||||
#include "returnvalues/classIds.h"
|
#include "returnvalues/classIds.h"
|
||||||
@ -21,7 +21,7 @@ static constexpr char PREFERED_SDC_KEY[] = "PREFSD";
|
|||||||
static constexpr char ALLOC_FAILURE_COUNT[] = "ALLOCERR";
|
static constexpr char ALLOC_FAILURE_COUNT[] = "ALLOCERR";
|
||||||
|
|
||||||
static constexpr uint8_t INTERFACE_ID = CLASS_ID::SCRATCH_BUFFER;
|
static constexpr uint8_t INTERFACE_ID = CLASS_ID::SCRATCH_BUFFER;
|
||||||
static constexpr ReturnValue_t KEY_NOT_FOUND = HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 0);
|
static constexpr ReturnValue_t KEY_NOT_FOUND = returnvalue::makeCode(INTERFACE_ID, 0);
|
||||||
|
|
||||||
ReturnValue_t clearValue(std::string key);
|
ReturnValue_t clearValue(std::string key);
|
||||||
|
|
||||||
@ -83,11 +83,11 @@ ReturnValue_t readToFile(std::string name, std::ifstream& file, std::string& fil
|
|||||||
} else {
|
} else {
|
||||||
utility::handleSystemError(result, "scratch::readToFile");
|
utility::handleSystemError(result, "scratch::readToFile");
|
||||||
std::remove(filename.c_str());
|
std::remove(filename.c_str());
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file.open(filename);
|
file.open(filename);
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // End of anonymous namespace
|
} // End of anonymous namespace
|
||||||
@ -99,9 +99,9 @@ inline ReturnValue_t writeNumber(std::string key, T num) noexcept {
|
|||||||
int result = std::system(oss.str().c_str());
|
int result = std::system(oss.str().c_str());
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
utility::handleSystemError(result, "scratch::writeNumber");
|
utility::handleSystemError(result, "scratch::writeNumber");
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, class = typename std::enable_if<std::is_integral<T>::value>::type>
|
template <typename T, class = typename std::enable_if<std::is_integral<T>::value>::type>
|
||||||
@ -110,7 +110,7 @@ inline ReturnValue_t readNumber(std::string key, T& num) noexcept {
|
|||||||
ifstream file;
|
ifstream file;
|
||||||
std::string filename;
|
std::string filename;
|
||||||
ReturnValue_t result = readToFile(key, file, filename);
|
ReturnValue_t result = readToFile(key, file, filename);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
std::remove(filename.c_str());
|
std::remove(filename.c_str());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -118,7 +118,7 @@ inline ReturnValue_t readNumber(std::string key, T& num) noexcept {
|
|||||||
string line;
|
string line;
|
||||||
if (not std::getline(file, line)) {
|
if (not std::getline(file, line)) {
|
||||||
std::remove(filename.c_str());
|
std::remove(filename.c_str());
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t pos = line.find("=");
|
size_t pos = line.find("=");
|
||||||
@ -138,7 +138,7 @@ inline ReturnValue_t readNumber(std::string key, T& num) noexcept {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::remove(filename.c_str());
|
std::remove(filename.c_str());
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace scratch
|
} // namespace scratch
|
||||||
|
@ -12,20 +12,20 @@ Xadc::Xadc() {}
|
|||||||
Xadc::~Xadc() {}
|
Xadc::~Xadc() {}
|
||||||
|
|
||||||
ReturnValue_t Xadc::getTemperature(float& temperature) {
|
ReturnValue_t Xadc::getTemperature(float& temperature) {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
int raw = 0;
|
int raw = 0;
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
float scale = 0;
|
float scale = 0;
|
||||||
result = readValFromFile<int>(xadc::file::tempRaw.c_str(), raw);
|
result = readValFromFile<int>(xadc::file::tempRaw.c_str(), raw);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = readValFromFile<int>(xadc::file::tempOffset.c_str(), offset);
|
result = readValFromFile<int>(xadc::file::tempOffset.c_str(), offset);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = readValFromFile<float>(xadc::file::tempScale.c_str(), scale);
|
result = readValFromFile<float>(xadc::file::tempScale.c_str(), scale);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
temperature = (raw + offset) * scale / 1000;
|
temperature = (raw + offset) * scale / 1000;
|
||||||
@ -35,84 +35,84 @@ ReturnValue_t Xadc::getTemperature(float& temperature) {
|
|||||||
ReturnValue_t Xadc::getVccPint(float& vccPint) {
|
ReturnValue_t Xadc::getVccPint(float& vccPint) {
|
||||||
ReturnValue_t result =
|
ReturnValue_t result =
|
||||||
readVoltageFromSysfs(xadc::file::vccpintRaw, xadc::file::vccpintScale, vccPint);
|
readVoltageFromSysfs(xadc::file::vccpintRaw, xadc::file::vccpintScale, vccPint);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Xadc::getVccPaux(float& vccPaux) {
|
ReturnValue_t Xadc::getVccPaux(float& vccPaux) {
|
||||||
ReturnValue_t result =
|
ReturnValue_t result =
|
||||||
readVoltageFromSysfs(xadc::file::vccpauxRaw, xadc::file::vccpauxScale, vccPaux);
|
readVoltageFromSysfs(xadc::file::vccpauxRaw, xadc::file::vccpauxScale, vccPaux);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Xadc::getVccInt(float& vccInt) {
|
ReturnValue_t Xadc::getVccInt(float& vccInt) {
|
||||||
ReturnValue_t result =
|
ReturnValue_t result =
|
||||||
readVoltageFromSysfs(xadc::file::vccintRaw, xadc::file::vccintScale, vccInt);
|
readVoltageFromSysfs(xadc::file::vccintRaw, xadc::file::vccintScale, vccInt);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Xadc::getVccAux(float& vccAux) {
|
ReturnValue_t Xadc::getVccAux(float& vccAux) {
|
||||||
ReturnValue_t result =
|
ReturnValue_t result =
|
||||||
readVoltageFromSysfs(xadc::file::vccauxRaw, xadc::file::vccauxScale, vccAux);
|
readVoltageFromSysfs(xadc::file::vccauxRaw, xadc::file::vccauxScale, vccAux);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Xadc::getVccBram(float& vccBram) {
|
ReturnValue_t Xadc::getVccBram(float& vccBram) {
|
||||||
ReturnValue_t result =
|
ReturnValue_t result =
|
||||||
readVoltageFromSysfs(xadc::file::vccbramRaw, xadc::file::vccbramScale, vccBram);
|
readVoltageFromSysfs(xadc::file::vccbramRaw, xadc::file::vccbramScale, vccBram);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Xadc::getVccOddr(float& vccOddr) {
|
ReturnValue_t Xadc::getVccOddr(float& vccOddr) {
|
||||||
ReturnValue_t result =
|
ReturnValue_t result =
|
||||||
readVoltageFromSysfs(xadc::file::vccoddrRaw, xadc::file::vccoddrScale, vccOddr);
|
readVoltageFromSysfs(xadc::file::vccoddrRaw, xadc::file::vccoddrScale, vccOddr);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Xadc::getVrefp(float& vrefp) {
|
ReturnValue_t Xadc::getVrefp(float& vrefp) {
|
||||||
ReturnValue_t result = readVoltageFromSysfs(xadc::file::vrefpRaw, xadc::file::vrefpScale, vrefp);
|
ReturnValue_t result = readVoltageFromSysfs(xadc::file::vrefpRaw, xadc::file::vrefpScale, vrefp);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Xadc::getVrefn(float& vrefn) {
|
ReturnValue_t Xadc::getVrefn(float& vrefn) {
|
||||||
ReturnValue_t result = readVoltageFromSysfs(xadc::file::vrefnRaw, xadc::file::vrefnScale, vrefn);
|
ReturnValue_t result = readVoltageFromSysfs(xadc::file::vrefnRaw, xadc::file::vrefnScale, vrefn);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Xadc::readVoltageFromSysfs(std::string rawFile, std::string scaleFile,
|
ReturnValue_t Xadc::readVoltageFromSysfs(std::string rawFile, std::string scaleFile,
|
||||||
float& voltage) {
|
float& voltage) {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
float raw = 0;
|
float raw = 0;
|
||||||
float scale = 0;
|
float scale = 0;
|
||||||
result = readValFromFile(rawFile.c_str(), raw);
|
result = readValFromFile(rawFile.c_str(), raw);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = readValFromFile(scaleFile.c_str(), scale);
|
result = readValFromFile(scaleFile.c_str(), scale);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
voltage = calculateVoltage(raw, scale);
|
voltage = calculateVoltage(raw, scale);
|
||||||
@ -127,7 +127,7 @@ ReturnValue_t Xadc::readValFromFile(const char* filename, T& val) {
|
|||||||
fp = fopen(filename, "r");
|
fp = fopen(filename, "r");
|
||||||
if (fp == nullptr) {
|
if (fp == nullptr) {
|
||||||
sif::warning << "Xadc::readValFromFile: Failed to open file " << filename << std::endl;
|
sif::warning << "Xadc::readValFromFile: Failed to open file " << filename << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
char valstring[MAX_STR_LENGTH] = "";
|
char valstring[MAX_STR_LENGTH] = "";
|
||||||
char* returnVal = fgets(valstring, MAX_STR_LENGTH, fp);
|
char* returnVal = fgets(valstring, MAX_STR_LENGTH, fp);
|
||||||
@ -135,10 +135,10 @@ ReturnValue_t Xadc::readValFromFile(const char* filename, T& val) {
|
|||||||
sif::warning << "Xadc::readValFromFile: Failed to read string from file " << filename
|
sif::warning << "Xadc::readValFromFile: Failed to read string from file " << filename
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
std::istringstream valSstream(valstring);
|
std::istringstream valSstream(valstring);
|
||||||
valSstream >> val;
|
valSstream >> val;
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
|
|
||||||
namespace xadc {
|
namespace xadc {
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <fsfw/objectmanager/ObjectManager.h>
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
||||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
#include <fsfw/returnvalues/returnvalue.h>
|
||||||
#include <fsfw/serviceinterface/ServiceInterface.h>
|
#include <fsfw/serviceinterface/ServiceInterface.h>
|
||||||
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
|
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
|
||||||
#include <fsfw/tasks/PeriodicTaskIF.h>
|
#include <fsfw/tasks/PeriodicTaskIF.h>
|
||||||
@ -36,7 +36,7 @@ void initmission::initMission() {
|
|||||||
|
|
||||||
void initmission::initTasks() {
|
void initmission::initTasks() {
|
||||||
TaskFactory* factory = TaskFactory::instance();
|
TaskFactory* factory = TaskFactory::instance();
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
if (factory == nullptr) {
|
if (factory == nullptr) {
|
||||||
/* Should never happen ! */
|
/* Should never happen ! */
|
||||||
return;
|
return;
|
||||||
@ -51,28 +51,28 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* tmtcDistributor = factory->createPeriodicTask(
|
PeriodicTaskIF* tmtcDistributor = factory->createPeriodicTask(
|
||||||
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
result = tmtcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
|
result = tmtcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Object add component failed" << std::endl;
|
sif::error << "Object add component failed" << std::endl;
|
||||||
}
|
}
|
||||||
result = tmtcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
|
result = tmtcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Object add component failed" << std::endl;
|
sif::error << "Object add component failed" << std::endl;
|
||||||
}
|
}
|
||||||
result = tmtcDistributor->addComponent(objects::TM_FUNNEL);
|
result = tmtcDistributor->addComponent(objects::TM_FUNNEL);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Object add component failed" << std::endl;
|
sif::error << "Object add component failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
|
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
|
||||||
"TMTC_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"TMTC_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
|
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Add component TMTC Bridge failed" << std::endl;
|
sif::error << "Add component TMTC Bridge failed" << std::endl;
|
||||||
}
|
}
|
||||||
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
|
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
|
||||||
"TMTC_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
"TMTC_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||||
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
|
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Add component TMTC Polling failed" << std::endl;
|
sif::error << "Add component TMTC Polling failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ void initmission::initTasks() {
|
|||||||
FixedTimeslotTaskIF* pst = factory->createFixedTimeslotTask(
|
FixedTimeslotTaskIF* pst = factory->createFixedTimeslotTask(
|
||||||
"UART_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 1.0, missedDeadlineFunc);
|
"UART_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 1.0, missedDeadlineFunc);
|
||||||
result = pst::pstUart(pst);
|
result = pst::pstUart(pst);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
|
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
|
||||||
}
|
}
|
||||||
pstTasks.push_back(pst);
|
pstTasks.push_back(pst);
|
||||||
@ -93,7 +93,7 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* mpsocHelperTask = factory->createPeriodicTask(
|
PeriodicTaskIF* mpsocHelperTask = factory->createPeriodicTask(
|
||||||
"PLOC_MPSOC_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"PLOC_MPSOC_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
result = mpsocHelperTask->addComponent(objects::PLOC_MPSOC_HELPER);
|
result = mpsocHelperTask->addComponent(objects::PLOC_MPSOC_HELPER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PLOC_MPSOC_HELPER", objects::PLOC_MPSOC_HELPER);
|
initmission::printAddObjectError("PLOC_MPSOC_HELPER", objects::PLOC_MPSOC_HELPER);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_PLOC_MPSOC == 1*/
|
#endif /* OBSW_ADD_PLOC_MPSOC == 1*/
|
||||||
@ -102,7 +102,7 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* supvHelperTask = factory->createPeriodicTask(
|
PeriodicTaskIF* supvHelperTask = factory->createPeriodicTask(
|
||||||
"PLOC_SUPV_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"PLOC_SUPV_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
result = supvHelperTask->addComponent(objects::PLOC_SUPERVISOR_HELPER);
|
result = supvHelperTask->addComponent(objects::PLOC_SUPERVISOR_HELPER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PLOC_SUPV_HELPER", objects::PLOC_SUPERVISOR_HELPER);
|
initmission::printAddObjectError("PLOC_SUPV_HELPER", objects::PLOC_SUPERVISOR_HELPER);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
||||||
@ -111,7 +111,7 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* ccsdsHandlerTask = factory->createPeriodicTask(
|
PeriodicTaskIF* ccsdsHandlerTask = factory->createPeriodicTask(
|
||||||
"CCSDS_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
"CCSDS_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||||
result = ccsdsHandlerTask->addComponent(objects::CCSDS_HANDLER);
|
result = ccsdsHandlerTask->addComponent(objects::CCSDS_HANDLER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("CCSDS Handler", objects::CCSDS_HANDLER);
|
initmission::printAddObjectError("CCSDS Handler", objects::CCSDS_HANDLER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ void initmission::initTasks() {
|
|||||||
PeriodicTaskIF* pdecHandlerTask = factory->createPeriodicTask(
|
PeriodicTaskIF* pdecHandlerTask = factory->createPeriodicTask(
|
||||||
"PDEC_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
"PDEC_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||||
result = pdecHandlerTask->addComponent(objects::PDEC_HANDLER);
|
result = pdecHandlerTask->addComponent(objects::PDEC_HANDLER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PDEC Handler", objects::PDEC_HANDLER);
|
initmission::printAddObjectError("PDEC Handler", objects::PDEC_HANDLER);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
|
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
|
||||||
@ -160,11 +160,11 @@ void initmission::initTasks() {
|
|||||||
void initmission::createPusTasks(TaskFactory& factory,
|
void initmission::createPusTasks(TaskFactory& factory,
|
||||||
TaskDeadlineMissedFunction missedDeadlineFunc,
|
TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||||
std::vector<PeriodicTaskIF*>& taskVec) {
|
std::vector<PeriodicTaskIF*>& taskVec) {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
PeriodicTaskIF* pusVerification = factory.createPeriodicTask(
|
PeriodicTaskIF* pusVerification = factory.createPeriodicTask(
|
||||||
"PUS_VERIF", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
"PUS_VERIF", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
result = pusVerification->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
|
result = pusVerification->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Object add component failed" << std::endl;
|
sif::error << "Object add component failed" << std::endl;
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusVerification);
|
taskVec.push_back(pusVerification);
|
||||||
@ -172,11 +172,11 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
PeriodicTaskIF* pusEvents = factory.createPeriodicTask(
|
PeriodicTaskIF* pusEvents = factory.createPeriodicTask(
|
||||||
"PUS_EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
"PUS_EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
result = pusEvents->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
|
result = pusEvents->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_EVENTS", objects::PUS_SERVICE_5_EVENT_REPORTING);
|
initmission::printAddObjectError("PUS_EVENTS", objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||||
}
|
}
|
||||||
result = pusEvents->addComponent(objects::EVENT_MANAGER);
|
result = pusEvents->addComponent(objects::EVENT_MANAGER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_MGMT", objects::EVENT_MANAGER);
|
initmission::printAddObjectError("PUS_MGMT", objects::EVENT_MANAGER);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusEvents);
|
taskVec.push_back(pusEvents);
|
||||||
@ -184,11 +184,11 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
PeriodicTaskIF* pusHighPrio = factory.createPeriodicTask(
|
PeriodicTaskIF* pusHighPrio = factory.createPeriodicTask(
|
||||||
"PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
"PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
initmission::printAddObjectError("PUS2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||||
}
|
}
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS9", objects::PUS_SERVICE_9_TIME_MGMT);
|
initmission::printAddObjectError("PUS9", objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusHighPrio);
|
taskVec.push_back(pusHighPrio);
|
||||||
@ -196,19 +196,19 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
PeriodicTaskIF* pusMedPrio = factory.createPeriodicTask(
|
PeriodicTaskIF* pusMedPrio = factory.createPeriodicTask(
|
||||||
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
initmission::printAddObjectError("PUS8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS200", objects::PUS_SERVICE_200_MODE_MGMT);
|
initmission::printAddObjectError("PUS200", objects::PUS_SERVICE_200_MODE_MGMT);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS20", objects::PUS_SERVICE_20_PARAMETERS);
|
initmission::printAddObjectError("PUS20", objects::PUS_SERVICE_20_PARAMETERS);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
initmission::printAddObjectError("PUS3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusMedPrio);
|
taskVec.push_back(pusMedPrio);
|
||||||
@ -216,11 +216,11 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
PeriodicTaskIF* pusLowPrio = factory.createPeriodicTask(
|
PeriodicTaskIF* pusLowPrio = factory.createPeriodicTask(
|
||||||
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
|
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
|
||||||
result = pusLowPrio->addComponent(objects::PUS_SERVICE_17_TEST);
|
result = pusLowPrio->addComponent(objects::PUS_SERVICE_17_TEST);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS17", objects::PUS_SERVICE_17_TEST);
|
initmission::printAddObjectError("PUS17", objects::PUS_SERVICE_17_TEST);
|
||||||
}
|
}
|
||||||
result = pusLowPrio->addComponent(objects::INTERNAL_ERROR_REPORTER);
|
result = pusLowPrio->addComponent(objects::INTERNAL_ERROR_REPORTER);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("INT_ERR_RPRT", objects::INTERNAL_ERROR_REPORTER);
|
initmission::printAddObjectError("INT_ERR_RPRT", objects::INTERNAL_ERROR_REPORTER);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusLowPrio);
|
taskVec.push_back(pusLowPrio);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#include "commonConfig.h"
|
#include "commonConfig.h"
|
||||||
|
|
||||||
#include "fsfw/tmtcpacket/SpacePacket.h"
|
#include "fsfw/tmtcpacket/ccsds/defs.h"
|
||||||
#include "tmtc/apid.h"
|
#include "tmtc/apid.h"
|
||||||
|
|
||||||
const fsfw::Version common::OBSW_VERSION{OBSW_VERSION_MAJOR, OBSW_VERSION_MINOR,
|
const fsfw::Version common::OBSW_VERSION{OBSW_VERSION_MAJOR, OBSW_VERSION_MINOR,
|
||||||
OBSW_VERSION_REVISION, OBSW_VERSION_CST_GIT_SHA1};
|
OBSW_VERSION_REVISION, OBSW_VERSION_CST_GIT_SHA1};
|
||||||
const uint16_t common::PUS_PACKET_ID = spacepacket::getTcSpacePacketIdFromApid(apid::EIVE_OBSW);
|
const uint16_t common::PUS_PACKET_ID = ccsds::getTcSpacePacketIdFromApid(apid::EIVE_OBSW);
|
||||||
|
@ -18,7 +18,7 @@ enum commonObjects : uint32_t {
|
|||||||
|
|
||||||
/* 0x43 ('C') for Controllers */
|
/* 0x43 ('C') for Controllers */
|
||||||
THERMAL_CONTROLLER = 0x43400001,
|
THERMAL_CONTROLLER = 0x43400001,
|
||||||
ACS_CONTROLLER = 0x43100002,
|
ACS_CONTROLLER = 0x43000002,
|
||||||
CORE_CONTROLLER = 0x43000003,
|
CORE_CONTROLLER = 0x43000003,
|
||||||
|
|
||||||
/* 0x44 ('D') for device handlers */
|
/* 0x44 ('D') for device handlers */
|
||||||
|
@ -19,16 +19,16 @@ ReturnValue_t AcuDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
|||||||
|
|
||||||
ReturnValue_t AcuDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
ReturnValue_t AcuDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
const uint8_t *commandData, size_t commandDataLen) {
|
const uint8_t *commandData, size_t commandDataLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t AcuDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
ReturnValue_t AcuDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
||||||
size_t *foundLen) {
|
size_t *foundLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t AcuDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
ReturnValue_t AcuDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AcuDummy::fillCommandAndReplyMap() {}
|
void AcuDummy::fillCommandAndReplyMap() {}
|
||||||
@ -37,6 +37,6 @@ uint32_t AcuDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return
|
|||||||
|
|
||||||
ReturnValue_t AcuDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t AcuDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(P60System::pool::ACU_TEMPERATURES, new PoolEntry<float>(3));
|
localDataPoolMap.emplace(ACU::pool::ACU_TEMPERATURES, new PoolEntry<float>(3));
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -19,16 +19,16 @@ ReturnValue_t BpxDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
|||||||
|
|
||||||
ReturnValue_t BpxDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
ReturnValue_t BpxDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
const uint8_t *commandData, size_t commandDataLen) {
|
const uint8_t *commandData, size_t commandDataLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t BpxDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
ReturnValue_t BpxDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
||||||
size_t *foundLen) {
|
size_t *foundLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t BpxDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
ReturnValue_t BpxDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BpxDummy::fillCommandAndReplyMap() {}
|
void BpxDummy::fillCommandAndReplyMap() {}
|
||||||
@ -51,5 +51,5 @@ ReturnValue_t BpxDummy::initializeLocalDataPool(localpool::DataPool &localDataPo
|
|||||||
localDataPoolMap.emplace(BpxBattery::BATTERY_HEATER_MODE, &battheatMode);
|
localDataPoolMap.emplace(BpxBattery::BATTERY_HEATER_MODE, &battheatMode);
|
||||||
localDataPoolMap.emplace(BpxBattery::BATTHEAT_LOW_LIMIT, &battheatLow);
|
localDataPoolMap.emplace(BpxBattery::BATTHEAT_LOW_LIMIT, &battheatLow);
|
||||||
localDataPoolMap.emplace(BpxBattery::BATTHEAT_HIGH_LIMIT, &battheatHigh);
|
localDataPoolMap.emplace(BpxBattery::BATTHEAT_HIGH_LIMIT, &battheatHigh);
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -4,18 +4,18 @@ ComIFDummy::ComIFDummy(object_id_t objectId) : SystemObject(objectId) {}
|
|||||||
|
|
||||||
ComIFDummy::~ComIFDummy() {}
|
ComIFDummy::~ComIFDummy() {}
|
||||||
|
|
||||||
ReturnValue_t ComIFDummy::initializeInterface(CookieIF *cookie) { return RETURN_OK; }
|
ReturnValue_t ComIFDummy::initializeInterface(CookieIF *cookie) { return returnvalue::OK; }
|
||||||
|
|
||||||
ReturnValue_t ComIFDummy::sendMessage(CookieIF *cookie, const uint8_t *sendData, size_t sendLen) {
|
ReturnValue_t ComIFDummy::sendMessage(CookieIF *cookie, const uint8_t *sendData, size_t sendLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t ComIFDummy::getSendSuccess(CookieIF *cookie) { return RETURN_OK; }
|
ReturnValue_t ComIFDummy::getSendSuccess(CookieIF *cookie) { return returnvalue::OK; }
|
||||||
|
|
||||||
ReturnValue_t ComIFDummy::requestReceiveMessage(CookieIF *cookie, size_t requestLen) {
|
ReturnValue_t ComIFDummy::requestReceiveMessage(CookieIF *cookie, size_t requestLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t ComIFDummy::readReceivedMessage(CookieIF *cookie, uint8_t **buffer, size_t *size) {
|
ReturnValue_t ComIFDummy::readReceivedMessage(CookieIF *cookie, uint8_t **buffer, size_t *size) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -14,16 +14,16 @@ ReturnValue_t CoreControllerDummy::initialize() {
|
|||||||
if (not done) {
|
if (not done) {
|
||||||
done = true;
|
done = true;
|
||||||
ReturnValue_t result = ExtendedControllerBase::initialize();
|
ReturnValue_t result = ExtendedControllerBase::initialize();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreControllerDummy::handleCommandMessage(CommandMessage* message) {
|
ReturnValue_t CoreControllerDummy::handleCommandMessage(CommandMessage* message) {
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreControllerDummy::performControlOperation() { return; }
|
void CoreControllerDummy::performControlOperation() { return; }
|
||||||
@ -33,7 +33,7 @@ ReturnValue_t CoreControllerDummy::initializeLocalDataPool(localpool::DataPool&
|
|||||||
localDataPoolMap.emplace(core::TEMPERATURE, new PoolEntry<float>({0}));
|
localDataPoolMap.emplace(core::TEMPERATURE, new PoolEntry<float>({0}));
|
||||||
localDataPoolMap.emplace(core::PS_VOLTAGE, new PoolEntry<float>({0}));
|
localDataPoolMap.emplace(core::PS_VOLTAGE, new PoolEntry<float>({0}));
|
||||||
localDataPoolMap.emplace(core::PL_VOLTAGE, new PoolEntry<float>({0}));
|
localDataPoolMap.emplace(core::PL_VOLTAGE, new PoolEntry<float>({0}));
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalPoolDataSetBase* CoreControllerDummy::getDataSetHandle(sid_t sid) {
|
LocalPoolDataSetBase* CoreControllerDummy::getDataSetHandle(sid_t sid) {
|
||||||
@ -51,5 +51,5 @@ ReturnValue_t CoreControllerDummy::checkModeCommand(Mode_t mode, Submode_t submo
|
|||||||
if ((mode != MODE_OFF) && (mode != MODE_ON) && (mode != MODE_NORMAL)) {
|
if ((mode != MODE_OFF) && (mode != MODE_ON) && (mode != MODE_NORMAL)) {
|
||||||
return INVALID_MODE;
|
return INVALID_MODE;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -22,16 +22,16 @@ ReturnValue_t GyroAdisDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id)
|
|||||||
ReturnValue_t GyroAdisDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
ReturnValue_t GyroAdisDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
const uint8_t *commandData,
|
const uint8_t *commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t GyroAdisDummy::scanForReply(const uint8_t *start, size_t len,
|
ReturnValue_t GyroAdisDummy::scanForReply(const uint8_t *start, size_t len,
|
||||||
DeviceCommandId_t *foundId, size_t *foundLen) {
|
DeviceCommandId_t *foundId, size_t *foundLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t GyroAdisDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
ReturnValue_t GyroAdisDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GyroAdisDummy::fillCommandAndReplyMap() {}
|
void GyroAdisDummy::fillCommandAndReplyMap() {}
|
||||||
@ -41,5 +41,5 @@ uint32_t GyroAdisDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { r
|
|||||||
ReturnValue_t GyroAdisDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t GyroAdisDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(ADIS1650X::TEMPERATURE, new PoolEntry<float>({0.0}));
|
localDataPoolMap.emplace(ADIS1650X::TEMPERATURE, new PoolEntry<float>({0.0}));
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -22,16 +22,16 @@ ReturnValue_t GyroL3GD20Dummy::buildTransitionDeviceCommand(DeviceCommandId_t *i
|
|||||||
ReturnValue_t GyroL3GD20Dummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
ReturnValue_t GyroL3GD20Dummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
const uint8_t *commandData,
|
const uint8_t *commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t GyroL3GD20Dummy::scanForReply(const uint8_t *start, size_t len,
|
ReturnValue_t GyroL3GD20Dummy::scanForReply(const uint8_t *start, size_t len,
|
||||||
DeviceCommandId_t *foundId, size_t *foundLen) {
|
DeviceCommandId_t *foundId, size_t *foundLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t GyroL3GD20Dummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
ReturnValue_t GyroL3GD20Dummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GyroL3GD20Dummy::fillCommandAndReplyMap() {}
|
void GyroL3GD20Dummy::fillCommandAndReplyMap() {}
|
||||||
@ -44,5 +44,5 @@ ReturnValue_t GyroL3GD20Dummy::initializeLocalDataPool(localpool::DataPool &loca
|
|||||||
localDataPoolMap.emplace(L3GD20H::ANG_VELOC_Y, new PoolEntry<float>({0.0}));
|
localDataPoolMap.emplace(L3GD20H::ANG_VELOC_Y, new PoolEntry<float>({0.0}));
|
||||||
localDataPoolMap.emplace(L3GD20H::ANG_VELOC_Z, new PoolEntry<float>({0.0}));
|
localDataPoolMap.emplace(L3GD20H::ANG_VELOC_Z, new PoolEntry<float>({0.0}));
|
||||||
localDataPoolMap.emplace(L3GD20H::TEMPERATURE, new PoolEntry<float>({0.0}));
|
localDataPoolMap.emplace(L3GD20H::TEMPERATURE, new PoolEntry<float>({0.0}));
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -20,16 +20,16 @@ ReturnValue_t ImtqDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
|||||||
ReturnValue_t ImtqDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
ReturnValue_t ImtqDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
const uint8_t *commandData,
|
const uint8_t *commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t ImtqDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
ReturnValue_t ImtqDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
||||||
size_t *foundLen) {
|
size_t *foundLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t ImtqDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
ReturnValue_t ImtqDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImtqDummy::fillCommandAndReplyMap() {}
|
void ImtqDummy::fillCommandAndReplyMap() {}
|
||||||
@ -39,5 +39,5 @@ uint32_t ImtqDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { retur
|
|||||||
ReturnValue_t ImtqDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t ImtqDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(IMTQ::MCU_TEMPERATURE, new PoolEntry<int16_t>({0}));
|
localDataPoolMap.emplace(IMTQ::MCU_TEMPERATURE, new PoolEntry<int16_t>({0}));
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -22,16 +22,16 @@ ReturnValue_t MgmLIS3MDLDummy::buildTransitionDeviceCommand(DeviceCommandId_t *i
|
|||||||
ReturnValue_t MgmLIS3MDLDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
ReturnValue_t MgmLIS3MDLDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
const uint8_t *commandData,
|
const uint8_t *commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t MgmLIS3MDLDummy::scanForReply(const uint8_t *start, size_t len,
|
ReturnValue_t MgmLIS3MDLDummy::scanForReply(const uint8_t *start, size_t len,
|
||||||
DeviceCommandId_t *foundId, size_t *foundLen) {
|
DeviceCommandId_t *foundId, size_t *foundLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t MgmLIS3MDLDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
ReturnValue_t MgmLIS3MDLDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MgmLIS3MDLDummy::fillCommandAndReplyMap() {}
|
void MgmLIS3MDLDummy::fillCommandAndReplyMap() {}
|
||||||
@ -41,5 +41,5 @@ uint32_t MgmLIS3MDLDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) {
|
|||||||
ReturnValue_t MgmLIS3MDLDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t MgmLIS3MDLDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(MGMLIS3MDL::TEMPERATURE_CELCIUS, new PoolEntry<float>({0.0}));
|
localDataPoolMap.emplace(MGMLIS3MDL::TEMPERATURE_CELCIUS, new PoolEntry<float>({0.0}));
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -22,16 +22,16 @@ ReturnValue_t P60DockDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id)
|
|||||||
ReturnValue_t P60DockDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
ReturnValue_t P60DockDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
const uint8_t *commandData,
|
const uint8_t *commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t P60DockDummy::scanForReply(const uint8_t *start, size_t len,
|
ReturnValue_t P60DockDummy::scanForReply(const uint8_t *start, size_t len,
|
||||||
DeviceCommandId_t *foundId, size_t *foundLen) {
|
DeviceCommandId_t *foundId, size_t *foundLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t P60DockDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
ReturnValue_t P60DockDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void P60DockDummy::fillCommandAndReplyMap() {}
|
void P60DockDummy::fillCommandAndReplyMap() {}
|
||||||
@ -40,7 +40,7 @@ uint32_t P60DockDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { re
|
|||||||
|
|
||||||
ReturnValue_t P60DockDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t P60DockDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(P60System::pool::P60DOCK_TEMPERATURE_1, new PoolEntry<float>({0}));
|
localDataPoolMap.emplace(P60Dock::pool::P60DOCK_TEMPERATURE_1, new PoolEntry<float>({0}));
|
||||||
localDataPoolMap.emplace(P60System::pool::P60DOCK_TEMPERATURE_2, new PoolEntry<float>({0}));
|
localDataPoolMap.emplace(P60Dock::pool::P60DOCK_TEMPERATURE_2, new PoolEntry<float>({0}));
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -19,16 +19,16 @@ ReturnValue_t PduDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
|||||||
|
|
||||||
ReturnValue_t PduDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
ReturnValue_t PduDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
const uint8_t *commandData, size_t commandDataLen) {
|
const uint8_t *commandData, size_t commandDataLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PduDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
ReturnValue_t PduDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
||||||
size_t *foundLen) {
|
size_t *foundLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PduDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
ReturnValue_t PduDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PduDummy::fillCommandAndReplyMap() {}
|
void PduDummy::fillCommandAndReplyMap() {}
|
||||||
@ -37,6 +37,6 @@ uint32_t PduDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return
|
|||||||
|
|
||||||
ReturnValue_t PduDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t PduDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(P60System::pool::PDU_TEMPERATURE, new PoolEntry<float>({0}));
|
localDataPoolMap.emplace(PDU::pool::PDU_TEMPERATURE, new PoolEntry<float>({0}));
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -22,16 +22,16 @@ ReturnValue_t PlPcduDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
|||||||
ReturnValue_t PlPcduDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
ReturnValue_t PlPcduDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
const uint8_t *commandData,
|
const uint8_t *commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlPcduDummy::scanForReply(const uint8_t *start, size_t len,
|
ReturnValue_t PlPcduDummy::scanForReply(const uint8_t *start, size_t len,
|
||||||
DeviceCommandId_t *foundId, size_t *foundLen) {
|
DeviceCommandId_t *foundId, size_t *foundLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlPcduDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
ReturnValue_t PlPcduDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlPcduDummy::fillCommandAndReplyMap() {}
|
void PlPcduDummy::fillCommandAndReplyMap() {}
|
||||||
@ -41,5 +41,5 @@ uint32_t PlPcduDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { ret
|
|||||||
ReturnValue_t PlPcduDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t PlPcduDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(plpcdu::PlPcduPoolIds::TEMP, new PoolEntry<float>({0.0}));
|
localDataPoolMap.emplace(plpcdu::PlPcduPoolIds::TEMP, new PoolEntry<float>({0.0}));
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -19,16 +19,16 @@ ReturnValue_t RwDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
|||||||
|
|
||||||
ReturnValue_t RwDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
ReturnValue_t RwDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
const uint8_t *commandData, size_t commandDataLen) {
|
const uint8_t *commandData, size_t commandDataLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t RwDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
ReturnValue_t RwDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
||||||
size_t *foundLen) {
|
size_t *foundLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t RwDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
ReturnValue_t RwDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RwDummy::fillCommandAndReplyMap() {}
|
void RwDummy::fillCommandAndReplyMap() {}
|
||||||
@ -71,5 +71,5 @@ ReturnValue_t RwDummy::initializeLocalDataPool(localpool::DataPool &localDataPoo
|
|||||||
localDataPoolMap.emplace(RwDefinitions::SPI_BYTES_READ, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(RwDefinitions::SPI_BYTES_READ, new PoolEntry<uint32_t>({0}));
|
||||||
localDataPoolMap.emplace(RwDefinitions::SPI_REG_OVERRUN_ERRORS, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(RwDefinitions::SPI_REG_OVERRUN_ERRORS, new PoolEntry<uint32_t>({0}));
|
||||||
localDataPoolMap.emplace(RwDefinitions::SPI_TOTAL_ERRORS, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(RwDefinitions::SPI_TOTAL_ERRORS, new PoolEntry<uint32_t>({0}));
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -22,16 +22,16 @@ ReturnValue_t StarTrackerDummy::buildTransitionDeviceCommand(DeviceCommandId_t *
|
|||||||
ReturnValue_t StarTrackerDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
ReturnValue_t StarTrackerDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
const uint8_t *commandData,
|
const uint8_t *commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerDummy::scanForReply(const uint8_t *start, size_t len,
|
ReturnValue_t StarTrackerDummy::scanForReply(const uint8_t *start, size_t len,
|
||||||
DeviceCommandId_t *foundId, size_t *foundLen) {
|
DeviceCommandId_t *foundId, size_t *foundLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
ReturnValue_t StarTrackerDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StarTrackerDummy::fillCommandAndReplyMap() {}
|
void StarTrackerDummy::fillCommandAndReplyMap() {}
|
||||||
@ -41,5 +41,5 @@ uint32_t StarTrackerDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo)
|
|||||||
ReturnValue_t StarTrackerDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t StarTrackerDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(startracker::MCU_TEMPERATURE, new PoolEntry<float>({0}));
|
localDataPoolMap.emplace(startracker::MCU_TEMPERATURE, new PoolEntry<float>({0}));
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -25,15 +25,17 @@ ReturnValue_t SusDummy::initialize() {
|
|||||||
if (not done) {
|
if (not done) {
|
||||||
done = true;
|
done = true;
|
||||||
ReturnValue_t result = ExtendedControllerBase::initialize();
|
ReturnValue_t result = ExtendedControllerBase::initialize();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t SusDummy::handleCommandMessage(CommandMessage* message) { return RETURN_FAILED; }
|
ReturnValue_t SusDummy::handleCommandMessage(CommandMessage* message) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
void SusDummy::performControlOperation() {
|
void SusDummy::performControlOperation() {
|
||||||
iteration++;
|
iteration++;
|
||||||
@ -54,7 +56,7 @@ ReturnValue_t SusDummy::initializeLocalDataPool(localpool::DataPool& localDataPo
|
|||||||
localDataPoolMap.emplace(SUS::SusPoolIds::TEMPERATURE_C, new PoolEntry<float>({0}, 1, true));
|
localDataPoolMap.emplace(SUS::SusPoolIds::TEMPERATURE_C, new PoolEntry<float>({0}, 1, true));
|
||||||
localDataPoolMap.emplace(SUS::SusPoolIds::CHANNEL_VEC, new PoolEntry<uint16_t>({0}));
|
localDataPoolMap.emplace(SUS::SusPoolIds::CHANNEL_VEC, new PoolEntry<uint16_t>({0}));
|
||||||
|
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalPoolDataSetBase* SusDummy::getDataSetHandle(sid_t sid) {
|
LocalPoolDataSetBase* SusDummy::getDataSetHandle(sid_t sid) {
|
||||||
@ -74,5 +76,5 @@ ReturnValue_t SusDummy::checkModeCommand(Mode_t mode, Submode_t submode,
|
|||||||
if ((mode != MODE_OFF) && (mode != MODE_ON) && (mode != MODE_NORMAL)) {
|
if ((mode != MODE_OFF) && (mode != MODE_ON) && (mode != MODE_NORMAL)) {
|
||||||
return INVALID_MODE;
|
return INVALID_MODE;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -22,16 +22,16 @@ ReturnValue_t SyrlinksDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id)
|
|||||||
ReturnValue_t SyrlinksDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
ReturnValue_t SyrlinksDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
const uint8_t *commandData,
|
const uint8_t *commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t SyrlinksDummy::scanForReply(const uint8_t *start, size_t len,
|
ReturnValue_t SyrlinksDummy::scanForReply(const uint8_t *start, size_t len,
|
||||||
DeviceCommandId_t *foundId, size_t *foundLen) {
|
DeviceCommandId_t *foundId, size_t *foundLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t SyrlinksDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
ReturnValue_t SyrlinksDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SyrlinksDummy::fillCommandAndReplyMap() {}
|
void SyrlinksDummy::fillCommandAndReplyMap() {}
|
||||||
@ -42,5 +42,5 @@ ReturnValue_t SyrlinksDummy::initializeLocalDataPool(localpool::DataPool &localD
|
|||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(syrlinks::TEMP_BASEBAND_BOARD, new PoolEntry<float>({0}));
|
localDataPoolMap.emplace(syrlinks::TEMP_BASEBAND_BOARD, new PoolEntry<float>({0}));
|
||||||
localDataPoolMap.emplace(syrlinks::TEMP_POWER_AMPLIFIER, new PoolEntry<float>({0}));
|
localDataPoolMap.emplace(syrlinks::TEMP_POWER_AMPLIFIER, new PoolEntry<float>({0}));
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -32,16 +32,16 @@ ReturnValue_t TemperatureSensorsDummy::initialize() {
|
|||||||
if (not done) {
|
if (not done) {
|
||||||
done = true;
|
done = true;
|
||||||
ReturnValue_t result = ExtendedControllerBase::initialize();
|
ReturnValue_t result = ExtendedControllerBase::initialize();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t TemperatureSensorsDummy::handleCommandMessage(CommandMessage* message) {
|
ReturnValue_t TemperatureSensorsDummy::handleCommandMessage(CommandMessage* message) {
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TemperatureSensorsDummy::performControlOperation() {
|
void TemperatureSensorsDummy::performControlOperation() {
|
||||||
@ -49,7 +49,7 @@ void TemperatureSensorsDummy::performControlOperation() {
|
|||||||
value = sin(iteration / 80. * M_PI) * 10;
|
value = sin(iteration / 80. * M_PI) * 10;
|
||||||
|
|
||||||
ReturnValue_t result = max31865Set.read();
|
ReturnValue_t result = max31865Set.read();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "Failed to read temperature from MAX31865 dataset" << std::endl;
|
sif::warning << "Failed to read temperature from MAX31865 dataset" << std::endl;
|
||||||
}
|
}
|
||||||
max31865Set.rtdValue = value - 5;
|
max31865Set.rtdValue = value - 5;
|
||||||
@ -73,7 +73,7 @@ ReturnValue_t TemperatureSensorsDummy::initializeLocalDataPool(
|
|||||||
localDataPoolMap.emplace(static_cast<lp_id_t>(MAX31865::PoolIds::FAULT_BYTE),
|
localDataPoolMap.emplace(static_cast<lp_id_t>(MAX31865::PoolIds::FAULT_BYTE),
|
||||||
new PoolEntry<uint8_t>({0}));
|
new PoolEntry<uint8_t>({0}));
|
||||||
|
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalPoolDataSetBase* TemperatureSensorsDummy::getDataSetHandle(sid_t sid) {
|
LocalPoolDataSetBase* TemperatureSensorsDummy::getDataSetHandle(sid_t sid) {
|
||||||
@ -94,5 +94,5 @@ ReturnValue_t TemperatureSensorsDummy::checkModeCommand(Mode_t mode, Submode_t s
|
|||||||
if ((mode != MODE_OFF) && (mode != MODE_ON) && (mode != MODE_NORMAL)) {
|
if ((mode != MODE_OFF) && (mode != MODE_ON) && (mode != MODE_NORMAL)) {
|
||||||
return INVALID_MODE;
|
return INVALID_MODE;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit 904ae2cc0ef61706a385d498942154da4f923a18
|
Subproject commit 9a590a3fcd81ed4dd48de503522b6d71f64205d2
|
@ -78,7 +78,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
8901;0x22c5;CLOCK_SET_FAILURE;LOW;;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
8901;0x22c5;CLOCK_SET_FAILURE;LOW;;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
||||||
9100;0x238c;TC_DELETION_FAILED;MEDIUM;Deletion of a TC from the map failed. P1: First 32 bit of request ID, P2. Last 32 bit of Request ID;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
9100;0x238c;TC_DELETION_FAILED;MEDIUM;Deletion of a TC from the map failed. P1: First 32 bit of request ID, P2. Last 32 bit of Request ID;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||||
9700;0x25e4;TEST;INFO;;fsfw/src/fsfw/pus/Service17Test.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
|
10600;0x2968;CHANGE_OF_SETUP_PARAMETER;LOW;;fsfw/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
|
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
|
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
|
11302;0x2c26;SWITCHING_Q7S_DENIED;MEDIUM;;mission/devices/devicedefinitions/powerDefinitions.h
|
||||||
@ -159,6 +159,8 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
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
|
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
|
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
|
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
|
||||||
|
12612;0x3144;MPSOC_TM_SIZE_ERROR;LOW;;linux/devices/ploc/PlocMPSoCHelper.h
|
||||||
|
12613;0x3145;MPSOC_TM_CRC_MISSMATCH;LOW;;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
|
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
|
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
|
12702;0x319e;U_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
|
||||||
@ -192,18 +194,23 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
13605;0x3525;SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL;LOW;Requesting event buffer was successful;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
|
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
|
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
|
13608;0x3528;SUPV_MEM_CHECK_OK;INFO;;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
|
13609;0x3529;SUPV_MEM_CHECK_FAIL;INFO;;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
|
13616;0x3530;SUPV_SENDING_COMMAND_FAILED;LOW;;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
|
13617;0x3531;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
|
||||||
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
|
13618;0x3532;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
|
||||||
13613;0x352d;SUPV_ACK_FAILURE_REPORT;LOW;Supervisor received acknowledgment failure report P1: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
|
13619;0x3533;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
|
||||||
13614;0x352e;SUPV_EXE_FAILURE_REPORT;LOW;Execution report failure P1:;linux/devices/ploc/PlocSupvHelper.h
|
13620;0x3534;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
|
||||||
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
|
13621;0x3535;SUPV_ACK_FAILURE_REPORT;LOW;Supervisor received acknowledgment failure report P1: 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
|
13622;0x3536;SUPV_EXE_FAILURE_REPORT;LOW;Execution report failure P1:;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
|
13623;0x3537;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
|
||||||
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
|
13624;0x3538;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
|
||||||
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
|
13625;0x3539;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
|
||||||
|
13626;0x353a;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
|
||||||
|
13627;0x353b;WRITE_MEMORY_FAILED;LOW;Update procedure failed when sending packet. P1: First byte percent, third and fourth byte Sequence Count, P2: Bytes written;linux/devices/ploc/PlocSupvHelper.h
|
||||||
|
13628;0x353c;SUPV_REPLY_SIZE_MISSMATCH;LOW;;linux/devices/ploc/PlocSupvHelper.h
|
||||||
|
13629;0x353d;SUPV_REPLY_CRC_MISSMATCH;LOW;;linux/devices/ploc/PlocSupvHelper.h
|
||||||
|
13630;0x353e;SUPV_UPDATE_PROGRESS;INFO;Will be triggered every 5 percent of the update progress. P1: First byte percent, third and fourth byte Sequence Count, P2: Bytes written;linux/devices/ploc/PlocSupvHelper.h
|
||||||
13700;0x3584;ALLOC_FAILURE;MEDIUM;;bsp_q7s/core/CoreController.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
|
13701;0x3585;REBOOT_SW;MEDIUM; Software reboot occurred. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
||||||
13702;0x3586;REBOOT_MECHANISM_TRIGGERED;MEDIUM;The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots;bsp_q7s/core/CoreController.h
|
13702;0x3586;REBOOT_MECHANISM_TRIGGERED;MEDIUM;The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots;bsp_q7s/core/CoreController.h
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
0x00005060;P60DOCK_TEST_TASK
|
0x00005060;P60DOCK_TEST_TASK
|
||||||
|
0x43000002;ACS_CONTROLLER
|
||||||
0x43000003;CORE_CONTROLLER
|
0x43000003;CORE_CONTROLLER
|
||||||
0x43100002;ACS_CONTROLLER
|
|
||||||
0x43400001;THERMAL_CONTROLLER
|
0x43400001;THERMAL_CONTROLLER
|
||||||
0x44120006;MGM_0_LIS3_HANDLER
|
0x44120006;MGM_0_LIS3_HANDLER
|
||||||
0x44120010;GYRO_0_ADIS_HANDLER
|
0x44120010;GYRO_0_ADIS_HANDLER
|
||||||
@ -106,6 +106,7 @@
|
|||||||
0x534f0200;TM_STORE
|
0x534f0200;TM_STORE
|
||||||
0x534f0300;IPC_STORE
|
0x534f0300;IPC_STORE
|
||||||
0x53500010;TIME_STAMPER
|
0x53500010;TIME_STAMPER
|
||||||
|
0x53500020;VERIFICATION_REPORTER
|
||||||
0x53ffffff;FSFW_OBJECTS_END
|
0x53ffffff;FSFW_OBJECTS_END
|
||||||
0x54000010;SPI_TEST
|
0x54000010;SPI_TEST
|
||||||
0x54000020;UART_TEST
|
0x54000020;UART_TEST
|
||||||
|
|
@ -1,188 +1,169 @@
|
|||||||
Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||||
0x0000;OK;System-wide code for ok.;0;HasReturnvaluesIF;fsfw/returnvalues/HasReturnvaluesIF.h
|
0x0000;OK;System-wide code for ok.;0;HasReturnvaluesIF;fsfw/returnvalues/HasReturnvaluesIF.h
|
||||||
0x0001;Failed;Unspecified system-wide code for failed.;1;HasReturnvaluesIF;fsfw/returnvalues/HasReturnvaluesIF.h
|
0x0001;Failed;Unspecified system-wide code for failed.;1;HasReturnvaluesIF;fsfw/returnvalues/HasReturnvaluesIF.h
|
||||||
0x64a0;CCSDS_CommandNotImplemented;Received action message with unknown action id;160;CCSDS_HANDLER;mission/tmtc/CCSDSHandler.h
|
0x63a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NVMParameterBase.h
|
||||||
0x6100;GOMS_PacketTooLong;;0;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
0x58a0;SUSS_ErrorUnlockMutex;;160;SUS_HANDLER;mission/devices/SusHandler.h
|
||||||
0x6101;GOMS_InvalidTableId;;1;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
0x58a1;SUSS_ErrorLockMutex;;161;SUS_HANDLER;mission/devices/SusHandler.h
|
||||||
0x6102;GOMS_InvalidAddress;;2;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
0x66a0;SADPL_CommandNotSupported;;160;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
0x6103;GOMS_InvalidParamSize;;3;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
0x66a1;SADPL_DeploymentAlreadyExecuting;;161;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
0x6104;GOMS_InvalidPayloadSize;;4;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
0x66a2;SADPL_MainSwitchTimeoutFailure;;162;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
0x6105;GOMS_UnknownReplyId;;5;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
0x66a3;SADPL_SwitchingDeplSa1Failed;;163;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
0x56b0;RWHA_SpiWriteFailure;;176;RW_HANDLER;mission/devices/RwHandler.h
|
0x66a4;SADPL_SwitchingDeplSa2Failed;;164;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
0x56b1;RWHA_SpiReadFailure;Used by the spi send function to tell a failing read call;177;RW_HANDLER;mission/devices/RwHandler.h
|
0x52b0;RWHA_SpiWriteFailure;;176;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56b2;RWHA_MissingStartSign;Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E;178;RW_HANDLER;mission/devices/RwHandler.h
|
0x52b1;RWHA_SpiReadFailure;Used by the spi send function to tell a failing read call;177;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56b3;RWHA_InvalidSubstitute;Can be used by the HDLC decoding mechanism to inform about an invalid substitution combination;179;RW_HANDLER;mission/devices/RwHandler.h
|
0x52b2;RWHA_MissingStartSign;Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E;178;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56b4;RWHA_MissingEndSign;HDLC decoding mechanism never receives the end sign 0x7E;180;RW_HANDLER;mission/devices/RwHandler.h
|
0x52b3;RWHA_InvalidSubstitute;Can be used by the HDLC decoding mechanism to inform about an invalid substitution combination;179;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56b5;RWHA_NoReply;Reaction wheel only responds with empty frames.;181;RW_HANDLER;mission/devices/RwHandler.h
|
0x52b4;RWHA_MissingEndSign;HDLC decoding mechanism never receives the end sign 0x7E;180;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56b6;RWHA_NoStartMarker;Expected a start marker as first byte;182;RW_HANDLER;mission/devices/RwHandler.h
|
0x52b5;RWHA_NoReply;Reaction wheel only responds with empty frames.;181;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56a0;RWHA_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;RW_HANDLER;mission/devices/RwHandler.h
|
0x52b6;RWHA_NoStartMarker;Expected a start marker as first byte;182;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56a1;RWHA_InvalidRampTime;Action Message with invalid ramp time was received.;161;RW_HANDLER;mission/devices/RwHandler.h
|
0x52a0;RWHA_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56a2;RWHA_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;RW_HANDLER;mission/devices/RwHandler.h
|
0x52a1;RWHA_InvalidRampTime;Action Message with invalid ramp time was received.;161;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56a3;RWHA_ExecutionFailed;Command execution failed;163;RW_HANDLER;mission/devices/RwHandler.h
|
0x52a2;RWHA_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56a4;RWHA_CrcError;Reaction wheel reply has invalid crc;164;RW_HANDLER;mission/devices/RwHandler.h
|
0x52a3;RWHA_ExecutionFailed;Command execution failed;163;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x53a1;HEATER_CommandNotSupported;;161;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
0x52a4;RWHA_CrcError;Reaction wheel reply has invalid crc;164;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x53a2;HEATER_InitFailed;;162;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
0x5d00;GOMS_PacketTooLong;;0;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||||
0x53a3;HEATER_InvalidSwitchNr;;163;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
0x5d01;GOMS_InvalidTableId;;1;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||||
0x53a4;HEATER_MainSwitchSetTimeout;;164;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
0x5d02;GOMS_InvalidAddress;;2;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||||
0x53a5;HEATER_CommandAlreadyWaiting;;165;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
0x5d03;GOMS_InvalidParamSize;;3;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||||
0x5ca0;SUSS_ErrorUnlockMutex;;160;SUS_HANDLER;mission/devices/SusHandler.h
|
0x5d04;GOMS_InvalidPayloadSize;;4;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||||
0x5ca1;SUSS_ErrorLockMutex;;161;SUS_HANDLER;mission/devices/SusHandler.h
|
0x5d05;GOMS_UnknownReplyId;;5;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||||
0x55a0;IMTQ_InvalidCommandCode;;160;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
0x51a0;IMTQ_InvalidCommandCode;;160;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
||||||
0x55a1;IMTQ_ParameterMissing;;161;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
0x51a1;IMTQ_ParameterMissing;;161;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
||||||
0x55a2;IMTQ_ParameterInvalid;;162;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
0x51a2;IMTQ_ParameterInvalid;;162;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
||||||
0x55a3;IMTQ_CcUnavailable;;163;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
0x51a3;IMTQ_CcUnavailable;;163;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
||||||
0x55a4;IMTQ_InternalProcessingError;;164;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
0x51a4;IMTQ_InternalProcessingError;;164;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
||||||
0x55a5;IMTQ_RejectedWithoutReason;;165;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
0x51a5;IMTQ_RejectedWithoutReason;;165;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
||||||
0x55a6;IMTQ_CmdErrUnknown;;166;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
0x51a6;IMTQ_CmdErrUnknown;;166;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
||||||
0x55a7;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;167;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
0x51a7;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;167;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
||||||
0x54a0;SYRLINKS_CrcFailure;;160;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x50a0;SYRLINKS_CrcFailure;;160;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x54a1;SYRLINKS_UartFraminOrParityErrorAck;;161;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x50a1;SYRLINKS_UartFraminOrParityErrorAck;;161;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x54a2;SYRLINKS_BadCharacterAck;;162;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x50a2;SYRLINKS_BadCharacterAck;;162;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x54a3;SYRLINKS_BadParameterValueAck;;163;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x50a3;SYRLINKS_BadParameterValueAck;;163;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x54a4;SYRLINKS_BadEndOfFrameAck;;164;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x50a4;SYRLINKS_BadEndOfFrameAck;;164;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x54a5;SYRLINKS_UnknownCommandIdAck;;165;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x50a5;SYRLINKS_UnknownCommandIdAck;;165;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x54a6;SYRLINKS_BadCrcAck;;166;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x50a6;SYRLINKS_BadCrcAck;;166;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x54a7;SYRLINKS_ReplyWrongSize;;167;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x50a7;SYRLINKS_ReplyWrongSize;;167;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x54a8;SYRLINKS_MissingStartFrameCharacter;;168;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x50a8;SYRLINKS_MissingStartFrameCharacter;;168;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x6aa0;SADPL_CommandNotSupported;;160;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
0x4fa1;HEATER_CommandNotSupported;;161;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
||||||
0x6aa1;SADPL_DeploymentAlreadyExecuting;;161;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
0x4fa2;HEATER_InitFailed;;162;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
||||||
0x6aa2;SADPL_MainSwitchTimeoutFailure;;162;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
0x4fa3;HEATER_InvalidSwitchNr;;163;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
||||||
0x6aa3;SADPL_SwitchingDeplSa1Failed;;163;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
0x4fa4;HEATER_MainSwitchSetTimeout;;164;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
||||||
0x6aa4;SADPL_SwitchingDeplSa2Failed;;164;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
0x4fa5;HEATER_CommandAlreadyWaiting;;165;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
||||||
0x67a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NVMParameterBase.h
|
0x60a0;CCSDS_CommandNotImplemented;Received action message with unknown action id;160;CCSDS_HANDLER;mission/tmtc/CCSDSHandler.h
|
||||||
0x4400;HSPI_HalTimeoutRetval;;0;HAL_SPI;fsfw/hal/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
0x4500;HSPI_OpeningFileFailed;;0;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||||
0x4401;HSPI_HalBusyRetval;;1;HAL_SPI;fsfw/hal/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
0x4501;HSPI_FullDuplexTransferFailed;;1;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||||
0x4402;HSPI_HalErrorRetval;;2;HAL_SPI;fsfw/hal/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
0x4502;HSPI_HalfDuplexTransferFailed;;2;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||||
0x4501;HURT_UartReadFailure;;1;HAL_UART;fsfw/hal/src/fsfw_hal/linux/uart/UartComIF.h
|
0x4801;HGIO_UnknownGpioId;;1;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x4502;HURT_UartReadSizeMissmatch;;2;HAL_UART;fsfw/hal/src/fsfw_hal/linux/uart/UartComIF.h
|
0x4802;HGIO_DriveGpioFailure;;2;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x4503;HURT_UartRxBufferTooSmall;;3;HAL_UART;fsfw/hal/src/fsfw_hal/linux/uart/UartComIF.h
|
0x4803;HGIO_GpioTypeFailure;;3;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x4701;HGIO_UnknownGpioId;;1;HAL_GPIO;fsfw/hal/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
0x4804;HGIO_GpioInvalidInstance;;4;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x4702;HGIO_DriveGpioFailure;;2;HAL_GPIO;fsfw/hal/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
0x4805;HGIO_GpioDuplicateDetected;;5;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x4703;HGIO_GpioTypeFailure;;3;HAL_GPIO;fsfw/hal/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
0x4806;HGIO_GpioInitFailed;;6;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x4704;HGIO_GpioInvalidInstance;;4;HAL_GPIO;fsfw/hal/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
0x4807;HGIO_GpioGetValueFailed;;7;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x4705;HGIO_GpioDuplicateDetected;;5;HAL_GPIO;fsfw/hal/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
0x4601;HURT_UartReadFailure;;1;HAL_UART;fsfw/src/fsfw_hal/linux/uart/UartComIF.h
|
||||||
0x4706;HGIO_GpioInitFailed;;6;HAL_GPIO;fsfw/hal/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
0x4602;HURT_UartReadSizeMissmatch;;2;HAL_UART;fsfw/src/fsfw_hal/linux/uart/UartComIF.h
|
||||||
0x4707;HGIO_GpioGetValueFailed;;7;HAL_GPIO;fsfw/hal/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
0x4603;HURT_UartRxBufferTooSmall;;3;HAL_UART;fsfw/src/fsfw_hal/linux/uart/UartComIF.h
|
||||||
0x4300;UXOS_ExecutionFinished;Execution of the current command has finished;0;LINUX_OSAL;fsfw/hal/src/fsfw_hal/linux/CommandExecutor.h
|
0x4400;UXOS_ExecutionFinished;Execution of the current command has finished;0;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||||
0x4301;UXOS_CommandPending;Command is pending. This will also be returned if the user tries to load another command but a command is still pending;1;LINUX_OSAL;fsfw/hal/src/fsfw_hal/linux/CommandExecutor.h
|
0x4401;UXOS_CommandPending;Command is pending. This will also be returned if the user tries to load another command but a command is still pending;1;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||||
0x4302;UXOS_BytesRead;Some bytes have been read from the executing process;2;LINUX_OSAL;fsfw/hal/src/fsfw_hal/linux/CommandExecutor.h
|
0x4402;UXOS_BytesRead;Some bytes have been read from the executing process;2;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||||
0x4303;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/hal/src/fsfw_hal/linux/CommandExecutor.h
|
0x4403;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||||
0x4304;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/hal/src/fsfw_hal/linux/CommandExecutor.h
|
0x4404;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||||
0x4306;UXOS_PcloseCallError;;6;LINUX_OSAL;fsfw/hal/src/fsfw_hal/linux/CommandExecutor.h
|
0x4406;UXOS_PcloseCallError;;6;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||||
0x2b01;CCS_BcIsSetVrCommand;;1;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2801;SM_DataTooLarge;;1;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||||
0x2b02;CCS_BcIsUnlockCommand;;2;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2802;SM_DataStorageFull;;2;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||||
0x2bb0;CCS_BcIllegalCommand;;176;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2803;SM_IllegalStorageId;;3;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||||
0x2bb1;CCS_BoardReadingNotFinished;;177;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2804;SM_DataDoesNotExist;;4;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||||
0x2bf0;CCS_NsPositiveW;;240;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2805;SM_IllegalAddress;;5;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||||
0x2bf1;CCS_NsNegativeW;;241;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2806;SM_PoolTooLarge;;6;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||||
0x2bf2;CCS_NsLockout;;242;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x0601;PP_DoItMyself;;1;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x2bf3;CCS_FarmInLockout;;243;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x0602;PP_PointsToVariable;;2;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x2bf4;CCS_FarmInWait;;244;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x0603;PP_PointsToMemory;;3;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x2be0;CCS_WrongSymbol;;224;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x0604;PP_ActivityCompleted;;4;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x2be1;CCS_DoubleStart;;225;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x0605;PP_PointsToVectorUint8;;5;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x2be2;CCS_StartSymbolMissed;;226;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x0606;PP_PointsToVectorUint16;;6;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x2be3;CCS_EndWithoutStart;;227;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x0607;PP_PointsToVectorUint32;;7;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x2be4;CCS_TooLarge;;228;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x0608;PP_PointsToVectorFloat;;8;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x2be5;CCS_TooShort;;229;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x06a0;PP_DumpNotSupported;;160;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x2be6;CCS_WrongTfVersion;;230;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x06e0;PP_InvalidSize;;224;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x2be7;CCS_WrongSpacecraftId;;231;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x06e1;PP_InvalidAddress;;225;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x2be8;CCS_NoValidFrameType;;232;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x06e2;PP_InvalidContent;;226;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x2be9;CCS_CrcFailed;;233;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x06e3;PP_UnalignedAccess;;227;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x2bea;CCS_VcNotFound;;234;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x06e4;PP_WriteProtected;;228;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x2beb;CCS_ForwardingFailed;;235;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x4300;FILS_GenericFileError;;0;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
||||||
0x2bec;CCS_ContentTooLarge;;236;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x4301;FILS_IsBusy;;1;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
||||||
0x2bed;CCS_ResidualData;;237;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x4302;FILS_InvalidParameters;;2;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
||||||
0x2bee;CCS_DataCorrupted;;238;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x4305;FILS_FileDoesNotExist;;5;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
||||||
0x2bef;CCS_IllegalSegmentationFlag;;239;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x4306;FILS_FileAlreadyExists;;6;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
||||||
0x2bd0;CCS_IllegalFlagCombination;;208;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x4307;FILS_FileLocked;;7;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
||||||
0x2bd1;CCS_ShorterThanHeader;;209;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x430a;FILS_DirectoryDoesNotExist;;10;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
||||||
0x2bd2;CCS_TooShortBlockedPacket;;210;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x430b;FILS_DirectoryAlreadyExists;;11;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
||||||
0x2bd3;CCS_TooShortMapExtraction;;211;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x430c;FILS_DirectoryNotEmpty;;12;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
||||||
0x3a00;SPH_ConnBroken;;0;SEMAPHORE_IF;fsfw/src/fsfw/osal/common/TcpTmTcServer.h
|
0x430f;FILS_SequencePacketMissingWrite;;15;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
||||||
0x2901;IEC_NoConfigurationTable;;1;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x4310;FILS_SequencePacketMissingRead;;16;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
||||||
0x2902;IEC_NoCpuTable;;2;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x13e0;MH_UnknownCmd;;224;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||||
0x2903;IEC_InvalidWorkspaceAddress;;3;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x13e1;MH_InvalidAddress;;225;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||||
0x2904;IEC_TooLittleWorkspace;;4;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x13e2;MH_InvalidSize;;226;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||||
0x2905;IEC_WorkspaceAllocation;;5;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x13e3;MH_StateMismatch;;227;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||||
0x2906;IEC_InterruptStackTooSmall;;6;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x38a1;SGP4_InvalidEccentricity;;161;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||||
0x2907;IEC_ThreadExitted;;7;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x38a2;SGP4_InvalidMeanMotion;;162;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||||
0x2908;IEC_InconsistentMpInformation;;8;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x38a3;SGP4_InvalidPerturbationElements;;163;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||||
0x2909;IEC_InvalidNode;;9;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x38a4;SGP4_InvalidSemiLatusRectum;;164;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||||
0x290a;IEC_NoMpci;;10;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x38a5;SGP4_InvalidEpochElements;;165;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||||
0x290b;IEC_BadPacket;;11;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x38a6;SGP4_SatelliteHasDecayed;;166;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||||
0x290c;IEC_OutOfPackets;;12;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x38b1;SGP4_TleTooOld;;177;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||||
0x290d;IEC_OutOfGlobalObjects;;13;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x38b2;SGP4_TleNotInitialized;;178;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||||
0x290e;IEC_OutOfProxies;;14;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x1101;AL_Full;;1;ARRAY_LIST;fsfw/src/fsfw/container/ArrayList.h
|
||||||
0x290f;IEC_InvalidGlobalId;;15;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x1501;FM_KeyAlreadyExists;;1;FIXED_MAP;fsfw/src/fsfw/container/FixedMap.h
|
||||||
0x2910;IEC_BadStackHook;;16;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x1502;FM_MapFull;;2;FIXED_MAP;fsfw/src/fsfw/container/FixedMap.h
|
||||||
0x2911;IEC_BadAttributes;;17;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x1503;FM_KeyDoesNotExist;;3;FIXED_MAP;fsfw/src/fsfw/container/FixedMap.h
|
||||||
0x2912;IEC_ImplementationKeyCreateInconsistency;;18;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x1801;FF_Full;;1;FIFO_CLASS;fsfw/src/fsfw/container/FIFOBase.h
|
||||||
0x2913;IEC_ImplementationBlockingOperationCancel;;19;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x1802;FF_Empty;;2;FIFO_CLASS;fsfw/src/fsfw/container/FIFOBase.h
|
||||||
0x2914;IEC_MutexObtainFromBadState;;20;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x1601;FMM_MapFull;;1;FIXED_MULTIMAP;fsfw/src/fsfw/container/FixedOrderedMultimap.h
|
||||||
0x2915;IEC_UnlimitedAndMaximumIs0;;21;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
0x1602;FMM_KeyDoesNotExist;;2;FIXED_MULTIMAP;fsfw/src/fsfw/container/FixedOrderedMultimap.h
|
||||||
|
0x3901;MUX_NotEnoughResources;;1;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||||
|
0x3902;MUX_InsufficientMemory;;2;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||||
|
0x3903;MUX_NoPrivilege;;3;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||||
|
0x3904;MUX_WrongAttributeSetting;;4;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||||
|
0x3905;MUX_MutexAlreadyLocked;;5;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||||
|
0x3906;MUX_MutexNotFound;;6;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||||
|
0x3907;MUX_MutexMaxLocks;;7;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||||
|
0x3908;MUX_CurrThreadAlreadyOwnsMutex;;8;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||||
|
0x3909;MUX_CurrThreadDoesNotOwnMutex;;9;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||||
|
0x390a;MUX_MutexTimeout;;10;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||||
|
0x390b;MUX_MutexInvalidId;;11;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||||
|
0x390c;MUX_MutexDestroyedWhileWaiting;;12;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||||
|
0x3a01;MQI_Empty;;1;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
||||||
|
0x3a02;MQI_Full;No space left for more messages;2;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
||||||
|
0x3a03;MQI_NoReplyPartner;Returned if a reply method was called without partner;3;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
||||||
|
0x3a04;MQI_DestinationInvalid;Returned if the target destination is invalid.;4;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
||||||
|
0x0f01;CM_UnknownCommand;;1;COMMAND_MESSAGE;fsfw/src/fsfw/ipc/CommandMessageIF.h
|
||||||
0x0e01;HM_InvalidMode;;1;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
0x0e01;HM_InvalidMode;;1;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
0x0e02;HM_TransNotAllowed;;2;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
0x0e02;HM_TransNotAllowed;;2;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
0x0e03;HM_InTransition;;3;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
0x0e03;HM_InTransition;;3;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
0x0e04;HM_InvalidSubmode;;4;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
0x0e04;HM_InvalidSubmode;;4;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
0x2d01;HPA_InvalidIdentifierId;;1;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
0x0c02;MS_InvalidEntry;;2;MODE_STORE_IF;fsfw/src/fsfw/subsystem/modes/ModeStoreIF.h
|
||||||
0x2d02;HPA_InvalidDomainId;;2;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
0x0c03;MS_TooManyElements;;3;MODE_STORE_IF;fsfw/src/fsfw/subsystem/modes/ModeStoreIF.h
|
||||||
0x2d03;HPA_InvalidValue;;3;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
0x0c04;MS_CantStoreEmpty;;4;MODE_STORE_IF;fsfw/src/fsfw/subsystem/modes/ModeStoreIF.h
|
||||||
0x2d05;HPA_ReadOnly;;5;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
0x0b01;SB_ChildNotFound;;1;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||||
0x2c01;PAW_UnknownDatatype;;1;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
0x0b02;SB_ChildInfoUpdated;;2;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||||
0x2c02;PAW_DatatypeMissmatch;;2;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
0x0b03;SB_ChildDoesntHaveModes;;3;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||||
0x2c03;PAW_Readonly;;3;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
0x0b04;SB_CouldNotInsertChild;;4;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||||
0x2c04;PAW_TooBig;;4;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
0x0b05;SB_TableContainsInvalidObjectId;;5;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||||
0x2c05;PAW_SourceNotSet;;5;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
0x0d01;SS_SequenceAlreadyExists;;1;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
0x2c06;PAW_OutOfBounds;;6;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
0x0d02;SS_TableAlreadyExists;;2;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
0x2c07;PAW_NotSet;;7;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
0x0d03;SS_TableDoesNotExist;;3;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
0x2c08;PAW_ColumnOrRowsZero;;8;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
0x0d04;SS_TableOrSequenceLengthInvalid;;4;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
0x3101;CF_ObjectHasNoFunctions;;1;COMMANDS_ACTIONS_IF;fsfw/src/fsfw/action/CommandsActionsIF.h
|
0x0d05;SS_SequenceDoesNotExist;;5;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
0x3102;CF_AlreadyCommanding;;2;COMMANDS_ACTIONS_IF;fsfw/src/fsfw/action/CommandsActionsIF.h
|
0x0d06;SS_TableContainsInvalidObjectId;;6;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
0x3201;HF_IsBusy;;1;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
0x0d07;SS_FallbackSequenceDoesNotExist;;7;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
0x3202;HF_InvalidParameters;;2;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
0x0d08;SS_NoTargetTable;;8;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
0x3203;HF_ExecutionFinished;;3;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
0x0d09;SS_SequenceOrTableTooLong;;9;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
0x3204;HF_InvalidActionId;;4;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
0x0d0b;SS_IsFallbackSequence;;11;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
0x0201;OM_InsertionFailed;;1;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
0x0d0c;SS_AccessDenied;;12;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
0x0202;OM_NotFound;;2;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
0x0d0e;SS_TableInUse;;14;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
0x0203;OM_ChildInitFailed;;3;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
0x0da1;SS_TargetTableNotReached;;161;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
0x0204;OM_InternalErrReporterUninit;;4;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
0x0da2;SS_TableCheckFailed;;162;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
0x2500;FDI_YourFault;;0;HANDLES_FAILURES_IF;fsfw/src/fsfw/fdir/ConfirmsFailuresIF.h
|
0x2501;EV_ListenerNotFound;;1;EVENT_MANAGER_IF;fsfw/src/fsfw/events/EventManagerIF.h
|
||||||
0x2501;FDI_MyFault;;1;HANDLES_FAILURES_IF;fsfw/src/fsfw/fdir/ConfirmsFailuresIF.h
|
|
||||||
0x2502;FDI_ConfirmLater;;2;HANDLES_FAILURES_IF;fsfw/src/fsfw/fdir/ConfirmsFailuresIF.h
|
|
||||||
0x2101;TMF_Busy;;1;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
|
||||||
0x2102;TMF_LastPacketFound;;2;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
|
||||||
0x2103;TMF_StopFetch;;3;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
|
||||||
0x2104;TMF_Timeout;;4;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
|
||||||
0x2105;TMF_TmChannelFull;;5;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
|
||||||
0x2106;TMF_NotStored;;6;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
|
||||||
0x2107;TMF_AllDeleted;;7;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
|
||||||
0x2108;TMF_InvalidData;;8;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
|
||||||
0x2109;TMF_NotReady;;9;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
|
||||||
0x2001;TMB_Busy;;1;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x2002;TMB_Full;;2;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x2003;TMB_Empty;;3;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x2004;TMB_NullRequested;;4;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x2005;TMB_TooLarge;;5;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x2006;TMB_NotReady;;6;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x2007;TMB_DumpError;;7;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x2008;TMB_CrcError;;8;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x2009;TMB_Timeout;;9;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x200a;TMB_IdlePacketFound;;10;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x200b;TMB_TelecommandFound;;11;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x200c;TMB_NoPusATm;;12;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x200d;TMB_TooSmall;;13;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x200e;TMB_BlockNotFound;;14;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x200f;TMB_InvalidRequest;;15;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x1c01;TCD_PacketLost;;1;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributor.h
|
|
||||||
0x1c02;TCD_DestinationNotFound;;2;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributor.h
|
|
||||||
0x1c03;TCD_ServiceIdAlreadyExists;;3;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributor.h
|
|
||||||
0x1b00;TCC_IllegalApid;;0;TC_PACKET_CHECK;fsfw/src/fsfw/tcdistribution/TcPacketCheckPUS.h
|
|
||||||
0x1b01;TCC_IncompletePacket;;1;TC_PACKET_CHECK;fsfw/src/fsfw/tcdistribution/TcPacketCheckPUS.h
|
|
||||||
0x1b02;TCC_IncorrectChecksum;;2;TC_PACKET_CHECK;fsfw/src/fsfw/tcdistribution/TcPacketCheckPUS.h
|
|
||||||
0x1b03;TCC_IllegalPacketType;;3;TC_PACKET_CHECK;fsfw/src/fsfw/tcdistribution/TcPacketCheckPUS.h
|
|
||||||
0x1b04;TCC_IllegalPacketSubtype;;4;TC_PACKET_CHECK;fsfw/src/fsfw/tcdistribution/TcPacketCheckPUS.h
|
|
||||||
0x1b05;TCC_IncorrectPrimaryHeader;;5;TC_PACKET_CHECK;fsfw/src/fsfw/tcdistribution/TcPacketCheckPUS.h
|
|
||||||
0x1b06;TCC_IncorrectSecondaryHeader;;6;TC_PACKET_CHECK;fsfw/src/fsfw/tcdistribution/TcPacketCheckPUS.h
|
|
||||||
0x04e1;RMP_CommandNoDescriptorsAvailable;;225;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
0x04e1;RMP_CommandNoDescriptorsAvailable;;225;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
||||||
0x04e2;RMP_CommandBufferFull;;226;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
0x04e2;RMP_CommandBufferFull;;226;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
||||||
0x04e3;RMP_CommandChannelOutOfRange;;227;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
0x04e3;RMP_CommandChannelOutOfRange;;227;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
||||||
@ -223,195 +204,171 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x040a;RMP_ReplyCommandNotImplementedOrNotAuthorised;;10;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
0x040a;RMP_ReplyCommandNotImplementedOrNotAuthorised;;10;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
||||||
0x040b;RMP_ReplyRmwDataLengthError;;11;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
0x040b;RMP_ReplyRmwDataLengthError;;11;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
||||||
0x040c;RMP_ReplyInvalidTargetLogicalAddress;;12;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
0x040c;RMP_ReplyInvalidTargetLogicalAddress;;12;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
||||||
0x2701;SM_DataTooLarge;;1;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
0x1401;SE_BufferTooShort;;1;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
||||||
0x2702;SM_DataStorageFull;;2;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
0x1402;SE_StreamTooShort;;2;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
||||||
0x2703;SM_IllegalStorageId;;3;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
0x1403;SE_TooManyElements;;3;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
||||||
0x2704;SM_DataDoesNotExist;;4;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
0x3da0;PVA_InvalidReadWriteMode;;160;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h
|
||||||
0x2705;SM_IllegalAddress;;5;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
0x3da1;PVA_InvalidPoolEntry;;161;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h
|
||||||
0x2706;SM_PoolTooLarge;;6;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
|
||||||
0x37a1;SGP4_InvalidEccentricity;;161;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
|
||||||
0x37a2;SGP4_InvalidMeanMotion;;162;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
|
||||||
0x37a3;SGP4_InvalidPerturbationElements;;163;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
|
||||||
0x37a4;SGP4_InvalidSemiLatusRectum;;164;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
|
||||||
0x37a5;SGP4_InvalidEpochElements;;165;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
|
||||||
0x37a6;SGP4_SatelliteHasDecayed;;166;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
|
||||||
0x37b1;SGP4_TleTooOld;;177;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
|
||||||
0x37b2;SGP4_TleNotInitialized;;178;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
|
||||||
0x2301;MT_TooDetailedRequest;;1;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
|
||||||
0x2302;MT_TooGeneralRequest;;2;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
|
||||||
0x2303;MT_NoMatch;;3;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
|
||||||
0x2304;MT_Full;;4;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
|
||||||
0x2305;MT_NewNodeCreated;;5;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
|
||||||
0x3e01;DLEE_StreamTooShort;;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
|
||||||
0x3e02;DLEE_DecodingError;;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
|
||||||
0x2e01;ASC_TooLongForTargetType;;1;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/AsciiConverter.h
|
|
||||||
0x2e02;ASC_InvalidCharacters;;2;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/AsciiConverter.h
|
|
||||||
0x2e03;ASC_BufferTooSmall;;3;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/AsciiConverter.h
|
|
||||||
0x0f01;CM_UnknownCommand;;1;COMMAND_MESSAGE;fsfw/src/fsfw/ipc/CommandMessageIF.h
|
|
||||||
0x3901;MQI_Empty;;1;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
|
||||||
0x3902;MQI_Full;No space left for more messages;2;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
|
||||||
0x3903;MQI_NoReplyPartner;Returned if a reply method was called without partner;3;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
|
||||||
0x3904;MQI_DestinationInvalid;Returned if the target destination is invalid.;4;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
|
||||||
0x3801;MUX_NotEnoughResources;;1;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
|
||||||
0x3802;MUX_InsufficientMemory;;2;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
|
||||||
0x3803;MUX_NoPrivilege;;3;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
|
||||||
0x3804;MUX_WrongAttributeSetting;;4;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
|
||||||
0x3805;MUX_MutexAlreadyLocked;;5;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
|
||||||
0x3806;MUX_MutexNotFound;;6;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
|
||||||
0x3807;MUX_MutexMaxLocks;;7;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
|
||||||
0x3808;MUX_CurrThreadAlreadyOwnsMutex;;8;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
|
||||||
0x3809;MUX_CurrThreadDoesNotOwnMutex;;9;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
|
||||||
0x380a;MUX_MutexTimeout;;10;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
|
||||||
0x380b;MUX_MutexInvalidId;;11;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
|
||||||
0x380c;MUX_MutexDestroyedWhileWaiting;;12;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
|
||||||
0x3a01;SPH_SemaphoreTimeout;;1;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h
|
|
||||||
0x3a02;SPH_SemaphoreNotOwned;;2;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h
|
|
||||||
0x3a03;SPH_SemaphoreInvalid;;3;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h
|
|
||||||
0x3501;CFDP_InvalidTlvType;;1;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
|
||||||
0x3502;CFDP_InvalidDirectiveFields;;2;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
|
||||||
0x3503;CFDP_InvalidPduDatafieldLen;;3;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
|
||||||
0x3504;CFDP_InvalidAckDirectiveFields;;4;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
|
||||||
0x3505;CFDP_MetadataCantParseOptions;;5;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
|
||||||
0x3506;CFDP_FinishedCantParseFsResponses;;6;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
|
||||||
0x3508;CFDP_FilestoreRequiresSecondFile;;8;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
|
||||||
0x3509;CFDP_FilestoreResponseCantParseFsMessage;;9;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
|
||||||
0x2801;TC_InvalidTargetState;;1;THERMAL_COMPONENT_IF;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
|
||||||
0x28f1;TC_AboveOperationalLimit;;241;THERMAL_COMPONENT_IF;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
|
||||||
0x28f2;TC_BelowOperationalLimit;;242;THERMAL_COMPONENT_IF;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
|
||||||
0x0c02;MS_InvalidEntry;;2;MODE_STORE_IF;fsfw/src/fsfw/subsystem/modes/ModeStoreIF.h
|
|
||||||
0x0c03;MS_TooManyElements;;3;MODE_STORE_IF;fsfw/src/fsfw/subsystem/modes/ModeStoreIF.h
|
|
||||||
0x0c04;MS_CantStoreEmpty;;4;MODE_STORE_IF;fsfw/src/fsfw/subsystem/modes/ModeStoreIF.h
|
|
||||||
0x0d01;SS_SequenceAlreadyExists;;1;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
|
||||||
0x0d02;SS_TableAlreadyExists;;2;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
|
||||||
0x0d03;SS_TableDoesNotExist;;3;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
|
||||||
0x0d04;SS_TableOrSequenceLengthInvalid;;4;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
|
||||||
0x0d05;SS_SequenceDoesNotExist;;5;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
|
||||||
0x0d06;SS_TableContainsInvalidObjectId;;6;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
|
||||||
0x0d07;SS_FallbackSequenceDoesNotExist;;7;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
|
||||||
0x0d08;SS_NoTargetTable;;8;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
|
||||||
0x0d09;SS_SequenceOrTableTooLong;;9;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
|
||||||
0x0d0b;SS_IsFallbackSequence;;11;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
|
||||||
0x0d0c;SS_AccessDenied;;12;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
|
||||||
0x0d0e;SS_TableInUse;;14;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
|
||||||
0x0da1;SS_TargetTableNotReached;;161;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
|
||||||
0x0da2;SS_TableCheckFailed;;162;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
|
||||||
0x0b01;SB_ChildNotFound;;1;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
|
||||||
0x0b02;SB_ChildInfoUpdated;;2;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
|
||||||
0x0b03;SB_ChildDoesntHaveModes;;3;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
|
||||||
0x0b04;SB_CouldNotInsertChild;;4;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
|
||||||
0x0b05;SB_TableContainsInvalidObjectId;;5;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
|
||||||
0x3d00;HKM_QueueOrDestinationInvalid;;0;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
|
||||||
0x3d01;HKM_WrongHkPacketType;;1;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
|
||||||
0x3d02;HKM_ReportingStatusUnchanged;;2;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
|
||||||
0x3d03;HKM_PeriodicHelperInvalid;;3;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
|
||||||
0x3d04;HKM_PoolobjectNotFound;;4;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
|
||||||
0x3d05;HKM_DatasetNotFound;;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
|
||||||
0x3b00;LPIF_PoolEntryNotFound;;0;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h
|
|
||||||
0x3b01;LPIF_PoolEntryTypeConflict;;1;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h
|
|
||||||
0x3ca0;PVA_InvalidReadWriteMode;;160;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h
|
|
||||||
0x3ca1;PVA_InvalidPoolEntry;;161;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h
|
|
||||||
0x0801;DPS_InvalidParameterDefinition;;1;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
0x0801;DPS_InvalidParameterDefinition;;1;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||||
0x0802;DPS_SetWasAlreadyRead;;2;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
0x0802;DPS_SetWasAlreadyRead;;2;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||||
0x0803;DPS_CommitingWithoutReading;;3;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
0x0803;DPS_CommitingWithoutReading;;3;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||||
0x0804;DPS_DataSetUninitialised;;4;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
0x0804;DPS_DataSetUninitialised;;4;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||||
0x0805;DPS_DataSetFull;;5;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
0x0805;DPS_DataSetFull;;5;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||||
0x0806;DPS_PoolVarNull;;6;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
0x0806;DPS_PoolVarNull;;6;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||||
0x1000;TIM_UnsupportedTimeFormat;;0;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
0x1c01;TCD_PacketLost;;1;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributor.h
|
||||||
0x1001;TIM_NotEnoughInformationForTargetFormat;;1;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
0x1c02;TCD_DestinationNotFound;;2;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributor.h
|
||||||
0x1002;TIM_LengthMismatch;;2;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
0x1c03;TCD_ServiceIdAlreadyExists;;3;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributor.h
|
||||||
0x1003;TIM_InvalidTimeFormat;;3;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
0x1b00;TCC_InvalidCcsdsVersion;;0;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1004;TIM_InvalidDayOfYear;;4;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
0x1b01;TCC_InvalidApid;;1;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1005;TIM_TimeDoesNotFitFormat;;5;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
0x1b02;TCC_InvalidPacketType;;2;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x3601;TSI_BadTimestamp;;1;TIME_STAMPER_IF;fsfw/src/fsfw/timemanager/TimeStamperIF.h
|
0x1b03;TCC_InvalidSecHeaderField;;3;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1d01;PUS_ActivityStarted;;1;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
0x1b04;TCC_IncorrectPrimaryHeader;;4;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1d02;PUS_InvalidSubservice;;2;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
0x1b05;TCC_IncompletePacket;;5;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1d03;PUS_IllegalApplicationData;;3;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
0x1b06;TCC_InvalidPusVersion;;6;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1d04;PUS_SendTmFailed;;4;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
0x1b07;TCC_IncorrectChecksum;;7;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1d05;PUS_Timeout;;5;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
0x1b08;TCC_IllegalPacketSubtype;;8;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x4b00;SPPA_NoPacketFound;;0;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h
|
0x1b09;TCC_IncorrectSecondaryHeader;;9;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x4b01;SPPA_SplitPacket;;1;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h
|
0x3001;POS_InPowerTransition;;1;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
||||||
0x1f01;CSB_ExecutionComplete;;1;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
0x3002;POS_SwitchStateMismatch;;2;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
||||||
0x1f02;CSB_NoStepMessage;;2;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
|
||||||
0x1f03;CSB_ObjectBusy;;3;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
|
||||||
0x1f04;CSB_Busy;;4;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
|
||||||
0x1f05;CSB_InvalidTc;;5;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
|
||||||
0x1f06;CSB_InvalidObject;;6;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
|
||||||
0x1f07;CSB_InvalidReply;;7;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
|
||||||
0x1101;AL_Full;;1;ARRAY_LIST;fsfw/src/fsfw/container/ArrayList.h
|
|
||||||
0x1801;FF_Full;;1;FIFO_CLASS;fsfw/src/fsfw/container/FIFOBase.h
|
|
||||||
0x1802;FF_Empty;;2;FIFO_CLASS;fsfw/src/fsfw/container/FIFOBase.h
|
|
||||||
0x1601;FMM_MapFull;;1;FIXED_MULTIMAP;fsfw/src/fsfw/container/FixedOrderedMultimap.h
|
|
||||||
0x1602;FMM_KeyDoesNotExist;;2;FIXED_MULTIMAP;fsfw/src/fsfw/container/FixedOrderedMultimap.h
|
|
||||||
0x1501;FM_KeyAlreadyExists;;1;FIXED_MAP;fsfw/src/fsfw/container/FixedMap.h
|
|
||||||
0x1502;FM_MapFull;;2;FIXED_MAP;fsfw/src/fsfw/container/FixedMap.h
|
|
||||||
0x1503;FM_KeyDoesNotExist;;3;FIXED_MAP;fsfw/src/fsfw/container/FixedMap.h
|
|
||||||
0x2401;EV_ListenerNotFound;;1;EVENT_MANAGER_IF;fsfw/src/fsfw/events/EventManagerIF.h
|
|
||||||
0x1701;HHI_ObjectNotHealthy;;1;HAS_HEALTH_IF;fsfw/src/fsfw/health/HasHealthIF.h
|
|
||||||
0x1702;HHI_InvalidHealthState;;2;HAS_HEALTH_IF;fsfw/src/fsfw/health/HasHealthIF.h
|
|
||||||
0x1703;HHI_IsExternallyControlled;;3;HAS_HEALTH_IF;fsfw/src/fsfw/health/HasHealthIF.h
|
|
||||||
0x2f01;POS_InPowerTransition;;1;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
|
||||||
0x2f02;POS_SwitchStateMismatch;;2;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
|
||||||
0x0501;PS_SwitchOn;;1;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
0x0501;PS_SwitchOn;;1;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||||
0x0500;PS_SwitchOff;;0;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
0x0500;PS_SwitchOff;;0;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||||
0x0502;PS_SwitchTimeout;;2;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
0x0502;PS_SwitchTimeout;;2;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||||
0x0503;PS_FuseOn;;3;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
0x0503;PS_FuseOn;;3;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||||
0x0504;PS_FuseOff;;4;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
0x0504;PS_FuseOff;;4;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||||
|
0x3b00;SPH_ConnBroken;;0;SEMAPHORE_IF;fsfw/src/fsfw/osal/common/TcpTmTcServer.h
|
||||||
|
0x2a01;IEC_NoConfigurationTable;;1;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a02;IEC_NoCpuTable;;2;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a03;IEC_InvalidWorkspaceAddress;;3;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a04;IEC_TooLittleWorkspace;;4;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a05;IEC_WorkspaceAllocation;;5;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a06;IEC_InterruptStackTooSmall;;6;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a07;IEC_ThreadExitted;;7;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a08;IEC_InconsistentMpInformation;;8;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a09;IEC_InvalidNode;;9;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a0a;IEC_NoMpci;;10;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a0b;IEC_BadPacket;;11;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a0c;IEC_OutOfPackets;;12;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a0d;IEC_OutOfGlobalObjects;;13;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a0e;IEC_OutOfProxies;;14;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a0f;IEC_InvalidGlobalId;;15;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a10;IEC_BadStackHook;;16;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a11;IEC_BadAttributes;;17;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a12;IEC_ImplementationKeyCreateInconsistency;;18;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a13;IEC_ImplementationBlockingOperationCancel;;19;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a14;IEC_MutexObtainFromBadState;;20;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a15;IEC_UnlimitedAndMaximumIs0;;21;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2600;FDI_YourFault;;0;HANDLES_FAILURES_IF;fsfw/src/fsfw/fdir/ConfirmsFailuresIF.h
|
||||||
|
0x2601;FDI_MyFault;;1;HANDLES_FAILURES_IF;fsfw/src/fsfw/fdir/ConfirmsFailuresIF.h
|
||||||
|
0x2602;FDI_ConfirmLater;;2;HANDLES_FAILURES_IF;fsfw/src/fsfw/fdir/ConfirmsFailuresIF.h
|
||||||
|
0x1e00;PUS_InvalidPusVersion;;0;PUS_IF;fsfw/src/fsfw/tmtcpacket/pus/PusIF.h
|
||||||
|
0x1e01;PUS_InvalidCrc16;;1;PUS_IF;fsfw/src/fsfw/tmtcpacket/pus/PusIF.h
|
||||||
|
0x0201;OM_InsertionFailed;;1;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
||||||
|
0x0202;OM_NotFound;;2;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
||||||
|
0x0203;OM_ChildInitFailed;;3;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
||||||
|
0x0204;OM_InternalErrReporterUninit;;4;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
||||||
|
0x2201;TMF_Busy;;1;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||||
|
0x2202;TMF_LastPacketFound;;2;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||||
|
0x2203;TMF_StopFetch;;3;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||||
|
0x2204;TMF_Timeout;;4;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||||
|
0x2205;TMF_TmChannelFull;;5;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||||
|
0x2206;TMF_NotStored;;6;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||||
|
0x2207;TMF_AllDeleted;;7;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||||
|
0x2208;TMF_InvalidData;;8;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||||
|
0x2209;TMF_NotReady;;9;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||||
|
0x2101;TMB_Busy;;1;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x2102;TMB_Full;;2;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x2103;TMB_Empty;;3;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x2104;TMB_NullRequested;;4;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x2105;TMB_TooLarge;;5;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x2106;TMB_NotReady;;6;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x2107;TMB_DumpError;;7;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x2108;TMB_CrcError;;8;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x2109;TMB_Timeout;;9;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x210a;TMB_IdlePacketFound;;10;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x210b;TMB_TelecommandFound;;11;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x210c;TMB_NoPusATm;;12;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x210d;TMB_TooSmall;;13;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x210e;TMB_BlockNotFound;;14;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x210f;TMB_InvalidRequest;;15;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x2d01;PAW_UnknownDatatype;;1;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||||
|
0x2d02;PAW_DatatypeMissmatch;;2;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||||
|
0x2d03;PAW_Readonly;;3;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||||
|
0x2d04;PAW_TooBig;;4;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||||
|
0x2d05;PAW_SourceNotSet;;5;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||||
|
0x2d06;PAW_OutOfBounds;;6;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||||
|
0x2d07;PAW_NotSet;;7;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||||
|
0x2d08;PAW_ColumnOrRowsZero;;8;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||||
|
0x2e01;HPA_InvalidIdentifierId;;1;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
||||||
|
0x2e02;HPA_InvalidDomainId;;2;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
||||||
|
0x2e03;HPA_InvalidValue;;3;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
||||||
|
0x2e05;HPA_ReadOnly;;5;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
||||||
|
0x3b01;SPH_SemaphoreTimeout;;1;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h
|
||||||
|
0x3b02;SPH_SemaphoreNotOwned;;2;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h
|
||||||
|
0x3b03;SPH_SemaphoreInvalid;;3;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h
|
||||||
0x1a01;TRC_NotEnoughSensors;;1;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
0x1a01;TRC_NotEnoughSensors;;1;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||||
0x1a02;TRC_LowestValueOol;;2;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
0x1a02;TRC_LowestValueOol;;2;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||||
0x1a03;TRC_HighestValueOol;;3;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
0x1a03;TRC_HighestValueOol;;3;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||||
0x1a04;TRC_BothValuesOol;;4;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
0x1a04;TRC_BothValuesOol;;4;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||||
0x1a05;TRC_DuplexOol;;5;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
0x1a05;TRC_DuplexOol;;5;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||||
0x3001;LIM_Unchecked;;1;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
0x3101;LIM_Unchecked;;1;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x3002;LIM_Invalid;;2;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
0x3102;LIM_Invalid;;2;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x3003;LIM_Unselected;;3;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
0x3103;LIM_Unselected;;3;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x3004;LIM_BelowLowLimit;;4;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
0x3104;LIM_BelowLowLimit;;4;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x3005;LIM_AboveHighLimit;;5;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
0x3105;LIM_AboveHighLimit;;5;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x3006;LIM_UnexpectedValue;;6;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
0x3106;LIM_UnexpectedValue;;6;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x3007;LIM_OutOfRange;;7;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
0x3107;LIM_OutOfRange;;7;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x30a0;LIM_FirstSample;;160;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
0x31a0;LIM_FirstSample;;160;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x30e0;LIM_InvalidSize;;224;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
0x31e0;LIM_InvalidSize;;224;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x30e1;LIM_WrongType;;225;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
0x31e1;LIM_WrongType;;225;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x30e2;LIM_WrongPid;;226;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
0x31e2;LIM_WrongPid;;226;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x30e3;LIM_WrongLimitId;;227;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
0x31e3;LIM_WrongLimitId;;227;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x30ee;LIM_MonitorNotFound;;238;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
0x31ee;LIM_MonitorNotFound;;238;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x4101;PUS11_InvalidTypeTimeWindow;;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
0x3601;CFDP_InvalidTlvType;;1;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x4102;PUS11_TimeshiftingNotPossible;;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
0x3602;CFDP_InvalidDirectiveFields;;2;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x4103;PUS11_InvalidRelativeTime;;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
0x3603;CFDP_InvalidPduDatafieldLen;;3;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x4200;FILS_GenericFileError;;0;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
0x3604;CFDP_InvalidAckDirectiveFields;;4;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x4201;FILS_IsBusy;;1;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
0x3605;CFDP_MetadataCantParseOptions;;5;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x4202;FILS_InvalidParameters;;2;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
0x3606;CFDP_FinishedCantParseFsResponses;;6;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x4205;FILS_FileDoesNotExist;;5;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
0x3608;CFDP_FilestoreRequiresSecondFile;;8;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x4206;FILS_FileAlreadyExists;;6;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
0x3609;CFDP_FilestoreResponseCantParseFsMessage;;9;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x4207;FILS_FileLocked;;7;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
0x2c01;CCS_BcIsSetVrCommand;;1;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x420a;FILS_DirectoryDoesNotExist;;10;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
0x2c02;CCS_BcIsUnlockCommand;;2;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x420b;FILS_DirectoryAlreadyExists;;11;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
0x2cb0;CCS_BcIllegalCommand;;176;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x420c;FILS_DirectoryNotEmpty;;12;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
0x2cb1;CCS_BoardReadingNotFinished;;177;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x420f;FILS_SequencePacketMissingWrite;;15;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
0x2cf0;CCS_NsPositiveW;;240;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x4210;FILS_SequencePacketMissingRead;;16;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
0x2cf1;CCS_NsNegativeW;;241;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x0601;PP_DoItMyself;;1;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2cf2;CCS_NsLockout;;242;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x0602;PP_PointsToVariable;;2;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2cf3;CCS_FarmInLockout;;243;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x0603;PP_PointsToMemory;;3;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2cf4;CCS_FarmInWait;;244;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x0604;PP_ActivityCompleted;;4;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2ce0;CCS_WrongSymbol;;224;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x0605;PP_PointsToVectorUint8;;5;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2ce1;CCS_DoubleStart;;225;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x0606;PP_PointsToVectorUint16;;6;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2ce2;CCS_StartSymbolMissed;;226;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x0607;PP_PointsToVectorUint32;;7;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2ce3;CCS_EndWithoutStart;;227;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x0608;PP_PointsToVectorFloat;;8;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2ce4;CCS_TooLarge;;228;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x06a0;PP_DumpNotSupported;;160;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2ce5;CCS_TooShort;;229;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x06e0;PP_InvalidSize;;224;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2ce6;CCS_WrongTfVersion;;230;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x06e1;PP_InvalidAddress;;225;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2ce7;CCS_WrongSpacecraftId;;231;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x06e2;PP_InvalidContent;;226;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2ce8;CCS_NoValidFrameType;;232;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x06e3;PP_UnalignedAccess;;227;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2ce9;CCS_CrcFailed;;233;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x06e4;PP_WriteProtected;;228;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2cea;CCS_VcNotFound;;234;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x13e0;MH_UnknownCmd;;224;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
0x2ceb;CCS_ForwardingFailed;;235;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x13e1;MH_InvalidAddress;;225;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
0x2cec;CCS_ContentTooLarge;;236;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x13e2;MH_InvalidSize;;226;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
0x2ced;CCS_ResidualData;;237;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x13e3;MH_StateMismatch;;227;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
0x2cee;CCS_DataCorrupted;;238;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x1201;AB_NeedSecondStep;;1;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
0x2cef;CCS_IllegalSegmentationFlag;;239;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x1202;AB_NeedToReconfigure;;2;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
0x2cd0;CCS_IllegalFlagCombination;;208;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x1203;AB_ModeFallback;;3;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
0x2cd1;CCS_ShorterThanHeader;;209;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x1204;AB_ChildNotCommandable;;4;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
0x2cd2;CCS_TooShortBlockedPacket;;210;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x1205;AB_NeedToChangeHealth;;5;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
0x2cd3;CCS_TooShortMapExtraction;;211;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x12a1;AB_NotEnoughChildrenInCorrectState;;161;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
0x4201;PUS11_InvalidTypeTimeWindow;;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||||
|
0x4202;PUS11_TimeshiftingNotPossible;;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||||
|
0x4203;PUS11_InvalidRelativeTime;;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||||
|
0x3401;DC_NoReplyReceived;;1;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||||
|
0x3402;DC_ProtocolError;;2;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||||
|
0x3403;DC_Nullpointer;;3;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||||
|
0x3404;DC_InvalidCookieType;;4;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||||
|
0x3405;DC_NotActive;;5;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||||
|
0x3406;DC_TooMuchData;;6;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||||
0x03a0;DHB_InvalidChannel;;160;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
0x03a0;DHB_InvalidChannel;;160;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
||||||
0x03b0;DHB_AperiodicReply;;176;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
0x03b0;DHB_AperiodicReply;;176;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
||||||
0x03b1;DHB_IgnoreReplyData;;177;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
0x03b1;DHB_IgnoreReplyData;;177;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
||||||
@ -421,46 +378,94 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x03d0;DHB_NoSwitch;;208;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
0x03d0;DHB_NoSwitch;;208;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
||||||
0x03e0;DHB_ChildTimeout;;224;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
0x03e0;DHB_ChildTimeout;;224;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
||||||
0x03e1;DHB_SwitchFailed;;225;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
0x03e1;DHB_SwitchFailed;;225;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
||||||
0x3301;DC_NoReplyReceived;;1;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
0x1201;AB_NeedSecondStep;;1;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
||||||
0x3302;DC_ProtocolError;;2;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
0x1202;AB_NeedToReconfigure;;2;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
||||||
0x3303;DC_Nullpointer;;3;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
0x1203;AB_ModeFallback;;3;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
||||||
0x3304;DC_InvalidCookieType;;4;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
0x1204;AB_ChildNotCommandable;;4;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
||||||
0x3305;DC_NotActive;;5;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
0x1205;AB_NeedToChangeHealth;;5;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
||||||
0x3306;DC_TooMuchData;;6;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
0x12a1;AB_NotEnoughChildrenInCorrectState;;161;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
||||||
0x26a0;DHI_NoCommandData;;160;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27a0;DHI_NoCommandData;;160;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26a1;DHI_CommandNotSupported;;161;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27a1;DHI_CommandNotSupported;;161;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26a2;DHI_CommandAlreadySent;;162;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27a2;DHI_CommandAlreadySent;;162;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26a3;DHI_CommandWasNotSent;;163;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27a3;DHI_CommandWasNotSent;;163;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26a4;DHI_CantSwitchAddress;;164;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27a4;DHI_CantSwitchAddress;;164;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26a5;DHI_WrongModeForCommand;;165;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27a5;DHI_WrongModeForCommand;;165;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26a6;DHI_Timeout;;166;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27a6;DHI_Timeout;;166;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26a7;DHI_Busy;;167;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27a7;DHI_Busy;;167;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26a8;DHI_NoReplyExpected;;168;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27a8;DHI_NoReplyExpected;;168;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26a9;DHI_NonOpTemperature;;169;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27a9;DHI_NonOpTemperature;;169;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26aa;DHI_CommandNotImplemented;;170;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27aa;DHI_CommandNotImplemented;;170;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26b0;DHI_ChecksumError;;176;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27b0;DHI_ChecksumError;;176;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26b1;DHI_LengthMissmatch;;177;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27b1;DHI_LengthMissmatch;;177;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26b2;DHI_InvalidData;;178;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27b2;DHI_InvalidData;;178;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26b3;DHI_ProtocolError;;179;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27b3;DHI_ProtocolError;;179;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26c0;DHI_DeviceDidNotExecute;;192;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27c0;DHI_DeviceDidNotExecute;;192;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26c1;DHI_DeviceReportedError;;193;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27c1;DHI_DeviceReportedError;;193;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26c2;DHI_UnknownDeviceReply;;194;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27c2;DHI_UnknownDeviceReply;;194;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26c3;DHI_DeviceReplyInvalid;;195;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27c3;DHI_DeviceReplyInvalid;;195;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26d0;DHI_InvalidCommandParameter;;208;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27d0;DHI_InvalidCommandParameter;;208;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x26d1;DHI_InvalidNumberOrLengthOfParameters;;209;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27d1;DHI_InvalidNumberOrLengthOfParameters;;209;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x1401;SE_BufferTooShort;;1;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
0x2401;MT_TooDetailedRequest;;1;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||||
0x1402;SE_StreamTooShort;;2;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
0x2402;MT_TooGeneralRequest;;2;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||||
0x1403;SE_TooManyElements;;3;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
0x2403;MT_NoMatch;;3;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||||
0x68a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/memory/FilesystemHelper.h
|
0x2404;MT_Full;;4;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||||
0x68a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/memory/FilesystemHelper.h
|
0x2405;MT_NewNodeCreated;;5;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||||
0x7300;SDMA_OpOngoing;;0;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x3f01;DLEE_StreamTooShort;;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||||
0x7301;SDMA_AlreadyOn;;1;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x3f02;DLEE_DecodingError;;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||||
0x7302;SDMA_AlreadyMounted;;2;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x2f01;ASC_TooLongForTargetType;;1;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/AsciiConverter.h
|
||||||
0x7303;SDMA_AlreadyOff;;3;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x2f02;ASC_InvalidCharacters;;2;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/AsciiConverter.h
|
||||||
0x730a;SDMA_StatusFileNexists;;10;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x2f03;ASC_BufferTooSmall;;3;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/AsciiConverter.h
|
||||||
0x730b;SDMA_StatusFileFormatInvalid;;11;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x1701;HHI_ObjectNotHealthy;;1;HAS_HEALTH_IF;fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
0x730c;SDMA_MountError;;12;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x1702;HHI_InvalidHealthState;;2;HAS_HEALTH_IF;fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
0x730d;SDMA_UnmountError;;13;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x1703;HHI_IsExternallyControlled;;3;HAS_HEALTH_IF;fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
0x730e;SDMA_SystemCallError;;14;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x3201;CF_ObjectHasNoFunctions;;1;COMMANDS_ACTIONS_IF;fsfw/src/fsfw/action/CommandsActionsIF.h
|
||||||
0x730f;SDMA_PopenCallError;;15;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x3202;CF_AlreadyCommanding;;2;COMMANDS_ACTIONS_IF;fsfw/src/fsfw/action/CommandsActionsIF.h
|
||||||
0x7400;SCBU_KeyNotFound;;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h
|
0x3301;HF_IsBusy;;1;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
||||||
|
0x3302;HF_InvalidParameters;;2;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
||||||
|
0x3303;HF_ExecutionFinished;;3;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
||||||
|
0x3304;HF_InvalidActionId;;4;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
||||||
|
0x1000;TIM_UnsupportedTimeFormat;;0;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||||
|
0x1001;TIM_NotEnoughInformationForTargetFormat;;1;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||||
|
0x1002;TIM_LengthMismatch;;2;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||||
|
0x1003;TIM_InvalidTimeFormat;;3;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||||
|
0x1004;TIM_InvalidDayOfYear;;4;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||||
|
0x1005;TIM_TimeDoesNotFitFormat;;5;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||||
|
0x3701;TSI_BadTimestamp;;1;TIME_STAMPER_IF;fsfw/src/fsfw/timemanager/TimeStampIF.h
|
||||||
|
0x3c00;LPIF_PoolEntryNotFound;;0;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h
|
||||||
|
0x3c01;LPIF_PoolEntryTypeConflict;;1;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h
|
||||||
|
0x3e00;HKM_QueueOrDestinationInvalid;;0;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||||
|
0x3e01;HKM_WrongHkPacketType;;1;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||||
|
0x3e02;HKM_ReportingStatusUnchanged;;2;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||||
|
0x3e03;HKM_PeriodicHelperInvalid;;3;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||||
|
0x3e04;HKM_PoolobjectNotFound;;4;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||||
|
0x3e05;HKM_DatasetNotFound;;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||||
|
0x2901;TC_InvalidTargetState;;1;THERMAL_COMPONENT_IF;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||||
|
0x29f1;TC_AboveOperationalLimit;;241;THERMAL_COMPONENT_IF;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||||
|
0x29f2;TC_BelowOperationalLimit;;242;THERMAL_COMPONENT_IF;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||||
|
0x2001;CSB_ExecutionComplete;;1;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||||
|
0x2002;CSB_NoStepMessage;;2;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||||
|
0x2003;CSB_ObjectBusy;;3;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||||
|
0x2004;CSB_Busy;;4;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||||
|
0x2005;CSB_InvalidTc;;5;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||||
|
0x2006;CSB_InvalidObject;;6;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||||
|
0x2007;CSB_InvalidReply;;7;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||||
|
0x4c00;SPPA_NoPacketFound;;0;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h
|
||||||
|
0x4c01;SPPA_SplitPacket;;1;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h
|
||||||
|
0x1d01;ATC_ActivityStarted;;1;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||||
|
0x1d02;ATC_InvalidSubservice;;2;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||||
|
0x1d03;ATC_IllegalApplicationData;;3;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||||
|
0x1d04;ATC_SendTmFailed;;4;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||||
|
0x1d05;ATC_Timeout;;5;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||||
|
0x6b00;SCBU_KeyNotFound;;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h
|
||||||
|
0x64a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/memory/FilesystemHelper.h
|
||||||
|
0x64a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/memory/FilesystemHelper.h
|
||||||
|
0x6a00;SDMA_OpOngoing;;0;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
0x6a01;SDMA_AlreadyOn;;1;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
0x6a02;SDMA_AlreadyMounted;;2;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
0x6a03;SDMA_AlreadyOff;;3;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
0x6a0a;SDMA_StatusFileNexists;;10;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
0x6a0b;SDMA_StatusFileFormatInvalid;;11;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
0x6a0c;SDMA_MountError;;12;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
0x6a0d;SDMA_UnmountError;;13;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
0x6a0e;SDMA_SystemCallError;;14;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
0x6a0f;SDMA_PopenCallError;;15;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
|
@ -1 +1 @@
|
|||||||
Subproject commit a5dee6e41749508a85842a931e6f1d210aee2031
|
Subproject commit b1e5a2d40a5f41b9020f2beb0b976035f91c6343
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 209 translations.
|
* @brief Auto-generated event translation file. Contains 216 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2022-08-08 17:06:18
|
* Generated on: 2022-08-24 16:44:18
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -165,6 +165,8 @@ const char *MPSOC_EXE_FAILURE_REPORT_STRING = "MPSOC_EXE_FAILURE_REPORT";
|
|||||||
const char *MPSOC_ACK_INVALID_APID_STRING = "MPSOC_ACK_INVALID_APID";
|
const char *MPSOC_ACK_INVALID_APID_STRING = "MPSOC_ACK_INVALID_APID";
|
||||||
const char *MPSOC_EXE_INVALID_APID_STRING = "MPSOC_EXE_INVALID_APID";
|
const char *MPSOC_EXE_INVALID_APID_STRING = "MPSOC_EXE_INVALID_APID";
|
||||||
const char *MPSOC_HELPER_SEQ_CNT_MISMATCH_STRING = "MPSOC_HELPER_SEQ_CNT_MISMATCH";
|
const char *MPSOC_HELPER_SEQ_CNT_MISMATCH_STRING = "MPSOC_HELPER_SEQ_CNT_MISMATCH";
|
||||||
|
const char *MPSOC_TM_SIZE_ERROR_STRING = "MPSOC_TM_SIZE_ERROR";
|
||||||
|
const char *MPSOC_TM_CRC_MISSMATCH_STRING = "MPSOC_TM_CRC_MISSMATCH";
|
||||||
const char *TRANSITION_BACK_TO_OFF_STRING = "TRANSITION_BACK_TO_OFF";
|
const char *TRANSITION_BACK_TO_OFF_STRING = "TRANSITION_BACK_TO_OFF";
|
||||||
const char *NEG_V_OUT_OF_BOUNDS_STRING = "NEG_V_OUT_OF_BOUNDS";
|
const char *NEG_V_OUT_OF_BOUNDS_STRING = "NEG_V_OUT_OF_BOUNDS";
|
||||||
const char *U_DRO_OUT_OF_BOUNDS_STRING = "U_DRO_OUT_OF_BOUNDS";
|
const char *U_DRO_OUT_OF_BOUNDS_STRING = "U_DRO_OUT_OF_BOUNDS";
|
||||||
@ -194,6 +196,8 @@ 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_SUCCESSFUL_STRING = "SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL";
|
||||||
const char *SUPV_EVENT_BUFFER_REQUEST_FAILED_STRING = "SUPV_EVENT_BUFFER_REQUEST_FAILED";
|
const char *SUPV_EVENT_BUFFER_REQUEST_FAILED_STRING = "SUPV_EVENT_BUFFER_REQUEST_FAILED";
|
||||||
const char *SUPV_EVENT_BUFFER_REQUEST_TERMINATED_STRING = "SUPV_EVENT_BUFFER_REQUEST_TERMINATED";
|
const char *SUPV_EVENT_BUFFER_REQUEST_TERMINATED_STRING = "SUPV_EVENT_BUFFER_REQUEST_TERMINATED";
|
||||||
|
const char *SUPV_MEM_CHECK_OK_STRING = "SUPV_MEM_CHECK_OK";
|
||||||
|
const char *SUPV_MEM_CHECK_FAIL_STRING = "SUPV_MEM_CHECK_FAIL";
|
||||||
const char *SUPV_SENDING_COMMAND_FAILED_STRING = "SUPV_SENDING_COMMAND_FAILED";
|
const char *SUPV_SENDING_COMMAND_FAILED_STRING = "SUPV_SENDING_COMMAND_FAILED";
|
||||||
const char *SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING = "SUPV_HELPER_REQUESTING_REPLY_FAILED";
|
const char *SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING = "SUPV_HELPER_REQUESTING_REPLY_FAILED";
|
||||||
const char *SUPV_HELPER_READING_REPLY_FAILED_STRING = "SUPV_HELPER_READING_REPLY_FAILED";
|
const char *SUPV_HELPER_READING_REPLY_FAILED_STRING = "SUPV_HELPER_READING_REPLY_FAILED";
|
||||||
@ -206,6 +210,9 @@ const char *SUPV_EXE_INVALID_APID_STRING = "SUPV_EXE_INVALID_APID";
|
|||||||
const char *ACK_RECEPTION_FAILURE_STRING = "ACK_RECEPTION_FAILURE";
|
const char *ACK_RECEPTION_FAILURE_STRING = "ACK_RECEPTION_FAILURE";
|
||||||
const char *EXE_RECEPTION_FAILURE_STRING = "EXE_RECEPTION_FAILURE";
|
const char *EXE_RECEPTION_FAILURE_STRING = "EXE_RECEPTION_FAILURE";
|
||||||
const char *WRITE_MEMORY_FAILED_STRING = "WRITE_MEMORY_FAILED";
|
const char *WRITE_MEMORY_FAILED_STRING = "WRITE_MEMORY_FAILED";
|
||||||
|
const char *SUPV_REPLY_SIZE_MISSMATCH_STRING = "SUPV_REPLY_SIZE_MISSMATCH";
|
||||||
|
const char *SUPV_REPLY_CRC_MISSMATCH_STRING = "SUPV_REPLY_CRC_MISSMATCH";
|
||||||
|
const char *SUPV_UPDATE_PROGRESS_STRING = "SUPV_UPDATE_PROGRESS";
|
||||||
const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
|
const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
|
||||||
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
||||||
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
|
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
|
||||||
@ -533,6 +540,10 @@ const char *translateEvents(Event event) {
|
|||||||
return MPSOC_EXE_INVALID_APID_STRING;
|
return MPSOC_EXE_INVALID_APID_STRING;
|
||||||
case (12611):
|
case (12611):
|
||||||
return MPSOC_HELPER_SEQ_CNT_MISMATCH_STRING;
|
return MPSOC_HELPER_SEQ_CNT_MISMATCH_STRING;
|
||||||
|
case (12612):
|
||||||
|
return MPSOC_TM_SIZE_ERROR_STRING;
|
||||||
|
case (12613):
|
||||||
|
return MPSOC_TM_CRC_MISSMATCH_STRING;
|
||||||
case (12700):
|
case (12700):
|
||||||
return TRANSITION_BACK_TO_OFF_STRING;
|
return TRANSITION_BACK_TO_OFF_STRING;
|
||||||
case (12701):
|
case (12701):
|
||||||
@ -592,29 +603,39 @@ const char *translateEvents(Event event) {
|
|||||||
case (13607):
|
case (13607):
|
||||||
return SUPV_EVENT_BUFFER_REQUEST_TERMINATED_STRING;
|
return SUPV_EVENT_BUFFER_REQUEST_TERMINATED_STRING;
|
||||||
case (13608):
|
case (13608):
|
||||||
return SUPV_SENDING_COMMAND_FAILED_STRING;
|
return SUPV_MEM_CHECK_OK_STRING;
|
||||||
case (13609):
|
case (13609):
|
||||||
return SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING;
|
return SUPV_MEM_CHECK_FAIL_STRING;
|
||||||
case (13610):
|
|
||||||
return SUPV_HELPER_READING_REPLY_FAILED_STRING;
|
|
||||||
case (13611):
|
|
||||||
return SUPV_MISSING_ACK_STRING;
|
|
||||||
case (13612):
|
|
||||||
return SUPV_MISSING_EXE_STRING;
|
|
||||||
case (13613):
|
|
||||||
return SUPV_ACK_FAILURE_REPORT_STRING;
|
|
||||||
case (13614):
|
|
||||||
return SUPV_EXE_FAILURE_REPORT_STRING;
|
|
||||||
case (13615):
|
|
||||||
return SUPV_ACK_INVALID_APID_STRING;
|
|
||||||
case (13616):
|
case (13616):
|
||||||
return SUPV_EXE_INVALID_APID_STRING;
|
return SUPV_SENDING_COMMAND_FAILED_STRING;
|
||||||
case (13617):
|
case (13617):
|
||||||
return ACK_RECEPTION_FAILURE_STRING;
|
return SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING;
|
||||||
case (13618):
|
case (13618):
|
||||||
return EXE_RECEPTION_FAILURE_STRING;
|
return SUPV_HELPER_READING_REPLY_FAILED_STRING;
|
||||||
case (13619):
|
case (13619):
|
||||||
|
return SUPV_MISSING_ACK_STRING;
|
||||||
|
case (13620):
|
||||||
|
return SUPV_MISSING_EXE_STRING;
|
||||||
|
case (13621):
|
||||||
|
return SUPV_ACK_FAILURE_REPORT_STRING;
|
||||||
|
case (13622):
|
||||||
|
return SUPV_EXE_FAILURE_REPORT_STRING;
|
||||||
|
case (13623):
|
||||||
|
return SUPV_ACK_INVALID_APID_STRING;
|
||||||
|
case (13624):
|
||||||
|
return SUPV_EXE_INVALID_APID_STRING;
|
||||||
|
case (13625):
|
||||||
|
return ACK_RECEPTION_FAILURE_STRING;
|
||||||
|
case (13626):
|
||||||
|
return EXE_RECEPTION_FAILURE_STRING;
|
||||||
|
case (13627):
|
||||||
return WRITE_MEMORY_FAILED_STRING;
|
return WRITE_MEMORY_FAILED_STRING;
|
||||||
|
case (13628):
|
||||||
|
return SUPV_REPLY_SIZE_MISSMATCH_STRING;
|
||||||
|
case (13629):
|
||||||
|
return SUPV_REPLY_CRC_MISSMATCH_STRING;
|
||||||
|
case (13630):
|
||||||
|
return SUPV_UPDATE_PROGRESS_STRING;
|
||||||
case (13700):
|
case (13700):
|
||||||
return ALLOC_FAILURE_STRING;
|
return ALLOC_FAILURE_STRING;
|
||||||
case (13701):
|
case (13701):
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 132 translations.
|
* Contains 133 translations.
|
||||||
* Generated on: 2022-08-08 17:06:18
|
* Generated on: 2022-08-24 16:44:18
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
const char *P60DOCK_TEST_TASK_STRING = "P60DOCK_TEST_TASK";
|
const char *P60DOCK_TEST_TASK_STRING = "P60DOCK_TEST_TASK";
|
||||||
const char *CORE_CONTROLLER_STRING = "CORE_CONTROLLER";
|
|
||||||
const char *ACS_CONTROLLER_STRING = "ACS_CONTROLLER";
|
const char *ACS_CONTROLLER_STRING = "ACS_CONTROLLER";
|
||||||
|
const char *CORE_CONTROLLER_STRING = "CORE_CONTROLLER";
|
||||||
const char *THERMAL_CONTROLLER_STRING = "THERMAL_CONTROLLER";
|
const char *THERMAL_CONTROLLER_STRING = "THERMAL_CONTROLLER";
|
||||||
const char *MGM_0_LIS3_HANDLER_STRING = "MGM_0_LIS3_HANDLER";
|
const char *MGM_0_LIS3_HANDLER_STRING = "MGM_0_LIS3_HANDLER";
|
||||||
const char *GYRO_0_ADIS_HANDLER_STRING = "GYRO_0_ADIS_HANDLER";
|
const char *GYRO_0_ADIS_HANDLER_STRING = "GYRO_0_ADIS_HANDLER";
|
||||||
@ -114,6 +114,7 @@ const char *TC_STORE_STRING = "TC_STORE";
|
|||||||
const char *TM_STORE_STRING = "TM_STORE";
|
const char *TM_STORE_STRING = "TM_STORE";
|
||||||
const char *IPC_STORE_STRING = "IPC_STORE";
|
const char *IPC_STORE_STRING = "IPC_STORE";
|
||||||
const char *TIME_STAMPER_STRING = "TIME_STAMPER";
|
const char *TIME_STAMPER_STRING = "TIME_STAMPER";
|
||||||
|
const char *VERIFICATION_REPORTER_STRING = "VERIFICATION_REPORTER";
|
||||||
const char *FSFW_OBJECTS_END_STRING = "FSFW_OBJECTS_END";
|
const char *FSFW_OBJECTS_END_STRING = "FSFW_OBJECTS_END";
|
||||||
const char *SPI_TEST_STRING = "SPI_TEST";
|
const char *SPI_TEST_STRING = "SPI_TEST";
|
||||||
const char *UART_TEST_STRING = "UART_TEST";
|
const char *UART_TEST_STRING = "UART_TEST";
|
||||||
@ -143,10 +144,10 @@ const char *translateObject(object_id_t object) {
|
|||||||
switch ((object & 0xFFFFFFFF)) {
|
switch ((object & 0xFFFFFFFF)) {
|
||||||
case 0x00005060:
|
case 0x00005060:
|
||||||
return P60DOCK_TEST_TASK_STRING;
|
return P60DOCK_TEST_TASK_STRING;
|
||||||
|
case 0x43000002:
|
||||||
|
return ACS_CONTROLLER_STRING;
|
||||||
case 0x43000003:
|
case 0x43000003:
|
||||||
return CORE_CONTROLLER_STRING;
|
return CORE_CONTROLLER_STRING;
|
||||||
case 0x43100002:
|
|
||||||
return ACS_CONTROLLER_STRING;
|
|
||||||
case 0x43400001:
|
case 0x43400001:
|
||||||
return THERMAL_CONTROLLER_STRING;
|
return THERMAL_CONTROLLER_STRING;
|
||||||
case 0x44120006:
|
case 0x44120006:
|
||||||
@ -357,6 +358,8 @@ const char *translateObject(object_id_t object) {
|
|||||||
return IPC_STORE_STRING;
|
return IPC_STORE_STRING;
|
||||||
case 0x53500010:
|
case 0x53500010:
|
||||||
return TIME_STAMPER_STRING;
|
return TIME_STAMPER_STRING;
|
||||||
|
case 0x53500020:
|
||||||
|
return VERIFICATION_REPORTER_STRING;
|
||||||
case 0x53ffffff:
|
case 0x53ffffff:
|
||||||
return FSFW_OBJECTS_END_STRING;
|
return FSFW_OBJECTS_END_STRING;
|
||||||
case 0x54000010:
|
case 0x54000010:
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include <fsfw_hal/linux/spi/SpiCookie.h>
|
#include <fsfw_hal/linux/spi/SpiCookie.h>
|
||||||
#include <linux/callbacks/gpioCallbacks.h>
|
#include <linux/callbacks/gpioCallbacks.h>
|
||||||
#include <linux/devices/Max31865RtdLowlevelHandler.h>
|
#include <linux/devices/Max31865RtdLowlevelHandler.h>
|
||||||
|
#include <mission/controller/AcsController.h>
|
||||||
#include <mission/controller/ThermalController.h>
|
#include <mission/controller/ThermalController.h>
|
||||||
#include <mission/devices/Max31865EiveHandler.h>
|
#include <mission/devices/Max31865EiveHandler.h>
|
||||||
#include <mission/devices/Max31865PT1000Handler.h>
|
#include <mission/devices/Max31865PT1000Handler.h>
|
||||||
@ -324,8 +325,10 @@ void ObjectFactory::createThermalController() {
|
|||||||
new ThermalController(objects::THERMAL_CONTROLLER, objects::NO_OBJECT);
|
new ThermalController(objects::THERMAL_CONTROLLER, objects::NO_OBJECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ObjectFactory::createAcsController() { new AcsController(objects::ACS_CONTROLLER); }
|
||||||
|
|
||||||
void ObjectFactory::gpioChecker(ReturnValue_t result, std::string output) {
|
void ObjectFactory::gpioChecker(ReturnValue_t result, std::string output) {
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "ObjectFactory: Adding GPIOs failed for " << output << std::endl;
|
sif::error << "ObjectFactory: Adding GPIOs failed for " << output << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <fsfw/hal/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
|
#include <fsfw/returnvalues/returnvalue.h>
|
||||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@ -19,5 +19,6 @@ void createRtdComponents(std::string spiDev, GpioIF* gpioComIF, PowerSwitchIF* p
|
|||||||
void gpioChecker(ReturnValue_t result, std::string output);
|
void gpioChecker(ReturnValue_t result, std::string output);
|
||||||
|
|
||||||
void createThermalController();
|
void createThermalController();
|
||||||
|
void createAcsController();
|
||||||
|
|
||||||
} // namespace ObjectFactory
|
} // namespace ObjectFactory
|
||||||
|
@ -17,20 +17,20 @@ ReturnValue_t I2cTestClass::initialize() {
|
|||||||
if (mode == TestModes::BPX_BATTERY) {
|
if (mode == TestModes::BPX_BATTERY) {
|
||||||
battInit();
|
battInit();
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t I2cTestClass::performPeriodicAction() {
|
ReturnValue_t I2cTestClass::performPeriodicAction() {
|
||||||
if (mode == TestModes::BPX_BATTERY) {
|
if (mode == TestModes::BPX_BATTERY) {
|
||||||
battPeriodic();
|
battPeriodic();
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void I2cTestClass::battInit() {
|
void I2cTestClass::battInit() {
|
||||||
sif::info << "I2cTestClass: BPX Initialization" << std::endl;
|
sif::info << "I2cTestClass: BPX Initialization" << std::endl;
|
||||||
UnixFileGuard fileHelper(i2cdev, &bpxInfo.fd, O_RDWR, "I2cTestClass::sendMessage");
|
UnixFileGuard fileHelper(i2cdev, &bpxInfo.fd, O_RDWR, "I2cTestClass::sendMessage");
|
||||||
if (fileHelper.getOpenResult() != HasReturnvaluesIF::RETURN_OK) {
|
if (fileHelper.getOpenResult() != returnvalue::OK) {
|
||||||
sif::error << "Opening I2C device" << i2cdev << " failed" << std::endl;
|
sif::error << "Opening I2C device" << i2cdev << " failed" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -41,13 +41,13 @@ void I2cTestClass::battInit() {
|
|||||||
cmdBuf[1] = 0x42;
|
cmdBuf[1] = 0x42;
|
||||||
sendLen = 2;
|
sendLen = 2;
|
||||||
ReturnValue_t result = i2cWrite(bpxInfo.fd, cmdBuf.data(), sendLen);
|
ReturnValue_t result = i2cWrite(bpxInfo.fd, cmdBuf.data(), sendLen);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Receive back port, error byte and ping reply
|
// Receive back port, error byte and ping reply
|
||||||
recvLen = 3;
|
recvLen = 3;
|
||||||
result = i2cRead(bpxInfo.fd, replyBuf.data(), recvLen);
|
result = i2cRead(bpxInfo.fd, replyBuf.data(), recvLen);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sif::info << "Ping reply:" << std::endl;
|
sif::info << "Ping reply:" << std::endl;
|
||||||
@ -59,7 +59,7 @@ void I2cTestClass::battInit() {
|
|||||||
|
|
||||||
void I2cTestClass::battPeriodic() {
|
void I2cTestClass::battPeriodic() {
|
||||||
UnixFileGuard fileHelper(i2cdev, &bpxInfo.fd, O_RDWR, "I2cTestClass::sendMessage");
|
UnixFileGuard fileHelper(i2cdev, &bpxInfo.fd, O_RDWR, "I2cTestClass::sendMessage");
|
||||||
if (fileHelper.getOpenResult() != HasReturnvaluesIF::RETURN_OK) {
|
if (fileHelper.getOpenResult() != returnvalue::OK) {
|
||||||
sif::error << "Opening I2C device" << i2cdev << " failed" << std::endl;
|
sif::error << "Opening I2C device" << i2cdev << " failed" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -69,13 +69,13 @@ void I2cTestClass::battPeriodic() {
|
|||||||
cmdBuf[0] = BpxBattery::PORT_GET_HK;
|
cmdBuf[0] = BpxBattery::PORT_GET_HK;
|
||||||
sendLen = 1;
|
sendLen = 1;
|
||||||
ReturnValue_t result = i2cWrite(bpxInfo.fd, cmdBuf.data(), sendLen);
|
ReturnValue_t result = i2cWrite(bpxInfo.fd, cmdBuf.data(), sendLen);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Receive back HK set
|
// Receive back HK set
|
||||||
recvLen = 23;
|
recvLen = 23;
|
||||||
result = i2cRead(bpxInfo.fd, replyBuf.data(), recvLen);
|
result = i2cRead(bpxInfo.fd, replyBuf.data(), recvLen);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sif::info << "HK reply:" << std::endl;
|
sif::info << "HK reply:" << std::endl;
|
||||||
@ -86,16 +86,16 @@ ReturnValue_t I2cTestClass::i2cWrite(int fd, uint8_t* data, size_t len) {
|
|||||||
if (write(fd, data, len) != static_cast<ssize_t>(len)) {
|
if (write(fd, data, len) != static_cast<ssize_t>(len)) {
|
||||||
sif::error << "Failed to write to I2C bus" << std::endl;
|
sif::error << "Failed to write to I2C bus" << std::endl;
|
||||||
sif::error << "Error " << errno << ": " << strerror(errno) << std::endl;
|
sif::error << "Error " << errno << ": " << strerror(errno) << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t I2cTestClass::i2cRead(int fd, uint8_t* data, size_t len) {
|
ReturnValue_t I2cTestClass::i2cRead(int fd, uint8_t* data, size_t len) {
|
||||||
if (read(fd, data, len) != static_cast<ssize_t>(len)) {
|
if (read(fd, data, len) != static_cast<ssize_t>(len)) {
|
||||||
sif::error << "Failed to read from I2C bus" << std::endl;
|
sif::error << "Failed to read from I2C bus" << std::endl;
|
||||||
sif::error << "Error " << errno << ": " << strerror(errno) << std::endl;
|
sif::error << "Error " << errno << ": " << strerror(errno) << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -25,9 +25,9 @@ ReturnValue_t LibgpiodTest::performPeriodicAction() {
|
|||||||
switch (testCase) {
|
switch (testCase) {
|
||||||
case (TestCases::READ): {
|
case (TestCases::READ): {
|
||||||
result = gpioInterface->readGpio(gpioIds::TEST_ID_0, gpioState);
|
result = gpioInterface->readGpio(gpioIds::TEST_ID_0, gpioState);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "LibgpiodTest::performPeriodicAction: Failed to read gpio " << std::endl;
|
sif::warning << "LibgpiodTest::performPeriodicAction: Failed to read gpio " << std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
} else {
|
} else {
|
||||||
sif::debug << "LibgpiodTest::performPeriodicAction: MIO 0 state = "
|
sif::debug << "LibgpiodTest::performPeriodicAction: MIO 0 state = "
|
||||||
<< static_cast<int>(gpioState) << std::endl;
|
<< static_cast<int>(gpioState) << std::endl;
|
||||||
@ -39,23 +39,23 @@ ReturnValue_t LibgpiodTest::performPeriodicAction() {
|
|||||||
}
|
}
|
||||||
case (TestCases::BLINK): {
|
case (TestCases::BLINK): {
|
||||||
result = gpioInterface->readGpio(gpioIds::TEST_ID_0, gpioState);
|
result = gpioInterface->readGpio(gpioIds::TEST_ID_0, gpioState);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "LibgpiodTest::performPeriodicAction: Failed to read gpio " << std::endl;
|
sif::warning << "LibgpiodTest::performPeriodicAction: Failed to read gpio " << std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
if (gpioState == gpio::Levels::HIGH) {
|
if (gpioState == gpio::Levels::HIGH) {
|
||||||
result = gpioInterface->pullLow(gpioIds::TEST_ID_0);
|
result = gpioInterface->pullLow(gpioIds::TEST_ID_0);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "LibgpiodTest::performPeriodicAction: Could not pull GPIO low!"
|
sif::warning << "LibgpiodTest::performPeriodicAction: Could not pull GPIO low!"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
} else if (gpioState == gpio::Levels::LOW) {
|
} else if (gpioState == gpio::Levels::LOW) {
|
||||||
result = gpioInterface->pullHigh(gpioIds::TEST_ID_0);
|
result = gpioInterface->pullHigh(gpioIds::TEST_ID_0);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "LibgpiodTest::performPeriodicAction: Could not pull GPIO high!"
|
sif::warning << "LibgpiodTest::performPeriodicAction: Could not pull GPIO high!"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sif::warning << "LibgpiodTest::performPeriodicAction: Invalid GPIO state" << std::endl;
|
sif::warning << "LibgpiodTest::performPeriodicAction: Invalid GPIO state" << std::endl;
|
||||||
@ -68,7 +68,7 @@ ReturnValue_t LibgpiodTest::performPeriodicAction() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t LibgpiodTest::performOneShotAction() {
|
ReturnValue_t LibgpiodTest::performOneShotAction() {
|
||||||
@ -84,44 +84,44 @@ ReturnValue_t LibgpiodTest::performOneShotAction() {
|
|||||||
}
|
}
|
||||||
case (TestCases::LOOPBACK): {
|
case (TestCases::LOOPBACK): {
|
||||||
result = gpioInterface->pullHigh(gpioIds::TEST_ID_0);
|
result = gpioInterface->pullHigh(gpioIds::TEST_ID_0);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
sif::info << "LibgpiodTest::performOneShotAction: "
|
sif::info << "LibgpiodTest::performOneShotAction: "
|
||||||
"GPIO pulled high successfully for loopback test"
|
"GPIO pulled high successfully for loopback test"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
} else {
|
} else {
|
||||||
sif::warning << "LibgpiodTest::performOneShotAction: Could not pull GPIO high!"
|
sif::warning << "LibgpiodTest::performOneShotAction: Could not pull GPIO high!"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
result = gpioInterface->readGpio(gpioIds::TEST_ID_1, gpioState);
|
result = gpioInterface->readGpio(gpioIds::TEST_ID_1, gpioState);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK and gpioState == gpio::Levels::HIGH) {
|
if (result == returnvalue::OK and gpioState == gpio::Levels::HIGH) {
|
||||||
sif::info << "LibgpiodTest::performOneShotAction: "
|
sif::info << "LibgpiodTest::performOneShotAction: "
|
||||||
"GPIO state read successfully and is high"
|
"GPIO state read successfully and is high"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
} else {
|
} else {
|
||||||
sif::warning << "LibgpiodTest::performOneShotAction: GPIO read and is not high!"
|
sif::warning << "LibgpiodTest::performOneShotAction: GPIO read and is not high!"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = gpioInterface->pullLow(gpioIds::TEST_ID_0);
|
result = gpioInterface->pullLow(gpioIds::TEST_ID_0);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
sif::info << "LibgpiodTest::performOneShotAction: "
|
sif::info << "LibgpiodTest::performOneShotAction: "
|
||||||
"GPIO pulled low successfully for loopback test"
|
"GPIO pulled low successfully for loopback test"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
result = gpioInterface->readGpio(gpioIds::TEST_ID_1, gpioState);
|
result = gpioInterface->readGpio(gpioIds::TEST_ID_1, gpioState);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK and gpioState == gpio::Levels::LOW) {
|
if (result == returnvalue::OK and gpioState == gpio::Levels::LOW) {
|
||||||
sif::info << "LibgpiodTest::performOneShotAction: "
|
sif::info << "LibgpiodTest::performOneShotAction: "
|
||||||
"GPIO state read successfully and is low"
|
"GPIO state read successfully and is low"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
} else {
|
} else {
|
||||||
sif::warning << "LibgpiodTest::performOneShotAction: GPIO read and is not low!"
|
sif::warning << "LibgpiodTest::performOneShotAction: GPIO read and is not low!"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ ReturnValue_t SpiTestClass::performOneShotAction() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t SpiTestClass::performPeriodicAction() {
|
ReturnValue_t SpiTestClass::performPeriodicAction() {
|
||||||
@ -65,7 +65,7 @@ ReturnValue_t SpiTestClass::performPeriodicAction() {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpiTestClass::performRm3100Test(uint8_t mgmId) {
|
void SpiTestClass::performRm3100Test(uint8_t mgmId) {
|
||||||
@ -532,11 +532,11 @@ void SpiTestClass::max1227PlPcduTest(int fd) {
|
|||||||
adcCfg.vbatSwitch) {
|
adcCfg.vbatSwitch) {
|
||||||
// This enables the ADC
|
// This enables the ADC
|
||||||
ReturnValue_t result = gpioIF->pullHigh(gpioIds::PLPCDU_ENB_VBAT0);
|
ReturnValue_t result = gpioIF->pullHigh(gpioIds::PLPCDU_ENB_VBAT0);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
result = gpioIF->pullHigh(gpioIds::PLPCDU_ENB_VBAT1);
|
result = gpioIF->pullHigh(gpioIds::PLPCDU_ENB_VBAT1);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
adcCfg.vbatSwitch = false;
|
adcCfg.vbatSwitch = false;
|
||||||
@ -878,10 +878,10 @@ uint8_t SpiTestClass::readRegister(int fd, gpioId_t chipSelect, uint8_t reg) {
|
|||||||
|
|
||||||
ReturnValue_t SpiTestClass::transfer(int fd, gpioId_t chipSelect = gpio::NO_GPIO) {
|
ReturnValue_t SpiTestClass::transfer(int fd, gpioId_t chipSelect = gpio::NO_GPIO) {
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
if (chipSelect != gpio::NO_GPIO) {
|
if (chipSelect != gpio::NO_GPIO) {
|
||||||
result = gpioIF->pullLow(chipSelect);
|
result = gpioIF->pullLow(chipSelect);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -889,14 +889,14 @@ ReturnValue_t SpiTestClass::transfer(int fd, gpioId_t chipSelect = gpio::NO_GPIO
|
|||||||
retval = ioctl(fd, SPI_IOC_MESSAGE(1), &spiTransferStruct);
|
retval = ioctl(fd, SPI_IOC_MESSAGE(1), &spiTransferStruct);
|
||||||
if (retval < 0) {
|
if (retval < 0) {
|
||||||
utility::handleIoctlError("SpiTestClass::transfer: ioctl failed");
|
utility::handleIoctlError("SpiTestClass::transfer: ioctl failed");
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chipSelect != gpio::NO_GPIO) {
|
if (chipSelect != gpio::NO_GPIO) {
|
||||||
result = gpioIF->pullHigh(chipSelect);
|
result = gpioIF->pullHigh(chipSelect);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -26,10 +26,10 @@ ReturnValue_t UartTestClass::initialize() {
|
|||||||
} else if (mode == TestModes::SCEX) {
|
} else if (mode == TestModes::SCEX) {
|
||||||
scexInit();
|
scexInit();
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t UartTestClass::performOneShotAction() { return HasReturnvaluesIF::RETURN_OK; }
|
ReturnValue_t UartTestClass::performOneShotAction() { return returnvalue::OK; }
|
||||||
|
|
||||||
ReturnValue_t UartTestClass::performPeriodicAction() {
|
ReturnValue_t UartTestClass::performPeriodicAction() {
|
||||||
if (mode == TestModes::GPS) {
|
if (mode == TestModes::GPS) {
|
||||||
@ -37,7 +37,7 @@ ReturnValue_t UartTestClass::performPeriodicAction() {
|
|||||||
} else if (mode == TestModes::SCEX) {
|
} else if (mode == TestModes::SCEX) {
|
||||||
scexPeriodic();
|
scexPeriodic();
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UartTestClass::gpsInit() {
|
void UartTestClass::gpsInit() {
|
||||||
@ -217,7 +217,7 @@ int UartTestClass::prepareScexPing() {
|
|||||||
tmpCmdBuf[6] = crc & 0xff;
|
tmpCmdBuf[6] = crc & 0xff;
|
||||||
ReturnValue_t result =
|
ReturnValue_t result =
|
||||||
dleEncoder.encode(tmpCmdBuf.data(), 7, cmdBuf.data(), cmdBuf.size(), &encodedLen, true);
|
dleEncoder.encode(tmpCmdBuf.data(), 7, cmdBuf.data(), cmdBuf.size(), &encodedLen, true);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "UartTestClass::scexInit: Encoding failed" << std::endl;
|
sif::warning << "UartTestClass::scexInit: Encoding failed" << std::endl;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
target_sources(${OBSW_NAME} PUBLIC CspComIF.cpp CspCookie.cpp)
|
target_sources(${OBSW_NAME} PUBLIC CspComIF.cpp)
|
||||||
|
@ -3,8 +3,16 @@
|
|||||||
#include <csp/drivers/can_socketcan.h>
|
#include <csp/drivers/can_socketcan.h>
|
||||||
#include <fsfw/serialize/SerializeAdapter.h>
|
#include <fsfw/serialize/SerializeAdapter.h>
|
||||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
||||||
|
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
|
||||||
|
#include <p60acu.h>
|
||||||
|
#include <p60dock.h>
|
||||||
|
#include <p60pdu.h>
|
||||||
|
#include <param/param_string.h>
|
||||||
|
#include <param/rparam_client.h>
|
||||||
|
|
||||||
#include "CspCookie.h"
|
#include "mission/csp/CspCookie.h"
|
||||||
|
|
||||||
|
using namespace GOMSPACE;
|
||||||
|
|
||||||
CspComIF::CspComIF(object_id_t objectId) : SystemObject(objectId) {}
|
CspComIF::CspComIF(object_id_t objectId) : SystemObject(objectId) {}
|
||||||
|
|
||||||
@ -31,7 +39,7 @@ ReturnValue_t CspComIF::initializeInterface(CookieIF* cookie) {
|
|||||||
if (csp_init(cspOwnAddress) != CSP_ERR_NONE ||
|
if (csp_init(cspOwnAddress) != CSP_ERR_NONE ||
|
||||||
csp_buffer_init(buf_count, buf_size) != CSP_ERR_NONE) {
|
csp_buffer_init(buf_count, buf_size) != CSP_ERR_NONE) {
|
||||||
sif::error << "Failed to init CSP\r\n" << std::endl;
|
sif::error << "Failed to init CSP\r\n" << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
int promisc = 0; // Set filter mode on
|
int promisc = 0; // Set filter mode on
|
||||||
@ -45,7 +53,7 @@ ReturnValue_t CspComIF::initializeInterface(CookieIF* cookie) {
|
|||||||
int result = csp_rtable_set(address, netmask, csp_if_ptr, mac);
|
int result = csp_rtable_set(address, netmask, csp_if_ptr, mac);
|
||||||
if (result != CSP_ERR_NONE) {
|
if (result != CSP_ERR_NONE) {
|
||||||
sif::error << "Failed to add can interface to router table" << std::endl;
|
sif::error << "Failed to add can interface to router table" << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Start the route task */
|
/* Start the route task */
|
||||||
@ -54,7 +62,7 @@ ReturnValue_t CspComIF::initializeInterface(CookieIF* cookie) {
|
|||||||
result = csp_route_start_task(task_stack_size, priority);
|
result = csp_route_start_task(task_stack_size, priority);
|
||||||
if (result != CSP_ERR_NONE) {
|
if (result != CSP_ERR_NONE) {
|
||||||
sif::error << "Failed to start csp route task" << std::endl;
|
sif::error << "Failed to start csp route task" << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
sif::info << canInterface << " initialized successfully" << std::endl;
|
sif::info << canInterface << " initialized successfully" << std::endl;
|
||||||
}
|
}
|
||||||
@ -63,78 +71,144 @@ ReturnValue_t CspComIF::initializeInterface(CookieIF* cookie) {
|
|||||||
uint16_t maxReplyLength = cspCookie->getMaxReplyLength();
|
uint16_t maxReplyLength = cspCookie->getMaxReplyLength();
|
||||||
if (cspDeviceMap.find(cspAddress) == cspDeviceMap.end()) {
|
if (cspDeviceMap.find(cspAddress) == cspDeviceMap.end()) {
|
||||||
/* Insert device information in CSP map */
|
/* Insert device information in CSP map */
|
||||||
cspDeviceMap.emplace(cspAddress, vectorBuffer(maxReplyLength));
|
cspDeviceMap.emplace(cspAddress, ReplyInfo(maxReplyLength));
|
||||||
}
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CspComIF::sendMessage(CookieIF* cookie, const uint8_t* sendData, size_t sendLen) {
|
ReturnValue_t CspComIF::sendMessage(CookieIF* cookie, const uint8_t* sendData, size_t sendLen) {
|
||||||
int result;
|
int result;
|
||||||
if (cookie == NULL) {
|
if (cookie == nullptr) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
CspCookie* cspCookie = dynamic_cast<CspCookie*>(cookie);
|
CspCookie* cspCookie = dynamic_cast<CspCookie*>(cookie);
|
||||||
if (cspCookie == NULL) {
|
if (cspCookie == nullptr) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Extract csp port and bytes to query from command buffer */
|
|
||||||
uint8_t cspPort;
|
uint8_t cspPort;
|
||||||
uint16_t querySize = 0;
|
uint16_t querySize = 0;
|
||||||
|
if (cspCookie->getRequest() == GOMSPACE::SpecialRequestTypes::DEFAULT_COM_IF) {
|
||||||
|
/* Extract csp port and bytes to query from command buffer */
|
||||||
result = getPortAndQuerySize(&sendData, &sendLen, &cspPort, &querySize);
|
result = getPortAndQuerySize(&sendData, &sendLen, &cspPort, &querySize);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
cspPort = cspCookie->getCspPort();
|
||||||
|
querySize = cspCookie->getReplyLen();
|
||||||
|
}
|
||||||
|
if (querySize > cspCookie->getMaxReplyLength()) {
|
||||||
|
sif::error << "Query size " << querySize << " is larger than maximum allowed "
|
||||||
|
<< cspCookie->getMaxReplyLength() << std::endl;
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
uint8_t cspAddress = cspCookie->getCspAddress();
|
uint8_t cspAddress = cspCookie->getCspAddress();
|
||||||
|
auto iter = cspDeviceMap.find(cspAddress);
|
||||||
|
if (iter == cspDeviceMap.end()) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
switch (cspPort) {
|
switch (cspPort) {
|
||||||
case (Ports::CSP_PING): {
|
case (CspPorts::CSP_PING): {
|
||||||
initiatePingRequest(cspAddress, querySize);
|
initiatePingRequest(cspAddress, querySize);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (Ports::CSP_REBOOT): {
|
case (CspPorts::CSP_REBOOT): {
|
||||||
csp_reboot(cspAddress);
|
csp_reboot(cspAddress);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (Ports::P60_PORT_GNDWDT_RESET):
|
case (CspPorts::P60_PORT_GNDWDT_RESET_ENUM):
|
||||||
case (Ports::P60_PORT_RPARAM): {
|
case (CspPorts::P60_PORT_RPARAM_ENUM): {
|
||||||
|
if (cspCookie->getRequest() != SpecialRequestTypes::DEFAULT_COM_IF) {
|
||||||
|
param_index_t requestStruct{};
|
||||||
|
requestStruct.physaddr = iter->second.replyBuf.data();
|
||||||
|
auto req = cspCookie->getRequest();
|
||||||
|
if (req == GOMSPACE::SpecialRequestTypes::GET_PDU_HK) {
|
||||||
|
if (!p60pdu_get_hk(&requestStruct, cspAddress, cspCookie->getTimeout())) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (req == GOMSPACE::SpecialRequestTypes::GET_ACU_HK) {
|
||||||
|
if (!p60acu_get_hk(&requestStruct, cspAddress, cspCookie->getTimeout())) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
|
} else if (req == GOMSPACE::SpecialRequestTypes::GET_P60DOCK_HK) {
|
||||||
|
if (!p60dock_get_hk(&requestStruct, cspAddress, cspCookie->getTimeout())) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
|
} else if (req == GOMSPACE::SpecialRequestTypes::GET_PDU_CONFIG) {
|
||||||
|
requestStruct.table = p60pdu_config;
|
||||||
|
requestStruct.mem_id = P60PDU_PARAM;
|
||||||
|
requestStruct.count = p60pdu_config_count;
|
||||||
|
requestStruct.size = P60PDU_PARAM_SIZE;
|
||||||
|
int result = rparam_get_full_table(&requestStruct, cspAddress, P60_PORT_RPARAM,
|
||||||
|
requestStruct.mem_id, cspCookie->getTimeout());
|
||||||
|
if (result != 0) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
|
} else if (req == GOMSPACE::SpecialRequestTypes::GET_ACU_CONFIG) {
|
||||||
|
requestStruct.table = p60acu_config;
|
||||||
|
requestStruct.mem_id = P60ACU_PARAM;
|
||||||
|
requestStruct.count = p60acu_config_count;
|
||||||
|
requestStruct.size = P60ACU_PARAM_SIZE;
|
||||||
|
int result = rparam_get_full_table(&requestStruct, cspAddress, P60_PORT_RPARAM,
|
||||||
|
requestStruct.mem_id, cspCookie->getTimeout());
|
||||||
|
if (result != 0) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
|
} else if (req == GOMSPACE::SpecialRequestTypes::GET_P60DOCK_CONFIG) {
|
||||||
|
requestStruct.table = p60dock_config;
|
||||||
|
requestStruct.mem_id = P60DOCK_PARAM;
|
||||||
|
requestStruct.count = p60dock_config_count;
|
||||||
|
requestStruct.size = P60DOCK_PARAM_SIZE;
|
||||||
|
int result = rparam_get_full_table(&requestStruct, cspAddress, P60_PORT_RPARAM,
|
||||||
|
requestStruct.mem_id, cspCookie->getTimeout());
|
||||||
|
if (result != 0) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
/* No CSP fixed port was selected. Send data to the specified port and
|
/* No CSP fixed port was selected. Send data to the specified port and
|
||||||
* wait for querySize number of bytes */
|
* wait for querySize number of bytes */
|
||||||
result = cspTransfer(cspAddress, cspPort, sendData, sendLen, querySize);
|
result = cspTransfer(cspAddress, cspPort, sendData, sendLen, querySize);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
replySize = querySize;
|
}
|
||||||
|
iter->second.replyLen = querySize;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
sif::error << "CspComIF: Invalid port specified" << std::endl;
|
sif::error << "CspComIF: Invalid port specified" << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CspComIF::getSendSuccess(CookieIF* cookie) { return HasReturnvaluesIF::RETURN_OK; }
|
ReturnValue_t CspComIF::getSendSuccess(CookieIF* cookie) { return returnvalue::OK; }
|
||||||
|
|
||||||
ReturnValue_t CspComIF::requestReceiveMessage(CookieIF* cookie, size_t requestLen) {
|
ReturnValue_t CspComIF::requestReceiveMessage(CookieIF* cookie, size_t requestLen) {
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CspComIF::readReceivedMessage(CookieIF* cookie, uint8_t** buffer, size_t* size) {
|
ReturnValue_t CspComIF::readReceivedMessage(CookieIF* cookie, uint8_t** buffer, size_t* size) {
|
||||||
if (cookie == NULL) {
|
if (cookie == NULL) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
CspCookie* cspCookie = dynamic_cast<CspCookie*>(cookie);
|
CspCookie* cspCookie = dynamic_cast<CspCookie*>(cookie);
|
||||||
if (cspCookie == NULL) {
|
if (cspCookie == NULL) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t cspAddress = cspCookie->getCspAddress();
|
uint8_t cspAddress = cspCookie->getCspAddress();
|
||||||
|
auto iter = cspDeviceMap.find(cspAddress);
|
||||||
|
if (iter == cspDeviceMap.end()) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
|
*buffer = iter->second.replyBuf.data();
|
||||||
|
*size = iter->second.replyLen;
|
||||||
|
|
||||||
*buffer = cspDeviceMap[cspAddress].data();
|
return returnvalue::OK;
|
||||||
*size = replySize;
|
|
||||||
|
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CspComIF::cspTransfer(uint8_t cspAddress, uint8_t cspPort, const uint8_t* cmdBuffer,
|
ReturnValue_t CspComIF::cspTransfer(uint8_t cspAddress, uint8_t cspPort, const uint8_t* cmdBuffer,
|
||||||
@ -142,13 +216,13 @@ ReturnValue_t CspComIF::cspTransfer(uint8_t cspAddress, uint8_t cspPort, const u
|
|||||||
uint32_t timeout_ms = 1000;
|
uint32_t timeout_ms = 1000;
|
||||||
uint16_t bytesRead = 0;
|
uint16_t bytesRead = 0;
|
||||||
int32_t expectedSize = static_cast<int32_t>(querySize);
|
int32_t expectedSize = static_cast<int32_t>(querySize);
|
||||||
vectorBufferIter iter = cspDeviceMap.find(cspAddress);
|
auto iter = cspDeviceMap.find(cspAddress);
|
||||||
if (iter == cspDeviceMap.end()) {
|
if (iter == cspDeviceMap.end()) {
|
||||||
sif::error << "CSP device with address " << cspAddress << " no found in"
|
sif::error << "CSP device with address " << cspAddress << " no found in"
|
||||||
<< " device map" << std::endl;
|
<< " device map" << std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
uint8_t* replyBuffer = iter->second.data();
|
uint8_t* replyBuffer = iter->second.replyBuf.data();
|
||||||
|
|
||||||
csp_conn_t* conn = csp_connect(CSP_PRIO_HIGH, cspAddress, cspPort, 0, CSP_O_NONE);
|
csp_conn_t* conn = csp_connect(CSP_PRIO_HIGH, cspAddress, cspPort, 0, CSP_O_NONE);
|
||||||
|
|
||||||
@ -157,7 +231,7 @@ ReturnValue_t CspComIF::cspTransfer(uint8_t cspAddress, uint8_t cspPort, const u
|
|||||||
sif::error << "CspComIF::cspTransfer: Failed to get memory for a csp packet from the csp "
|
sif::error << "CspComIF::cspTransfer: Failed to get memory for a csp packet from the csp "
|
||||||
<< "stack" << std::endl;
|
<< "stack" << std::endl;
|
||||||
csp_close(conn);
|
csp_close(conn);
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(commandPacket->data, cmdBuffer, cmdLen);
|
memcpy(commandPacket->data, cmdBuffer, cmdLen);
|
||||||
@ -167,12 +241,12 @@ ReturnValue_t CspComIF::cspTransfer(uint8_t cspAddress, uint8_t cspPort, const u
|
|||||||
csp_buffer_free(commandPacket);
|
csp_buffer_free(commandPacket);
|
||||||
sif::error << "CspComIF::cspTransfer: Failed to send csp packet" << std::endl;
|
sif::error << "CspComIF::cspTransfer: Failed to send csp packet" << std::endl;
|
||||||
csp_close(conn);
|
csp_close(conn);
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return when no reply is expected */
|
/* Return when no reply is expected */
|
||||||
if (expectedSize == 0) {
|
if (expectedSize == 0) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
csp_packet_t* reply;
|
csp_packet_t* reply;
|
||||||
@ -180,7 +254,7 @@ ReturnValue_t CspComIF::cspTransfer(uint8_t cspAddress, uint8_t cspPort, const u
|
|||||||
if (reply == NULL) {
|
if (reply == NULL) {
|
||||||
sif::error << "CspComIF::cspTransfer: Failed to read csp packet" << std::endl;
|
sif::error << "CspComIF::cspTransfer: Failed to read csp packet" << std::endl;
|
||||||
csp_close(conn);
|
csp_close(conn);
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
memcpy(replyBuffer, reply->data, reply->length);
|
memcpy(replyBuffer, reply->data, reply->length);
|
||||||
expectedSize = expectedSize - reply->length;
|
expectedSize = expectedSize - reply->length;
|
||||||
@ -191,13 +265,13 @@ ReturnValue_t CspComIF::cspTransfer(uint8_t cspAddress, uint8_t cspPort, const u
|
|||||||
if (reply == NULL) {
|
if (reply == NULL) {
|
||||||
sif::error << "CspComIF::cspTransfer: Failed to read csp packet" << std::endl;
|
sif::error << "CspComIF::cspTransfer: Failed to read csp packet" << std::endl;
|
||||||
csp_close(conn);
|
csp_close(conn);
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
if ((reply->length + bytesRead) > iter->second.size()) {
|
if ((reply->length + bytesRead) > iter->second.replyBuf.size()) {
|
||||||
sif::error << "CspComIF::cspTransfer: Reply buffer to short" << std::endl;
|
sif::error << "CspComIF::cspTransfer: Reply buffer to short" << std::endl;
|
||||||
csp_buffer_free(reply);
|
csp_buffer_free(reply);
|
||||||
csp_close(conn);
|
csp_close(conn);
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
memcpy(replyBuffer + bytesRead, reply->data, reply->length);
|
memcpy(replyBuffer + bytesRead, reply->data, reply->length);
|
||||||
expectedSize = expectedSize - reply->length;
|
expectedSize = expectedSize - reply->length;
|
||||||
@ -209,30 +283,30 @@ ReturnValue_t CspComIF::cspTransfer(uint8_t cspAddress, uint8_t cspPort, const u
|
|||||||
sif::error << "CspComIF::cspTransfer: Received more bytes than requested" << std::endl;
|
sif::error << "CspComIF::cspTransfer: Received more bytes than requested" << std::endl;
|
||||||
sif::debug << "CspComIF::cspTransfer: Received bytes: " << bytesRead << std::endl;
|
sif::debug << "CspComIF::cspTransfer: Received bytes: " << bytesRead << std::endl;
|
||||||
csp_close(conn);
|
csp_close(conn);
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
csp_close(conn);
|
csp_close(conn);
|
||||||
|
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CspComIF::getPortAndQuerySize(const uint8_t** sendData, size_t* sendLen,
|
ReturnValue_t CspComIF::getPortAndQuerySize(const uint8_t** sendData, size_t* sendLen,
|
||||||
uint8_t* cspPort, uint16_t* querySize) {
|
uint8_t* cspPort, uint16_t* querySize) {
|
||||||
ReturnValue_t result =
|
ReturnValue_t result =
|
||||||
SerializeAdapter::deSerialize(cspPort, sendData, sendLen, SerializeIF::Endianness::BIG);
|
SerializeAdapter::deSerialize(cspPort, sendData, sendLen, SerializeIF::Endianness::BIG);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "CspComIF: Failed to deserialize CSP port from command "
|
sif::error << "CspComIF: Failed to deserialize CSP port from command "
|
||||||
<< "buffer" << std::endl;
|
<< "buffer" << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
SerializeAdapter::deSerialize(querySize, sendData, sendLen, SerializeIF::Endianness::BIG);
|
SerializeAdapter::deSerialize(querySize, sendData, sendLen, SerializeIF::Endianness::BIG);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "CspComIF: Failed to deserialize querySize from command "
|
sif::error << "CspComIF: Failed to deserialize querySize from command "
|
||||||
<< "buffer" << std::endl;
|
<< "buffer" << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CspComIF::initiatePingRequest(uint8_t cspAddress, uint16_t querySize) {
|
void CspComIF::initiatePingRequest(uint8_t cspAddress, uint16_t querySize) {
|
||||||
@ -240,8 +314,12 @@ void CspComIF::initiatePingRequest(uint8_t cspAddress, uint16_t querySize) {
|
|||||||
uint32_t replyTime = csp_ping(cspAddress, timeout_ms, querySize, CSP_O_NONE);
|
uint32_t replyTime = csp_ping(cspAddress, timeout_ms, querySize, CSP_O_NONE);
|
||||||
sif::info << "Ping address: " << cspAddress << ", reply after " << replyTime << " ms"
|
sif::info << "Ping address: " << cspAddress << ", reply after " << replyTime << " ms"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
auto iter = cspDeviceMap.find(cspAddress);
|
||||||
|
if (iter == cspDeviceMap.end()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/* Store reply time in reply buffer * */
|
/* Store reply time in reply buffer * */
|
||||||
uint8_t* replyBuffer = cspDeviceMap[cspAddress].data();
|
uint8_t* replyBuffer = iter->second.replyBuf.data();
|
||||||
memcpy(replyBuffer, &replyTime, sizeof(replyTime));
|
memcpy(replyBuffer, &replyTime, sizeof(replyTime));
|
||||||
replySize = sizeof(replyTime);
|
iter->second.replyLen = sizeof(replyTime);
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include <csp/csp.h>
|
#include <csp/csp.h>
|
||||||
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
|
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
|
||||||
#include <fsfw/objectmanager/SystemObject.h>
|
#include <fsfw/objectmanager/SystemObject.h>
|
||||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
#include <fsfw/returnvalues/returnvalue.h>
|
||||||
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -42,24 +42,22 @@ class CspComIF : public DeviceCommunicationIF, public SystemObject {
|
|||||||
ReturnValue_t cspTransfer(uint8_t cspAddress, uint8_t cspPort, const uint8_t *cmdBuffer,
|
ReturnValue_t cspTransfer(uint8_t cspAddress, uint8_t cspPort, const uint8_t *cmdBuffer,
|
||||||
int cmdLen, uint16_t querySize);
|
int cmdLen, uint16_t querySize);
|
||||||
|
|
||||||
enum Ports { CSP_PING = 1, CSP_REBOOT = 4, P60_PORT_RPARAM = 7, P60_PORT_GNDWDT_RESET = 9 };
|
|
||||||
|
|
||||||
typedef uint8_t node_t;
|
typedef uint8_t node_t;
|
||||||
using vectorBuffer = std::vector<uint8_t>;
|
struct ReplyInfo {
|
||||||
using VectorBufferMap = std::unordered_map<node_t, vectorBuffer>;
|
ReplyInfo(size_t maxLen) : replyBuf(maxLen){};
|
||||||
using vectorBufferIter = VectorBufferMap::iterator;
|
std::vector<uint8_t> replyBuf;
|
||||||
|
size_t replyLen = 0;
|
||||||
|
};
|
||||||
|
using VectorBufferMap = std::unordered_map<node_t, ReplyInfo>;
|
||||||
|
|
||||||
/* In this map assigns reply buffers to a CSP device */
|
/* In this map assigns reply buffers to a CSP device */
|
||||||
VectorBufferMap cspDeviceMap;
|
VectorBufferMap cspDeviceMap;
|
||||||
|
|
||||||
uint16_t replySize = 0;
|
|
||||||
|
|
||||||
/* This is the CSP address of the OBC. */
|
/* This is the CSP address of the OBC. */
|
||||||
node_t cspOwnAddress = 1;
|
node_t cspOwnAddress = 1;
|
||||||
|
|
||||||
/* Interface struct for csp protocol stack */
|
/* Interface struct for csp protocol stack */
|
||||||
csp_iface_t csp_if;
|
csp_iface_t csp_if;
|
||||||
|
|
||||||
char canInterface[5] = "can0";
|
char canInterface[5] = "can0";
|
||||||
int bitrate = 1000;
|
int bitrate = 1000;
|
||||||
|
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
#include "CspCookie.h"
|
|
||||||
|
|
||||||
CspCookie::CspCookie(uint16_t maxReplyLength_, uint8_t cspAddress_)
|
|
||||||
: maxReplyLength(maxReplyLength_), cspAddress(cspAddress_) {}
|
|
||||||
|
|
||||||
CspCookie::~CspCookie() {}
|
|
||||||
|
|
||||||
uint16_t CspCookie::getMaxReplyLength() { return maxReplyLength; }
|
|
||||||
|
|
||||||
uint8_t CspCookie::getCspAddress() { return cspAddress; }
|
|
@ -1,26 +0,0 @@
|
|||||||
#ifndef LINUX_CSP_CSPCOOKIE_H_
|
|
||||||
#define LINUX_CSP_CSPCOOKIE_H_
|
|
||||||
|
|
||||||
#include <fsfw/devicehandlers/CookieIF.h>
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This is the cookie for devices supporting the CSP (CubeSat Space
|
|
||||||
* Protocol).
|
|
||||||
* @author J. Meier
|
|
||||||
*/
|
|
||||||
class CspCookie : public CookieIF {
|
|
||||||
public:
|
|
||||||
CspCookie(uint16_t maxReplyLength_, uint8_t cspAddress_);
|
|
||||||
virtual ~CspCookie();
|
|
||||||
|
|
||||||
uint16_t getMaxReplyLength();
|
|
||||||
uint8_t getCspAddress();
|
|
||||||
|
|
||||||
private:
|
|
||||||
uint16_t maxReplyLength;
|
|
||||||
uint8_t cspAddress;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* LINUX_CSP_CSPCOOKIE_H_ */
|
|
@ -50,7 +50,7 @@ ReturnValue_t GPSHyperionLinuxController::checkModeCommand(Mode_t mode, Submode_
|
|||||||
return HasModesIF::INVALID_MODE;
|
return HasModesIF::INVALID_MODE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t GPSHyperionLinuxController::executeAction(ActionId_t actionId,
|
ReturnValue_t GPSHyperionLinuxController::executeAction(ActionId_t actionId,
|
||||||
@ -68,7 +68,7 @@ ReturnValue_t GPSHyperionLinuxController::executeAction(ActionId_t actionId,
|
|||||||
return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
|
return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t GPSHyperionLinuxController::initializeLocalDataPool(
|
ReturnValue_t GPSHyperionLinuxController::initializeLocalDataPool(
|
||||||
@ -87,8 +87,8 @@ ReturnValue_t GPSHyperionLinuxController::initializeLocalDataPool(
|
|||||||
localDataPoolMap.emplace(GpsHyperion::SATS_IN_USE, new PoolEntry<uint8_t>());
|
localDataPoolMap.emplace(GpsHyperion::SATS_IN_USE, new PoolEntry<uint8_t>());
|
||||||
localDataPoolMap.emplace(GpsHyperion::SATS_IN_VIEW, new PoolEntry<uint8_t>());
|
localDataPoolMap.emplace(GpsHyperion::SATS_IN_VIEW, new PoolEntry<uint8_t>());
|
||||||
localDataPoolMap.emplace(GpsHyperion::FIX_MODE, new PoolEntry<uint8_t>());
|
localDataPoolMap.emplace(GpsHyperion::FIX_MODE, new PoolEntry<uint8_t>());
|
||||||
poolManager.subscribeForPeriodicPacket(gpsSet.getSid(), false, 30.0, false);
|
poolManager.subscribeForRegularPeriodicPacket({gpsSet.getSid(), 30.0});
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPSHyperionLinuxController::setResetPinTriggerFunction(gpioResetFunction_t resetCallback,
|
void GPSHyperionLinuxController::setResetPinTriggerFunction(gpioResetFunction_t resetCallback,
|
||||||
@ -99,7 +99,7 @@ void GPSHyperionLinuxController::setResetPinTriggerFunction(gpioResetFunction_t
|
|||||||
|
|
||||||
ReturnValue_t GPSHyperionLinuxController::initialize() {
|
ReturnValue_t GPSHyperionLinuxController::initialize() {
|
||||||
ReturnValue_t result = ExtendedControllerBase::initialize();
|
ReturnValue_t result = ExtendedControllerBase::initialize();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
auto openError = [&](const char *type, int error) {
|
auto openError = [&](const char *type, int error) {
|
||||||
@ -178,11 +178,11 @@ void GPSHyperionLinuxController::readGpsDataFromGpsd() {
|
|||||||
|
|
||||||
ReturnValue_t GPSHyperionLinuxController::handleGpsRead() {
|
ReturnValue_t GPSHyperionLinuxController::handleGpsRead() {
|
||||||
PoolReadGuard pg(&gpsSet);
|
PoolReadGuard pg(&gpsSet);
|
||||||
if (pg.getReadResult() != HasReturnvaluesIF::RETURN_OK) {
|
if (pg.getReadResult() != returnvalue::OK) {
|
||||||
#if FSFW_VERBOSE_LEVEL >= 1
|
#if FSFW_VERBOSE_LEVEL >= 1
|
||||||
sif::warning << "GPSHyperionHandler::readGpsDataFromGpsd: Reading dataset failed" << std::endl;
|
sif::warning << "GPSHyperionHandler::readGpsDataFromGpsd: Reading dataset failed" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool validFix = false;
|
bool validFix = false;
|
||||||
@ -311,7 +311,7 @@ ReturnValue_t GPSHyperionLinuxController::handleGpsRead() {
|
|||||||
std::tm tm = *std::gmtime(&t);
|
std::tm tm = *std::gmtime(&t);
|
||||||
std::cout << "C Time: " << std::put_time(&tm, "%c") << std::endl;
|
std::cout << "C Time: " << std::put_time(&tm, "%c") << std::endl;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -24,7 +24,7 @@ Max31865RtdReader::Max31865RtdReader(object_id_t objectId, SpiComIF* lowLevelCom
|
|||||||
|
|
||||||
ReturnValue_t Max31865RtdReader::performOperation(uint8_t operationCode) {
|
ReturnValue_t Max31865RtdReader::performOperation(uint8_t operationCode) {
|
||||||
using namespace MAX31865;
|
using namespace MAX31865;
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
static_cast<void>(result);
|
static_cast<void>(result);
|
||||||
// Stopwatch watch;
|
// Stopwatch watch;
|
||||||
if (periodicInitHandling()) {
|
if (periodicInitHandling()) {
|
||||||
@ -34,12 +34,12 @@ ReturnValue_t Max31865RtdReader::performOperation(uint8_t operationCode) {
|
|||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
// No devices usable (e.g. TCS board off)
|
// No devices usable (e.g. TCS board off)
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OBSW_RTD_AUTO_MODE == 0
|
#if OBSW_RTD_AUTO_MODE == 0
|
||||||
result = periodicReadReqHandling();
|
result = periodicReadReqHandling();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
// After requesting, 65 milliseconds delay required
|
// After requesting, 65 milliseconds delay required
|
||||||
@ -59,8 +59,8 @@ bool Max31865RtdReader::rtdIsActive(uint8_t idx) {
|
|||||||
bool Max31865RtdReader::periodicInitHandling() {
|
bool Max31865RtdReader::periodicInitHandling() {
|
||||||
using namespace MAX31865;
|
using namespace MAX31865;
|
||||||
MutexGuard mg(readerMutex);
|
MutexGuard mg(readerMutex);
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
if (mg.getLockResult() != RETURN_OK) {
|
if (mg.getLockResult() != returnvalue::OK) {
|
||||||
sif::warning << "Max31865RtdReader::periodicInitHandling: Mutex lock failed" << std::endl;
|
sif::warning << "Max31865RtdReader::periodicInitHandling: Mutex lock failed" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -71,28 +71,28 @@ bool Max31865RtdReader::periodicInitHandling() {
|
|||||||
}
|
}
|
||||||
if ((rtd->on or rtd->active) and not rtd->configured and rtd->cd.hasTimedOut()) {
|
if ((rtd->on or rtd->active) and not rtd->configured and rtd->cd.hasTimedOut()) {
|
||||||
ManualCsLockWrapper mg(csLock, gpioIF, rtd->spiCookie, csTimeoutType, csTimeoutMs);
|
ManualCsLockWrapper mg(csLock, gpioIF, rtd->spiCookie, csTimeoutType, csTimeoutMs);
|
||||||
if (mg.lockResult != RETURN_OK or mg.gpioResult != RETURN_OK) {
|
if (mg.lockResult != returnvalue::OK or mg.gpioResult != returnvalue::OK) {
|
||||||
sif::error << "Max31865RtdReader::periodicInitHandling: Manual CS lock failed" << std::endl;
|
sif::error << "Max31865RtdReader::periodicInitHandling: Manual CS lock failed" << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
result = writeCfgReg(rtd->spiCookie, BASE_CFG);
|
result = writeCfgReg(rtd->spiCookie, BASE_CFG);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
handleSpiError(rtd, result, "writeCfgReg");
|
handleSpiError(rtd, result, "writeCfgReg");
|
||||||
}
|
}
|
||||||
if (rtd->writeLowThreshold) {
|
if (rtd->writeLowThreshold) {
|
||||||
result = writeLowThreshold(rtd->spiCookie, rtd->lowThreshold);
|
result = writeLowThreshold(rtd->spiCookie, rtd->lowThreshold);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
handleSpiError(rtd, result, "writeLowThreshold");
|
handleSpiError(rtd, result, "writeLowThreshold");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rtd->writeHighThreshold) {
|
if (rtd->writeHighThreshold) {
|
||||||
result = writeHighThreshold(rtd->spiCookie, rtd->highThreshold);
|
result = writeHighThreshold(rtd->spiCookie, rtd->highThreshold);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
handleSpiError(rtd, result, "writeHighThreshold");
|
handleSpiError(rtd, result, "writeHighThreshold");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result = clearFaultStatus(rtd->spiCookie);
|
result = clearFaultStatus(rtd->spiCookie);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
handleSpiError(rtd, result, "clearFaultStatus");
|
handleSpiError(rtd, result, "clearFaultStatus");
|
||||||
}
|
}
|
||||||
rtd->configured = true;
|
rtd->configured = true;
|
||||||
@ -123,9 +123,9 @@ bool Max31865RtdReader::periodicInitHandling() {
|
|||||||
ReturnValue_t Max31865RtdReader::periodicReadReqHandling() {
|
ReturnValue_t Max31865RtdReader::periodicReadReqHandling() {
|
||||||
using namespace MAX31865;
|
using namespace MAX31865;
|
||||||
MutexGuard mg(readerMutex);
|
MutexGuard mg(readerMutex);
|
||||||
if (mg.getLockResult() != RETURN_OK) {
|
if (mg.getLockResult() != returnvalue::OK) {
|
||||||
sif::warning << "Max31865RtdReader::periodicReadReqHandling: Mutex lock failed" << std::endl;
|
sif::warning << "Max31865RtdReader::periodicReadReqHandling: Mutex lock failed" << std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
// Now request one shot config for all active RTDs
|
// Now request one shot config for all active RTDs
|
||||||
for (auto& rtd : rtds) {
|
for (auto& rtd : rtds) {
|
||||||
@ -134,23 +134,23 @@ ReturnValue_t Max31865RtdReader::periodicReadReqHandling() {
|
|||||||
}
|
}
|
||||||
if (rtdIsActive(rtd->idx)) {
|
if (rtdIsActive(rtd->idx)) {
|
||||||
ReturnValue_t result = writeCfgReg(rtd->spiCookie, BASE_CFG | (1 << CfgBitPos::ONE_SHOT));
|
ReturnValue_t result = writeCfgReg(rtd->spiCookie, BASE_CFG | (1 << CfgBitPos::ONE_SHOT));
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
handleSpiError(rtd, result, "writeCfgReg");
|
handleSpiError(rtd, result, "writeCfgReg");
|
||||||
// Release mutex ASAP
|
// Release mutex ASAP
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Max31865RtdReader::periodicReadHandling() {
|
ReturnValue_t Max31865RtdReader::periodicReadHandling() {
|
||||||
using namespace MAX31865;
|
using namespace MAX31865;
|
||||||
auto result = RETURN_OK;
|
auto result = returnvalue::OK;
|
||||||
MutexGuard mg(readerMutex);
|
MutexGuard mg(readerMutex);
|
||||||
if (mg.getLockResult() != RETURN_OK) {
|
if (mg.getLockResult() != returnvalue::OK) {
|
||||||
sif::warning << "Max31865RtdReader::periodicReadReqHandling: Mutex lock failed" << std::endl;
|
sif::warning << "Max31865RtdReader::periodicReadReqHandling: Mutex lock failed" << std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
// Now read the RTD values
|
// Now read the RTD values
|
||||||
for (auto& rtd : rtds) {
|
for (auto& rtd : rtds) {
|
||||||
@ -161,9 +161,9 @@ ReturnValue_t Max31865RtdReader::periodicReadHandling() {
|
|||||||
uint16_t rtdVal = 0;
|
uint16_t rtdVal = 0;
|
||||||
bool faultBitSet = false;
|
bool faultBitSet = false;
|
||||||
result = readRtdVal(rtd->spiCookie, rtdVal, faultBitSet);
|
result = readRtdVal(rtd->spiCookie, rtdVal, faultBitSet);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
handleSpiError(rtd, result, "readRtdVal");
|
handleSpiError(rtd, result, "readRtdVal");
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
if (faultBitSet) {
|
if (faultBitSet) {
|
||||||
rtd->db.faultBitSet = faultBitSet;
|
rtd->db.faultBitSet = faultBitSet;
|
||||||
@ -183,7 +183,7 @@ ReturnValue_t Max31865RtdReader::periodicReadHandling() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Max31865RtdReader::initializeInterface(CookieIF* cookie) {
|
ReturnValue_t Max31865RtdReader::initializeInterface(CookieIF* cookie) {
|
||||||
@ -192,7 +192,7 @@ ReturnValue_t Max31865RtdReader::initializeInterface(CookieIF* cookie) {
|
|||||||
}
|
}
|
||||||
auto* rtdCookie = dynamic_cast<Max31865ReaderCookie*>(cookie);
|
auto* rtdCookie = dynamic_cast<Max31865ReaderCookie*>(cookie);
|
||||||
ReturnValue_t result = comIF->initializeInterface(rtdCookie->spiCookie);
|
ReturnValue_t result = comIF->initializeInterface(rtdCookie->spiCookie);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
if (rtdCookie->idx > EiveMax31855::NUM_RTDS) {
|
if (rtdCookie->idx > EiveMax31855::NUM_RTDS) {
|
||||||
@ -203,28 +203,28 @@ ReturnValue_t Max31865RtdReader::initializeInterface(CookieIF* cookie) {
|
|||||||
if (dbLen == 0) {
|
if (dbLen == 0) {
|
||||||
dbLen = rtdCookie->db.getSerializedSize();
|
dbLen = rtdCookie->db.getSerializedSize();
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Max31865RtdReader::sendMessage(CookieIF* cookie, const uint8_t* sendData,
|
ReturnValue_t Max31865RtdReader::sendMessage(CookieIF* cookie, const uint8_t* sendData,
|
||||||
size_t sendLen) {
|
size_t sendLen) {
|
||||||
if (cookie == nullptr) {
|
if (cookie == nullptr) {
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
// Empty command.. don't fail for now
|
// Empty command.. don't fail for now
|
||||||
if (sendLen < 1) {
|
if (sendLen < 1) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
MutexGuard mg(readerMutex);
|
MutexGuard mg(readerMutex);
|
||||||
if (mg.getLockResult() != RETURN_OK) {
|
if (mg.getLockResult() != returnvalue::OK) {
|
||||||
sif::warning << "Max31865RtdReader::sendMessage: Mutex lock failed" << std::endl;
|
sif::warning << "Max31865RtdReader::sendMessage: Mutex lock failed" << std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
auto* rtdCookie = dynamic_cast<Max31865ReaderCookie*>(cookie);
|
auto* rtdCookie = dynamic_cast<Max31865ReaderCookie*>(cookie);
|
||||||
uint8_t cmdRaw = sendData[0];
|
uint8_t cmdRaw = sendData[0];
|
||||||
if (cmdRaw > EiveMax31855::RtdCommands::NUM_CMDS) {
|
if (cmdRaw > EiveMax31855::RtdCommands::NUM_CMDS) {
|
||||||
sif::warning << "Max31865RtdReader::sendMessage: Invalid command" << std::endl;
|
sif::warning << "Max31865RtdReader::sendMessage: Invalid command" << std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto thresholdHandler = [](Max31865ReaderCookie* rtdCookie, const uint8_t* sendData) {
|
auto thresholdHandler = [](Max31865ReaderCookie* rtdCookie, const uint8_t* sendData) {
|
||||||
@ -275,7 +275,7 @@ ReturnValue_t Max31865RtdReader::sendMessage(CookieIF* cookie, const uint8_t* se
|
|||||||
rtdCookie->highThreshold = (sendData[1] << 8) | sendData[2];
|
rtdCookie->highThreshold = (sendData[1] << 8) | sendData[2];
|
||||||
rtdCookie->writeHighThreshold = true;
|
rtdCookie->writeHighThreshold = true;
|
||||||
} else {
|
} else {
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -284,7 +284,7 @@ ReturnValue_t Max31865RtdReader::sendMessage(CookieIF* cookie, const uint8_t* se
|
|||||||
rtdCookie->lowThreshold = (sendData[1] << 8) | sendData[2];
|
rtdCookie->lowThreshold = (sendData[1] << 8) | sendData[2];
|
||||||
rtdCookie->writeLowThreshold = true;
|
rtdCookie->writeLowThreshold = true;
|
||||||
} else {
|
} else {
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -294,34 +294,37 @@ ReturnValue_t Max31865RtdReader::sendMessage(CookieIF* cookie, const uint8_t* se
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Max31865RtdReader::getSendSuccess(CookieIF* cookie) { return RETURN_OK; }
|
ReturnValue_t Max31865RtdReader::getSendSuccess(CookieIF* cookie) { return returnvalue::OK; }
|
||||||
|
|
||||||
ReturnValue_t Max31865RtdReader::requestReceiveMessage(CookieIF* cookie, size_t requestLen) {
|
ReturnValue_t Max31865RtdReader::requestReceiveMessage(CookieIF* cookie, size_t requestLen) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Max31865RtdReader::readReceivedMessage(CookieIF* cookie, uint8_t** buffer,
|
ReturnValue_t Max31865RtdReader::readReceivedMessage(CookieIF* cookie, uint8_t** buffer,
|
||||||
size_t* size) {
|
size_t* size) {
|
||||||
MutexGuard mg(readerMutex);
|
MutexGuard mg(readerMutex);
|
||||||
if (mg.getLockResult() != RETURN_OK) {
|
if (mg.getLockResult() != returnvalue::OK) {
|
||||||
// TODO: Emit warning
|
// TODO: Emit warning
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
auto* rtdCookie = dynamic_cast<Max31865ReaderCookie*>(cookie);
|
auto* rtdCookie = dynamic_cast<Max31865ReaderCookie*>(cookie);
|
||||||
|
if(rtdCookie == nullptr) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
uint8_t* exchangePtr = rtdCookie->exchangeBuf.data();
|
uint8_t* exchangePtr = rtdCookie->exchangeBuf.data();
|
||||||
size_t serLen = 0;
|
size_t serLen = 0;
|
||||||
auto result = rtdCookie->db.serialize(&exchangePtr, &serLen, rtdCookie->exchangeBuf.size(),
|
auto result = rtdCookie->db.serialize(&exchangePtr, &serLen, rtdCookie->exchangeBuf.size(),
|
||||||
SerializeIF::Endianness::MACHINE);
|
SerializeIF::Endianness::MACHINE);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
// TODO: Emit warning
|
// TODO: Emit warning
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
*buffer = reinterpret_cast<uint8_t*>(rtdCookie->exchangeBuf.data());
|
*buffer = reinterpret_cast<uint8_t*>(rtdCookie->exchangeBuf.data());
|
||||||
*size = serLen;
|
*size = serLen;
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Max31865RtdReader::writeCfgReg(SpiCookie* cookie, uint8_t cfg) {
|
ReturnValue_t Max31865RtdReader::writeCfgReg(SpiCookie* cookie, uint8_t cfg) {
|
||||||
@ -345,7 +348,7 @@ ReturnValue_t Max31865RtdReader::clearFaultStatus(SpiCookie* cookie) {
|
|||||||
// Read back the current configuration to avoid overwriting it when clearing te fault status
|
// Read back the current configuration to avoid overwriting it when clearing te fault status
|
||||||
uint8_t currentCfg = 0;
|
uint8_t currentCfg = 0;
|
||||||
auto result = readCfgReg(cookie, currentCfg);
|
auto result = readCfgReg(cookie, currentCfg);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
// Clear bytes 5, 3 and 2 which need to be 0
|
// Clear bytes 5, 3 and 2 which need to be 0
|
||||||
@ -358,7 +361,7 @@ ReturnValue_t Max31865RtdReader::readCfgReg(SpiCookie* cookie, uint8_t& cfg) {
|
|||||||
using namespace MAX31865;
|
using namespace MAX31865;
|
||||||
uint8_t* replyPtr = nullptr;
|
uint8_t* replyPtr = nullptr;
|
||||||
auto result = readNFromReg(cookie, CONFIG, 1, &replyPtr);
|
auto result = readNFromReg(cookie, CONFIG, 1, &replyPtr);
|
||||||
if (result == RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
cfg = replyPtr[0];
|
cfg = replyPtr[0];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@ -380,7 +383,7 @@ ReturnValue_t Max31865RtdReader::readLowThreshold(SpiCookie* cookie, uint16_t& l
|
|||||||
using namespace MAX31865;
|
using namespace MAX31865;
|
||||||
uint8_t* replyPtr = nullptr;
|
uint8_t* replyPtr = nullptr;
|
||||||
auto result = readNFromReg(cookie, LOW_THRESHOLD, 2, &replyPtr);
|
auto result = readNFromReg(cookie, LOW_THRESHOLD, 2, &replyPtr);
|
||||||
if (result == RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
lowThreshold = (replyPtr[0] << 8) | replyPtr[1];
|
lowThreshold = (replyPtr[0] << 8) | replyPtr[1];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@ -390,7 +393,7 @@ ReturnValue_t Max31865RtdReader::readHighThreshold(SpiCookie* cookie, uint16_t&
|
|||||||
using namespace MAX31865;
|
using namespace MAX31865;
|
||||||
uint8_t* replyPtr = nullptr;
|
uint8_t* replyPtr = nullptr;
|
||||||
auto result = readNFromReg(cookie, HIGH_THRESHOLD, 2, &replyPtr);
|
auto result = readNFromReg(cookie, HIGH_THRESHOLD, 2, &replyPtr);
|
||||||
if (result == RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
highThreshold = (replyPtr[0] << 8) | replyPtr[1];
|
highThreshold = (replyPtr[0] << 8) | replyPtr[1];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@ -400,7 +403,7 @@ ReturnValue_t Max31865RtdReader::writeNToReg(SpiCookie* cookie, uint8_t reg, siz
|
|||||||
uint8_t** reply) {
|
uint8_t** reply) {
|
||||||
using namespace MAX31865;
|
using namespace MAX31865;
|
||||||
if (n > cmdBuf.size() - 1) {
|
if (n > cmdBuf.size() - 1) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
cmdBuf[0] = reg | WRITE_BIT;
|
cmdBuf[0] = reg | WRITE_BIT;
|
||||||
for (size_t idx = 0; idx < n; idx++) {
|
for (size_t idx = 0; idx < n; idx++) {
|
||||||
@ -413,7 +416,7 @@ ReturnValue_t Max31865RtdReader::readRtdVal(SpiCookie* cookie, uint16_t& val, bo
|
|||||||
using namespace MAX31865;
|
using namespace MAX31865;
|
||||||
uint8_t* replyPtr = nullptr;
|
uint8_t* replyPtr = nullptr;
|
||||||
auto result = readNFromReg(cookie, RTD, 2, &replyPtr);
|
auto result = readNFromReg(cookie, RTD, 2, &replyPtr);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
if (replyPtr[1] & 0b0000'0001) {
|
if (replyPtr[1] & 0b0000'0001) {
|
||||||
@ -428,27 +431,27 @@ ReturnValue_t Max31865RtdReader::readNFromReg(SpiCookie* cookie, uint8_t reg, si
|
|||||||
uint8_t** reply) {
|
uint8_t** reply) {
|
||||||
using namespace MAX31865;
|
using namespace MAX31865;
|
||||||
if (n > 4) {
|
if (n > 4) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
// Clear write bit in any case
|
// Clear write bit in any case
|
||||||
reg &= ~WRITE_BIT;
|
reg &= ~WRITE_BIT;
|
||||||
cmdBuf[0] = reg;
|
cmdBuf[0] = reg;
|
||||||
std::memset(cmdBuf.data() + 1, 0, n);
|
std::memset(cmdBuf.data() + 1, 0, n);
|
||||||
ReturnValue_t result = comIF->sendMessage(cookie, cmdBuf.data(), n + 1);
|
ReturnValue_t result = comIF->sendMessage(cookie, cmdBuf.data(), n + 1);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t dummyLen = 0;
|
size_t dummyLen = 0;
|
||||||
uint8_t* replyPtr = nullptr;
|
uint8_t* replyPtr = nullptr;
|
||||||
result = comIF->readReceivedMessage(cookie, &replyPtr, &dummyLen);
|
result = comIF->readReceivedMessage(cookie, &replyPtr, &dummyLen);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
if (reply != nullptr) {
|
if (reply != nullptr) {
|
||||||
*reply = replyPtr + 1;
|
*reply = replyPtr + 1;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Max31865RtdReader::handleSpiError(Max31865ReaderCookie* cookie, ReturnValue_t result,
|
ReturnValue_t Max31865RtdReader::handleSpiError(Max31865ReaderCookie* cookie, ReturnValue_t result,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef MPSOC_RETURN_VALUES_IF_H_
|
#ifndef MPSOC_RETURN_VALUES_IF_H_
|
||||||
#define MPSOC_RETURN_VALUES_IF_H_
|
#define MPSOC_RETURN_VALUES_IF_H_
|
||||||
|
|
||||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
|
|
||||||
class MPSoCReturnValuesIF {
|
class MPSoCReturnValuesIF {
|
||||||
public:
|
public:
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include "eive/definitions.h"
|
#include "eive/definitions.h"
|
||||||
#include "fsfw/globalfunctions/CRC.h"
|
#include "fsfw/globalfunctions/CRC.h"
|
||||||
#include "fsfw/serialize/SerializeAdapter.h"
|
#include "fsfw/serialize/SerializeAdapter.h"
|
||||||
#include "fsfw/tmtcpacket/SpacePacket.h"
|
#include "mission/devices/devicedefinitions/SpBase.h"
|
||||||
|
|
||||||
namespace mpsoc {
|
namespace mpsoc {
|
||||||
|
|
||||||
@ -73,6 +73,8 @@ static const char NULL_TERMINATOR = '\0';
|
|||||||
static const uint8_t MIN_SPACE_PACKET_LENGTH = 7;
|
static const uint8_t MIN_SPACE_PACKET_LENGTH = 7;
|
||||||
static const uint8_t SPACE_PACKET_HEADER_SIZE = 6;
|
static const uint8_t SPACE_PACKET_HEADER_SIZE = 6;
|
||||||
|
|
||||||
|
static constexpr size_t CRC_SIZE = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The size of payload data which will be forwarded to the requesting object. e.g. PUS Service
|
* The size of payload data which will be forwarded to the requesting object. e.g. PUS Service
|
||||||
* 8.
|
* 8.
|
||||||
@ -88,8 +90,14 @@ static const size_t MAX_FILENAME_SIZE = 256;
|
|||||||
static const uint16_t LENGTH_TC_MEM_WRITE = 12;
|
static const uint16_t LENGTH_TC_MEM_WRITE = 12;
|
||||||
static const uint16_t LENGTH_TC_MEM_READ = 8;
|
static const uint16_t LENGTH_TC_MEM_READ = 8;
|
||||||
|
|
||||||
static const size_t MAX_REPLY_SIZE = SpacePacket::PACKET_MAX_SIZE * 3;
|
/**
|
||||||
static const size_t MAX_COMMAND_SIZE = SpacePacket::PACKET_MAX_SIZE;
|
* Maximum SP packet size as specified in the TAS Supversior ICD.
|
||||||
|
* https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_TAS-ILH-IRS/ICD-PLOC/TAS&fileid=942896
|
||||||
|
* at sheet README
|
||||||
|
*/
|
||||||
|
static constexpr size_t SP_MAX_SIZE = 1024;
|
||||||
|
static const size_t MAX_REPLY_SIZE = SP_MAX_SIZE * 3;
|
||||||
|
static const size_t MAX_COMMAND_SIZE = SP_MAX_SIZE;
|
||||||
static const size_t MAX_DATA_SIZE = 1016;
|
static const size_t MAX_DATA_SIZE = 1016;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -130,10 +138,12 @@ static const uint16_t RESERVED_4 = 0x5F4;
|
|||||||
/**
|
/**
|
||||||
* @brief Abstract base class for TC space packet of MPSoC.
|
* @brief Abstract base class for TC space packet of MPSoC.
|
||||||
*/
|
*/
|
||||||
class TcBase : public SpacePacket, public MPSoCReturnValuesIF {
|
class TcBase : public ploc::SpTcBase, public MPSoCReturnValuesIF {
|
||||||
public:
|
public:
|
||||||
|
virtual ~TcBase() = default;
|
||||||
|
|
||||||
// Initial length field of space packet. Will always be updated when packet is created.
|
// Initial length field of space packet. Will always be updated when packet is created.
|
||||||
static const uint16_t INIT_LENGTH = 1;
|
static const uint16_t INIT_LENGTH = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* @brief Constructor
|
||||||
@ -141,8 +151,12 @@ class TcBase : public SpacePacket, public MPSoCReturnValuesIF {
|
|||||||
* @param sequenceCount Sequence count of space packet which will be incremented with each
|
* @param sequenceCount Sequence count of space packet which will be incremented with each
|
||||||
* sent and received packets.
|
* sent and received packets.
|
||||||
*/
|
*/
|
||||||
TcBase(uint16_t apid, uint16_t sequenceCount)
|
TcBase(ploc::SpTcParams params, uint16_t apid, uint16_t sequenceCount)
|
||||||
: SpacePacket(INIT_LENGTH, true, apid, sequenceCount) {}
|
: ploc::SpTcBase(params, apid, sequenceCount) {
|
||||||
|
spParams.setDataFieldLen(INIT_LENGTH);
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t buildPacket() { return buildPacket(nullptr, 0); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Function to initialize the space packet
|
* @brief Function to initialize the space packet
|
||||||
@ -150,19 +164,24 @@ class TcBase : public SpacePacket, public MPSoCReturnValuesIF {
|
|||||||
* @param commandData Pointer to command specific data
|
* @param commandData Pointer to command specific data
|
||||||
* @param commandDataLen Length of command data
|
* @param commandDataLen Length of command data
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if packet creation was successful, otherwise error return value
|
* @return returnvalue::OK if packet creation was successful, otherwise error return value
|
||||||
*/
|
*/
|
||||||
virtual ReturnValue_t createPacket(const uint8_t* commandData, size_t commandDataLen) {
|
ReturnValue_t buildPacket(const uint8_t* commandData, size_t commandDataLen) {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
payloadStart = spParams.buf + ccsds::HEADER_LEN;
|
||||||
result = initPacket(commandData, commandDataLen);
|
ReturnValue_t res;
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (commandData != nullptr and commandDataLen > 0) {
|
||||||
return result;
|
res = initPacket(commandData, commandDataLen);
|
||||||
|
if (res != returnvalue::OK) {
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
result = addCrc();
|
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
return result;
|
|
||||||
|
updateSpFields();
|
||||||
|
res = checkSizeAndSerializeHeader();
|
||||||
|
if (res != returnvalue::OK) {
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
return calcCrc();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -173,46 +192,7 @@ class TcBase : public SpacePacket, public MPSoCReturnValuesIF {
|
|||||||
* @param commandDataLen Length of received command data
|
* @param commandDataLen Length of received command data
|
||||||
*/
|
*/
|
||||||
virtual ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) {
|
virtual ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) {
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Calculates and adds the CRC
|
|
||||||
*/
|
|
||||||
ReturnValue_t addCrc() {
|
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
|
||||||
size_t serializedSize = 0;
|
|
||||||
uint32_t full_size = getFullSize();
|
|
||||||
uint16_t crc = CRC::crc16ccitt(getWholeData(), full_size - CRC_SIZE);
|
|
||||||
result = SerializeAdapter::serialize<uint16_t>(
|
|
||||||
&crc, this->localData.byteStream + full_size - CRC_SIZE, &serializedSize, sizeof(crc),
|
|
||||||
SerializeIF::Endianness::BIG);
|
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
|
||||||
sif::debug << "TcBase::addCrc: Failed to serialize crc field" << std::endl;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Class for handling tm replies of the PLOC MPSoC.
|
|
||||||
*/
|
|
||||||
class TmPacket : public SpacePacket, public MPSoCReturnValuesIF {
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* @brief Constructor creates idle packet and sets length field to maximum allowed size.
|
|
||||||
*/
|
|
||||||
TmPacket() : SpacePacket(PACKET_MAX_SIZE) {}
|
|
||||||
|
|
||||||
ReturnValue_t checkCrc() {
|
|
||||||
uint8_t* crcPtr = this->getPacketData() + this->getPacketDataLength() - 1;
|
|
||||||
uint16_t receivedCrc = *(crcPtr) << 8 | *(crcPtr + 1);
|
|
||||||
uint16_t recalculatedCrc =
|
|
||||||
CRC::crc16ccitt(this->localData.byteStream, this->getFullSize() - CRC_SIZE);
|
|
||||||
if (recalculatedCrc != receivedCrc) {
|
|
||||||
return CRC_FAILURE;
|
|
||||||
}
|
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -224,27 +204,27 @@ class TcMemRead : public TcBase {
|
|||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* @brief Constructor
|
||||||
*/
|
*/
|
||||||
TcMemRead(uint16_t sequenceCount) : TcBase(apid::TC_MEM_READ, sequenceCount) {
|
TcMemRead(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
this->setPacketDataLength(PACKET_LENGTH);
|
: TcBase(params, apid::TC_MEM_READ, sequenceCount) {
|
||||||
|
spParams.setPayloadLen(COMMAND_LENGTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t getMemLen() const { return memLen; }
|
uint16_t getMemLen() const { return memLen; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) {
|
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) override {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
result = lengthCheck(commandDataLen);
|
result = lengthCheck(commandDataLen);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
std::memcpy(this->localData.fields.buffer, commandData, MEM_ADDRESS_SIZE);
|
std::memcpy(payloadStart, commandData, MEM_ADDRESS_SIZE);
|
||||||
std::memcpy(this->localData.fields.buffer + MEM_ADDRESS_SIZE, commandData + MEM_ADDRESS_SIZE,
|
std::memcpy(payloadStart + MEM_ADDRESS_SIZE, commandData + MEM_ADDRESS_SIZE, MEM_LEN_SIZE);
|
||||||
MEM_LEN_SIZE);
|
|
||||||
size_t size = sizeof(memLen);
|
size_t size = sizeof(memLen);
|
||||||
const uint8_t* memLenPtr = commandData + MEM_ADDRESS_SIZE;
|
const uint8_t* memLenPtr = commandData + MEM_ADDRESS_SIZE;
|
||||||
result =
|
result =
|
||||||
SerializeAdapter::deSerialize(&memLen, &memLenPtr, &size, SerializeIF::Endianness::BIG);
|
SerializeAdapter::deSerialize(&memLen, &memLenPtr, &size, SerializeIF::Endianness::BIG);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@ -259,10 +239,10 @@ class TcMemRead : public TcBase {
|
|||||||
uint16_t memLen = 0;
|
uint16_t memLen = 0;
|
||||||
|
|
||||||
ReturnValue_t lengthCheck(size_t commandDataLen) {
|
ReturnValue_t lengthCheck(size_t commandDataLen) {
|
||||||
if (commandDataLen != COMMAND_LENGTH) {
|
if (commandDataLen != COMMAND_LENGTH or checkPayloadLen() != returnvalue::OK) {
|
||||||
return INVALID_LENGTH;
|
return INVALID_LENGTH;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -275,43 +255,56 @@ class TcMemWrite : public TcBase {
|
|||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* @brief Constructor
|
||||||
*/
|
*/
|
||||||
TcMemWrite(uint16_t sequenceCount) : TcBase(apid::TC_MEM_WRITE, sequenceCount) {}
|
TcMemWrite(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
|
: TcBase(params, apid::TC_MEM_WRITE, sequenceCount) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) {
|
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) override {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
result = lengthCheck(commandDataLen);
|
result = lengthCheck(commandDataLen);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
std::memcpy(this->localData.fields.buffer, commandData, commandDataLen);
|
|
||||||
uint16_t memLen =
|
uint16_t memLen =
|
||||||
*(commandData + MEM_ADDRESS_SIZE) << 8 | *(commandData + MEM_ADDRESS_SIZE + 1);
|
*(commandData + MEM_ADDRESS_SIZE) << 8 | *(commandData + MEM_ADDRESS_SIZE + 1);
|
||||||
this->setPacketDataLength(memLen * 4 + FIX_LENGTH - 1);
|
spParams.setPayloadLen(MIN_FIXED_PAYLOAD_LENGTH + memLen * 4);
|
||||||
|
result = checkPayloadLen();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
std::memcpy(payloadStart, commandData, commandDataLen);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Min length consists of 4 byte address, 2 byte mem length field, 4 byte data (1 word)
|
// 4 byte address, 2 byte mem length field
|
||||||
static const size_t MIN_COMMAND_DATA_LENGTH = 10;
|
|
||||||
static const size_t MEM_ADDRESS_SIZE = 4;
|
static const size_t MEM_ADDRESS_SIZE = 4;
|
||||||
static const size_t FIX_LENGTH = 8;
|
static const size_t MIN_FIXED_PAYLOAD_LENGTH = MEM_ADDRESS_SIZE + 2;
|
||||||
|
// Min length consists of 4 byte address, 2 byte mem length field, 4 byte data (1 word)
|
||||||
|
static const size_t MIN_COMMAND_DATA_LENGTH = MIN_FIXED_PAYLOAD_LENGTH + 4;
|
||||||
|
|
||||||
ReturnValue_t lengthCheck(size_t commandDataLen) {
|
ReturnValue_t lengthCheck(size_t commandDataLen) {
|
||||||
if (commandDataLen < MIN_COMMAND_DATA_LENGTH) {
|
if (commandDataLen < MIN_COMMAND_DATA_LENGTH) {
|
||||||
sif::warning << "TcMemWrite: Command has invalid length " << commandDataLen << std::endl;
|
sif::warning << "TcMemWrite: Length " << commandDataLen << " smaller than minimum "
|
||||||
|
<< MIN_COMMAND_DATA_LENGTH << std::endl;
|
||||||
return INVALID_LENGTH;
|
return INVALID_LENGTH;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
if (commandDataLen + CRC_SIZE > spParams.maxSize) {
|
||||||
|
sif::warning << "TcMemWrite: Length " << commandDataLen << " larger than allowed "
|
||||||
|
<< spParams.maxSize - CRC_SIZE << std::endl;
|
||||||
|
return INVALID_LENGTH;
|
||||||
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Class to help creation of flash fopen command.
|
* @brief Class to help creation of flash fopen command.
|
||||||
*/
|
*/
|
||||||
class FlashFopen : public TcBase {
|
class FlashFopen : public ploc::SpTcBase {
|
||||||
public:
|
public:
|
||||||
FlashFopen(uint16_t sequenceCount) : TcBase(apid::TC_FLASHFOPEN, sequenceCount) {}
|
FlashFopen(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
|
: ploc::SpTcBase(params, apid::TC_FLASHFOPEN, sequenceCount) {}
|
||||||
|
|
||||||
static const char APPEND = 'a';
|
static const char APPEND = 'a';
|
||||||
static const char WRITE = 'w';
|
static const char WRITE = 'w';
|
||||||
@ -319,19 +312,17 @@ class FlashFopen : public TcBase {
|
|||||||
|
|
||||||
ReturnValue_t createPacket(std::string filename, char accessMode_) {
|
ReturnValue_t createPacket(std::string filename, char accessMode_) {
|
||||||
accessMode = accessMode_;
|
accessMode = accessMode_;
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
|
||||||
size_t nameSize = filename.size();
|
size_t nameSize = filename.size();
|
||||||
std::memcpy(this->getPacketData(), filename.c_str(), nameSize);
|
spParams.setPayloadLen(nameSize + sizeof(NULL_TERMINATOR) + sizeof(accessMode));
|
||||||
*(this->getPacketData() + nameSize) = NULL_TERMINATOR;
|
ReturnValue_t result = checkPayloadLen();
|
||||||
std::memcpy(this->getPacketData() + nameSize + sizeof(NULL_TERMINATOR), &accessMode,
|
if (result != returnvalue::OK) {
|
||||||
sizeof(accessMode));
|
|
||||||
this->setPacketDataLength(nameSize + sizeof(NULL_TERMINATOR) + sizeof(accessMode) + CRC_SIZE -
|
|
||||||
1);
|
|
||||||
result = addCrc();
|
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return result;
|
std::memcpy(payloadStart, filename.c_str(), nameSize);
|
||||||
|
*(spParams.buf + nameSize) = NULL_TERMINATOR;
|
||||||
|
std::memcpy(payloadStart + nameSize + sizeof(NULL_TERMINATOR), &accessMode, sizeof(accessMode));
|
||||||
|
updateSpFields();
|
||||||
|
return calcCrc();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -341,52 +332,57 @@ class FlashFopen : public TcBase {
|
|||||||
/**
|
/**
|
||||||
* @brief Class to help creation of flash fclose command.
|
* @brief Class to help creation of flash fclose command.
|
||||||
*/
|
*/
|
||||||
class FlashFclose : public TcBase {
|
class FlashFclose : public ploc::SpTcBase {
|
||||||
public:
|
public:
|
||||||
FlashFclose(uint16_t sequenceCount) : TcBase(apid::TC_FLASHFCLOSE, sequenceCount) {}
|
FlashFclose(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
|
: ploc::SpTcBase(params, apid::TC_FLASHFCLOSE, sequenceCount) {}
|
||||||
|
|
||||||
ReturnValue_t createPacket(std::string filename) {
|
ReturnValue_t createPacket(std::string filename) {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
|
||||||
size_t nameSize = filename.size();
|
size_t nameSize = filename.size();
|
||||||
std::memcpy(this->getPacketData(), filename.c_str(), nameSize);
|
spParams.setPayloadLen(nameSize + sizeof(NULL_TERMINATOR));
|
||||||
*(this->getPacketData() + nameSize) = NULL_TERMINATOR;
|
ReturnValue_t result = checkPayloadLen();
|
||||||
this->setPacketDataLength(nameSize + sizeof(NULL_TERMINATOR) + CRC_SIZE - 1);
|
if (result != returnvalue::OK) {
|
||||||
result = addCrc();
|
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return result;
|
std::memcpy(payloadStart, filename.c_str(), nameSize);
|
||||||
|
*(payloadStart + nameSize) = NULL_TERMINATOR;
|
||||||
|
return calcCrc();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Class to build flash write space packet.
|
* @brief Class to build flash write space packet.
|
||||||
*/
|
*/
|
||||||
class TcFlashWrite : public TcBase {
|
class TcFlashWrite : public ploc::SpTcBase {
|
||||||
public:
|
public:
|
||||||
TcFlashWrite(uint16_t sequenceCount) : TcBase(apid::TC_FLASHWRITE, sequenceCount) {}
|
TcFlashWrite(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
|
: ploc::SpTcBase(params, apid::TC_FLASHWRITE, sequenceCount) {}
|
||||||
|
|
||||||
ReturnValue_t createPacket(const uint8_t* writeData, uint32_t writeLen_) {
|
ReturnValue_t buildPacket(const uint8_t* writeData, uint32_t writeLen_) {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
writeLen = writeLen_;
|
writeLen = writeLen_;
|
||||||
if (writeLen > MAX_DATA_SIZE) {
|
if (writeLen > MAX_DATA_SIZE) {
|
||||||
sif::debug << "FlashWrite::createPacket: Command data too big" << std::endl;
|
sif::debug << "FlashWrite::createPacket: Command data too big" << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
size_t serializedSize = 0;
|
spParams.setPayloadLen(static_cast<uint16_t>(writeLen) + 4);
|
||||||
result =
|
result = checkPayloadLen();
|
||||||
SerializeAdapter::serialize<uint32_t>(&writeLen, this->getPacketData(), &serializedSize,
|
if (result != returnvalue::OK) {
|
||||||
sizeof(writeLen), SerializeIF::Endianness::BIG);
|
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
std::memcpy(this->getPacketData() + sizeof(writeLen), writeData, writeLen);
|
size_t serializedSize = ccsds::HEADER_LEN;
|
||||||
this->setPacketDataLength(static_cast<uint16_t>(writeLen + CRC_SIZE - 1));
|
result = SerializeAdapter::serialize(&writeLen, payloadStart, &serializedSize, spParams.maxSize,
|
||||||
result = addCrc();
|
SerializeIF::Endianness::BIG);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
std::memcpy(payloadStart + sizeof(writeLen), writeData, writeLen);
|
||||||
|
updateSpFields();
|
||||||
|
auto res = checkSizeAndSerializeHeader();
|
||||||
|
if (res != returnvalue::OK) {
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
return calcCrc();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -396,21 +392,27 @@ class TcFlashWrite : public TcBase {
|
|||||||
/**
|
/**
|
||||||
* @brief Class to help creation of flash delete command.
|
* @brief Class to help creation of flash delete command.
|
||||||
*/
|
*/
|
||||||
class TcFlashDelete : public TcBase {
|
class TcFlashDelete : public ploc::SpTcBase {
|
||||||
public:
|
public:
|
||||||
TcFlashDelete(uint16_t sequenceCount) : TcBase(apid::TC_FLASHDELETE, sequenceCount) {}
|
TcFlashDelete(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
|
: ploc::SpTcBase(params, apid::TC_FLASHDELETE, sequenceCount) {}
|
||||||
|
|
||||||
ReturnValue_t createPacket(std::string filename) {
|
ReturnValue_t buildPacket(std::string filename) {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
|
||||||
size_t nameSize = filename.size();
|
size_t nameSize = filename.size();
|
||||||
std::memcpy(this->getPacketData(), filename.c_str(), nameSize);
|
spParams.setPayloadLen(nameSize + sizeof(NULL_TERMINATOR));
|
||||||
*(this->getPacketData() + nameSize) = NULL_TERMINATOR;
|
auto res = checkPayloadLen();
|
||||||
this->setPacketDataLength(nameSize + sizeof(NULL_TERMINATOR) + CRC_SIZE - 1);
|
if (res != returnvalue::OK) {
|
||||||
result = addCrc();
|
return res;
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
return result;
|
std::memcpy(payloadStart, filename.c_str(), nameSize);
|
||||||
|
*(payloadStart + nameSize) = NULL_TERMINATOR;
|
||||||
|
|
||||||
|
updateSpFields();
|
||||||
|
res = checkSizeAndSerializeHeader();
|
||||||
|
if (res != returnvalue::OK) {
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
return calcCrc();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -419,17 +421,8 @@ class TcFlashDelete : public TcBase {
|
|||||||
*/
|
*/
|
||||||
class TcReplayStop : public TcBase {
|
class TcReplayStop : public TcBase {
|
||||||
public:
|
public:
|
||||||
TcReplayStop(uint16_t sequenceCount) : TcBase(apid::TC_REPLAY_STOP, sequenceCount) {}
|
TcReplayStop(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
|
: TcBase(params, apid::TC_REPLAY_STOP, sequenceCount) {}
|
||||||
ReturnValue_t createPacket() {
|
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
|
||||||
result = addCrc();
|
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
this->setPacketDataLength(static_cast<uint16_t>(CRC_SIZE - 1));
|
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -440,21 +433,22 @@ class TcReplayStart : public TcBase {
|
|||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* @brief Constructor
|
||||||
*/
|
*/
|
||||||
TcReplayStart(uint16_t sequenceCount) : TcBase(apid::TC_REPLAY_START, sequenceCount) {}
|
TcReplayStart(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
|
: TcBase(params, apid::TC_REPLAY_START, sequenceCount) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) {
|
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) override {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
spParams.setPayloadLen(commandDataLen);
|
||||||
result = lengthCheck(commandDataLen);
|
result = lengthCheck(commandDataLen);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = checkData(*commandData);
|
result = checkData(*commandData);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
std::memcpy(this->localData.fields.buffer, commandData, commandDataLen);
|
std::memcpy(payloadStart, commandData, commandDataLen);
|
||||||
this->setPacketDataLength(commandDataLen + CRC_SIZE - 1);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -464,11 +458,11 @@ class TcReplayStart : public TcBase {
|
|||||||
static const uint8_t ONCE = 1;
|
static const uint8_t ONCE = 1;
|
||||||
|
|
||||||
ReturnValue_t lengthCheck(size_t commandDataLen) {
|
ReturnValue_t lengthCheck(size_t commandDataLen) {
|
||||||
if (commandDataLen != COMMAND_DATA_LENGTH) {
|
if (commandDataLen != COMMAND_DATA_LENGTH or checkPayloadLen() != returnvalue::OK) {
|
||||||
sif::warning << "TcReplayStart: Command has invalid length " << commandDataLen << std::endl;
|
sif::warning << "TcReplayStart: Command has invalid length " << commandDataLen << std::endl;
|
||||||
return INVALID_LENGTH;
|
return INVALID_LENGTH;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t checkData(uint8_t replay) {
|
ReturnValue_t checkData(uint8_t replay) {
|
||||||
@ -476,7 +470,7 @@ class TcReplayStart : public TcBase {
|
|||||||
sif::warning << "TcReplayStart::checkData: Invalid replay value" << std::endl;
|
sif::warning << "TcReplayStart::checkData: Invalid replay value" << std::endl;
|
||||||
return INVALID_PARAMETER;
|
return INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -488,27 +482,31 @@ class TcDownlinkPwrOn : public TcBase {
|
|||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* @brief Constructor
|
||||||
*/
|
*/
|
||||||
TcDownlinkPwrOn(uint16_t sequenceCount) : TcBase(apid::TC_DOWNLINK_PWR_ON, sequenceCount) {}
|
TcDownlinkPwrOn(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
|
: TcBase(params, apid::TC_DOWNLINK_PWR_ON, sequenceCount) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) {
|
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) override {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
result = lengthCheck(commandDataLen);
|
result = lengthCheck(commandDataLen);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = modeCheck(*commandData);
|
result = modeCheck(*commandData);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = laneRateCheck(*(commandData + 1));
|
result = laneRateCheck(*(commandData + 1));
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
std::memcpy(this->localData.fields.buffer, commandData, commandDataLen);
|
spParams.setPayloadLen(commandDataLen + sizeof(MAX_AMPLITUDE));
|
||||||
std::memcpy(this->localData.fields.buffer + commandDataLen, &MAX_AMPLITUDE,
|
result = checkPayloadLen();
|
||||||
sizeof(MAX_AMPLITUDE));
|
if (result != returnvalue::OK) {
|
||||||
this->setPacketDataLength(commandDataLen + sizeof(MAX_AMPLITUDE) + CRC_SIZE - 1);
|
return result;
|
||||||
|
}
|
||||||
|
std::memcpy(payloadStart, commandData, commandDataLen);
|
||||||
|
std::memcpy(payloadStart + commandDataLen, &MAX_AMPLITUDE, sizeof(MAX_AMPLITUDE));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -530,7 +528,7 @@ class TcDownlinkPwrOn : public TcBase {
|
|||||||
sif::warning << "TcDownlinkPwrOn: Command has invalid length " << commandDataLen << std::endl;
|
sif::warning << "TcDownlinkPwrOn: Command has invalid length " << commandDataLen << std::endl;
|
||||||
return INVALID_LENGTH;
|
return INVALID_LENGTH;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t modeCheck(uint8_t mode) {
|
ReturnValue_t modeCheck(uint8_t mode) {
|
||||||
@ -538,7 +536,7 @@ class TcDownlinkPwrOn : public TcBase {
|
|||||||
sif::warning << "TcDwonlinkPwrOn::modeCheck: Invalid JESD mode" << std::endl;
|
sif::warning << "TcDwonlinkPwrOn::modeCheck: Invalid JESD mode" << std::endl;
|
||||||
return INVALID_MODE;
|
return INVALID_MODE;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t laneRateCheck(uint8_t laneRate) {
|
ReturnValue_t laneRateCheck(uint8_t laneRate) {
|
||||||
@ -546,7 +544,7 @@ class TcDownlinkPwrOn : public TcBase {
|
|||||||
sif::warning << "TcReplayStart::laneRateCheck: Invalid lane rate" << std::endl;
|
sif::warning << "TcReplayStart::laneRateCheck: Invalid lane rate" << std::endl;
|
||||||
return INVALID_LANE_RATE;
|
return INVALID_LANE_RATE;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -555,17 +553,8 @@ class TcDownlinkPwrOn : public TcBase {
|
|||||||
*/
|
*/
|
||||||
class TcDownlinkPwrOff : public TcBase {
|
class TcDownlinkPwrOff : public TcBase {
|
||||||
public:
|
public:
|
||||||
TcDownlinkPwrOff(uint16_t sequenceCount) : TcBase(apid::TC_DOWNLINK_PWR_OFF, sequenceCount) {}
|
TcDownlinkPwrOff(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
|
: TcBase(params, apid::TC_DOWNLINK_PWR_OFF, sequenceCount) {}
|
||||||
ReturnValue_t createPacket() {
|
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
|
||||||
result = addCrc();
|
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
this->setPacketDataLength(static_cast<uint16_t>(CRC_SIZE - 1));
|
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -576,19 +565,19 @@ class TcReplayWriteSeq : public TcBase {
|
|||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* @brief Constructor
|
||||||
*/
|
*/
|
||||||
TcReplayWriteSeq(uint16_t sequenceCount)
|
TcReplayWriteSeq(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
: TcBase(apid::TC_REPLAY_WRITE_SEQUENCE, sequenceCount) {}
|
: TcBase(params, apid::TC_REPLAY_WRITE_SEQUENCE, sequenceCount) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) {
|
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) override {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
spParams.setPayloadLen(commandDataLen + sizeof(NULL_TERMINATOR));
|
||||||
result = lengthCheck(commandDataLen);
|
result = lengthCheck(commandDataLen);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
std::memcpy(this->localData.fields.buffer, commandData, commandDataLen);
|
std::memcpy(payloadStart, commandData, commandDataLen);
|
||||||
*(this->localData.fields.buffer + commandDataLen) = NULL_TERMINATOR;
|
*(payloadStart + commandDataLen) = NULL_TERMINATOR;
|
||||||
this->setPacketDataLength(commandDataLen + sizeof(NULL_TERMINATOR) + CRC_SIZE - 1);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -596,12 +585,13 @@ class TcReplayWriteSeq : public TcBase {
|
|||||||
static const size_t USE_DECODING_LENGTH = 1;
|
static const size_t USE_DECODING_LENGTH = 1;
|
||||||
|
|
||||||
ReturnValue_t lengthCheck(size_t commandDataLen) {
|
ReturnValue_t lengthCheck(size_t commandDataLen) {
|
||||||
if (commandDataLen > USE_DECODING_LENGTH + MAX_FILENAME_SIZE) {
|
if (commandDataLen > USE_DECODING_LENGTH + MAX_FILENAME_SIZE or
|
||||||
|
checkPayloadLen() != returnvalue::OK) {
|
||||||
sif::warning << "TcReplayWriteSeq: Command has invalid length " << commandDataLen
|
sif::warning << "TcReplayWriteSeq: Command has invalid length " << commandDataLen
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return INVALID_LENGTH;
|
return INVALID_LENGTH;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -625,7 +615,7 @@ class FlashWritePusCmd : public MPSoCReturnValuesIF {
|
|||||||
if (mpsocFile.size() > MAX_FILENAME_SIZE) {
|
if (mpsocFile.size() > MAX_FILENAME_SIZE) {
|
||||||
return MPSOC_FILENAME_TOO_LONG;
|
return MPSOC_FILENAME_TOO_LONG;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string getObcFile() { return obcFile; }
|
std::string getObcFile() { return obcFile; }
|
||||||
@ -643,17 +633,8 @@ class FlashWritePusCmd : public MPSoCReturnValuesIF {
|
|||||||
*/
|
*/
|
||||||
class TcModeReplay : public TcBase {
|
class TcModeReplay : public TcBase {
|
||||||
public:
|
public:
|
||||||
TcModeReplay(uint16_t sequenceCount) : TcBase(apid::TC_MODE_REPLAY, sequenceCount) {}
|
TcModeReplay(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
|
: TcBase(params, apid::TC_MODE_REPLAY, sequenceCount) {}
|
||||||
ReturnValue_t createPacket() {
|
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
|
||||||
result = addCrc();
|
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
this->setPacketDataLength(static_cast<uint16_t>(CRC_SIZE - 1));
|
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -661,37 +642,33 @@ class TcModeReplay : public TcBase {
|
|||||||
*/
|
*/
|
||||||
class TcModeIdle : public TcBase {
|
class TcModeIdle : public TcBase {
|
||||||
public:
|
public:
|
||||||
TcModeIdle(uint16_t sequenceCount) : TcBase(apid::TC_MODE_IDLE, sequenceCount) {}
|
TcModeIdle(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
|
: TcBase(params, apid::TC_MODE_IDLE, sequenceCount) {}
|
||||||
ReturnValue_t createPacket() {
|
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
|
||||||
result = addCrc();
|
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
this->setPacketDataLength(static_cast<uint16_t>(CRC_SIZE - 1));
|
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class TcCamcmdSend : public TcBase {
|
class TcCamcmdSend : public TcBase {
|
||||||
public:
|
public:
|
||||||
TcCamcmdSend(uint16_t sequenceCount) : TcBase(apid::TC_CAM_CMD_SEND, sequenceCount) {}
|
TcCamcmdSend(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
|
: TcBase(params, apid::TC_CAM_CMD_SEND, sequenceCount) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) {
|
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) override {
|
||||||
if (commandDataLen > MAX_DATA_LENGTH) {
|
if (commandDataLen > MAX_DATA_LENGTH) {
|
||||||
return INVALID_LENGTH;
|
return INVALID_LENGTH;
|
||||||
}
|
}
|
||||||
uint16_t dataLen = static_cast<uint16_t>(commandDataLen + sizeof(CARRIAGE_RETURN));
|
uint16_t dataLen = static_cast<uint16_t>(commandDataLen + sizeof(CARRIAGE_RETURN));
|
||||||
size_t size = sizeof(dataLen);
|
spParams.setPayloadLen(sizeof(dataLen) + commandDataLen + sizeof(CARRIAGE_RETURN));
|
||||||
SerializeAdapter::serialize(&dataLen, this->getPacketData(), &size, sizeof(dataLen),
|
auto res = checkPayloadLen();
|
||||||
|
if (res != returnvalue::OK) {
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
size_t size = ccsds::HEADER_LEN;
|
||||||
|
SerializeAdapter::serialize(&dataLen, payloadStart, &size, spParams.maxSize,
|
||||||
SerializeIF::Endianness::BIG);
|
SerializeIF::Endianness::BIG);
|
||||||
std::memcpy(this->getPacketData() + sizeof(dataLen), commandData, commandDataLen);
|
std::memcpy(payloadStart + sizeof(dataLen), commandData, commandDataLen);
|
||||||
*(this->getPacketData() + sizeof(dataLen) + commandDataLen) = CARRIAGE_RETURN;
|
*(payloadStart + sizeof(dataLen) + commandDataLen) = CARRIAGE_RETURN;
|
||||||
uint16_t trueLength = sizeof(dataLen) + commandDataLen + sizeof(CARRIAGE_RETURN) + CRC_SIZE;
|
|
||||||
this->setPacketDataLength(trueLength - 1);
|
return returnvalue::OK;
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -821,27 +821,27 @@ class ChecksumReply {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
ChecksumReply(const uint8_t* datafield) {
|
ChecksumReply(const uint8_t* datafield) {
|
||||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
region = *(datafield);
|
region = *(datafield);
|
||||||
const uint8_t* addressData = datafield + ADDRESS_OFFSET;
|
const uint8_t* addressData = datafield + ADDRESS_OFFSET;
|
||||||
size_t size = sizeof(address);
|
size_t size = sizeof(address);
|
||||||
result = SerializeAdapter::deSerialize(&address, &addressData, &size,
|
result = SerializeAdapter::deSerialize(&address, &addressData, &size,
|
||||||
SerializeIF::Endianness::LITTLE);
|
SerializeIF::Endianness::LITTLE);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "ChecksumReply::ChecksumReply: Failed to deserialize address" << std::endl;
|
sif::debug << "ChecksumReply::ChecksumReply: Failed to deserialize address" << std::endl;
|
||||||
}
|
}
|
||||||
const uint8_t* lengthData = datafield + LENGTH_OFFSET;
|
const uint8_t* lengthData = datafield + LENGTH_OFFSET;
|
||||||
size = sizeof(length);
|
size = sizeof(length);
|
||||||
result =
|
result =
|
||||||
SerializeAdapter::deSerialize(&length, &lengthData, &size, SerializeIF::Endianness::LITTLE);
|
SerializeAdapter::deSerialize(&length, &lengthData, &size, SerializeIF::Endianness::LITTLE);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "ChecksumReply::ChecksumReply: Failed to deserialize length" << std::endl;
|
sif::debug << "ChecksumReply::ChecksumReply: Failed to deserialize length" << std::endl;
|
||||||
}
|
}
|
||||||
const uint8_t* checksumData = datafield + CHECKSUM_OFFSET;
|
const uint8_t* checksumData = datafield + CHECKSUM_OFFSET;
|
||||||
size = sizeof(checksum);
|
size = sizeof(checksum);
|
||||||
result = SerializeAdapter::deSerialize(&checksum, &checksumData, &size,
|
result = SerializeAdapter::deSerialize(&checksum, &checksumData, &size,
|
||||||
SerializeIF::Endianness::LITTLE);
|
SerializeIF::Endianness::LITTLE);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "ChecksumReply::ChecksumReply: Failed to deserialize checksum" << std::endl;
|
sif::debug << "ChecksumReply::ChecksumReply: Failed to deserialize checksum" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef SUPV_RETURN_VALUES_IF_H_
|
#ifndef SUPV_RETURN_VALUES_IF_H_
|
||||||
#define SUPV_RETURN_VALUES_IF_H_
|
#define SUPV_RETURN_VALUES_IF_H_
|
||||||
|
|
||||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
|
|
||||||
class SupvReturnValuesIF {
|
class SupvReturnValuesIF {
|
||||||
public:
|
public:
|
||||||
|
@ -19,14 +19,16 @@ PlocMPSoCHandler::PlocMPSoCHandler(object_id_t objectId, object_id_t uartComIFid
|
|||||||
eventQueue = QueueFactory::instance()->createMessageQueue(EventMessage::EVENT_MESSAGE_SIZE * 5);
|
eventQueue = QueueFactory::instance()->createMessageQueue(EventMessage::EVENT_MESSAGE_SIZE * 5);
|
||||||
commandActionHelperQueue =
|
commandActionHelperQueue =
|
||||||
QueueFactory::instance()->createMessageQueue(EventMessage::EVENT_MESSAGE_SIZE * 5);
|
QueueFactory::instance()->createMessageQueue(EventMessage::EVENT_MESSAGE_SIZE * 5);
|
||||||
|
spParams.maxSize = sizeof(commandBuffer);
|
||||||
|
spParams.buf = commandBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlocMPSoCHandler::~PlocMPSoCHandler() {}
|
PlocMPSoCHandler::~PlocMPSoCHandler() {}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::initialize() {
|
ReturnValue_t PlocMPSoCHandler::initialize() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
result = DeviceHandlerBase::initialize();
|
result = DeviceHandlerBase::initialize();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
uartComIf = dynamic_cast<UartComIF*>(communicationInterface);
|
uartComIf = dynamic_cast<UartComIF*>(communicationInterface);
|
||||||
@ -44,13 +46,13 @@ ReturnValue_t PlocMPSoCHandler::initialize() {
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
result = manager->registerListener(eventQueue->getId());
|
result = manager->registerListener(eventQueue->getId());
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = manager->subscribeToEventRange(
|
result = manager->subscribeToEventRange(
|
||||||
eventQueue->getId(), event::getEventId(PlocMPSoCHelper::MPSOC_FLASH_WRITE_FAILED),
|
eventQueue->getId(), event::getEventId(PlocMPSoCHelper::MPSOC_FLASH_WRITE_FAILED),
|
||||||
event::getEventId(PlocMPSoCHelper::MPSOC_FLASH_WRITE_SUCCESSFUL));
|
event::getEventId(PlocMPSoCHelper::MPSOC_FLASH_WRITE_SUCCESSFUL));
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::warning << "PlocMPSoCHandler::initialize: Failed to subscribe to events from "
|
sif::warning << "PlocMPSoCHandler::initialize: Failed to subscribe to events from "
|
||||||
" ploc mpsoc helper"
|
" ploc mpsoc helper"
|
||||||
@ -60,13 +62,13 @@ ReturnValue_t PlocMPSoCHandler::initialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
result = plocMPSoCHelper->setComIF(communicationInterface);
|
result = plocMPSoCHelper->setComIF(communicationInterface);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
}
|
}
|
||||||
plocMPSoCHelper->setComCookie(comCookie);
|
plocMPSoCHelper->setComCookie(comCookie);
|
||||||
plocMPSoCHelper->setSequenceCount(&sequenceCount);
|
plocMPSoCHelper->setSequenceCount(&sequenceCount);
|
||||||
result = commandActionHelper.initialize();
|
result = commandActionHelper.initialize();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@ -74,7 +76,7 @@ ReturnValue_t PlocMPSoCHandler::initialize() {
|
|||||||
|
|
||||||
void PlocMPSoCHandler::performOperationHook() {
|
void PlocMPSoCHandler::performOperationHook() {
|
||||||
EventMessage event;
|
EventMessage event;
|
||||||
for (ReturnValue_t result = eventQueue->receiveMessage(&event); result == RETURN_OK;
|
for (ReturnValue_t result = eventQueue->receiveMessage(&event); result == returnvalue::OK;
|
||||||
result = eventQueue->receiveMessage(&event)) {
|
result = eventQueue->receiveMessage(&event)) {
|
||||||
switch (event.getMessageId()) {
|
switch (event.getMessageId()) {
|
||||||
case EventMessage::EVENT_MESSAGE:
|
case EventMessage::EVENT_MESSAGE:
|
||||||
@ -88,9 +90,9 @@ void PlocMPSoCHandler::performOperationHook() {
|
|||||||
}
|
}
|
||||||
CommandMessage message;
|
CommandMessage message;
|
||||||
for (ReturnValue_t result = commandActionHelperQueue->receiveMessage(&message);
|
for (ReturnValue_t result = commandActionHelperQueue->receiveMessage(&message);
|
||||||
result == RETURN_OK; result = commandActionHelperQueue->receiveMessage(&message)) {
|
result == returnvalue::OK; result = commandActionHelperQueue->receiveMessage(&message)) {
|
||||||
result = commandActionHelper.handleReply(&message);
|
result = commandActionHelper.handleReply(&message);
|
||||||
if (result == RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -98,7 +100,7 @@ void PlocMPSoCHandler::performOperationHook() {
|
|||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
ReturnValue_t PlocMPSoCHandler::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||||
const uint8_t* data, size_t size) {
|
const uint8_t* data, size_t size) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
switch (actionId) {
|
switch (actionId) {
|
||||||
case mpsoc::SET_UART_TX_TRISTATE: {
|
case mpsoc::SET_UART_TX_TRISTATE: {
|
||||||
uartIsolatorSwitch.pullLow();
|
uartIsolatorSwitch.pullLow();
|
||||||
@ -125,12 +127,12 @@ ReturnValue_t PlocMPSoCHandler::executeAction(ActionId_t actionId, MessageQueueI
|
|||||||
}
|
}
|
||||||
mpsoc::FlashWritePusCmd flashWritePusCmd;
|
mpsoc::FlashWritePusCmd flashWritePusCmd;
|
||||||
result = flashWritePusCmd.extractFields(data, size);
|
result = flashWritePusCmd.extractFields(data, size);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = plocMPSoCHelper->startFlashWrite(flashWritePusCmd.getObcFile(),
|
result = plocMPSoCHelper->startFlashWrite(flashWritePusCmd.getObcFile(),
|
||||||
flashWritePusCmd.getMPSoCFile());
|
flashWritePusCmd.getMPSoCFile());
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
plocMPSoCHelperExecuting = true;
|
plocMPSoCHelperExecuting = true;
|
||||||
@ -206,7 +208,8 @@ ReturnValue_t PlocMPSoCHandler::buildTransitionDeviceCommand(DeviceCommandId_t*
|
|||||||
ReturnValue_t PlocMPSoCHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
ReturnValue_t PlocMPSoCHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
const uint8_t* commandData,
|
const uint8_t* commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
spParams.buf = commandBuffer;
|
||||||
|
ReturnValue_t result = returnvalue::OK;
|
||||||
switch (deviceCommand) {
|
switch (deviceCommand) {
|
||||||
case (mpsoc::TC_MEM_WRITE): {
|
case (mpsoc::TC_MEM_WRITE): {
|
||||||
result = prepareTcMemWrite(commandData, commandDataLen);
|
result = prepareTcMemWrite(commandData, commandDataLen);
|
||||||
@ -259,7 +262,7 @@ ReturnValue_t PlocMPSoCHandler::buildCommandFromCommand(DeviceCommandId_t device
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result == RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
/**
|
/**
|
||||||
* Flushing the receive buffer to make sure there are no data left from a faulty reply.
|
* Flushing the receive buffer to make sure there are no data left from a faulty reply.
|
||||||
*/
|
*/
|
||||||
@ -286,16 +289,23 @@ void PlocMPSoCHandler::fillCommandAndReplyMap() {
|
|||||||
this->insertInReplyMap(mpsoc::ACK_REPORT, 3, nullptr, mpsoc::SIZE_ACK_REPORT);
|
this->insertInReplyMap(mpsoc::ACK_REPORT, 3, nullptr, mpsoc::SIZE_ACK_REPORT);
|
||||||
this->insertInReplyMap(mpsoc::EXE_REPORT, 3, nullptr, mpsoc::SIZE_EXE_REPORT);
|
this->insertInReplyMap(mpsoc::EXE_REPORT, 3, nullptr, mpsoc::SIZE_EXE_REPORT);
|
||||||
this->insertInReplyMap(mpsoc::TM_MEMORY_READ_REPORT, 2, nullptr, mpsoc::SIZE_TM_MEM_READ_REPORT);
|
this->insertInReplyMap(mpsoc::TM_MEMORY_READ_REPORT, 2, nullptr, mpsoc::SIZE_TM_MEM_READ_REPORT);
|
||||||
this->insertInReplyMap(mpsoc::TM_CAM_CMD_RPT, 2, nullptr, SpacePacket::PACKET_MAX_SIZE);
|
this->insertInReplyMap(mpsoc::TM_CAM_CMD_RPT, 2, nullptr, mpsoc::SP_MAX_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::scanForReply(const uint8_t* start, size_t remainingSize,
|
ReturnValue_t PlocMPSoCHandler::scanForReply(const uint8_t* start, size_t remainingSize,
|
||||||
DeviceCommandId_t* foundId, size_t* foundLen) {
|
DeviceCommandId_t* foundId, size_t* foundLen) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
|
||||||
SpacePacket spacePacket;
|
SpacePacketReader spacePacket;
|
||||||
std::memcpy(spacePacket.getWholeData(), start, remainingSize);
|
spacePacket.setReadOnlyData(start, remainingSize);
|
||||||
uint16_t apid = spacePacket.getAPID();
|
if (spacePacket.isNull()) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
|
auto res = spacePacket.checkSize();
|
||||||
|
if (res != returnvalue::OK) {
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
uint16_t apid = spacePacket.getApid();
|
||||||
|
|
||||||
switch (apid) {
|
switch (apid) {
|
||||||
case (mpsoc::apid::ACK_SUCCESS):
|
case (mpsoc::apid::ACK_SUCCESS):
|
||||||
@ -311,7 +321,7 @@ ReturnValue_t PlocMPSoCHandler::scanForReply(const uint8_t* start, size_t remain
|
|||||||
*foundId = mpsoc::TM_MEMORY_READ_REPORT;
|
*foundId = mpsoc::TM_MEMORY_READ_REPORT;
|
||||||
break;
|
break;
|
||||||
case (mpsoc::apid::TM_CAM_CMD_RPT):
|
case (mpsoc::apid::TM_CAM_CMD_RPT):
|
||||||
*foundLen = spacePacket.getFullSize();
|
*foundLen = spacePacket.getFullPacketLen();
|
||||||
tmCamCmdRpt.rememberSpacePacketSize = *foundLen;
|
tmCamCmdRpt.rememberSpacePacketSize = *foundLen;
|
||||||
*foundId = mpsoc::TM_CAM_CMD_RPT;
|
*foundId = mpsoc::TM_CAM_CMD_RPT;
|
||||||
break;
|
break;
|
||||||
@ -340,7 +350,7 @@ ReturnValue_t PlocMPSoCHandler::scanForReply(const uint8_t* start, size_t remain
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) {
|
ReturnValue_t PlocMPSoCHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case mpsoc::ACK_REPORT: {
|
case mpsoc::ACK_REPORT: {
|
||||||
@ -374,7 +384,7 @@ uint32_t PlocMPSoCHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo)
|
|||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
ReturnValue_t PlocMPSoCHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
LocalDataPoolManager& poolManager) {
|
LocalDataPoolManager& poolManager) {
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlocMPSoCHandler::handleEvent(EventMessage* eventMessage) {
|
void PlocMPSoCHandler::handleEvent(EventMessage* eventMessage) {
|
||||||
@ -392,31 +402,31 @@ void PlocMPSoCHandler::handleEvent(EventMessage* eventMessage) {
|
|||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::prepareTcMemWrite(const uint8_t* commandData,
|
ReturnValue_t PlocMPSoCHandler::prepareTcMemWrite(const uint8_t* commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
sequenceCount++;
|
sequenceCount++;
|
||||||
mpsoc::TcMemWrite tcMemWrite(sequenceCount);
|
mpsoc::TcMemWrite tcMemWrite(spParams, sequenceCount);
|
||||||
result = tcMemWrite.createPacket(commandData, commandDataLen);
|
result = tcMemWrite.buildPacket(commandData, commandDataLen);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
copyToCommandBuffer(&tcMemWrite);
|
finishTcPrep(tcMemWrite.getFullPacketLen());
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::prepareTcMemRead(const uint8_t* commandData,
|
ReturnValue_t PlocMPSoCHandler::prepareTcMemRead(const uint8_t* commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
sequenceCount++;
|
sequenceCount++;
|
||||||
mpsoc::TcMemRead tcMemRead(sequenceCount);
|
mpsoc::TcMemRead tcMemRead(spParams, sequenceCount);
|
||||||
result = tcMemRead.createPacket(commandData, commandDataLen);
|
result = tcMemRead.buildPacket(commandData, commandDataLen);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
copyToCommandBuffer(&tcMemRead);
|
finishTcPrep(tcMemRead.getFullPacketLen());
|
||||||
tmMemReadReport.rememberRequestedSize = tcMemRead.getMemLen() * 4 + TmMemReadReport::FIX_SIZE;
|
tmMemReadReport.rememberRequestedSize = tcMemRead.getMemLen() * 4 + TmMemReadReport::FIX_SIZE;
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::prepareTcFlashDelete(const uint8_t* commandData,
|
ReturnValue_t PlocMPSoCHandler::prepareTcFlashDelete(const uint8_t* commandData,
|
||||||
@ -424,155 +434,143 @@ ReturnValue_t PlocMPSoCHandler::prepareTcFlashDelete(const uint8_t* commandData,
|
|||||||
if (commandDataLen > config::MAX_PATH_SIZE + config::MAX_FILENAME_SIZE) {
|
if (commandDataLen > config::MAX_PATH_SIZE + config::MAX_FILENAME_SIZE) {
|
||||||
return MPSoCReturnValuesIF::NAME_TOO_LONG;
|
return MPSoCReturnValuesIF::NAME_TOO_LONG;
|
||||||
}
|
}
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
sequenceCount++;
|
sequenceCount++;
|
||||||
mpsoc::TcFlashDelete tcFlashDelete(sequenceCount);
|
mpsoc::TcFlashDelete tcFlashDelete(spParams, sequenceCount);
|
||||||
result = tcFlashDelete.createPacket(
|
result = tcFlashDelete.buildPacket(
|
||||||
std::string(reinterpret_cast<const char*>(commandData), commandDataLen));
|
std::string(reinterpret_cast<const char*>(commandData), commandDataLen));
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
copyToCommandBuffer(&tcFlashDelete);
|
finishTcPrep(tcFlashDelete.getFullPacketLen());
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::prepareTcReplayStart(const uint8_t* commandData,
|
ReturnValue_t PlocMPSoCHandler::prepareTcReplayStart(const uint8_t* commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
sequenceCount++;
|
sequenceCount++;
|
||||||
mpsoc::TcReplayStart tcReplayStart(sequenceCount);
|
mpsoc::TcReplayStart tcReplayStart(spParams, sequenceCount);
|
||||||
result = tcReplayStart.createPacket(commandData, commandDataLen);
|
result = tcReplayStart.buildPacket(commandData, commandDataLen);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
copyToCommandBuffer(&tcReplayStart);
|
finishTcPrep(tcReplayStart.getFullPacketLen());
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::prepareTcReplayStop() {
|
ReturnValue_t PlocMPSoCHandler::prepareTcReplayStop() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
sequenceCount++;
|
sequenceCount++;
|
||||||
mpsoc::TcReplayStop tcReplayStop(sequenceCount);
|
mpsoc::TcReplayStop tcReplayStop(spParams, sequenceCount);
|
||||||
result = tcReplayStop.createPacket();
|
result = tcReplayStop.buildPacket();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
copyToCommandBuffer(&tcReplayStop);
|
finishTcPrep(tcReplayStop.getFullPacketLen());
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::prepareTcDownlinkPwrOn(const uint8_t* commandData,
|
ReturnValue_t PlocMPSoCHandler::prepareTcDownlinkPwrOn(const uint8_t* commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
sequenceCount++;
|
sequenceCount++;
|
||||||
mpsoc::TcDownlinkPwrOn tcDownlinkPwrOn(sequenceCount);
|
mpsoc::TcDownlinkPwrOn tcDownlinkPwrOn(spParams, sequenceCount);
|
||||||
result = tcDownlinkPwrOn.createPacket(commandData, commandDataLen);
|
result = tcDownlinkPwrOn.buildPacket(commandData, commandDataLen);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
copyToCommandBuffer(&tcDownlinkPwrOn);
|
finishTcPrep(tcDownlinkPwrOn.getFullPacketLen());
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::prepareTcDownlinkPwrOff() {
|
ReturnValue_t PlocMPSoCHandler::prepareTcDownlinkPwrOff() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
sequenceCount++;
|
sequenceCount++;
|
||||||
mpsoc::TcDownlinkPwrOff tcDownlinkPwrOff(sequenceCount);
|
mpsoc::TcDownlinkPwrOff tcDownlinkPwrOff(spParams, sequenceCount);
|
||||||
result = tcDownlinkPwrOff.createPacket();
|
result = tcDownlinkPwrOff.buildPacket();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
copyToCommandBuffer(&tcDownlinkPwrOff);
|
finishTcPrep(tcDownlinkPwrOff.getFullPacketLen());
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::prepareTcReplayWriteSequence(const uint8_t* commandData,
|
ReturnValue_t PlocMPSoCHandler::prepareTcReplayWriteSequence(const uint8_t* commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
sequenceCount++;
|
sequenceCount++;
|
||||||
mpsoc::TcReplayWriteSeq tcReplayWriteSeq(sequenceCount);
|
mpsoc::TcReplayWriteSeq tcReplayWriteSeq(spParams, sequenceCount);
|
||||||
result = tcReplayWriteSeq.createPacket(commandData, commandDataLen);
|
result = tcReplayWriteSeq.buildPacket(commandData, commandDataLen);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
copyToCommandBuffer(&tcReplayWriteSeq);
|
finishTcPrep(tcReplayWriteSeq.getFullPacketLen());
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::prepareTcModeReplay() {
|
ReturnValue_t PlocMPSoCHandler::prepareTcModeReplay() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
sequenceCount++;
|
sequenceCount++;
|
||||||
mpsoc::TcModeReplay tcModeReplay(sequenceCount);
|
mpsoc::TcModeReplay tcModeReplay(spParams, sequenceCount);
|
||||||
result = tcModeReplay.createPacket();
|
result = tcModeReplay.buildPacket();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
memcpy(commandBuffer, tcModeReplay.getWholeData(), tcModeReplay.getFullSize());
|
finishTcPrep(tcModeReplay.getFullPacketLen());
|
||||||
rawPacket = commandBuffer;
|
return returnvalue::OK;
|
||||||
rawPacketLen = tcModeReplay.getFullSize();
|
|
||||||
nextReplyId = mpsoc::ACK_REPORT;
|
|
||||||
return RETURN_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::prepareTcModeIdle() {
|
ReturnValue_t PlocMPSoCHandler::prepareTcModeIdle() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
sequenceCount++;
|
sequenceCount++;
|
||||||
mpsoc::TcModeIdle tcModeIdle(sequenceCount);
|
mpsoc::TcModeIdle tcModeIdle(spParams, sequenceCount);
|
||||||
result = tcModeIdle.createPacket();
|
result = tcModeIdle.buildPacket();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
memcpy(commandBuffer, tcModeIdle.getWholeData(), tcModeIdle.getFullSize());
|
finishTcPrep(tcModeIdle.getFullPacketLen());
|
||||||
rawPacket = commandBuffer;
|
return returnvalue::OK;
|
||||||
rawPacketLen = tcModeIdle.getFullSize();
|
|
||||||
nextReplyId = mpsoc::ACK_REPORT;
|
|
||||||
return RETURN_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::prepareTcCamCmdSend(const uint8_t* commandData,
|
ReturnValue_t PlocMPSoCHandler::prepareTcCamCmdSend(const uint8_t* commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
sequenceCount++;
|
sequenceCount++;
|
||||||
mpsoc::TcCamcmdSend tcCamCmdSend(sequenceCount);
|
mpsoc::TcCamcmdSend tcCamCmdSend(spParams, sequenceCount);
|
||||||
result = tcCamCmdSend.createPacket(commandData, commandDataLen);
|
result = tcCamCmdSend.buildPacket(commandData, commandDataLen);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
copyToCommandBuffer(&tcCamCmdSend);
|
finishTcPrep(tcCamCmdSend.getFullPacketLen());
|
||||||
nextReplyId = mpsoc::TM_CAM_CMD_RPT;
|
nextReplyId = mpsoc::TM_CAM_CMD_RPT;
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlocMPSoCHandler::copyToCommandBuffer(mpsoc::TcBase* tc) {
|
void PlocMPSoCHandler::finishTcPrep(size_t packetLen) {
|
||||||
if (tc == nullptr) {
|
|
||||||
sif::debug << "PlocMPSoCHandler::copyToCommandBuffer: Invalid TC" << std::endl;
|
|
||||||
}
|
|
||||||
memcpy(commandBuffer, tc->getWholeData(), tc->getFullSize());
|
|
||||||
rawPacket = commandBuffer;
|
|
||||||
rawPacketLen = tc->getFullSize();
|
|
||||||
nextReplyId = mpsoc::ACK_REPORT;
|
nextReplyId = mpsoc::ACK_REPORT;
|
||||||
|
rawPacket = commandBuffer;
|
||||||
|
rawPacketLen = packetLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::verifyPacket(const uint8_t* start, size_t foundLen) {
|
ReturnValue_t PlocMPSoCHandler::verifyPacket(const uint8_t* start, size_t foundLen) {
|
||||||
uint16_t receivedCrc = *(start + foundLen - 2) << 8 | *(start + foundLen - 1);
|
if (CRC::crc16ccitt(start, foundLen) != 0) {
|
||||||
uint16_t recalculatedCrc = CRC::crc16ccitt(start, foundLen - 2);
|
|
||||||
if (receivedCrc != recalculatedCrc) {
|
|
||||||
return MPSoCReturnValuesIF::CRC_FAILURE;
|
return MPSoCReturnValuesIF::CRC_FAILURE;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::handleAckReport(const uint8_t* data) {
|
ReturnValue_t PlocMPSoCHandler::handleAckReport(const uint8_t* data) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
|
||||||
result = verifyPacket(data, mpsoc::SIZE_ACK_REPORT);
|
result = verifyPacket(data, mpsoc::SIZE_ACK_REPORT);
|
||||||
if (result == MPSoCReturnValuesIF::CRC_FAILURE) {
|
if (result == MPSoCReturnValuesIF::CRC_FAILURE) {
|
||||||
@ -608,7 +606,7 @@ ReturnValue_t PlocMPSoCHandler::handleAckReport(const uint8_t* data) {
|
|||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
sif::debug << "PlocMPSoCHandler::handleAckReport: Invalid APID in Ack report" << std::endl;
|
sif::debug << "PlocMPSoCHandler::handleAckReport: Invalid APID in Ack report" << std::endl;
|
||||||
result = RETURN_FAILED;
|
result = returnvalue::FAILED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -617,7 +615,7 @@ ReturnValue_t PlocMPSoCHandler::handleAckReport(const uint8_t* data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::handleExecutionReport(const uint8_t* data) {
|
ReturnValue_t PlocMPSoCHandler::handleExecutionReport(const uint8_t* data) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
|
||||||
result = verifyPacket(data, mpsoc::SIZE_EXE_REPORT);
|
result = verifyPacket(data, mpsoc::SIZE_EXE_REPORT);
|
||||||
if (result == MPSoCReturnValuesIF::CRC_FAILURE) {
|
if (result == MPSoCReturnValuesIF::CRC_FAILURE) {
|
||||||
@ -651,7 +649,7 @@ ReturnValue_t PlocMPSoCHandler::handleExecutionReport(const uint8_t* data) {
|
|||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
sif::warning << "PlocMPSoCHandler::handleExecutionReport: Unknown APID" << std::endl;
|
sif::warning << "PlocMPSoCHandler::handleExecutionReport: Unknown APID" << std::endl;
|
||||||
result = RETURN_FAILED;
|
result = returnvalue::FAILED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -660,7 +658,7 @@ ReturnValue_t PlocMPSoCHandler::handleExecutionReport(const uint8_t* data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::handleMemoryReadReport(const uint8_t* data) {
|
ReturnValue_t PlocMPSoCHandler::handleMemoryReadReport(const uint8_t* data) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
result = verifyPacket(data, tmMemReadReport.rememberRequestedSize);
|
result = verifyPacket(data, tmMemReadReport.rememberRequestedSize);
|
||||||
if (result == MPSoCReturnValuesIF::CRC_FAILURE) {
|
if (result == MPSoCReturnValuesIF::CRC_FAILURE) {
|
||||||
sif::warning << "PlocMPSoCHandler::handleMemoryReadReport: Memory read report has invalid crc"
|
sif::warning << "PlocMPSoCHandler::handleMemoryReadReport: Memory read report has invalid crc"
|
||||||
@ -676,32 +674,31 @@ ReturnValue_t PlocMPSoCHandler::handleMemoryReadReport(const uint8_t* data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::handleCamCmdRpt(const uint8_t* data) {
|
ReturnValue_t PlocMPSoCHandler::handleCamCmdRpt(const uint8_t* data) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
SpacePacket packet;
|
|
||||||
std::memcpy(packet.getWholeData(), data, tmCamCmdRpt.rememberSpacePacketSize);
|
|
||||||
result = verifyPacket(data, tmCamCmdRpt.rememberSpacePacketSize);
|
result = verifyPacket(data, tmCamCmdRpt.rememberSpacePacketSize);
|
||||||
if (result == MPSoCReturnValuesIF::CRC_FAILURE) {
|
if (result == MPSoCReturnValuesIF::CRC_FAILURE) {
|
||||||
sif::warning << "PlocMPSoCHandler::handleCamCmdRpt: CRC failure" << std::endl;
|
sif::warning << "PlocMPSoCHandler::handleCamCmdRpt: CRC failure" << std::endl;
|
||||||
}
|
}
|
||||||
|
SpacePacketReader packetReader(data, tmCamCmdRpt.rememberSpacePacketSize);
|
||||||
const uint8_t* dataFieldPtr = data + mpsoc::SPACE_PACKET_HEADER_SIZE + sizeof(uint16_t);
|
const uint8_t* dataFieldPtr = data + mpsoc::SPACE_PACKET_HEADER_SIZE + sizeof(uint16_t);
|
||||||
std::string camCmdRptMsg(
|
std::string camCmdRptMsg(
|
||||||
reinterpret_cast<const char*>(dataFieldPtr),
|
reinterpret_cast<const char*>(dataFieldPtr),
|
||||||
tmCamCmdRpt.rememberSpacePacketSize - mpsoc::SPACE_PACKET_HEADER_SIZE - sizeof(uint16_t) - 3);
|
tmCamCmdRpt.rememberSpacePacketSize - mpsoc::SPACE_PACKET_HEADER_SIZE - sizeof(uint16_t) - 3);
|
||||||
#if OBSW_DEBUG_PLOC_MPSOC == 1
|
#if OBSW_DEBUG_PLOC_MPSOC == 1
|
||||||
uint8_t ackValue = *(packet.getPacketData() + packet.getPacketDataLength() - 2);
|
uint8_t ackValue = *(packetReader.getFullData() + packetReader.getFullPacketLen() - 2);
|
||||||
sif::info << "PlocMPSoCHandler: CamCmdRpt message: " << camCmdRptMsg << std::endl;
|
sif::info << "PlocMPSoCHandler: CamCmdRpt message: " << camCmdRptMsg << std::endl;
|
||||||
sif::info << "PlocMPSoCHandler: CamCmdRpt Ack value: 0x" << std::hex
|
sif::info << "PlocMPSoCHandler: CamCmdRpt Ack value: 0x" << std::hex
|
||||||
<< static_cast<unsigned int>(ackValue) << std::endl;
|
<< static_cast<unsigned int>(ackValue) << std::endl;
|
||||||
#endif /* OBSW_DEBUG_PLOC_MPSOC == 1 */
|
#endif /* OBSW_DEBUG_PLOC_MPSOC == 1 */
|
||||||
handleDeviceTM(packet.getPacketData() + sizeof(uint16_t), packet.getPacketDataLength() - 1,
|
handleDeviceTM(packetReader.getPacketData() + sizeof(uint16_t),
|
||||||
mpsoc::TM_CAM_CMD_RPT);
|
packetReader.getPacketDataLen() - 1, mpsoc::TM_CAM_CMD_RPT);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::enableReplyInReplyMap(DeviceCommandMap::iterator command,
|
ReturnValue_t PlocMPSoCHandler::enableReplyInReplyMap(DeviceCommandMap::iterator command,
|
||||||
uint8_t expectedReplies, bool useAlternateId,
|
uint8_t expectedReplies, bool useAlternateId,
|
||||||
DeviceCommandId_t alternateReplyID) {
|
DeviceCommandId_t alternateReplyID) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
|
||||||
uint8_t enabledReplies = 0;
|
uint8_t enabledReplies = 0;
|
||||||
|
|
||||||
@ -721,7 +718,7 @@ ReturnValue_t PlocMPSoCHandler::enableReplyInReplyMap(DeviceCommandMap::iterator
|
|||||||
enabledReplies = 3;
|
enabledReplies = 3;
|
||||||
result = DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true,
|
result = DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true,
|
||||||
mpsoc::TM_MEMORY_READ_REPORT);
|
mpsoc::TM_MEMORY_READ_REPORT);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "PlocMPSoCHandler::enableReplyInReplyMap: Reply with id "
|
sif::debug << "PlocMPSoCHandler::enableReplyInReplyMap: Reply with id "
|
||||||
<< mpsoc::TM_MEMORY_READ_REPORT << " not in replyMap" << std::endl;
|
<< mpsoc::TM_MEMORY_READ_REPORT << " not in replyMap" << std::endl;
|
||||||
return result;
|
return result;
|
||||||
@ -732,7 +729,7 @@ ReturnValue_t PlocMPSoCHandler::enableReplyInReplyMap(DeviceCommandMap::iterator
|
|||||||
enabledReplies = 3;
|
enabledReplies = 3;
|
||||||
result = DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true,
|
result = DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true,
|
||||||
mpsoc::TM_CAM_CMD_RPT);
|
mpsoc::TM_CAM_CMD_RPT);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "PlocMPSoCHandler::enableReplyInReplyMap: Reply with id "
|
sif::debug << "PlocMPSoCHandler::enableReplyInReplyMap: Reply with id "
|
||||||
<< mpsoc::TM_CAM_CMD_RPT << " not in replyMap" << std::endl;
|
<< mpsoc::TM_CAM_CMD_RPT << " not in replyMap" << std::endl;
|
||||||
return result;
|
return result;
|
||||||
@ -752,14 +749,14 @@ ReturnValue_t PlocMPSoCHandler::enableReplyInReplyMap(DeviceCommandMap::iterator
|
|||||||
*/
|
*/
|
||||||
result =
|
result =
|
||||||
DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true, mpsoc::ACK_REPORT);
|
DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true, mpsoc::ACK_REPORT);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "PlocMPSoCHandler::enableReplyInReplyMap: Reply with id " << mpsoc::ACK_REPORT
|
sif::debug << "PlocMPSoCHandler::enableReplyInReplyMap: Reply with id " << mpsoc::ACK_REPORT
|
||||||
<< " not in replyMap" << std::endl;
|
<< " not in replyMap" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
result =
|
result =
|
||||||
DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true, mpsoc::EXE_REPORT);
|
DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true, mpsoc::EXE_REPORT);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "PlocMPSoCHandler::enableReplyInReplyMap: Reply with id " << mpsoc::EXE_REPORT
|
sif::debug << "PlocMPSoCHandler::enableReplyInReplyMap: Reply with id " << mpsoc::EXE_REPORT
|
||||||
<< " not in replyMap" << std::endl;
|
<< " not in replyMap" << std::endl;
|
||||||
}
|
}
|
||||||
@ -782,7 +779,7 @@ ReturnValue_t PlocMPSoCHandler::enableReplyInReplyMap(DeviceCommandMap::iterator
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlocMPSoCHandler::setNextReplyId() {
|
void PlocMPSoCHandler::setNextReplyId() {
|
||||||
@ -818,7 +815,7 @@ size_t PlocMPSoCHandler::getNextReplyLength(DeviceCommandId_t commandId) {
|
|||||||
case mpsoc::TM_CAM_CMD_RPT:
|
case mpsoc::TM_CAM_CMD_RPT:
|
||||||
// Read acknowledgment, camera and execution report in one go because length of camera
|
// Read acknowledgment, camera and execution report in one go because length of camera
|
||||||
// report is not fixed
|
// report is not fixed
|
||||||
replyLen = SpacePacket::PACKET_MAX_SIZE;
|
replyLen = mpsoc::SP_MAX_SIZE;
|
||||||
break;
|
break;
|
||||||
default: {
|
default: {
|
||||||
replyLen = iter->second.replyLen;
|
replyLen = iter->second.replyLen;
|
||||||
@ -836,9 +833,9 @@ size_t PlocMPSoCHandler::getNextReplyLength(DeviceCommandId_t commandId) {
|
|||||||
ReturnValue_t PlocMPSoCHandler::doSendReadHook() {
|
ReturnValue_t PlocMPSoCHandler::doSendReadHook() {
|
||||||
// Prevent DHB from polling UART during commands executed by the mpsoc helper task
|
// Prevent DHB from polling UART during commands executed by the mpsoc helper task
|
||||||
if (plocMPSoCHelperExecuting) {
|
if (plocMPSoCHelperExecuting) {
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageQueueIF* PlocMPSoCHandler::getCommandQueuePtr() { return commandActionHelperQueue; }
|
MessageQueueIF* PlocMPSoCHandler::getCommandQueuePtr() { return commandActionHelperQueue; }
|
||||||
@ -899,7 +896,7 @@ void PlocMPSoCHandler::completionFailedReceived(ActionId_t actionId, ReturnValue
|
|||||||
|
|
||||||
void PlocMPSoCHandler::handleDeviceTM(const uint8_t* data, size_t dataSize,
|
void PlocMPSoCHandler::handleDeviceTM(const uint8_t* data, size_t dataSize,
|
||||||
DeviceCommandId_t replyId) {
|
DeviceCommandId_t replyId) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
|
||||||
if (wiretappingMode == RAW) {
|
if (wiretappingMode == RAW) {
|
||||||
/* Data already sent in doGetRead() */
|
/* Data already sent in doGetRead() */
|
||||||
@ -918,7 +915,7 @@ void PlocMPSoCHandler::handleDeviceTM(const uint8_t* data, size_t dataSize,
|
|||||||
}
|
}
|
||||||
|
|
||||||
result = actionHelper.reportData(queueId, replyId, data, dataSize);
|
result = actionHelper.reportData(queueId, replyId, data, dataSize);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "PlocMPSoCHandler::handleDeviceTM: Failed to report data" << std::endl;
|
sif::debug << "PlocMPSoCHandler::handleDeviceTM: Failed to report data" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
#include "fsfw/action/CommandsActionsIF.h"
|
#include "fsfw/action/CommandsActionsIF.h"
|
||||||
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
||||||
#include "fsfw/ipc/QueueFactory.h"
|
#include "fsfw/ipc/QueueFactory.h"
|
||||||
#include "fsfw/tmtcpacket/SpacePacket.h"
|
|
||||||
#include "fsfw/tmtcservices/SourceSequenceCounter.h"
|
#include "fsfw/tmtcservices/SourceSequenceCounter.h"
|
||||||
#include "fsfw_hal/linux/gpio/Gpio.h"
|
#include "fsfw_hal/linux/gpio/Gpio.h"
|
||||||
#include "fsfw_hal/linux/uart/UartComIF.h"
|
#include "fsfw_hal/linux/uart/UartComIF.h"
|
||||||
@ -111,10 +110,11 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
|||||||
// Initiate the sequence count with the maximum value. It is incremented before
|
// Initiate the sequence count with the maximum value. It is incremented before
|
||||||
// a packet is sent, so the first value will be 0 accordingly using
|
// a packet is sent, so the first value will be 0 accordingly using
|
||||||
// the wrap around of the counter.
|
// the wrap around of the counter.
|
||||||
SourceSequenceCounter sequenceCount =
|
SourceSequenceCounter sequenceCount = SourceSequenceCounter(ccsds::LIMIT_SEQUENCE_COUNT - 1);
|
||||||
SourceSequenceCounter(SpacePacketBase::LIMIT_SEQUENCE_COUNT - 1);
|
|
||||||
|
|
||||||
uint8_t commandBuffer[mpsoc::MAX_COMMAND_SIZE];
|
uint8_t commandBuffer[mpsoc::MAX_COMMAND_SIZE];
|
||||||
|
SpacePacketCreator creator;
|
||||||
|
ploc::SpTcParams spParams = ploc::SpTcParams(creator);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This variable is used to store the id of the next reply to receive. This is necessary
|
* This variable is used to store the id of the next reply to receive. This is necessary
|
||||||
@ -148,7 +148,7 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
|||||||
|
|
||||||
struct TelemetryBuffer {
|
struct TelemetryBuffer {
|
||||||
uint16_t length = 0;
|
uint16_t length = 0;
|
||||||
uint8_t buffer[SpacePacket::PACKET_MAX_SIZE];
|
uint8_t buffer[mpsoc::SP_MAX_SIZE];
|
||||||
};
|
};
|
||||||
|
|
||||||
TelemetryBuffer tmBuffer;
|
TelemetryBuffer tmBuffer;
|
||||||
@ -172,10 +172,7 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
|||||||
ReturnValue_t prepareTcReplayWriteSequence(const uint8_t* commandData, size_t commandDataLen);
|
ReturnValue_t prepareTcReplayWriteSequence(const uint8_t* commandData, size_t commandDataLen);
|
||||||
ReturnValue_t prepareTcCamCmdSend(const uint8_t* commandData, size_t commandDataLen);
|
ReturnValue_t prepareTcCamCmdSend(const uint8_t* commandData, size_t commandDataLen);
|
||||||
ReturnValue_t prepareTcModeIdle();
|
ReturnValue_t prepareTcModeIdle();
|
||||||
/**
|
void finishTcPrep(size_t packetLen);
|
||||||
* @brief Copies space packet into command buffer
|
|
||||||
*/
|
|
||||||
void copyToCommandBuffer(mpsoc::TcBase* tc);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function checks the crc of the received PLOC reply.
|
* @brief This function checks the crc of the received PLOC reply.
|
||||||
@ -183,7 +180,7 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
|||||||
* @param start Pointer to the first byte of the reply.
|
* @param start Pointer to the first byte of the reply.
|
||||||
* @param foundLen Pointer to the length of the whole packet.
|
* @param foundLen Pointer to the length of the whole packet.
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if CRC is ok, otherwise CRC_FAILURE.
|
* @return returnvalue::OK if CRC is ok, otherwise CRC_FAILURE.
|
||||||
*/
|
*/
|
||||||
ReturnValue_t verifyPacket(const uint8_t* start, size_t foundLen);
|
ReturnValue_t verifyPacket(const uint8_t* start, size_t foundLen);
|
||||||
|
|
||||||
@ -192,7 +189,7 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
|||||||
*
|
*
|
||||||
* @param data Pointer to the data holding the acknowledgment report.
|
* @param data Pointer to the data holding the acknowledgment report.
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if successful, otherwise an error code.
|
* @return returnvalue::OK if successful, otherwise an error code.
|
||||||
*/
|
*/
|
||||||
ReturnValue_t handleAckReport(const uint8_t* data);
|
ReturnValue_t handleAckReport(const uint8_t* data);
|
||||||
|
|
||||||
@ -201,7 +198,7 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
|||||||
*
|
*
|
||||||
* @param data Pointer to the received data packet.
|
* @param data Pointer to the received data packet.
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if successful, otherwise an error code.
|
* @return returnvalue::OK if successful, otherwise an error code.
|
||||||
*/
|
*/
|
||||||
ReturnValue_t handleExecutionReport(const uint8_t* data);
|
ReturnValue_t handleExecutionReport(const uint8_t* data);
|
||||||
|
|
||||||
@ -210,7 +207,7 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
|||||||
*
|
*
|
||||||
* @param data Pointer to the data buffer holding the memory read report.
|
* @param data Pointer to the data buffer holding the memory read report.
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if successful, otherwise an error code.
|
* @return returnvalue::OK if successful, otherwise an error code.
|
||||||
*/
|
*/
|
||||||
ReturnValue_t handleMemoryReadReport(const uint8_t* data);
|
ReturnValue_t handleMemoryReadReport(const uint8_t* data);
|
||||||
|
|
||||||
|
@ -10,7 +10,12 @@
|
|||||||
|
|
||||||
#include "mission/utility/Timestamp.h"
|
#include "mission/utility/Timestamp.h"
|
||||||
|
|
||||||
PlocMPSoCHelper::PlocMPSoCHelper(object_id_t objectId) : SystemObject(objectId) {}
|
using namespace ploc;
|
||||||
|
|
||||||
|
PlocMPSoCHelper::PlocMPSoCHelper(object_id_t objectId) : SystemObject(objectId) {
|
||||||
|
spParams.buf = commandBuffer;
|
||||||
|
spParams.maxSize = sizeof(commandBuffer);
|
||||||
|
}
|
||||||
|
|
||||||
PlocMPSoCHelper::~PlocMPSoCHelper() {}
|
PlocMPSoCHelper::~PlocMPSoCHelper() {}
|
||||||
|
|
||||||
@ -19,14 +24,14 @@ ReturnValue_t PlocMPSoCHelper::initialize() {
|
|||||||
sdcMan = SdCardManager::instance();
|
sdcMan = SdCardManager::instance();
|
||||||
if (sdcMan == nullptr) {
|
if (sdcMan == nullptr) {
|
||||||
sif::warning << "PlocMPSoCHelper::initialize: Invalid SD Card Manager" << std::endl;
|
sif::warning << "PlocMPSoCHelper::initialize: Invalid SD Card Manager" << std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHelper::performOperation(uint8_t operationCode) {
|
ReturnValue_t PlocMPSoCHelper::performOperation(uint8_t operationCode) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
semaphore.acquire();
|
semaphore.acquire();
|
||||||
while (true) {
|
while (true) {
|
||||||
switch (internalState) {
|
switch (internalState) {
|
||||||
@ -36,7 +41,7 @@ ReturnValue_t PlocMPSoCHelper::performOperation(uint8_t operationCode) {
|
|||||||
}
|
}
|
||||||
case InternalState::FLASH_WRITE: {
|
case InternalState::FLASH_WRITE: {
|
||||||
result = performFlashWrite();
|
result = performFlashWrite();
|
||||||
if (result == RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
triggerEvent(MPSOC_FLASH_WRITE_SUCCESSFUL);
|
triggerEvent(MPSOC_FLASH_WRITE_SUCCESSFUL);
|
||||||
} else {
|
} else {
|
||||||
triggerEvent(MPSOC_FLASH_WRITE_FAILED);
|
triggerEvent(MPSOC_FLASH_WRITE_FAILED);
|
||||||
@ -55,9 +60,9 @@ ReturnValue_t PlocMPSoCHelper::setComIF(DeviceCommunicationIF* communicationInte
|
|||||||
uartComIF = dynamic_cast<UartComIF*>(communicationInterface_);
|
uartComIF = dynamic_cast<UartComIF*>(communicationInterface_);
|
||||||
if (uartComIF == nullptr) {
|
if (uartComIF == nullptr) {
|
||||||
sif::warning << "PlocMPSoCHelper::initialize: Invalid uart com if" << std::endl;
|
sif::warning << "PlocMPSoCHelper::initialize: Invalid uart com if" << std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlocMPSoCHelper::setComCookie(CookieIF* comCookie_) { comCookie = comCookie_; }
|
void PlocMPSoCHelper::setComCookie(CookieIF* comCookie_) { comCookie = comCookie_; }
|
||||||
@ -67,14 +72,14 @@ void PlocMPSoCHelper::setSequenceCount(SourceSequenceCounter* sequenceCount_) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHelper::startFlashWrite(std::string obcFile, std::string mpsocFile) {
|
ReturnValue_t PlocMPSoCHelper::startFlashWrite(std::string obcFile, std::string mpsocFile) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
result = FilesystemHelper::checkPath(obcFile);
|
result = FilesystemHelper::checkPath(obcFile);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = FilesystemHelper::fileExists(mpsocFile);
|
result = FilesystemHelper::fileExists(mpsocFile);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -82,7 +87,7 @@ ReturnValue_t PlocMPSoCHelper::startFlashWrite(std::string obcFile, std::string
|
|||||||
if (not std::filesystem::exists(obcFile)) {
|
if (not std::filesystem::exists(obcFile)) {
|
||||||
sif::warning << "PlocMPSoCHelper::startFlashWrite: File " << obcFile << "does not exist"
|
sif::warning << "PlocMPSoCHelper::startFlashWrite: File " << obcFile << "does not exist"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -90,15 +95,16 @@ ReturnValue_t PlocMPSoCHelper::startFlashWrite(std::string obcFile, std::string
|
|||||||
flashWrite.mpsocFile = mpsocFile;
|
flashWrite.mpsocFile = mpsocFile;
|
||||||
internalState = InternalState::FLASH_WRITE;
|
internalState = InternalState::FLASH_WRITE;
|
||||||
result = resetHelper();
|
result = resetHelper();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHelper::resetHelper() {
|
ReturnValue_t PlocMPSoCHelper::resetHelper() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
semaphore.release();
|
semaphore.release();
|
||||||
|
spParams.buf = commandBuffer;
|
||||||
terminate = false;
|
terminate = false;
|
||||||
result = uartComIF->flushUartRxBuffer(comCookie);
|
result = uartComIF->flushUartRxBuffer(comCookie);
|
||||||
return result;
|
return result;
|
||||||
@ -107,9 +113,9 @@ ReturnValue_t PlocMPSoCHelper::resetHelper() {
|
|||||||
void PlocMPSoCHelper::stopProcess() { terminate = true; }
|
void PlocMPSoCHelper::stopProcess() { terminate = true; }
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHelper::performFlashWrite() {
|
ReturnValue_t PlocMPSoCHelper::performFlashWrite() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
result = flashfopen();
|
result = flashfopen();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
uint8_t tempData[mpsoc::MAX_DATA_SIZE];
|
uint8_t tempData[mpsoc::MAX_DATA_SIZE];
|
||||||
@ -122,7 +128,7 @@ ReturnValue_t PlocMPSoCHelper::performFlashWrite() {
|
|||||||
size_t bytesRead = 0;
|
size_t bytesRead = 0;
|
||||||
while (remainingSize > 0) {
|
while (remainingSize > 0) {
|
||||||
if (terminate) {
|
if (terminate) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
if (remainingSize > mpsoc::MAX_DATA_SIZE) {
|
if (remainingSize > mpsoc::MAX_DATA_SIZE) {
|
||||||
dataLength = mpsoc::MAX_DATA_SIZE;
|
dataLength = mpsoc::MAX_DATA_SIZE;
|
||||||
@ -138,71 +144,76 @@ ReturnValue_t PlocMPSoCHelper::performFlashWrite() {
|
|||||||
return FILE_CLOSED_ACCIDENTALLY;
|
return FILE_CLOSED_ACCIDENTALLY;
|
||||||
}
|
}
|
||||||
(*sequenceCount)++;
|
(*sequenceCount)++;
|
||||||
mpsoc::TcFlashWrite tc(*sequenceCount);
|
mpsoc::TcFlashWrite tc(spParams, *sequenceCount);
|
||||||
tc.createPacket(tempData, dataLength);
|
result = tc.buildPacket(tempData, dataLength);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
result = handlePacketTransmission(tc);
|
result = handlePacketTransmission(tc);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result = flashfclose();
|
result = flashfclose();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHelper::flashfopen() {
|
ReturnValue_t PlocMPSoCHelper::flashfopen() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
spParams.buf = commandBuffer;
|
||||||
(*sequenceCount)++;
|
(*sequenceCount)++;
|
||||||
mpsoc::FlashFopen flashFopen(*sequenceCount);
|
mpsoc::FlashFopen flashFopen(spParams, *sequenceCount);
|
||||||
result = flashFopen.createPacket(flashWrite.mpsocFile, mpsoc::FlashFopen::APPEND);
|
result = flashFopen.createPacket(flashWrite.mpsocFile, mpsoc::FlashFopen::APPEND);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = handlePacketTransmission(flashFopen);
|
result = handlePacketTransmission(flashFopen);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHelper::flashfclose() {
|
ReturnValue_t PlocMPSoCHelper::flashfclose() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
spParams.buf = commandBuffer;
|
||||||
(*sequenceCount)++;
|
(*sequenceCount)++;
|
||||||
mpsoc::FlashFclose flashFclose(*sequenceCount);
|
mpsoc::FlashFclose flashFclose(spParams, *sequenceCount);
|
||||||
result = flashFclose.createPacket(flashWrite.mpsocFile);
|
result = flashFclose.createPacket(flashWrite.mpsocFile);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = handlePacketTransmission(flashFclose);
|
result = handlePacketTransmission(flashFclose);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHelper::handlePacketTransmission(mpsoc::TcBase& tc) {
|
ReturnValue_t PlocMPSoCHelper::handlePacketTransmission(ploc::SpTcBase& tc) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
result = sendCommand(tc);
|
result = sendCommand(tc);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = handleAck();
|
result = handleAck();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = handleExe();
|
result = handleExe();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHelper::sendCommand(mpsoc::TcBase& tc) {
|
ReturnValue_t PlocMPSoCHelper::sendCommand(ploc::SpTcBase& tc) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
result = uartComIF->sendMessage(comCookie, tc.getWholeData(), tc.getFullSize());
|
result = uartComIF->sendMessage(comCookie, tc.getFullPacket(), tc.getFullPacketLen());
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "PlocMPSoCHelper::sendCommand: Failed to send command" << std::endl;
|
sif::warning << "PlocMPSoCHelper::sendCommand: Failed to send command" << std::endl;
|
||||||
triggerEvent(MPSOC_SENDING_COMMAND_FAILED, result, static_cast<uint32_t>(internalState));
|
triggerEvent(MPSOC_SENDING_COMMAND_FAILED, result, static_cast<uint32_t>(internalState));
|
||||||
return result;
|
return result;
|
||||||
@ -211,18 +222,22 @@ ReturnValue_t PlocMPSoCHelper::sendCommand(mpsoc::TcBase& tc) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHelper::handleAck() {
|
ReturnValue_t PlocMPSoCHelper::handleAck() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
mpsoc::TmPacket tmPacket;
|
result = handleTmReception(mpsoc::SIZE_ACK_REPORT);
|
||||||
result = handleTmReception(&tmPacket, mpsoc::SIZE_ACK_REPORT);
|
if (result != returnvalue::OK) {
|
||||||
if (result != RETURN_OK) {
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
uint16_t apid = tmPacket.getAPID();
|
SpTmReader tmPacket(tmBuf.data(), tmBuf.size());
|
||||||
|
result = checkReceivedTm(tmPacket);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
uint16_t apid = tmPacket.getApid();
|
||||||
if (apid != mpsoc::apid::ACK_SUCCESS) {
|
if (apid != mpsoc::apid::ACK_SUCCESS) {
|
||||||
handleAckApidFailure(apid);
|
handleAckApidFailure(apid);
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlocMPSoCHelper::handleAckApidFailure(uint16_t apid) {
|
void PlocMPSoCHelper::handleAckApidFailure(uint16_t apid) {
|
||||||
@ -238,18 +253,23 @@ void PlocMPSoCHelper::handleAckApidFailure(uint16_t apid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHelper::handleExe() {
|
ReturnValue_t PlocMPSoCHelper::handleExe() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
mpsoc::TmPacket tmPacket;
|
|
||||||
result = handleTmReception(&tmPacket, mpsoc::SIZE_EXE_REPORT);
|
result = handleTmReception(mpsoc::SIZE_EXE_REPORT);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
uint16_t apid = tmPacket.getAPID();
|
ploc::SpTmReader tmPacket(tmBuf.data(), tmBuf.size());
|
||||||
|
result = checkReceivedTm(tmPacket);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
uint16_t apid = tmPacket.getApid();
|
||||||
if (apid != mpsoc::apid::EXE_SUCCESS) {
|
if (apid != mpsoc::apid::EXE_SUCCESS) {
|
||||||
handleExeApidFailure(apid);
|
handleExeApidFailure(apid);
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlocMPSoCHelper::handleExeApidFailure(uint16_t apid) {
|
void PlocMPSoCHelper::handleExeApidFailure(uint16_t apid) {
|
||||||
@ -264,13 +284,13 @@ void PlocMPSoCHelper::handleExeApidFailure(uint16_t apid) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHelper::handleTmReception(mpsoc::TmPacket* tmPacket, size_t remainingBytes) {
|
ReturnValue_t PlocMPSoCHelper::handleTmReception(size_t remainingBytes) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
size_t readBytes = 0;
|
size_t readBytes = 0;
|
||||||
size_t currentBytes = 0;
|
size_t currentBytes = 0;
|
||||||
for (int retries = 0; retries < RETRIES; retries++) {
|
for (int retries = 0; retries < RETRIES; retries++) {
|
||||||
result = receive(tmPacket->getWholeData() + readBytes, ¤tBytes, remainingBytes);
|
result = receive(tmBuf.data() + readBytes, ¤tBytes, remainingBytes);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
readBytes += currentBytes;
|
readBytes += currentBytes;
|
||||||
@ -282,37 +302,49 @@ ReturnValue_t PlocMPSoCHelper::handleTmReception(mpsoc::TmPacket* tmPacket, size
|
|||||||
if (remainingBytes != 0) {
|
if (remainingBytes != 0) {
|
||||||
sif::warning << "PlocMPSoCHelper::handleTmReception: Failed to receive reply" << std::endl;
|
sif::warning << "PlocMPSoCHelper::handleTmReception: Failed to receive reply" << std::endl;
|
||||||
triggerEvent(MPSOC_MISSING_EXE, remainingBytes, static_cast<uint32_t>(internalState));
|
triggerEvent(MPSOC_MISSING_EXE, remainingBytes, static_cast<uint32_t>(internalState));
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
|
||||||
result = tmPacket->checkCrc();
|
|
||||||
if (result != RETURN_OK) {
|
|
||||||
sif::warning << "PlocMPSoCHelper::handleTmReception: CRC check failed" << std::endl;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
(*sequenceCount)++;
|
|
||||||
uint16_t recvSeqCnt = tmPacket->getPacketSequenceCount();
|
|
||||||
if (recvSeqCnt != *sequenceCount) {
|
|
||||||
triggerEvent(MPSOC_HELPER_SEQ_CNT_MISMATCH, *sequenceCount, recvSeqCnt);
|
|
||||||
*sequenceCount = recvSeqCnt;
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PlocMPSoCHelper::checkReceivedTm(SpTmReader& reader) {
|
||||||
|
ReturnValue_t result = reader.checkSize();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::error << "PlocMPSoCHelper::handleTmReception: Size check on received TM failed"
|
||||||
|
<< std::endl;
|
||||||
|
triggerEvent(MPSOC_TM_SIZE_ERROR);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
reader.checkCrc();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::warning << "PlocMPSoCHelper::handleTmReception: CRC check failed" << std::endl;
|
||||||
|
triggerEvent(MPSOC_TM_CRC_MISSMATCH, *sequenceCount);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
(*sequenceCount)++;
|
||||||
|
uint16_t recvSeqCnt = reader.getSequenceCount();
|
||||||
|
if (recvSeqCnt != *sequenceCount) {
|
||||||
|
triggerEvent(MPSOC_HELPER_SEQ_CNT_MISMATCH, *sequenceCount, recvSeqCnt);
|
||||||
|
*sequenceCount = recvSeqCnt;
|
||||||
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHelper::receive(uint8_t* data, size_t* readBytes, size_t requestBytes) {
|
ReturnValue_t PlocMPSoCHelper::receive(uint8_t* data, size_t* readBytes, size_t requestBytes) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
uint8_t* buffer = nullptr;
|
uint8_t* buffer = nullptr;
|
||||||
result = uartComIF->requestReceiveMessage(comCookie, requestBytes);
|
result = uartComIF->requestReceiveMessage(comCookie, requestBytes);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "PlocMPSoCHelper::receive: Failed to request reply" << std::endl;
|
sif::warning << "PlocMPSoCHelper::receive: Failed to request reply" << std::endl;
|
||||||
triggerEvent(MPSOC_HELPER_REQUESTING_REPLY_FAILED, result,
|
triggerEvent(MPSOC_HELPER_REQUESTING_REPLY_FAILED, result,
|
||||||
static_cast<uint32_t>(static_cast<uint32_t>(internalState)));
|
static_cast<uint32_t>(static_cast<uint32_t>(internalState)));
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
result = uartComIF->readReceivedMessage(comCookie, &buffer, readBytes);
|
result = uartComIF->readReceivedMessage(comCookie, &buffer, readBytes);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "PlocMPSoCHelper::receive: Failed to read received message" << std::endl;
|
sif::warning << "PlocMPSoCHelper::receive: Failed to read received message" << std::endl;
|
||||||
triggerEvent(MPSOC_HELPER_READING_REPLY_FAILED, result, static_cast<uint32_t>(internalState));
|
triggerEvent(MPSOC_HELPER_READING_REPLY_FAILED, result, static_cast<uint32_t>(internalState));
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
if (*readBytes > 0) {
|
if (*readBytes > 0) {
|
||||||
std::memcpy(data, buffer, *readBytes);
|
std::memcpy(data, buffer, *readBytes);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include "fsfw/devicehandlers/CookieIF.h"
|
#include "fsfw/devicehandlers/CookieIF.h"
|
||||||
#include "fsfw/objectmanager/SystemObject.h"
|
#include "fsfw/objectmanager/SystemObject.h"
|
||||||
#include "fsfw/osal/linux/BinarySemaphore.h"
|
#include "fsfw/osal/linux/BinarySemaphore.h"
|
||||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
#include "fsfw/tasks/ExecutableObjectIF.h"
|
#include "fsfw/tasks/ExecutableObjectIF.h"
|
||||||
#include "fsfw/tmtcservices/SourceSequenceCounter.h"
|
#include "fsfw/tmtcservices/SourceSequenceCounter.h"
|
||||||
#include "fsfw_hal/linux/uart/UartComIF.h"
|
#include "fsfw_hal/linux/uart/UartComIF.h"
|
||||||
@ -20,7 +20,7 @@
|
|||||||
* MPSoC and OBC.
|
* MPSoC and OBC.
|
||||||
* @author J. Meier
|
* @author J. Meier
|
||||||
*/
|
*/
|
||||||
class PlocMPSoCHelper : public SystemObject, public ExecutableObjectIF, public HasReturnvaluesIF {
|
class PlocMPSoCHelper : public SystemObject, public ExecutableObjectIF {
|
||||||
public:
|
public:
|
||||||
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_MPSOC_HELPER;
|
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_MPSOC_HELPER;
|
||||||
|
|
||||||
@ -67,6 +67,8 @@ class PlocMPSoCHelper : public SystemObject, public ExecutableObjectIF, public H
|
|||||||
//! P1: Expected sequence count
|
//! P1: Expected sequence count
|
||||||
//! P2: Received sequence count
|
//! P2: Received sequence count
|
||||||
static const Event MPSOC_HELPER_SEQ_CNT_MISMATCH = MAKE_EVENT(11, severity::LOW);
|
static const Event MPSOC_HELPER_SEQ_CNT_MISMATCH = MAKE_EVENT(11, severity::LOW);
|
||||||
|
static const Event MPSOC_TM_SIZE_ERROR = MAKE_EVENT(12, severity::LOW);
|
||||||
|
static const Event MPSOC_TM_CRC_MISSMATCH = MAKE_EVENT(13, severity::LOW);
|
||||||
|
|
||||||
PlocMPSoCHelper(object_id_t objectId);
|
PlocMPSoCHelper(object_id_t objectId);
|
||||||
virtual ~PlocMPSoCHelper();
|
virtual ~PlocMPSoCHelper();
|
||||||
@ -83,7 +85,7 @@ class PlocMPSoCHelper : public SystemObject, public ExecutableObjectIF, public H
|
|||||||
* @param obcFile File where to read from the data
|
* @param obcFile File where to read from the data
|
||||||
* @param mpsocFile The file of the MPSoC where should be written to
|
* @param mpsocFile The file of the MPSoC where should be written to
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if successful, otherwise error return value
|
* @return returnvalue::OK if successful, otherwise error return value
|
||||||
*/
|
*/
|
||||||
ReturnValue_t startFlashWrite(std::string obcFile, std::string mpsocFile);
|
ReturnValue_t startFlashWrite(std::string obcFile, std::string mpsocFile);
|
||||||
|
|
||||||
@ -123,6 +125,10 @@ class PlocMPSoCHelper : public SystemObject, public ExecutableObjectIF, public H
|
|||||||
SdCardManager* sdcMan = nullptr;
|
SdCardManager* sdcMan = nullptr;
|
||||||
#endif
|
#endif
|
||||||
uint8_t commandBuffer[mpsoc::MAX_COMMAND_SIZE];
|
uint8_t commandBuffer[mpsoc::MAX_COMMAND_SIZE];
|
||||||
|
SpacePacketCreator creator;
|
||||||
|
ploc::SpTcParams spParams = ploc::SpTcParams(creator);
|
||||||
|
|
||||||
|
std::array<uint8_t, mpsoc::MAX_REPLY_SIZE> tmBuf;
|
||||||
|
|
||||||
bool terminate = false;
|
bool terminate = false;
|
||||||
|
|
||||||
@ -134,20 +140,21 @@ class PlocMPSoCHelper : public SystemObject, public ExecutableObjectIF, public H
|
|||||||
// Communication cookie. Must be set by the MPSoC Handler
|
// Communication cookie. Must be set by the MPSoC Handler
|
||||||
CookieIF* comCookie = nullptr;
|
CookieIF* comCookie = nullptr;
|
||||||
// Sequence count, must be set by Ploc MPSoC Handler
|
// Sequence count, must be set by Ploc MPSoC Handler
|
||||||
SourceSequenceCounter* sequenceCount;
|
SourceSequenceCounter* sequenceCount = nullptr;
|
||||||
|
|
||||||
ReturnValue_t resetHelper();
|
ReturnValue_t resetHelper();
|
||||||
ReturnValue_t performFlashWrite();
|
ReturnValue_t performFlashWrite();
|
||||||
ReturnValue_t flashfopen();
|
ReturnValue_t flashfopen();
|
||||||
ReturnValue_t flashfclose();
|
ReturnValue_t flashfclose();
|
||||||
ReturnValue_t handlePacketTransmission(mpsoc::TcBase& tc);
|
ReturnValue_t handlePacketTransmission(ploc::SpTcBase& tc);
|
||||||
ReturnValue_t sendCommand(mpsoc::TcBase& tc);
|
ReturnValue_t sendCommand(ploc::SpTcBase& tc);
|
||||||
ReturnValue_t receive(uint8_t* data, size_t* readBytes, size_t requestBytes);
|
ReturnValue_t receive(uint8_t* data, size_t* readBytes, size_t requestBytes);
|
||||||
ReturnValue_t handleAck();
|
ReturnValue_t handleAck();
|
||||||
ReturnValue_t handleExe();
|
ReturnValue_t handleExe();
|
||||||
void handleAckApidFailure(uint16_t apid);
|
void handleAckApidFailure(uint16_t apid);
|
||||||
void handleExeApidFailure(uint16_t apid);
|
void handleExeApidFailure(uint16_t apid);
|
||||||
ReturnValue_t handleTmReception(mpsoc::TmPacket* tmPacket, size_t remainingBytes);
|
ReturnValue_t handleTmReception(size_t remainingBytes);
|
||||||
|
ReturnValue_t checkReceivedTm(ploc::SpTmReader& reader);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* BSP_Q7S_DEVICES_PLOCMPSOCHELPER_H_ */
|
#endif /* BSP_Q7S_DEVICES_PLOCMPSOCHELPER_H_ */
|
||||||
|
@ -19,25 +19,25 @@ PlocMemoryDumper::~PlocMemoryDumper() {}
|
|||||||
|
|
||||||
ReturnValue_t PlocMemoryDumper::initialize() {
|
ReturnValue_t PlocMemoryDumper::initialize() {
|
||||||
ReturnValue_t result = SystemObject::initialize();
|
ReturnValue_t result = SystemObject::initialize();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = commandActionHelper.initialize();
|
result = commandActionHelper.initialize();
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = actionHelper.initialize(commandQueue);
|
result = actionHelper.initialize(commandQueue);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMemoryDumper::performOperation(uint8_t operationCode) {
|
ReturnValue_t PlocMemoryDumper::performOperation(uint8_t operationCode) {
|
||||||
readCommandQueue();
|
readCommandQueue();
|
||||||
doStateMachine();
|
doStateMachine();
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMemoryDumper::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
ReturnValue_t PlocMemoryDumper::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||||
@ -78,20 +78,20 @@ MessageQueueIF* PlocMemoryDumper::getCommandQueuePtr() { return commandQueue; }
|
|||||||
|
|
||||||
void PlocMemoryDumper::readCommandQueue() {
|
void PlocMemoryDumper::readCommandQueue() {
|
||||||
CommandMessage message;
|
CommandMessage message;
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
|
||||||
for (result = commandQueue->receiveMessage(&message); result == HasReturnvaluesIF::RETURN_OK;
|
for (result = commandQueue->receiveMessage(&message); result == returnvalue::OK;
|
||||||
result = commandQueue->receiveMessage(&message)) {
|
result = commandQueue->receiveMessage(&message)) {
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
result = actionHelper.handleActionMessage(&message);
|
result = actionHelper.handleActionMessage(&message);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = commandActionHelper.handleReply(&message);
|
result = commandActionHelper.handleReply(&message);
|
||||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ void PlocMemoryDumper::completionFailedReceived(ActionId_t actionId, ReturnValue
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PlocMemoryDumper::commandNextMramDump(ActionId_t dumpCommand) {
|
void PlocMemoryDumper::commandNextMramDump(ActionId_t dumpCommand) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
|
||||||
uint32_t tempStartAddress = 0;
|
uint32_t tempStartAddress = 0;
|
||||||
uint32_t tempEndAddress = 0;
|
uint32_t tempEndAddress = 0;
|
||||||
@ -181,7 +181,7 @@ void PlocMemoryDumper::commandNextMramDump(ActionId_t dumpCommand) {
|
|||||||
|
|
||||||
result =
|
result =
|
||||||
commandActionHelper.commandAction(objects::PLOC_SUPERVISOR_HANDLER, dumpCommand, ¶ms);
|
commandActionHelper.commandAction(objects::PLOC_SUPERVISOR_HANDLER, dumpCommand, ¶ms);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "PlocMemoryDumper::commandNextMramDump: Failed to send mram dump command "
|
sif::warning << "PlocMemoryDumper::commandNextMramDump: Failed to send mram dump command "
|
||||||
<< "with start address " << tempStartAddress << " and end address "
|
<< "with start address " << tempStartAddress << " and end address "
|
||||||
<< tempEndAddress << std::endl;
|
<< tempEndAddress << std::endl;
|
||||||
|
@ -11,9 +11,8 @@
|
|||||||
#include "fsfw/action/CommandsActionsIF.h"
|
#include "fsfw/action/CommandsActionsIF.h"
|
||||||
#include "fsfw/action/HasActionsIF.h"
|
#include "fsfw/action/HasActionsIF.h"
|
||||||
#include "fsfw/objectmanager/SystemObject.h"
|
#include "fsfw/objectmanager/SystemObject.h"
|
||||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
#include "fsfw/tasks/ExecutableObjectIF.h"
|
#include "fsfw/tasks/ExecutableObjectIF.h"
|
||||||
#include "fsfw/tmtcpacket/SpacePacket.h"
|
|
||||||
#include "linux/fsfwconfig/objects/systemObjectList.h"
|
#include "linux/fsfwconfig/objects/systemObjectList.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -27,7 +26,6 @@
|
|||||||
class PlocMemoryDumper : public SystemObject,
|
class PlocMemoryDumper : public SystemObject,
|
||||||
public HasActionsIF,
|
public HasActionsIF,
|
||||||
public ExecutableObjectIF,
|
public ExecutableObjectIF,
|
||||||
public HasReturnvaluesIF,
|
|
||||||
public CommandsActionsIF {
|
public CommandsActionsIF {
|
||||||
public:
|
public:
|
||||||
static const ActionId_t NONE = 0;
|
static const ActionId_t NONE = 0;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -100,6 +100,8 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
StartupState startupState = StartupState::OFF;
|
StartupState startupState = StartupState::OFF;
|
||||||
|
|
||||||
uint8_t commandBuffer[supv::MAX_COMMAND_SIZE];
|
uint8_t commandBuffer[supv::MAX_COMMAND_SIZE];
|
||||||
|
SpacePacketCreator creator;
|
||||||
|
ploc::SpTcParams spParams = ploc::SpTcParams(creator);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This variable is used to store the id of the next reply to receive. This is necessary
|
* This variable is used to store the id of the next reply to receive. This is necessary
|
||||||
@ -169,7 +171,7 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
* @param start Pointer to the first byte of the reply.
|
* @param start Pointer to the first byte of the reply.
|
||||||
* @param foundLen Pointer to the length of the whole packet.
|
* @param foundLen Pointer to the length of the whole packet.
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if CRC is ok, otherwise CRC_FAILURE.
|
* @return returnvalue::OK if CRC is ok, otherwise CRC_FAILURE.
|
||||||
*/
|
*/
|
||||||
ReturnValue_t verifyPacket(const uint8_t* start, size_t foundLen);
|
ReturnValue_t verifyPacket(const uint8_t* start, size_t foundLen);
|
||||||
|
|
||||||
@ -178,7 +180,7 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
*
|
*
|
||||||
* @param data Pointer to the data holding the acknowledgment report.
|
* @param data Pointer to the data holding the acknowledgment report.
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if successful, otherwise an error code.
|
* @return returnvalue::OK if successful, otherwise an error code.
|
||||||
*/
|
*/
|
||||||
ReturnValue_t handleAckReport(const uint8_t* data);
|
ReturnValue_t handleAckReport(const uint8_t* data);
|
||||||
|
|
||||||
@ -187,7 +189,7 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
*
|
*
|
||||||
* @param data Pointer to the received data packet.
|
* @param data Pointer to the received data packet.
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if successful, otherwise an error code.
|
* @return returnvalue::OK if successful, otherwise an error code.
|
||||||
*/
|
*/
|
||||||
ReturnValue_t handleExecutionReport(const uint8_t* data);
|
ReturnValue_t handleExecutionReport(const uint8_t* data);
|
||||||
|
|
||||||
@ -197,7 +199,7 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
*
|
*
|
||||||
* @param data Pointer to the data buffer holding the housekeeping read report.
|
* @param data Pointer to the data buffer holding the housekeeping read report.
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if successful, otherwise an error code.
|
* @return returnvalue::OK if successful, otherwise an error code.
|
||||||
*/
|
*/
|
||||||
ReturnValue_t handleHkReport(const uint8_t* data);
|
ReturnValue_t handleHkReport(const uint8_t* data);
|
||||||
|
|
||||||
@ -233,14 +235,14 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
* @brief This function prepares a space packet which does not transport any data in the
|
* @brief This function prepares a space packet which does not transport any data in the
|
||||||
* packet data field apart from the crc.
|
* packet data field apart from the crc.
|
||||||
*/
|
*/
|
||||||
void prepareEmptyCmd(uint16_t apid);
|
ReturnValue_t prepareEmptyCmd(uint16_t apid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function initializes the space packet to select the boot image of the MPSoC.
|
* @brief This function initializes the space packet to select the boot image of the MPSoC.
|
||||||
*/
|
*/
|
||||||
void prepareSelBootImageCmd(const uint8_t* commandData);
|
ReturnValue_t prepareSelBootImageCmd(const uint8_t* commandData);
|
||||||
|
|
||||||
void prepareDisableHk();
|
ReturnValue_t prepareDisableHk();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function fills the commandBuffer with the data to update the time of the
|
* @brief This function fills the commandBuffer with the data to update the time of the
|
||||||
@ -252,9 +254,9 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
* @brief This function fills the commandBuffer with the data to change the boot timeout
|
* @brief This function fills the commandBuffer with the data to change the boot timeout
|
||||||
* value in the PLOC supervisor.
|
* value in the PLOC supervisor.
|
||||||
*/
|
*/
|
||||||
void prepareSetBootTimeoutCmd(const uint8_t* commandData);
|
ReturnValue_t prepareSetBootTimeoutCmd(const uint8_t* commandData);
|
||||||
|
|
||||||
void prepareRestartTriesCmd(const uint8_t* commandData);
|
ReturnValue_t prepareRestartTriesCmd(const uint8_t* commandData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function fills the command buffer with the packet to enable or disable the
|
* @brief This function fills the command buffer with the packet to enable or disable the
|
||||||
@ -271,21 +273,21 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
ReturnValue_t prepareLatchupConfigCmd(const uint8_t* commandData,
|
ReturnValue_t prepareLatchupConfigCmd(const uint8_t* commandData,
|
||||||
DeviceCommandId_t deviceCommand);
|
DeviceCommandId_t deviceCommand);
|
||||||
ReturnValue_t prepareSetAlertLimitCmd(const uint8_t* commandData);
|
ReturnValue_t prepareSetAlertLimitCmd(const uint8_t* commandData);
|
||||||
void prepareSetAdcEnabledChannelsCmd(const uint8_t* commandData);
|
ReturnValue_t prepareSetAdcEnabledChannelsCmd(const uint8_t* commandData);
|
||||||
void prepareSetAdcWindowAndStrideCmd(const uint8_t* commandData);
|
ReturnValue_t prepareSetAdcWindowAndStrideCmd(const uint8_t* commandData);
|
||||||
void prepareSetAdcThresholdCmd(const uint8_t* commandData);
|
ReturnValue_t prepareSetAdcThresholdCmd(const uint8_t* commandData);
|
||||||
ReturnValue_t prepareRunAutoEmTest(const uint8_t* commandData);
|
ReturnValue_t prepareRunAutoEmTest(const uint8_t* commandData);
|
||||||
ReturnValue_t prepareWipeMramCmd(const uint8_t* commandData);
|
ReturnValue_t prepareWipeMramCmd(const uint8_t* commandData);
|
||||||
ReturnValue_t prepareDumpMramCmd(const uint8_t* commandData);
|
ReturnValue_t prepareDumpMramCmd(const uint8_t* commandData);
|
||||||
void prepareSetGpioCmd(const uint8_t* commandData);
|
ReturnValue_t prepareSetGpioCmd(const uint8_t* commandData);
|
||||||
void prepareReadGpioCmd(const uint8_t* commandData);
|
ReturnValue_t prepareReadGpioCmd(const uint8_t* commandData);
|
||||||
ReturnValue_t prepareLoggingRequest(const uint8_t* commandData, size_t commandDataLen);
|
ReturnValue_t prepareLoggingRequest(const uint8_t* commandData, size_t commandDataLen);
|
||||||
ReturnValue_t prepareEnableNvmsCommand(const uint8_t* commandData);
|
ReturnValue_t prepareEnableNvmsCommand(const uint8_t* commandData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Copies the content of a space packet to the command buffer.
|
* @brief Copies the content of a space packet to the command buffer.
|
||||||
*/
|
*/
|
||||||
void packetToOutBuffer(uint8_t* packetData, size_t fullSize);
|
void finishTcPrep(size_t packetLen);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief In case an acknowledgment failure reply has been received this function disables
|
* @brief In case an acknowledgment failure reply has been received this function disables
|
||||||
@ -363,13 +365,15 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
ReturnValue_t createMramDumpFile();
|
ReturnValue_t createMramDumpFile();
|
||||||
ReturnValue_t getTimeStampString(std::string& timeStamp);
|
ReturnValue_t getTimeStampString(std::string& timeStamp);
|
||||||
|
|
||||||
void prepareSetShutdownTimeoutCmd(const uint8_t* commandData);
|
ReturnValue_t prepareSetShutdownTimeoutCmd(const uint8_t* commandData);
|
||||||
|
|
||||||
ReturnValue_t extractUpdateCommand(const uint8_t* commandData, size_t size, std::string* file,
|
ReturnValue_t extractUpdateCommand(const uint8_t* commandData, size_t size,
|
||||||
uint8_t* memoryId, uint32_t* startAddress);
|
supv::UpdateParams& params);
|
||||||
|
ReturnValue_t extractBaseParams(const uint8_t** commandData, size_t& remSize,
|
||||||
|
supv::UpdateParams& params);
|
||||||
ReturnValue_t eventSubscription();
|
ReturnValue_t eventSubscription();
|
||||||
|
|
||||||
void handleExecutionSuccessReport(const uint8_t* data);
|
ReturnValue_t handleExecutionSuccessReport(const uint8_t* data);
|
||||||
void handleExecutionFailureReport(uint16_t statusCode);
|
void handleExecutionFailureReport(uint16_t statusCode);
|
||||||
|
|
||||||
void printAckFailureInfo(uint16_t statusCode, DeviceCommandId_t commandId);
|
void printAckFailureInfo(uint16_t statusCode, DeviceCommandId_t commandId);
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#include "PlocSupvHelper.h"
|
#include "PlocSupvHelper.h"
|
||||||
|
|
||||||
|
#include <etl/crc16_ccitt.h>
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
@ -9,14 +12,16 @@
|
|||||||
#include "bsp_q7s/memory/SdCardManager.h"
|
#include "bsp_q7s/memory/SdCardManager.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "fsfw/globalfunctions/CRC.h"
|
|
||||||
#include "fsfw/tasks/TaskFactory.h"
|
#include "fsfw/tasks/TaskFactory.h"
|
||||||
#include "fsfw/timemanager/Countdown.h"
|
#include "fsfw/timemanager/Countdown.h"
|
||||||
#include "mission/utility/Filenaming.h"
|
#include "mission/utility/Filenaming.h"
|
||||||
#include "mission/utility/ProgressPrinter.h"
|
#include "mission/utility/ProgressPrinter.h"
|
||||||
#include "mission/utility/Timestamp.h"
|
#include "mission/utility/Timestamp.h"
|
||||||
|
|
||||||
PlocSupvHelper::PlocSupvHelper(object_id_t objectId) : SystemObject(objectId) {}
|
PlocSupvHelper::PlocSupvHelper(object_id_t objectId) : SystemObject(objectId) {
|
||||||
|
spParams.maxSize = sizeof(commandBuffer);
|
||||||
|
resetSpParams();
|
||||||
|
}
|
||||||
|
|
||||||
PlocSupvHelper::~PlocSupvHelper() {}
|
PlocSupvHelper::~PlocSupvHelper() {}
|
||||||
|
|
||||||
@ -25,14 +30,14 @@ ReturnValue_t PlocSupvHelper::initialize() {
|
|||||||
sdcMan = SdCardManager::instance();
|
sdcMan = SdCardManager::instance();
|
||||||
if (sdcMan == nullptr) {
|
if (sdcMan == nullptr) {
|
||||||
sif::warning << "PlocSupvHelper::initialize: Invalid SD Card Manager" << std::endl;
|
sif::warning << "PlocSupvHelper::initialize: Invalid SD Card Manager" << std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::performOperation(uint8_t operationCode) {
|
ReturnValue_t PlocSupvHelper::performOperation(uint8_t operationCode) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
semaphore.acquire();
|
semaphore.acquire();
|
||||||
while (true) {
|
while (true) {
|
||||||
switch (internalState) {
|
switch (internalState) {
|
||||||
@ -41,8 +46,8 @@ ReturnValue_t PlocSupvHelper::performOperation(uint8_t operationCode) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case InternalState::UPDATE: {
|
case InternalState::UPDATE: {
|
||||||
result = performUpdate();
|
result = executeUpdate();
|
||||||
if (result == RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
triggerEvent(SUPV_UPDATE_SUCCESSFUL, result);
|
triggerEvent(SUPV_UPDATE_SUCCESSFUL, result);
|
||||||
} else if (result == PROCESS_TERMINATED) {
|
} else if (result == PROCESS_TERMINATED) {
|
||||||
// Event already triggered
|
// Event already triggered
|
||||||
@ -52,9 +57,14 @@ ReturnValue_t PlocSupvHelper::performOperation(uint8_t operationCode) {
|
|||||||
internalState = InternalState::IDLE;
|
internalState = InternalState::IDLE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case InternalState::CHECK_MEMORY: {
|
||||||
|
executeFullCheckMemoryCommand();
|
||||||
|
internalState = InternalState::IDLE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case InternalState::CONTINUE_UPDATE: {
|
case InternalState::CONTINUE_UPDATE: {
|
||||||
result = continueUpdate();
|
result = continueUpdate();
|
||||||
if (result == RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
triggerEvent(SUPV_CONTINUE_UPDATE_SUCCESSFUL, result);
|
triggerEvent(SUPV_CONTINUE_UPDATE_SUCCESSFUL, result);
|
||||||
} else if (result == PROCESS_TERMINATED) {
|
} else if (result == PROCESS_TERMINATED) {
|
||||||
// Event already triggered
|
// Event already triggered
|
||||||
@ -66,7 +76,7 @@ ReturnValue_t PlocSupvHelper::performOperation(uint8_t operationCode) {
|
|||||||
}
|
}
|
||||||
case InternalState::REQUEST_EVENT_BUFFER: {
|
case InternalState::REQUEST_EVENT_BUFFER: {
|
||||||
result = performEventBufferRequest();
|
result = performEventBufferRequest();
|
||||||
if (result == RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
triggerEvent(SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL, result);
|
triggerEvent(SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL, result);
|
||||||
} else if (result == PROCESS_TERMINATED) {
|
} else if (result == PROCESS_TERMINATED) {
|
||||||
// Event already triggered
|
// Event already triggered
|
||||||
@ -87,26 +97,38 @@ ReturnValue_t PlocSupvHelper::performOperation(uint8_t operationCode) {
|
|||||||
ReturnValue_t PlocSupvHelper::setComIF(UartComIF* uartComIF_) {
|
ReturnValue_t PlocSupvHelper::setComIF(UartComIF* uartComIF_) {
|
||||||
if (uartComIF_ == nullptr) {
|
if (uartComIF_ == nullptr) {
|
||||||
sif::warning << "PlocSupvHelper::initialize: Provided invalid uart com if" << std::endl;
|
sif::warning << "PlocSupvHelper::initialize: Provided invalid uart com if" << std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
uartComIF = uartComIF_;
|
uartComIF = uartComIF_;
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlocSupvHelper::setComCookie(CookieIF* comCookie_) { comCookie = comCookie_; }
|
void PlocSupvHelper::setComCookie(CookieIF* comCookie_) { comCookie = comCookie_; }
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::startUpdate(std::string file, uint8_t memoryId,
|
ReturnValue_t PlocSupvHelper::startUpdate(std::string file, uint8_t memoryId,
|
||||||
uint32_t startAddress) {
|
uint32_t startAddress) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
supv::UpdateParams params;
|
||||||
|
params.file = file;
|
||||||
|
params.memId = memoryId;
|
||||||
|
params.startAddr = startAddress;
|
||||||
|
params.bytesWritten = 0;
|
||||||
|
params.seqCount = 1;
|
||||||
|
params.deleteMemory = true;
|
||||||
|
return performUpdate(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PlocSupvHelper::performUpdate(const supv::UpdateParams& params) {
|
||||||
|
ReturnValue_t result = returnvalue::OK;
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
result = FilesystemHelper::checkPath(file);
|
result = FilesystemHelper::checkPath(params.file);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "PlocSupvHelper::startUpdate: File " << file << " does not exist" << std::endl;
|
sif::warning << "PlocSupvHelper::startUpdate: File " << params.file << " does not exist"
|
||||||
|
<< std::endl;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = FilesystemHelper::fileExists(file);
|
result = FilesystemHelper::fileExists(params.file);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "PlocSupvHelper::startUpdate: The file " << file << " does not exist"
|
sif::warning << "PlocSupvHelper::startUpdate: The file " << params.file << " does not exist"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -115,23 +137,50 @@ ReturnValue_t PlocSupvHelper::startUpdate(std::string file, uint8_t memoryId,
|
|||||||
if (not std::filesystem::exists(file)) {
|
if (not std::filesystem::exists(file)) {
|
||||||
sif::warning << "PlocSupvHelper::startUpdate: The file " << file << " does not exist"
|
sif::warning << "PlocSupvHelper::startUpdate: The file " << file << " does not exist"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
update.file = file;
|
update.file = params.file;
|
||||||
update.length = getFileSize(update.file);
|
update.fullFileSize = getFileSize(update.file);
|
||||||
update.memoryId = memoryId;
|
if (params.bytesWritten > update.fullFileSize) {
|
||||||
update.startAddress = startAddress;
|
sif::warning << "Invalid start bytes counter " << params.bytesWritten
|
||||||
update.remainingSize = update.length;
|
<< ", smaller than full file length" << update.fullFileSize << std::endl;
|
||||||
update.bytesWritten = 0;
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
|
update.length = update.fullFileSize - params.bytesWritten;
|
||||||
|
update.memoryId = params.memId;
|
||||||
|
update.startAddress = params.startAddr;
|
||||||
|
update.progressPercent = 0;
|
||||||
|
update.bytesWritten = params.bytesWritten;
|
||||||
|
update.crcShouldBeChecked = true;
|
||||||
update.packetNum = 1;
|
update.packetNum = 1;
|
||||||
update.sequenceCount = 1;
|
update.deleteMemory = params.deleteMemory;
|
||||||
|
update.sequenceCount = params.seqCount;
|
||||||
internalState = InternalState::UPDATE;
|
internalState = InternalState::UPDATE;
|
||||||
uartComIF->flushUartTxAndRxBuf(comCookie);
|
uartComIF->flushUartTxAndRxBuf(comCookie);
|
||||||
semaphore.release();
|
semaphore.release();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PlocSupvHelper::performMemCheck(std::string file, uint8_t memoryId,
|
||||||
|
uint32_t startAddress) {
|
||||||
|
update.file = file;
|
||||||
|
update.fullFileSize = getFileSize(file);
|
||||||
|
return performMemCheck(memoryId, startAddress, getFileSize(update.file), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PlocSupvHelper::performMemCheck(uint8_t memoryId, uint32_t startAddress,
|
||||||
|
size_t sizeToCheck, bool checkCrc) {
|
||||||
|
update.memoryId = memoryId;
|
||||||
|
update.startAddress = startAddress;
|
||||||
|
update.length = sizeToCheck;
|
||||||
|
update.crcShouldBeChecked = checkCrc;
|
||||||
|
internalState = InternalState::CHECK_MEMORY;
|
||||||
|
uartComIF->flushUartTxAndRxBuf(comCookie);
|
||||||
|
semaphore.release();
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
void PlocSupvHelper::initiateUpdateContinuation() {
|
void PlocSupvHelper::initiateUpdateContinuation() {
|
||||||
internalState = InternalState::CONTINUE_UPDATE;
|
internalState = InternalState::CONTINUE_UPDATE;
|
||||||
semaphore.release();
|
semaphore.release();
|
||||||
@ -140,7 +189,7 @@ void PlocSupvHelper::initiateUpdateContinuation() {
|
|||||||
ReturnValue_t PlocSupvHelper::startEventbBufferRequest(std::string path) {
|
ReturnValue_t PlocSupvHelper::startEventbBufferRequest(std::string path) {
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
ReturnValue_t result = FilesystemHelper::checkPath(path);
|
ReturnValue_t result = FilesystemHelper::checkPath(path);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -151,79 +200,113 @@ ReturnValue_t PlocSupvHelper::startEventbBufferRequest(std::string path) {
|
|||||||
internalState = InternalState::REQUEST_EVENT_BUFFER;
|
internalState = InternalState::REQUEST_EVENT_BUFFER;
|
||||||
uartComIF->flushUartTxAndRxBuf(comCookie);
|
uartComIF->flushUartTxAndRxBuf(comCookie);
|
||||||
semaphore.release();
|
semaphore.release();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlocSupvHelper::stopProcess() { terminate = true; }
|
void PlocSupvHelper::stopProcess() { terminate = true; }
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::performUpdate() {
|
void PlocSupvHelper::executeFullCheckMemoryCommand() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result;
|
||||||
|
if (update.crcShouldBeChecked) {
|
||||||
|
sif::info << "PLOC SUPV Mem Check: Calculating Image CRC" << std::endl;
|
||||||
result = calcImageCrc();
|
result = calcImageCrc();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
triggerEvent(SUPV_MEM_CHECK_FAIL, result);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
sif::info << "PLOC SUPV Mem Check: Selecting Memory" << std::endl;
|
||||||
result = selectMemory();
|
result = selectMemory();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
triggerEvent(SUPV_MEM_CHECK_FAIL, result);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
sif::info << "PLOC SUPV Mem Check: Preparing Update" << std::endl;
|
||||||
result = prepareUpdate();
|
result = prepareUpdate();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
triggerEvent(SUPV_MEM_CHECK_FAIL, result);
|
||||||
}
|
return;
|
||||||
result = eraseMemory();
|
|
||||||
if (result != RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = writeUpdatePackets();
|
|
||||||
if (result != RETURN_OK) {
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
sif::info << "PLOC SUPV Mem Check: Memory Check" << std::endl;
|
||||||
result = handleCheckMemoryCommand();
|
result = handleCheckMemoryCommand();
|
||||||
if (result != RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
|
triggerEvent(SUPV_MEM_CHECK_OK, result);
|
||||||
|
} else {
|
||||||
|
triggerEvent(SUPV_MEM_CHECK_FAIL, result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PlocSupvHelper::executeUpdate() {
|
||||||
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
sif::info << "PLOC SUPV Update MPSoC: Calculating Image CRC" << std::endl;
|
||||||
|
result = calcImageCrc();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
sif::info << "PLOC SUPV Update MPSoC: Selecting Memory" << std::endl;
|
||||||
|
result = selectMemory();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
|
}
|
||||||
|
sif::info << "PLOC SUPV Update MPSoC: Preparing Update" << std::endl;
|
||||||
|
result = prepareUpdate();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
if (update.deleteMemory) {
|
||||||
|
sif::info << "PLOC SUPV Update MPSoC: Erasing Memory" << std::endl;
|
||||||
|
result = eraseMemory();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return updateOperation();
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::continueUpdate() {
|
ReturnValue_t PlocSupvHelper::continueUpdate() {
|
||||||
ReturnValue_t result = prepareUpdate();
|
ReturnValue_t result = prepareUpdate();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = writeUpdatePackets();
|
return updateOperation();
|
||||||
if (result != RETURN_OK) {
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PlocSupvHelper::updateOperation() {
|
||||||
|
sif::info << "PlocSupvHelper::performUpdate: Writing Update Packets" << std::endl;
|
||||||
|
auto result = writeUpdatePackets();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = handleCheckMemoryCommand();
|
sif::info << "PlocSupvHelper::performUpdate: Memory Check" << std::endl;
|
||||||
if (result != RETURN_OK) {
|
return handleCheckMemoryCommand();
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::writeUpdatePackets() {
|
ReturnValue_t PlocSupvHelper::writeUpdatePackets() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
||||||
ProgressPrinter progressPrinter("Supervisor update", update.length,
|
ProgressPrinter progressPrinter("Supervisor update", update.fullFileSize,
|
||||||
ProgressPrinter::HALF_PERCENT);
|
ProgressPrinter::HALF_PERCENT);
|
||||||
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
||||||
uint8_t tempData[supv::WriteMemory::CHUNK_MAX];
|
uint8_t tempData[supv::WriteMemory::CHUNK_MAX + 1]{};
|
||||||
std::ifstream file(update.file, std::ifstream::binary);
|
std::ifstream file(update.file, std::ifstream::binary);
|
||||||
uint16_t dataLength = 0;
|
uint16_t dataLength = 0;
|
||||||
supv::SequenceFlags seqFlags;
|
ccsds::SequenceFlags seqFlags;
|
||||||
while (update.remainingSize > 0) {
|
while (update.bytesWritten < update.fullFileSize) {
|
||||||
if (terminate) {
|
if (terminate) {
|
||||||
terminate = false;
|
terminate = false;
|
||||||
triggerEvent(TERMINATED_UPDATE_PROCEDURE);
|
triggerEvent(TERMINATED_UPDATE_PROCEDURE);
|
||||||
return PROCESS_TERMINATED;
|
return PROCESS_TERMINATED;
|
||||||
}
|
}
|
||||||
if (update.remainingSize > supv::WriteMemory::CHUNK_MAX) {
|
size_t remainingSize = update.fullFileSize - update.bytesWritten;
|
||||||
|
bool lastSegment = false;
|
||||||
|
if (remainingSize > supv::WriteMemory::CHUNK_MAX) {
|
||||||
dataLength = supv::WriteMemory::CHUNK_MAX;
|
dataLength = supv::WriteMemory::CHUNK_MAX;
|
||||||
} else {
|
} else {
|
||||||
dataLength = static_cast<uint16_t>(update.remainingSize);
|
lastSegment = true;
|
||||||
|
dataLength = static_cast<uint16_t>(remainingSize);
|
||||||
}
|
}
|
||||||
if (file.is_open()) {
|
if (file.is_open()) {
|
||||||
file.seekg(update.bytesWritten, file.beg);
|
file.seekg(update.bytesWritten, std::ios::beg);
|
||||||
file.read(reinterpret_cast<char*>(tempData), dataLength);
|
file.read(reinterpret_cast<char*>(tempData), dataLength);
|
||||||
if (!file) {
|
if (!file) {
|
||||||
sif::warning << "PlocSupvHelper::performUpdate: Read only " << file.gcount() << " of "
|
sif::warning << "PlocSupvHelper::performUpdate: Read only " << file.gcount() << " of "
|
||||||
@ -235,23 +318,41 @@ ReturnValue_t PlocSupvHelper::writeUpdatePackets() {
|
|||||||
return FILE_CLOSED_ACCIDENTALLY;
|
return FILE_CLOSED_ACCIDENTALLY;
|
||||||
}
|
}
|
||||||
if (update.bytesWritten == 0) {
|
if (update.bytesWritten == 0) {
|
||||||
seqFlags = supv::SequenceFlags::FIRST_PKT;
|
seqFlags = ccsds::SequenceFlags::FIRST_SEGMENT;
|
||||||
} else if (update.remainingSize == 0) {
|
} else if (lastSegment) {
|
||||||
seqFlags = supv::SequenceFlags::LAST_PKT;
|
seqFlags = ccsds::SequenceFlags::LAST_SEGMENT;
|
||||||
} else {
|
} else {
|
||||||
seqFlags = supv::SequenceFlags::CONTINUED_PKT;
|
seqFlags = ccsds::SequenceFlags::CONTINUATION;
|
||||||
}
|
}
|
||||||
supv::WriteMemory packet(seqFlags, update.sequenceCount++, update.memoryId,
|
resetSpParams();
|
||||||
|
float progress = static_cast<float>(update.bytesWritten) / update.fullFileSize;
|
||||||
|
uint8_t progPercent = std::floor(progress * 100);
|
||||||
|
if (progPercent > update.progressPercent) {
|
||||||
|
update.progressPercent = progPercent;
|
||||||
|
if (progPercent % 5 == 0) {
|
||||||
|
// Useful to allow restarting the update
|
||||||
|
triggerEvent(SUPV_UPDATE_PROGRESS, buildProgParams1(progPercent, update.sequenceCount),
|
||||||
|
update.bytesWritten);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
supv::WriteMemory packet(spParams);
|
||||||
|
result = packet.buildPacket(seqFlags, update.sequenceCount, update.memoryId,
|
||||||
update.startAddress + update.bytesWritten, dataLength, tempData);
|
update.startAddress + update.bytesWritten, dataLength, tempData);
|
||||||
result = handlePacketTransmission(packet);
|
if (result != returnvalue::OK) {
|
||||||
if (result != RETURN_OK) {
|
triggerEvent(WRITE_MEMORY_FAILED, buildProgParams1(progPercent, update.sequenceCount),
|
||||||
update.sequenceCount--;
|
update.bytesWritten);
|
||||||
triggerEvent(WRITE_MEMORY_FAILED, update.packetNum);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
update.remainingSize -= dataLength;
|
result = handlePacketTransmission(packet);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
triggerEvent(WRITE_MEMORY_FAILED, buildProgParams1(progPercent, update.sequenceCount),
|
||||||
|
update.bytesWritten);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
update.sequenceCount++;
|
||||||
update.packetNum += 1;
|
update.packetNum += 1;
|
||||||
update.bytesWritten += dataLength;
|
update.bytesWritten += dataLength;
|
||||||
|
|
||||||
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
||||||
progressPrinter.print(update.bytesWritten);
|
progressPrinter.print(update.bytesWritten);
|
||||||
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
||||||
@ -259,82 +360,132 @@ ReturnValue_t PlocSupvHelper::writeUpdatePackets() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t PlocSupvHelper::buildProgParams1(uint8_t percent, uint16_t seqCount) {
|
||||||
|
return (static_cast<uint32_t>(percent) << 24) | static_cast<uint32_t>(seqCount);
|
||||||
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::performEventBufferRequest() {
|
ReturnValue_t PlocSupvHelper::performEventBufferRequest() {
|
||||||
using namespace supv;
|
using namespace supv;
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
RequestLoggingData packet(RequestLoggingData::Sa::REQUEST_EVENT_BUFFERS);
|
resetSpParams();
|
||||||
|
RequestLoggingData packet(spParams);
|
||||||
|
result = packet.buildPacket(RequestLoggingData::Sa::REQUEST_EVENT_BUFFERS);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
result = sendCommand(packet);
|
result = sendCommand(packet);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = handleAck();
|
result = handleAck();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = handleEventBufferReception();
|
result =
|
||||||
if (result != RETURN_OK) {
|
handleTmReception(ccsds::HEADER_LEN, tmBuf.data(), supv::recv_timeout::UPDATE_STATUS_REPORT);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
ploc::SpTmReader spReader(tmBuf.data(), tmBuf.size());
|
||||||
|
bool exeAlreadyReceived = false;
|
||||||
|
if (spReader.getApid() == supv::APID_EXE_FAILURE) {
|
||||||
|
exeAlreadyReceived = true;
|
||||||
|
result = handleRemainingExeReport(spReader);
|
||||||
|
} else if (spReader.getApid() == supv::APID_MRAM_DUMP_TM) {
|
||||||
|
result = handleEventBufferReception(spReader);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (not exeAlreadyReceived) {
|
||||||
result = handleExe();
|
result = handleExe();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PlocSupvHelper::handleRemainingExeReport(ploc::SpTmReader& reader) {
|
||||||
|
size_t remBytes = reader.getPacketDataLen() + 1;
|
||||||
|
ReturnValue_t result = handleTmReception(remBytes, tmBuf.data() + ccsds::HEADER_LEN);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::warning << "Reading exe failure report failed" << std::endl;
|
||||||
|
}
|
||||||
|
result = exeReportHandling();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::warning << "Handling exe report failed" << std::endl;
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::selectMemory() {
|
ReturnValue_t PlocSupvHelper::selectMemory() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
supv::MPSoCBootSelect packet(update.memoryId);
|
resetSpParams();
|
||||||
result = handlePacketTransmission(packet);
|
supv::MPSoCBootSelect packet(spParams);
|
||||||
if (result != RETURN_OK) {
|
result = packet.buildPacket(update.memoryId);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
result = handlePacketTransmission(packet);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::prepareUpdate() {
|
ReturnValue_t PlocSupvHelper::prepareUpdate() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
supv::ApidOnlyPacket packet(supv::APID_PREPARE_UPDATE);
|
resetSpParams();
|
||||||
result = handlePacketTransmission(packet, PREPARE_UPDATE_EXECUTION_REPORT);
|
supv::ApidOnlyPacket packet(spParams, supv::APID_PREPARE_UPDATE);
|
||||||
if (result != RETURN_OK) {
|
result = packet.buildPacket();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
result = handlePacketTransmission(packet, PREPARE_UPDATE_EXECUTION_REPORT);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::eraseMemory() {
|
ReturnValue_t PlocSupvHelper::eraseMemory() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
supv::EraseMemory eraseMemory(update.memoryId, update.startAddress, update.length);
|
resetSpParams();
|
||||||
result = handlePacketTransmission(eraseMemory, supv::recv_timeout::ERASE_MEMORY);
|
supv::EraseMemory eraseMemory(spParams);
|
||||||
if (result != RETURN_OK) {
|
result = eraseMemory.buildPacket(update.memoryId, update.startAddress + update.bytesWritten,
|
||||||
|
update.length);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
result = handlePacketTransmission(eraseMemory, supv::recv_timeout::ERASE_MEMORY);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::handlePacketTransmission(SpacePacket& packet,
|
ReturnValue_t PlocSupvHelper::handlePacketTransmission(ploc::SpTcBase& packet,
|
||||||
uint32_t timeoutExecutionReport) {
|
uint32_t timeoutExecutionReport) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
result = sendCommand(packet);
|
result = sendCommand(packet);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = handleAck();
|
result = handleAck();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = handleExe(timeoutExecutionReport);
|
result = handleExe(timeoutExecutionReport);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::sendCommand(SpacePacket& packet) {
|
ReturnValue_t PlocSupvHelper::sendCommand(ploc::SpTcBase& packet) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
rememberApid = packet.getAPID();
|
rememberApid = packet.getApid();
|
||||||
result = uartComIF->sendMessage(comCookie, packet.getWholeData(), packet.getFullSize());
|
result = uartComIF->sendMessage(comCookie, packet.getFullPacket(), packet.getFullPacketLen());
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "PlocSupvHelper::sendCommand: Failed to send command" << std::endl;
|
sif::warning << "PlocSupvHelper::sendCommand: Failed to send command" << std::endl;
|
||||||
triggerEvent(SUPV_SENDING_COMMAND_FAILED, result, static_cast<uint32_t>(internalState));
|
triggerEvent(SUPV_SENDING_COMMAND_FAILED, result, static_cast<uint32_t>(internalState));
|
||||||
return result;
|
return result;
|
||||||
@ -343,17 +494,22 @@ ReturnValue_t PlocSupvHelper::sendCommand(SpacePacket& packet) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::handleAck() {
|
ReturnValue_t PlocSupvHelper::handleAck() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
supv::AcknowledgmentReport ackReport;
|
|
||||||
result = handleTmReception(&ackReport, supv::SIZE_ACK_REPORT);
|
result = handleTmReception(supv::SIZE_ACK_REPORT);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
triggerEvent(ACK_RECEPTION_FAILURE, result, static_cast<uint32_t>(rememberApid));
|
triggerEvent(ACK_RECEPTION_FAILURE, result, static_cast<uint32_t>(rememberApid));
|
||||||
sif::warning << "PlocSupvHelper::handleAck: Error in reception of acknowledgment report"
|
sif::warning << "PlocSupvHelper::handleAck: Error in reception of acknowledgment report"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
supv::AcknowledgmentReport ackReport(tmBuf.data(), tmBuf.size());
|
||||||
|
result = checkReceivedTm(ackReport);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
result = ackReport.checkApid();
|
result = ackReport.checkApid();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (result == SupvReturnValuesIF::RECEIVED_ACK_FAILURE) {
|
if (result == SupvReturnValuesIF::RECEIVED_ACK_FAILURE) {
|
||||||
triggerEvent(SUPV_ACK_FAILURE_REPORT, static_cast<uint32_t>(ackReport.getRefApid()));
|
triggerEvent(SUPV_ACK_FAILURE_REPORT, static_cast<uint32_t>(ackReport.getRefApid()));
|
||||||
} else if (result == SupvReturnValuesIF::INVALID_APID) {
|
} else if (result == SupvReturnValuesIF::INVALID_APID) {
|
||||||
@ -361,21 +517,32 @@ ReturnValue_t PlocSupvHelper::handleAck() {
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::handleExe(uint32_t timeout) {
|
ReturnValue_t PlocSupvHelper::handleExe(uint32_t timeout) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
supv::ExecutionReport exeReport;
|
|
||||||
result = handleTmReception(&exeReport, supv::SIZE_EXE_REPORT, timeout);
|
result = handleTmReception(supv::SIZE_EXE_REPORT, tmBuf.data(), timeout);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
triggerEvent(EXE_RECEPTION_FAILURE, result, static_cast<uint32_t>(rememberApid));
|
triggerEvent(EXE_RECEPTION_FAILURE, result, static_cast<uint32_t>(rememberApid));
|
||||||
sif::warning << "PlocSupvHelper::handleExe: Error in reception of execution report"
|
sif::warning << "PlocSupvHelper::handleExe: Error in reception of execution report"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return exeReportHandling();
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PlocSupvHelper::exeReportHandling() {
|
||||||
|
supv::ExecutionReport exeReport(tmBuf.data(), tmBuf.size());
|
||||||
|
|
||||||
|
ReturnValue_t result = checkReceivedTm(exeReport);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
result = exeReport.checkApid();
|
result = exeReport.checkApid();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (result == SupvReturnValuesIF::RECEIVED_EXE_FAILURE) {
|
if (result == SupvReturnValuesIF::RECEIVED_EXE_FAILURE) {
|
||||||
triggerEvent(SUPV_EXE_FAILURE_REPORT, static_cast<uint32_t>(exeReport.getRefApid()));
|
triggerEvent(SUPV_EXE_FAILURE_REPORT, static_cast<uint32_t>(exeReport.getRefApid()));
|
||||||
} else if (result == SupvReturnValuesIF::INVALID_APID) {
|
} else if (result == SupvReturnValuesIF::INVALID_APID) {
|
||||||
@ -383,18 +550,21 @@ ReturnValue_t PlocSupvHelper::handleExe(uint32_t timeout) {
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::handleTmReception(supv::TmPacket* tmPacket, size_t remainingBytes,
|
ReturnValue_t PlocSupvHelper::handleTmReception(size_t remainingBytes, uint8_t* readBuf,
|
||||||
uint32_t timeout) {
|
uint32_t timeout) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
size_t readBytes = 0;
|
size_t readBytes = 0;
|
||||||
size_t currentBytes = 0;
|
size_t currentBytes = 0;
|
||||||
Countdown countdown(timeout);
|
Countdown countdown(timeout);
|
||||||
|
if (readBuf == nullptr) {
|
||||||
|
readBuf = tmBuf.data();
|
||||||
|
}
|
||||||
while (!countdown.hasTimedOut()) {
|
while (!countdown.hasTimedOut()) {
|
||||||
result = receive(tmPacket->getWholeData() + readBytes, ¤tBytes, remainingBytes);
|
result = receive(readBuf + readBytes, ¤tBytes, remainingBytes);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
readBytes += currentBytes;
|
readBytes += currentBytes;
|
||||||
@ -405,32 +575,41 @@ ReturnValue_t PlocSupvHelper::handleTmReception(supv::TmPacket* tmPacket, size_t
|
|||||||
}
|
}
|
||||||
if (remainingBytes != 0) {
|
if (remainingBytes != 0) {
|
||||||
sif::warning << "PlocSupvHelper::handleTmReception: Failed to read " << std::dec
|
sif::warning << "PlocSupvHelper::handleTmReception: Failed to read " << std::dec
|
||||||
<< remainingBytes << " bytes" << std::endl;
|
<< remainingBytes << " remaining bytes" << std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
result = tmPacket->checkCrc();
|
return result;
|
||||||
if (result != RETURN_OK) {
|
}
|
||||||
sif::warning << "PlocSupvHelper::handleTmReception: CRC check failed" << std::endl;
|
|
||||||
|
ReturnValue_t PlocSupvHelper::checkReceivedTm(ploc::SpTmReader& reader) {
|
||||||
|
ReturnValue_t result = reader.checkSize();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
triggerEvent(SUPV_REPLY_SIZE_MISSMATCH, rememberApid);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
result = reader.checkCrc();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
triggerEvent(SUPV_REPLY_CRC_MISSMATCH, rememberApid);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::receive(uint8_t* data, size_t* readBytes, size_t requestBytes) {
|
ReturnValue_t PlocSupvHelper::receive(uint8_t* data, size_t* readBytes, size_t requestBytes) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
uint8_t* buffer = nullptr;
|
uint8_t* buffer = nullptr;
|
||||||
result = uartComIF->requestReceiveMessage(comCookie, requestBytes);
|
result = uartComIF->requestReceiveMessage(comCookie, requestBytes);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "PlocSupvHelper::receive: Failed to request reply" << std::endl;
|
sif::warning << "PlocSupvHelper::receive: Failed to request reply" << std::endl;
|
||||||
triggerEvent(SUPV_HELPER_REQUESTING_REPLY_FAILED, result,
|
triggerEvent(SUPV_HELPER_REQUESTING_REPLY_FAILED, result,
|
||||||
static_cast<uint32_t>(static_cast<uint32_t>(internalState)));
|
static_cast<uint32_t>(static_cast<uint32_t>(internalState)));
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
result = uartComIF->readReceivedMessage(comCookie, &buffer, readBytes);
|
result = uartComIF->readReceivedMessage(comCookie, &buffer, readBytes);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "PlocSupvHelper::receive: Failed to read received message" << std::endl;
|
sif::warning << "PlocSupvHelper::receive: Failed to read received message" << std::endl;
|
||||||
triggerEvent(SUPV_HELPER_READING_REPLY_FAILED, result, static_cast<uint32_t>(internalState));
|
triggerEvent(SUPV_HELPER_READING_REPLY_FAILED, result, static_cast<uint32_t>(internalState));
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
if (*readBytes > 0) {
|
if (*readBytes > 0) {
|
||||||
std::memcpy(data, buffer, *readBytes);
|
std::memcpy(data, buffer, *readBytes);
|
||||||
@ -441,76 +620,121 @@ ReturnValue_t PlocSupvHelper::receive(uint8_t* data, size_t* readBytes, size_t r
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::calcImageCrc() {
|
ReturnValue_t PlocSupvHelper::calcImageCrc() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
if (update.fullFileSize == 0) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
result = FilesystemHelper::checkPath(update.file);
|
result = FilesystemHelper::checkPath(update.file);
|
||||||
#endif
|
if (result != returnvalue::OK) {
|
||||||
if (result != RETURN_OK) {
|
|
||||||
sif::warning << "PlocSupvHelper::calcImageCrc: File " << update.file << " does not exist"
|
sif::warning << "PlocSupvHelper::calcImageCrc: File " << update.file << " does not exist"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
auto crc16Calcer = etl::crc16_ccitt();
|
||||||
std::ifstream file(update.file, std::ifstream::binary);
|
std::ifstream file(update.file, std::ifstream::binary);
|
||||||
uint16_t remainder = CRC16_INIT;
|
std::array<uint8_t, 1025> crcBuf{};
|
||||||
uint8_t input;
|
|
||||||
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
||||||
ProgressPrinter progress("Supervisor update crc calculation", update.length,
|
ProgressPrinter progress("Supervisor update crc calculation", update.fullFileSize,
|
||||||
ProgressPrinter::ONE_PERCENT);
|
ProgressPrinter::ONE_PERCENT);
|
||||||
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
||||||
uint32_t byteCount = 0;
|
uint32_t byteCount = 0;
|
||||||
for (byteCount = 0; byteCount < update.length; byteCount++) {
|
size_t bytesToRead = 1024;
|
||||||
|
while (byteCount < update.fullFileSize) {
|
||||||
|
size_t remLen = update.fullFileSize - byteCount;
|
||||||
|
if (remLen < 1024) {
|
||||||
|
bytesToRead = remLen;
|
||||||
|
} else {
|
||||||
|
bytesToRead = 1024;
|
||||||
|
}
|
||||||
file.seekg(byteCount, file.beg);
|
file.seekg(byteCount, file.beg);
|
||||||
file.read(reinterpret_cast<char*>(&input), 1);
|
file.read(reinterpret_cast<char*>(crcBuf.data()), bytesToRead);
|
||||||
remainder = CRC::crc16ccitt(&input, sizeof(input), remainder);
|
crc16Calcer.add(crcBuf.begin(), crcBuf.begin() + bytesToRead);
|
||||||
|
|
||||||
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
||||||
progress.print(byteCount);
|
progress.print(byteCount);
|
||||||
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
||||||
|
byteCount += bytesToRead;
|
||||||
}
|
}
|
||||||
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
||||||
progress.print(byteCount);
|
progress.print(byteCount);
|
||||||
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
||||||
file.close();
|
update.crc = crc16Calcer.value();
|
||||||
update.crc = remainder;
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::handleCheckMemoryCommand() {
|
ReturnValue_t PlocSupvHelper::handleCheckMemoryCommand() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
resetSpParams();
|
||||||
|
// Will hold status report for later processing
|
||||||
|
std::array<uint8_t, 32> statusReportBuf{};
|
||||||
|
supv::UpdateStatusReport updateStatusReport(tmBuf.data(), tmBuf.size());
|
||||||
// Verification of update write procedure
|
// Verification of update write procedure
|
||||||
supv::CheckMemory packet(update.memoryId, update.startAddress, update.length);
|
supv::CheckMemory packet(spParams);
|
||||||
|
result = packet.buildPacket(update.memoryId, update.startAddress, update.fullFileSize);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
result = sendCommand(packet);
|
result = sendCommand(packet);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = handleAck();
|
result = handleAck();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
supv::UpdateStatusReport updateStatusReport;
|
|
||||||
result = handleTmReception(&updateStatusReport,
|
bool exeAlreadyHandled = false;
|
||||||
static_cast<size_t>(updateStatusReport.getNominalSize()),
|
uint32_t timeout = std::max(CRC_EXECUTION_TIMEOUT, supv::recv_timeout::UPDATE_STATUS_REPORT);
|
||||||
|
result = handleTmReception(ccsds::HEADER_LEN, tmBuf.data(), timeout);
|
||||||
|
ploc::SpTmReader spReader(tmBuf.data(), tmBuf.size());
|
||||||
|
if (spReader.getApid() == supv::APID_EXE_FAILURE) {
|
||||||
|
exeAlreadyHandled = true;
|
||||||
|
result = handleRemainingExeReport(spReader);
|
||||||
|
} else if (spReader.getApid() == supv::APID_UPDATE_STATUS_REPORT) {
|
||||||
|
size_t remBytes = spReader.getPacketDataLen() + 1;
|
||||||
|
result = handleTmReception(remBytes, tmBuf.data() + ccsds::HEADER_LEN,
|
||||||
supv::recv_timeout::UPDATE_STATUS_REPORT);
|
supv::recv_timeout::UPDATE_STATUS_REPORT);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning
|
sif::warning
|
||||||
<< "PlocSupvHelper::handleCheckMemoryCommand: Failed to receive update status report"
|
<< "PlocSupvHelper::handleCheckMemoryCommand: Failed to receive update status report"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
result = updateStatusReport.checkCrc();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
sif::warning << "PlocSupvHelper::handleCheckMemoryCommand: CRC check failed" << std::endl;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
// Copy into other buffer because data will be overwritten when reading execution report
|
||||||
|
std::memcpy(statusReportBuf.data(), tmBuf.data(), updateStatusReport.getNominalSize());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (not exeAlreadyHandled) {
|
||||||
result = handleExe(CRC_EXECUTION_TIMEOUT);
|
result = handleExe(CRC_EXECUTION_TIMEOUT);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now process the status report
|
||||||
|
updateStatusReport.setData(statusReportBuf.data(), statusReportBuf.size());
|
||||||
result = updateStatusReport.parseDataField();
|
result = updateStatusReport.parseDataField();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
if (update.crcShouldBeChecked) {
|
||||||
result = updateStatusReport.verifycrc(update.crc);
|
result = updateStatusReport.verifycrc(update.crc);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "PlocSupvHelper::handleCheckMemoryCommand: CRC failure. Expected CRC 0x"
|
sif::warning << "PlocSupvHelper::handleCheckMemoryCommand: CRC failure. Expected CRC 0x"
|
||||||
<< std::hex << update.crc << " but received CRC 0x" << updateStatusReport.getCrc()
|
<< std::setfill('0') << std::hex << std::setw(4)
|
||||||
<< std::endl;
|
<< static_cast<uint16_t>(update.crc) << " but received CRC 0x" << std::setw(4)
|
||||||
|
<< updateStatusReport.getCrc() << std::dec << std::endl;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -522,14 +746,14 @@ uint32_t PlocSupvHelper::getFileSize(std::string filename) {
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::handleEventBufferReception() {
|
ReturnValue_t PlocSupvHelper::handleEventBufferReception(ploc::SpTmReader& reader) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
std::string filename = Filenaming::generateAbsoluteFilename(
|
std::string filename = Filenaming::generateAbsoluteFilename(
|
||||||
eventBufferReq.path, eventBufferReq.filename, timestamping);
|
eventBufferReq.path, eventBufferReq.filename, timestamping);
|
||||||
std::ofstream file(filename, std::ios_base::app | std::ios_base::out);
|
std::ofstream file(filename, std::ios_base::app | std::ios_base::out);
|
||||||
uint32_t packetsRead = 0;
|
uint32_t packetsRead = 0;
|
||||||
size_t requestLen = 0;
|
size_t requestLen = 0;
|
||||||
supv::TmPacket tmPacket;
|
bool firstPacket = true;
|
||||||
for (packetsRead = 0; packetsRead < NUM_EVENT_BUFFER_PACKETS; packetsRead++) {
|
for (packetsRead = 0; packetsRead < NUM_EVENT_BUFFER_PACKETS; packetsRead++) {
|
||||||
if (terminate) {
|
if (terminate) {
|
||||||
triggerEvent(SUPV_EVENT_BUFFER_REQUEST_TERMINATED, packetsRead - 1);
|
triggerEvent(SUPV_EVENT_BUFFER_REQUEST_TERMINATED, packetsRead - 1);
|
||||||
@ -541,22 +765,33 @@ ReturnValue_t PlocSupvHelper::handleEventBufferReception() {
|
|||||||
} else {
|
} else {
|
||||||
requestLen = SIZE_EVENT_BUFFER_FULL_PACKET;
|
requestLen = SIZE_EVENT_BUFFER_FULL_PACKET;
|
||||||
}
|
}
|
||||||
result = handleTmReception(&tmPacket, requestLen);
|
if (firstPacket) {
|
||||||
if (result != RETURN_OK) {
|
firstPacket = false;
|
||||||
|
requestLen -= 6;
|
||||||
|
}
|
||||||
|
result = handleTmReception(requestLen);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "PlocSupvHelper::handleEventBufferReception: Failed while trying to read packet"
|
sif::debug << "PlocSupvHelper::handleEventBufferReception: Failed while trying to read packet"
|
||||||
<< " " << packetsRead + 1 << std::endl;
|
<< " " << packetsRead + 1 << std::endl;
|
||||||
file.close();
|
file.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
uint16_t apid = tmPacket.getAPID();
|
ReturnValue_t result = reader.checkCrc();
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
triggerEvent(SUPV_REPLY_CRC_MISSMATCH, rememberApid);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
uint16_t apid = reader.getApid();
|
||||||
if (apid != supv::APID_MRAM_DUMP_TM) {
|
if (apid != supv::APID_MRAM_DUMP_TM) {
|
||||||
sif::warning << "PlocSupvHelper::handleEventBufferReception: Did not expect space packet "
|
sif::warning << "PlocSupvHelper::handleEventBufferReception: Did not expect space packet "
|
||||||
<< "with APID 0x" << std::hex << apid << std::endl;
|
<< "with APID 0x" << std::hex << apid << std::endl;
|
||||||
file.close();
|
file.close();
|
||||||
return EVENT_BUFFER_REPLY_INVALID_APID;
|
return EVENT_BUFFER_REPLY_INVALID_APID;
|
||||||
}
|
}
|
||||||
file.write(reinterpret_cast<const char*>(tmPacket.getPacketData()),
|
file.write(reinterpret_cast<const char*>(reader.getPacketData()),
|
||||||
tmPacket.getPayloadDataLength());
|
reader.getPayloadDataLength());
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PlocSupvHelper::resetSpParams() { spParams.buf = commandBuffer; }
|
||||||
|
@ -7,10 +7,11 @@
|
|||||||
#include "fsfw/devicehandlers/CookieIF.h"
|
#include "fsfw/devicehandlers/CookieIF.h"
|
||||||
#include "fsfw/objectmanager/SystemObject.h"
|
#include "fsfw/objectmanager/SystemObject.h"
|
||||||
#include "fsfw/osal/linux/BinarySemaphore.h"
|
#include "fsfw/osal/linux/BinarySemaphore.h"
|
||||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
#include "fsfw/tasks/ExecutableObjectIF.h"
|
#include "fsfw/tasks/ExecutableObjectIF.h"
|
||||||
#include "fsfw_hal/linux/uart/UartComIF.h"
|
#include "fsfw_hal/linux/uart/UartComIF.h"
|
||||||
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
|
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
|
||||||
|
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
#include "bsp_q7s/memory/SdCardManager.h"
|
#include "bsp_q7s/memory/SdCardManager.h"
|
||||||
#endif
|
#endif
|
||||||
@ -20,7 +21,7 @@
|
|||||||
* the supervisor and the OBC.
|
* the supervisor and the OBC.
|
||||||
* @author J. Meier
|
* @author J. Meier
|
||||||
*/
|
*/
|
||||||
class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public HasReturnvaluesIF {
|
class PlocSupvHelper : public SystemObject, public ExecutableObjectIF {
|
||||||
public:
|
public:
|
||||||
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_SUPV_HELPER;
|
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_SUPV_HELPER;
|
||||||
|
|
||||||
@ -41,50 +42,61 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
|
|||||||
//! [EXPORT] : [COMMENT] Terminated event buffer request by command
|
//! [EXPORT] : [COMMENT] Terminated event buffer request by command
|
||||||
//! P1: Number of packets read before process was terminated
|
//! P1: Number of packets read before process was terminated
|
||||||
static const Event SUPV_EVENT_BUFFER_REQUEST_TERMINATED = MAKE_EVENT(7, severity::LOW);
|
static const Event SUPV_EVENT_BUFFER_REQUEST_TERMINATED = MAKE_EVENT(7, severity::LOW);
|
||||||
|
//! Status of memory check command
|
||||||
|
//! P1: Returncode, 0 for success, other value with returncode for failure
|
||||||
|
static constexpr Event SUPV_MEM_CHECK_OK = MAKE_EVENT(8, severity::INFO);
|
||||||
|
static constexpr Event SUPV_MEM_CHECK_FAIL = MAKE_EVENT(9, severity::INFO);
|
||||||
|
|
||||||
//! [EXPORT] : [COMMENT] Communication interface returned failure when trying to send the command
|
//! [EXPORT] : [COMMENT] Communication interface returned failure when trying to send the command
|
||||||
//! to the supervisor
|
//! to the supervisor
|
||||||
//! P1: Return value returned by the communication interface sendMessage function
|
//! P1: Return value returned by the communication interface sendMessage function
|
||||||
//! P2: Internal state of supervisor helper
|
//! P2: Internal state of supervisor helper
|
||||||
static const Event SUPV_SENDING_COMMAND_FAILED = MAKE_EVENT(8, severity::LOW);
|
static const Event SUPV_SENDING_COMMAND_FAILED = MAKE_EVENT(16, severity::LOW);
|
||||||
//! [EXPORT] : [COMMENT] Request receive message of communication interface failed
|
//! [EXPORT] : [COMMENT] Request receive message of communication interface failed
|
||||||
//! P1: Return value returned by the communication interface requestReceiveMessage function
|
//! P1: Return value returned by the communication interface requestReceiveMessage function
|
||||||
//! P2: Internal state of supervisor helper
|
//! P2: Internal state of supervisor helper
|
||||||
static const Event SUPV_HELPER_REQUESTING_REPLY_FAILED = MAKE_EVENT(9, severity::LOW);
|
static const Event SUPV_HELPER_REQUESTING_REPLY_FAILED = MAKE_EVENT(17, severity::LOW);
|
||||||
//! [EXPORT] : [COMMENT] Reading receive message of communication interface failed
|
//! [EXPORT] : [COMMENT] Reading receive message of communication interface failed
|
||||||
//! P1: Return value returned by the communication interface readingReceivedMessage function
|
//! P1: Return value returned by the communication interface readingReceivedMessage function
|
||||||
//! P2: Internal state of supervisor helper
|
//! P2: Internal state of supervisor helper
|
||||||
static const Event SUPV_HELPER_READING_REPLY_FAILED = MAKE_EVENT(10, severity::LOW);
|
static const Event SUPV_HELPER_READING_REPLY_FAILED = MAKE_EVENT(18, severity::LOW);
|
||||||
//! [EXPORT] : [COMMENT] Did not receive acknowledgement report
|
//! [EXPORT] : [COMMENT] Did not receive acknowledgement report
|
||||||
//! P1: Number of bytes missing
|
//! P1: Number of bytes missing
|
||||||
//! P2: Internal state of MPSoC helper
|
//! P2: Internal state of MPSoC helper
|
||||||
static const Event SUPV_MISSING_ACK = MAKE_EVENT(11, severity::LOW);
|
static const Event SUPV_MISSING_ACK = MAKE_EVENT(19, severity::LOW);
|
||||||
//! [EXPORT] : [COMMENT] Supervisor did not receive execution report
|
//! [EXPORT] : [COMMENT] Supervisor did not receive execution report
|
||||||
//! P1: Number of bytes missing
|
//! P1: Number of bytes missing
|
||||||
//! P2: Internal state of supervisor helper
|
//! P2: Internal state of supervisor helper
|
||||||
static const Event SUPV_MISSING_EXE = MAKE_EVENT(12, severity::LOW);
|
static const Event SUPV_MISSING_EXE = MAKE_EVENT(20, severity::LOW);
|
||||||
//! [EXPORT] : [COMMENT] Supervisor received acknowledgment failure report
|
//! [EXPORT] : [COMMENT] Supervisor received acknowledgment failure report
|
||||||
//! P1: Internal state of supervisor helper
|
//! P1: Internal state of supervisor helper
|
||||||
static const Event SUPV_ACK_FAILURE_REPORT = MAKE_EVENT(13, severity::LOW);
|
static const Event SUPV_ACK_FAILURE_REPORT = MAKE_EVENT(21, severity::LOW);
|
||||||
//! [EXPORT] : [COMMENT] Execution report failure
|
//! [EXPORT] : [COMMENT] Execution report failure
|
||||||
//! P1:
|
//! P1:
|
||||||
static const Event SUPV_EXE_FAILURE_REPORT = MAKE_EVENT(14, severity::LOW);
|
static const Event SUPV_EXE_FAILURE_REPORT = MAKE_EVENT(22, severity::LOW);
|
||||||
//! [EXPORT] : [COMMENT] Supervisor expected acknowledgment report but received space packet with
|
//! [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
|
//! other apid P1: Apid of received space packet P2: Internal state of supervisor helper
|
||||||
static const Event SUPV_ACK_INVALID_APID = MAKE_EVENT(15, severity::LOW);
|
static const Event SUPV_ACK_INVALID_APID = MAKE_EVENT(23, severity::LOW);
|
||||||
//! [EXPORT] : [COMMENT] Supervisor helper expected execution report but received space packet
|
//! [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
|
//! with other apid P1: Apid of received space packet P2: Internal state of supervisor helper
|
||||||
static const Event SUPV_EXE_INVALID_APID = MAKE_EVENT(16, severity::LOW);
|
static const Event SUPV_EXE_INVALID_APID = MAKE_EVENT(24, severity::LOW);
|
||||||
//! [EXPORT] : [COMMENT] Failed to receive acknowledgment report
|
//! [EXPORT] : [COMMENT] Failed to receive acknowledgment report
|
||||||
//! P1: Return value
|
//! P1: Return value
|
||||||
//! P2: Apid of command for which the reception of the acknowledgment report failed
|
//! P2: Apid of command for which the reception of the acknowledgment report failed
|
||||||
static const Event ACK_RECEPTION_FAILURE = MAKE_EVENT(17, severity::LOW);
|
static const Event ACK_RECEPTION_FAILURE = MAKE_EVENT(25, severity::LOW);
|
||||||
//! [EXPORT] : [COMMENT] Failed to receive execution report
|
//! [EXPORT] : [COMMENT] Failed to receive execution report
|
||||||
//! P1: Return value
|
//! P1: Return value
|
||||||
//! P2: Apid of command for which the reception of the execution report failed
|
//! P2: Apid of command for which the reception of the execution report failed
|
||||||
static const Event EXE_RECEPTION_FAILURE = MAKE_EVENT(18, severity::LOW);
|
static const Event EXE_RECEPTION_FAILURE = MAKE_EVENT(26, severity::LOW);
|
||||||
//! [EXPORT] : [COMMENT] Update procedure failed when sending packet with number P1
|
//! [EXPORT] : [COMMENT] Update procedure failed when sending packet.
|
||||||
//! P1: Packet number for which the memory write command fails
|
//! P1: First byte percent, third and fourth byte Sequence Count, P2: Bytes written
|
||||||
static const Event WRITE_MEMORY_FAILED = MAKE_EVENT(19, severity::LOW);
|
static const Event WRITE_MEMORY_FAILED = MAKE_EVENT(27, severity::LOW);
|
||||||
|
static const Event SUPV_REPLY_SIZE_MISSMATCH = MAKE_EVENT(28, severity::LOW);
|
||||||
|
static const Event SUPV_REPLY_CRC_MISSMATCH = MAKE_EVENT(29, severity::LOW);
|
||||||
|
|
||||||
|
//! [EXPORT] : [COMMENT] Will be triggered every 5 percent of the update progress.
|
||||||
|
//! P1: First byte percent, third and fourth byte Sequence Count, P2: Bytes written
|
||||||
|
static constexpr Event SUPV_UPDATE_PROGRESS = MAKE_EVENT(30, severity::INFO);
|
||||||
|
|
||||||
PlocSupvHelper(object_id_t objectId);
|
PlocSupvHelper(object_id_t objectId);
|
||||||
virtual ~PlocSupvHelper();
|
virtual ~PlocSupvHelper();
|
||||||
@ -102,10 +114,15 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
|
|||||||
* @param memoryId ID of the memory where to write to
|
* @param memoryId ID of the memory where to write to
|
||||||
* @param startAddress Address where to write data
|
* @param startAddress Address where to write data
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if successful, otherwise error return value
|
* @return returnvalue::OK if successful, otherwise error return value
|
||||||
*/
|
*/
|
||||||
|
ReturnValue_t performUpdate(const supv::UpdateParams& params);
|
||||||
ReturnValue_t startUpdate(std::string file, uint8_t memoryId, uint32_t startAddress);
|
ReturnValue_t startUpdate(std::string file, uint8_t memoryId, uint32_t startAddress);
|
||||||
|
|
||||||
|
ReturnValue_t performMemCheck(uint8_t memoryId, uint32_t startAddress, size_t sizeToCheck,
|
||||||
|
bool checkCrc);
|
||||||
|
ReturnValue_t performMemCheck(std::string file, uint8_t memoryId, uint32_t startAddress);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This initiate the continuation of a failed update.
|
* @brief This initiate the continuation of a failed update.
|
||||||
*/
|
*/
|
||||||
@ -121,6 +138,8 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
|
|||||||
*/
|
*/
|
||||||
void stopProcess();
|
void stopProcess();
|
||||||
|
|
||||||
|
static uint32_t buildProgParams1(uint8_t percent, uint16_t seqCount);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const uint8_t INTERFACE_ID = CLASS_ID::PLOC_SUPV_HELPER;
|
static const uint8_t INTERFACE_ID = CLASS_ID::PLOC_SUPV_HELPER;
|
||||||
|
|
||||||
@ -147,13 +166,17 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
|
|||||||
uint32_t startAddress;
|
uint32_t startAddress;
|
||||||
// Absolute name of file containing update data
|
// Absolute name of file containing update data
|
||||||
std::string file;
|
std::string file;
|
||||||
|
// Length of full file
|
||||||
|
size_t fullFileSize;
|
||||||
// Size of update
|
// Size of update
|
||||||
uint32_t length;
|
uint32_t length;
|
||||||
uint32_t crc;
|
uint32_t crc;
|
||||||
size_t remainingSize;
|
bool crcShouldBeChecked = true;
|
||||||
size_t bytesWritten;
|
size_t bytesWritten;
|
||||||
uint32_t packetNum;
|
uint32_t packetNum;
|
||||||
uint16_t sequenceCount;
|
uint16_t sequenceCount;
|
||||||
|
uint8_t progressPercent;
|
||||||
|
bool deleteMemory = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Update update;
|
struct Update update;
|
||||||
@ -167,7 +190,7 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
|
|||||||
|
|
||||||
EventBufferRequest eventBufferReq;
|
EventBufferRequest eventBufferReq;
|
||||||
|
|
||||||
enum class InternalState { IDLE, UPDATE, CONTINUE_UPDATE, REQUEST_EVENT_BUFFER };
|
enum class InternalState { IDLE, UPDATE, CONTINUE_UPDATE, REQUEST_EVENT_BUFFER, CHECK_MEMORY };
|
||||||
|
|
||||||
InternalState internalState = InternalState::IDLE;
|
InternalState internalState = InternalState::IDLE;
|
||||||
|
|
||||||
@ -175,7 +198,11 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
|
|||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
SdCardManager* sdcMan = nullptr;
|
SdCardManager* sdcMan = nullptr;
|
||||||
#endif
|
#endif
|
||||||
uint8_t commandBuffer[supv::MAX_COMMAND_SIZE];
|
uint8_t commandBuffer[supv::MAX_COMMAND_SIZE]{};
|
||||||
|
SpacePacketCreator creator;
|
||||||
|
ploc::SpTcParams spParams = ploc::SpTcParams(creator);
|
||||||
|
|
||||||
|
std::array<uint8_t, supv::MAX_COMMAND_SIZE> tmBuf{};
|
||||||
|
|
||||||
bool terminate = false;
|
bool terminate = false;
|
||||||
|
|
||||||
@ -191,13 +218,16 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
|
|||||||
// Remembers APID to know at which command a procedure failed
|
// Remembers APID to know at which command a procedure failed
|
||||||
uint16_t rememberApid = 0;
|
uint16_t rememberApid = 0;
|
||||||
|
|
||||||
ReturnValue_t performUpdate();
|
void executeFullCheckMemoryCommand();
|
||||||
|
|
||||||
|
ReturnValue_t executeUpdate();
|
||||||
ReturnValue_t continueUpdate();
|
ReturnValue_t continueUpdate();
|
||||||
|
ReturnValue_t updateOperation();
|
||||||
ReturnValue_t writeUpdatePackets();
|
ReturnValue_t writeUpdatePackets();
|
||||||
ReturnValue_t performEventBufferRequest();
|
ReturnValue_t performEventBufferRequest();
|
||||||
ReturnValue_t handlePacketTransmission(SpacePacket& packet,
|
ReturnValue_t handlePacketTransmission(ploc::SpTcBase& packet,
|
||||||
uint32_t timeoutExecutionReport = 60000);
|
uint32_t timeoutExecutionReport = 60000);
|
||||||
ReturnValue_t sendCommand(SpacePacket& packet);
|
ReturnValue_t sendCommand(ploc::SpTcBase& packet);
|
||||||
/**
|
/**
|
||||||
* @brief Function which reads form the communication interface
|
* @brief Function which reads form the communication interface
|
||||||
*
|
*
|
||||||
@ -218,8 +248,10 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
|
|||||||
* @note It can take up to 70 seconds until the supervisor replies with an acknowledgment
|
* @note It can take up to 70 seconds until the supervisor replies with an acknowledgment
|
||||||
* failure report.
|
* failure report.
|
||||||
*/
|
*/
|
||||||
ReturnValue_t handleTmReception(supv::TmPacket* tmPacket, size_t remainingBytes,
|
ReturnValue_t handleTmReception(size_t remainingBytes, uint8_t* readBuf = nullptr,
|
||||||
uint32_t timeout = 70000);
|
uint32_t timeout = 70000);
|
||||||
|
ReturnValue_t checkReceivedTm(ploc::SpTmReader& reader);
|
||||||
|
|
||||||
ReturnValue_t selectMemory();
|
ReturnValue_t selectMemory();
|
||||||
ReturnValue_t prepareUpdate();
|
ReturnValue_t prepareUpdate();
|
||||||
ReturnValue_t eraseMemory();
|
ReturnValue_t eraseMemory();
|
||||||
@ -227,6 +259,7 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
|
|||||||
// finished.
|
// finished.
|
||||||
ReturnValue_t calcImageCrc();
|
ReturnValue_t calcImageCrc();
|
||||||
ReturnValue_t handleCheckMemoryCommand();
|
ReturnValue_t handleCheckMemoryCommand();
|
||||||
|
ReturnValue_t exeReportHandling();
|
||||||
/**
|
/**
|
||||||
* @brief Return size of file with name filename
|
* @brief Return size of file with name filename
|
||||||
*
|
*
|
||||||
@ -235,7 +268,10 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
|
|||||||
* @return The size of the file
|
* @return The size of the file
|
||||||
*/
|
*/
|
||||||
uint32_t getFileSize(std::string filename);
|
uint32_t getFileSize(std::string filename);
|
||||||
ReturnValue_t handleEventBufferReception();
|
ReturnValue_t handleEventBufferReception(ploc::SpTmReader& reader);
|
||||||
|
ReturnValue_t handleRemainingExeReport(ploc::SpTmReader& reader);
|
||||||
|
|
||||||
|
void resetSpParams();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* BSP_Q7S_DEVICES_PLOCSUPVHELPER_H_ */
|
#endif /* BSP_Q7S_DEVICES_PLOCSUPVHELPER_H_ */
|
||||||
|
@ -34,15 +34,15 @@ ReturnValue_t ArcsecDatalinkLayer::decodeFrame(const uint8_t* rawData, size_t ra
|
|||||||
case ARC_DEC_SYNC: {
|
case ARC_DEC_SYNC: {
|
||||||
// Reset length of SLIP struct for next frame
|
// Reset length of SLIP struct for next frame
|
||||||
slipInfo.length = 0;
|
slipInfo.length = 0;
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
sif::debug << "ArcsecDatalinkLayer::decodeFrame: Unknown result code" << std::endl;
|
sif::debug << "ArcsecDatalinkLayer::decodeFrame: Unknown result code" << std::endl;
|
||||||
break;
|
break;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t ArcsecDatalinkLayer::getReplyFrameType() { return decodedFrame[0]; }
|
uint8_t ArcsecDatalinkLayer::getReplyFrameType() { return decodedFrame[0]; }
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef BSP_Q7S_DEVICES_ARCSECDATALINKLAYER_H_
|
#ifndef BSP_Q7S_DEVICES_ARCSECDATALINKLAYER_H_
|
||||||
#define BSP_Q7S_DEVICES_ARCSECDATALINKLAYER_H_
|
#define BSP_Q7S_DEVICES_ARCSECDATALINKLAYER_H_
|
||||||
|
|
||||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -11,7 +11,7 @@ extern "C" {
|
|||||||
/**
|
/**
|
||||||
* @brief Helper class to handle the datalinklayer of replies from the star tracker of arcsec.
|
* @brief Helper class to handle the datalinklayer of replies from the star tracker of arcsec.
|
||||||
*/
|
*/
|
||||||
class ArcsecDatalinkLayer : public HasReturnvaluesIF {
|
class ArcsecDatalinkLayer {
|
||||||
public:
|
public:
|
||||||
static const uint8_t INTERFACE_ID = CLASS_ID::STR_HANDLER;
|
static const uint8_t INTERFACE_ID = CLASS_ID::STR_HANDLER;
|
||||||
|
|
||||||
|
@ -5,15 +5,15 @@
|
|||||||
ArcsecJsonParamBase::ArcsecJsonParamBase(std::string setName) : setName(setName) {}
|
ArcsecJsonParamBase::ArcsecJsonParamBase(std::string setName) : setName(setName) {}
|
||||||
|
|
||||||
ReturnValue_t ArcsecJsonParamBase::create(std::string fullname, uint8_t* buffer) {
|
ReturnValue_t ArcsecJsonParamBase::create(std::string fullname, uint8_t* buffer) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
result = init(fullname);
|
result = init(fullname);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "ArcsecJsonParamBase::create: Failed to init parameter command for set "
|
sif::warning << "ArcsecJsonParamBase::create: Failed to init parameter command for set "
|
||||||
<< setName << std::endl;
|
<< setName << std::endl;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = createCommand(buffer);
|
result = createCommand(buffer);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "ArcsecJsonParamBase::create: Failed to create parameter command for set "
|
sif::warning << "ArcsecJsonParamBase::create: Failed to create parameter command for set "
|
||||||
<< setName << std::endl;
|
<< setName << std::endl;
|
||||||
}
|
}
|
||||||
@ -25,7 +25,7 @@ ReturnValue_t ArcsecJsonParamBase::getParam(const std::string name, std::string&
|
|||||||
if ((*it)[arcseckeys::NAME] == name) {
|
if ((*it)[arcseckeys::NAME] == name) {
|
||||||
value = (*it)[arcseckeys::VALUE];
|
value = (*it)[arcseckeys::VALUE];
|
||||||
convertEmpty(value);
|
convertEmpty(value);
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return PARAM_NOT_EXISTS;
|
return PARAM_NOT_EXISTS;
|
||||||
@ -68,7 +68,7 @@ void ArcsecJsonParamBase::addSetParamHeader(uint8_t* buffer, uint8_t setId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t ArcsecJsonParamBase::init(const std::string filename) {
|
ReturnValue_t ArcsecJsonParamBase::init(const std::string filename) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
if (not std::filesystem::exists(filename)) {
|
if (not std::filesystem::exists(filename)) {
|
||||||
sif::warning << "ArcsecJsonParamBase::init: JSON file " << filename << " does not exist"
|
sif::warning << "ArcsecJsonParamBase::init: JSON file " << filename << " does not exist"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
@ -76,10 +76,10 @@ ReturnValue_t ArcsecJsonParamBase::init(const std::string filename) {
|
|||||||
}
|
}
|
||||||
createJsonObject(filename);
|
createJsonObject(filename);
|
||||||
result = initSet();
|
result = initSet();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ArcsecJsonParamBase::createJsonObject(const std::string fullname) {
|
void ArcsecJsonParamBase::createJsonObject(const std::string fullname) {
|
||||||
@ -94,7 +94,7 @@ ReturnValue_t ArcsecJsonParamBase::initSet() {
|
|||||||
for (json::iterator it = properties.begin(); it != properties.end(); ++it) {
|
for (json::iterator it = properties.begin(); it != properties.end(); ++it) {
|
||||||
if ((*it)["name"] == setName) {
|
if ((*it)["name"] == setName) {
|
||||||
set = (*it)["fields"];
|
set = (*it)["fields"];
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sif::warning << "ArcsecJsonParamBase::initSet: Set " << setName << "not present in json file"
|
sif::warning << "ArcsecJsonParamBase::initSet: Set " << setName << "not present in json file"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <nlohmann/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
|
|
||||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -22,7 +22,7 @@ using json = nlohmann::json;
|
|||||||
*
|
*
|
||||||
* @author J. Meier
|
* @author J. Meier
|
||||||
*/
|
*/
|
||||||
class ArcsecJsonParamBase : public HasReturnvaluesIF {
|
class ArcsecJsonParamBase {
|
||||||
public:
|
public:
|
||||||
static const uint8_t INTERFACE_ID = CLASS_ID::ARCSEC_JSON_BASE;
|
static const uint8_t INTERFACE_ID = CLASS_ID::ARCSEC_JSON_BASE;
|
||||||
//! [EXPORT] : [COMMENT] Specified json file does not exist
|
//! [EXPORT] : [COMMENT] Specified json file does not exist
|
||||||
@ -32,6 +32,7 @@ class ArcsecJsonParamBase : public HasReturnvaluesIF {
|
|||||||
//! [EXPORT] : [COMMENT] Requested parameter does not exist in json file
|
//! [EXPORT] : [COMMENT] Requested parameter does not exist in json file
|
||||||
static const ReturnValue_t PARAM_NOT_EXISTS = MAKE_RETURN_CODE(3);
|
static const ReturnValue_t PARAM_NOT_EXISTS = MAKE_RETURN_CODE(3);
|
||||||
|
|
||||||
|
virtual ~ArcsecJsonParamBase() = default;
|
||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* @brief Constructor
|
||||||
*
|
*
|
||||||
@ -60,7 +61,7 @@ class ArcsecJsonParamBase : public HasReturnvaluesIF {
|
|||||||
* @param name The name of the parameter
|
* @param name The name of the parameter
|
||||||
* @param value The string representation of the read value
|
* @param value The string representation of the read value
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if successful, otherwise PARAM_NOT_EXISTS
|
* @return returnvalue::OK if successful, otherwise PARAM_NOT_EXISTS
|
||||||
*/
|
*/
|
||||||
ReturnValue_t getParam(const std::string name, std::string& value);
|
ReturnValue_t getParam(const std::string name, std::string& value);
|
||||||
|
|
||||||
@ -129,7 +130,7 @@ class ArcsecJsonParamBase : public HasReturnvaluesIF {
|
|||||||
* @param setName The name of the set to work on
|
* @param setName The name of the set to work on
|
||||||
*
|
*
|
||||||
* @param return JSON_FILE_NOT_EXISTS if specified file does not exist, otherwise
|
* @param return JSON_FILE_NOT_EXISTS if specified file does not exist, otherwise
|
||||||
* RETURN_OK
|
* returnvalue::OK
|
||||||
*/
|
*/
|
||||||
ReturnValue_t init(const std::string filename);
|
ReturnValue_t init(const std::string filename);
|
||||||
|
|
||||||
|
@ -53,9 +53,9 @@ StarTrackerHandler::StarTrackerHandler(object_id_t objectId, object_id_t comIF,
|
|||||||
StarTrackerHandler::~StarTrackerHandler() {}
|
StarTrackerHandler::~StarTrackerHandler() {}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::initialize() {
|
ReturnValue_t StarTrackerHandler::initialize() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
result = DeviceHandlerBase::initialize();
|
result = DeviceHandlerBase::initialize();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,13 +68,13 @@ ReturnValue_t StarTrackerHandler::initialize() {
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
result = manager->registerListener(eventQueue->getId());
|
result = manager->registerListener(eventQueue->getId());
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = manager->subscribeToEventRange(eventQueue->getId(),
|
result = manager->subscribeToEventRange(eventQueue->getId(),
|
||||||
event::getEventId(StrHelper::IMAGE_UPLOAD_FAILED),
|
event::getEventId(StrHelper::IMAGE_UPLOAD_FAILED),
|
||||||
event::getEventId(StrHelper::FIRMWARE_UPDATE_FAILED));
|
event::getEventId(StrHelper::FIRMWARE_UPDATE_FAILED));
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::warning << "StarTrackerHandler::initialize: Failed to subscribe to events from "
|
sif::warning << "StarTrackerHandler::initialize: Failed to subscribe to events from "
|
||||||
" str helper"
|
" str helper"
|
||||||
@ -84,16 +84,16 @@ ReturnValue_t StarTrackerHandler::initialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
result = strHelper->setComIF(communicationInterface);
|
result = strHelper->setComIF(communicationInterface);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
}
|
}
|
||||||
strHelper->setComCookie(comCookie);
|
strHelper->setComCookie(comCookie);
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||||
const uint8_t* data, size_t size) {
|
const uint8_t* data, size_t size) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
|
||||||
switch (actionId) {
|
switch (actionId) {
|
||||||
case (startracker::STOP_IMAGE_LOADER): {
|
case (startracker::STOP_IMAGE_LOADER): {
|
||||||
@ -122,12 +122,12 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu
|
|||||||
}
|
}
|
||||||
|
|
||||||
result = checkMode(actionId);
|
result = checkMode(actionId);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = checkCommand(actionId);
|
result = checkCommand(actionId);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,14 +135,14 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu
|
|||||||
switch (actionId) {
|
switch (actionId) {
|
||||||
case (startracker::UPLOAD_IMAGE): {
|
case (startracker::UPLOAD_IMAGE): {
|
||||||
result = DeviceHandlerBase::acceptExternalDeviceCommands();
|
result = DeviceHandlerBase::acceptExternalDeviceCommands();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
if (size > MAX_PATH_SIZE + MAX_FILE_NAME) {
|
if (size > MAX_PATH_SIZE + MAX_FILE_NAME) {
|
||||||
return FILE_PATH_TOO_LONG;
|
return FILE_PATH_TOO_LONG;
|
||||||
}
|
}
|
||||||
result = strHelper->startImageUpload(std::string(reinterpret_cast<const char*>(data), size));
|
result = strHelper->startImageUpload(std::string(reinterpret_cast<const char*>(data), size));
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
strHelperExecuting = true;
|
strHelperExecuting = true;
|
||||||
@ -150,7 +150,7 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu
|
|||||||
}
|
}
|
||||||
case (startracker::DOWNLOAD_IMAGE): {
|
case (startracker::DOWNLOAD_IMAGE): {
|
||||||
result = DeviceHandlerBase::acceptExternalDeviceCommands();
|
result = DeviceHandlerBase::acceptExternalDeviceCommands();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
if (size > MAX_PATH_SIZE) {
|
if (size > MAX_PATH_SIZE) {
|
||||||
@ -158,7 +158,7 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu
|
|||||||
}
|
}
|
||||||
result =
|
result =
|
||||||
strHelper->startImageDownload(std::string(reinterpret_cast<const char*>(data), size));
|
strHelper->startImageDownload(std::string(reinterpret_cast<const char*>(data), size));
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
strHelperExecuting = true;
|
strHelperExecuting = true;
|
||||||
@ -166,11 +166,11 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu
|
|||||||
}
|
}
|
||||||
case (startracker::FLASH_READ): {
|
case (startracker::FLASH_READ): {
|
||||||
result = DeviceHandlerBase::acceptExternalDeviceCommands();
|
result = DeviceHandlerBase::acceptExternalDeviceCommands();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = executeFlashReadCommand(data, size);
|
result = executeFlashReadCommand(data, size);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
strHelperExecuting = true;
|
strHelperExecuting = true;
|
||||||
@ -192,7 +192,7 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu
|
|||||||
}
|
}
|
||||||
case (startracker::FIRMWARE_UPDATE): {
|
case (startracker::FIRMWARE_UPDATE): {
|
||||||
result = DeviceHandlerBase::acceptExternalDeviceCommands();
|
result = DeviceHandlerBase::acceptExternalDeviceCommands();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
if (size > MAX_PATH_SIZE + MAX_FILE_NAME) {
|
if (size > MAX_PATH_SIZE + MAX_FILE_NAME) {
|
||||||
@ -200,7 +200,7 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu
|
|||||||
}
|
}
|
||||||
result =
|
result =
|
||||||
strHelper->startFirmwareUpdate(std::string(reinterpret_cast<const char*>(data), size));
|
strHelper->startFirmwareUpdate(std::string(reinterpret_cast<const char*>(data), size));
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
strHelperExecuting = true;
|
strHelperExecuting = true;
|
||||||
@ -214,7 +214,7 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu
|
|||||||
|
|
||||||
void StarTrackerHandler::performOperationHook() {
|
void StarTrackerHandler::performOperationHook() {
|
||||||
EventMessage event;
|
EventMessage event;
|
||||||
for (ReturnValue_t result = eventQueue->receiveMessage(&event); result == RETURN_OK;
|
for (ReturnValue_t result = eventQueue->receiveMessage(&event); result == returnvalue::OK;
|
||||||
result = eventQueue->receiveMessage(&event)) {
|
result = eventQueue->receiveMessage(&event)) {
|
||||||
switch (event.getMessageId()) {
|
switch (event.getMessageId()) {
|
||||||
case EventMessage::EVENT_MESSAGE:
|
case EventMessage::EVENT_MESSAGE:
|
||||||
@ -385,56 +385,56 @@ ReturnValue_t StarTrackerHandler::buildTransitionDeviceCommand(DeviceCommandId_t
|
|||||||
ReturnValue_t StarTrackerHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
ReturnValue_t StarTrackerHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
const uint8_t* commandData,
|
const uint8_t* commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
switch (deviceCommand) {
|
switch (deviceCommand) {
|
||||||
case (startracker::PING_REQUEST): {
|
case (startracker::PING_REQUEST): {
|
||||||
preparePingRequest();
|
preparePingRequest();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
case (startracker::REQ_TIME): {
|
case (startracker::REQ_TIME): {
|
||||||
prepareTimeRequest();
|
prepareTimeRequest();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
case (startracker::BOOT): {
|
case (startracker::BOOT): {
|
||||||
prepareBootCommand();
|
prepareBootCommand();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
case (startracker::REQ_VERSION): {
|
case (startracker::REQ_VERSION): {
|
||||||
prepareVersionRequest();
|
prepareVersionRequest();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
case (startracker::REQ_INTERFACE): {
|
case (startracker::REQ_INTERFACE): {
|
||||||
prepareInterfaceRequest();
|
prepareInterfaceRequest();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
case (startracker::REQ_POWER): {
|
case (startracker::REQ_POWER): {
|
||||||
preparePowerRequest();
|
preparePowerRequest();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
case (startracker::SWITCH_TO_BOOTLOADER_PROGRAM): {
|
case (startracker::SWITCH_TO_BOOTLOADER_PROGRAM): {
|
||||||
prepareSwitchToBootloaderCmd();
|
prepareSwitchToBootloaderCmd();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
case (startracker::TAKE_IMAGE): {
|
case (startracker::TAKE_IMAGE): {
|
||||||
prepareTakeImageCommand(commandData);
|
prepareTakeImageCommand(commandData);
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
case (startracker::SUBSCRIPTION): {
|
case (startracker::SUBSCRIPTION): {
|
||||||
Subscription subscription;
|
Subscription subscription;
|
||||||
result = prepareParamCommand(commandData, commandDataLen, subscription);
|
result = prepareParamCommand(commandData, commandDataLen, subscription);
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
case (startracker::REQ_SOLUTION): {
|
case (startracker::REQ_SOLUTION): {
|
||||||
prepareSolutionRequest();
|
prepareSolutionRequest();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
case (startracker::REQ_TEMPERATURE): {
|
case (startracker::REQ_TEMPERATURE): {
|
||||||
prepareTemperatureRequest();
|
prepareTemperatureRequest();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
case (startracker::REQ_HISTOGRAM): {
|
case (startracker::REQ_HISTOGRAM): {
|
||||||
prepareHistogramRequest();
|
prepareHistogramRequest();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
case (startracker::LIMITS): {
|
case (startracker::LIMITS): {
|
||||||
Limits limits;
|
Limits limits;
|
||||||
@ -564,7 +564,7 @@ ReturnValue_t StarTrackerHandler::buildCommandFromCommand(DeviceCommandId_t devi
|
|||||||
default:
|
default:
|
||||||
return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
|
return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StarTrackerHandler::fillCommandAndReplyMap() {
|
void StarTrackerHandler::fillCommandAndReplyMap() {
|
||||||
@ -662,13 +662,13 @@ ReturnValue_t StarTrackerHandler::isModeCombinationValid(Mode_t mode, Submode_t
|
|||||||
case MODE_NORMAL:
|
case MODE_NORMAL:
|
||||||
case MODE_RAW:
|
case MODE_RAW:
|
||||||
if (submode == SUBMODE_NONE) {
|
if (submode == SUBMODE_NONE) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
} else {
|
} else {
|
||||||
return INVALID_SUBMODE;
|
return INVALID_SUBMODE;
|
||||||
}
|
}
|
||||||
case MODE_ON:
|
case MODE_ON:
|
||||||
if (submode == SUBMODE_BOOTLOADER || submode == SUBMODE_FIRMWARE) {
|
if (submode == SUBMODE_BOOTLOADER || submode == SUBMODE_FIRMWARE) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
} else {
|
} else {
|
||||||
return INVALID_SUBMODE;
|
return INVALID_SUBMODE;
|
||||||
}
|
}
|
||||||
@ -759,7 +759,7 @@ void StarTrackerHandler::bootBootloader() {
|
|||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::scanForReply(const uint8_t* start, size_t remainingSize,
|
ReturnValue_t StarTrackerHandler::scanForReply(const uint8_t* start, size_t remainingSize,
|
||||||
DeviceCommandId_t* foundId, size_t* foundLen) {
|
DeviceCommandId_t* foundId, size_t* foundLen) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
size_t bytesLeft = 0;
|
size_t bytesLeft = 0;
|
||||||
|
|
||||||
result = dataLinkLayer.decodeFrame(start, remainingSize, &bytesLeft);
|
result = dataLinkLayer.decodeFrame(start, remainingSize, &bytesLeft);
|
||||||
@ -769,7 +769,7 @@ ReturnValue_t StarTrackerHandler::scanForReply(const uint8_t* start, size_t rema
|
|||||||
// Need a second doSendRead pass to reaa in whole packet
|
// Need a second doSendRead pass to reaa in whole packet
|
||||||
return IGNORE_REPLY_DATA;
|
return IGNORE_REPLY_DATA;
|
||||||
}
|
}
|
||||||
case RETURN_OK: {
|
case returnvalue::OK: {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@ -801,7 +801,7 @@ ReturnValue_t StarTrackerHandler::scanForReply(const uint8_t* start, size_t rema
|
|||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
sif::debug << "StarTrackerHandler::scanForReply: Reply has invalid type id" << std::endl;
|
sif::debug << "StarTrackerHandler::scanForReply: Reply has invalid type id" << std::endl;
|
||||||
result = RETURN_FAILED;
|
result = returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -812,7 +812,7 @@ ReturnValue_t StarTrackerHandler::scanForReply(const uint8_t* start, size_t rema
|
|||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::interpretDeviceReply(DeviceCommandId_t id,
|
ReturnValue_t StarTrackerHandler::interpretDeviceReply(DeviceCommandId_t id,
|
||||||
const uint8_t* packet) {
|
const uint8_t* packet) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case (startracker::REQ_TIME): {
|
case (startracker::REQ_TIME): {
|
||||||
@ -832,11 +832,11 @@ ReturnValue_t StarTrackerHandler::interpretDeviceReply(DeviceCommandId_t id,
|
|||||||
}
|
}
|
||||||
case (startracker::REQ_VERSION): {
|
case (startracker::REQ_VERSION): {
|
||||||
result = handleTm(versionSet, startracker::VersionSet::SIZE);
|
result = handleTm(versionSet, startracker::VersionSet::SIZE);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = checkProgram();
|
result = checkProgram();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1209,7 +1209,7 @@ ReturnValue_t StarTrackerHandler::initializeLocalDataPool(localpool::DataPool& l
|
|||||||
localDataPoolMap.emplace(startracker::DEBUG_CAMERA_TEST, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(startracker::DEBUG_CAMERA_TEST, new PoolEntry<uint32_t>({0}));
|
||||||
|
|
||||||
localDataPoolMap.emplace(startracker::CHKSUM, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(startracker::CHKSUM, new PoolEntry<uint32_t>({0}));
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t StarTrackerHandler::getNextReplyLength(DeviceCommandId_t commandId) {
|
size_t StarTrackerHandler::getNextReplyLength(DeviceCommandId_t commandId) {
|
||||||
@ -1219,9 +1219,9 @@ size_t StarTrackerHandler::getNextReplyLength(DeviceCommandId_t commandId) {
|
|||||||
ReturnValue_t StarTrackerHandler::doSendReadHook() {
|
ReturnValue_t StarTrackerHandler::doSendReadHook() {
|
||||||
// Prevent DHB from polling UART during commands executed by the image loader task
|
// Prevent DHB from polling UART during commands executed by the image loader task
|
||||||
if (strHelperExecuting) {
|
if (strHelperExecuting) {
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::getSwitches(const uint8_t** switches, uint8_t* numberOfSwitches) {
|
ReturnValue_t StarTrackerHandler::getSwitches(const uint8_t** switches, uint8_t* numberOfSwitches) {
|
||||||
@ -1230,7 +1230,7 @@ ReturnValue_t StarTrackerHandler::getSwitches(const uint8_t** switches, uint8_t*
|
|||||||
}
|
}
|
||||||
*numberOfSwitches = 1;
|
*numberOfSwitches = 1;
|
||||||
*switches = &powerSwitch;
|
*switches = &powerSwitch;
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::checkMode(ActionId_t actionId) {
|
ReturnValue_t StarTrackerHandler::checkMode(ActionId_t actionId) {
|
||||||
@ -1244,7 +1244,7 @@ ReturnValue_t StarTrackerHandler::checkMode(ActionId_t actionId) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::scanForActionReply(DeviceCommandId_t* foundId) {
|
ReturnValue_t StarTrackerHandler::scanForActionReply(DeviceCommandId_t* foundId) {
|
||||||
@ -1273,9 +1273,9 @@ ReturnValue_t StarTrackerHandler::scanForActionReply(DeviceCommandId_t* foundId)
|
|||||||
default:
|
default:
|
||||||
sif::warning << "StarTrackerHandler::scanForActionReply: Unknown parameter reply id"
|
sif::warning << "StarTrackerHandler::scanForActionReply: Unknown parameter reply id"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::scanForSetParameterReply(DeviceCommandId_t* foundId) {
|
ReturnValue_t StarTrackerHandler::scanForSetParameterReply(DeviceCommandId_t* foundId) {
|
||||||
@ -1340,9 +1340,9 @@ ReturnValue_t StarTrackerHandler::scanForSetParameterReply(DeviceCommandId_t* fo
|
|||||||
default:
|
default:
|
||||||
sif::debug << "StarTrackerHandler::scanForParameterReply: Unknown parameter reply id"
|
sif::debug << "StarTrackerHandler::scanForParameterReply: Unknown parameter reply id"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::scanForGetParameterReply(DeviceCommandId_t* foundId) {
|
ReturnValue_t StarTrackerHandler::scanForGetParameterReply(DeviceCommandId_t* foundId) {
|
||||||
@ -1406,11 +1406,11 @@ ReturnValue_t StarTrackerHandler::scanForGetParameterReply(DeviceCommandId_t* fo
|
|||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
sif::warning << "tarTrackerHandler::scanForGetParameterReply: UnkNown ID" << std::endl;
|
sif::warning << "tarTrackerHandler::scanForGetParameterReply: UnkNown ID" << std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::scanForTmReply(DeviceCommandId_t* foundId) {
|
ReturnValue_t StarTrackerHandler::scanForTmReply(DeviceCommandId_t* foundId) {
|
||||||
@ -1447,11 +1447,11 @@ ReturnValue_t StarTrackerHandler::scanForTmReply(DeviceCommandId_t* foundId) {
|
|||||||
default: {
|
default: {
|
||||||
sif::debug << "StarTrackerHandler::scanForTmReply: Reply contains invalid reply id: "
|
sif::debug << "StarTrackerHandler::scanForTmReply: Reply contains invalid reply id: "
|
||||||
<< static_cast<unsigned int>(*reply) << std::endl;
|
<< static_cast<unsigned int>(*reply) << std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StarTrackerHandler::handleEvent(EventMessage* eventMessage) {
|
void StarTrackerHandler::handleEvent(EventMessage* eventMessage) {
|
||||||
@ -1471,7 +1471,7 @@ void StarTrackerHandler::handleEvent(EventMessage* eventMessage) {
|
|||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::executeFlashReadCommand(const uint8_t* commandData,
|
ReturnValue_t StarTrackerHandler::executeFlashReadCommand(const uint8_t* commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
if (commandDataLen < FlashReadCmd::MIN_LENGTH) {
|
if (commandDataLen < FlashReadCmd::MIN_LENGTH) {
|
||||||
sif::warning << "StarTrackerHandler::executeFlashReadCommand: Command too short" << std::endl;
|
sif::warning << "StarTrackerHandler::executeFlashReadCommand: Command too short" << std::endl;
|
||||||
return COMMAND_TOO_SHORT;
|
return COMMAND_TOO_SHORT;
|
||||||
@ -1481,7 +1481,7 @@ ReturnValue_t StarTrackerHandler::executeFlashReadCommand(const uint8_t* command
|
|||||||
size_t size = sizeof(length);
|
size_t size = sizeof(length);
|
||||||
const uint8_t* lengthPtr = commandData + sizeof(startRegion);
|
const uint8_t* lengthPtr = commandData + sizeof(startRegion);
|
||||||
result = SerializeAdapter::deSerialize(&length, lengthPtr, &size, SerializeIF::Endianness::BIG);
|
result = SerializeAdapter::deSerialize(&length, lengthPtr, &size, SerializeIF::Endianness::BIG);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "StarTrackerHandler::executeFlashReadCommand: Deserialization of length failed"
|
sif::debug << "StarTrackerHandler::executeFlashReadCommand: Deserialization of length failed"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return result;
|
return result;
|
||||||
@ -1495,7 +1495,7 @@ ReturnValue_t StarTrackerHandler::executeFlashReadCommand(const uint8_t* command
|
|||||||
std::string fullname = std::string(reinterpret_cast<const char*>(filePtr),
|
std::string fullname = std::string(reinterpret_cast<const char*>(filePtr),
|
||||||
commandDataLen - sizeof(startRegion) - sizeof(length));
|
commandDataLen - sizeof(startRegion) - sizeof(length));
|
||||||
result = strHelper->startFlashRead(fullname, startRegion, length);
|
result = strHelper->startFlashRead(fullname, startRegion, length);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@ -1513,7 +1513,7 @@ void StarTrackerHandler::prepareBootCommand() {
|
|||||||
ReturnValue_t StarTrackerHandler::prepareChecksumCommand(const uint8_t* commandData,
|
ReturnValue_t StarTrackerHandler::prepareChecksumCommand(const uint8_t* commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
struct ChecksumActionRequest req;
|
struct ChecksumActionRequest req;
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
if (commandDataLen != ChecksumCmd::LENGTH) {
|
if (commandDataLen != ChecksumCmd::LENGTH) {
|
||||||
sif::warning << "StarTrackerHandler::prepareChecksumCommand: Invalid length" << std::endl;
|
sif::warning << "StarTrackerHandler::prepareChecksumCommand: Invalid length" << std::endl;
|
||||||
return INVALID_LENGTH;
|
return INVALID_LENGTH;
|
||||||
@ -1523,7 +1523,7 @@ ReturnValue_t StarTrackerHandler::prepareChecksumCommand(const uint8_t* commandD
|
|||||||
const uint8_t* addressPtr = commandData + ChecksumCmd::ADDRESS_OFFSET;
|
const uint8_t* addressPtr = commandData + ChecksumCmd::ADDRESS_OFFSET;
|
||||||
result =
|
result =
|
||||||
SerializeAdapter::deSerialize(&req.address, addressPtr, &size, SerializeIF::Endianness::BIG);
|
SerializeAdapter::deSerialize(&req.address, addressPtr, &size, SerializeIF::Endianness::BIG);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "StarTrackerHandler::prepareChecksumCommand: Deserialization of address "
|
sif::debug << "StarTrackerHandler::prepareChecksumCommand: Deserialization of address "
|
||||||
<< "failed" << std::endl;
|
<< "failed" << std::endl;
|
||||||
return result;
|
return result;
|
||||||
@ -1532,7 +1532,7 @@ ReturnValue_t StarTrackerHandler::prepareChecksumCommand(const uint8_t* commandD
|
|||||||
const uint8_t* lengthPtr = commandData + ChecksumCmd::LENGTH_OFFSET;
|
const uint8_t* lengthPtr = commandData + ChecksumCmd::LENGTH_OFFSET;
|
||||||
result =
|
result =
|
||||||
SerializeAdapter::deSerialize(&req.length, lengthPtr, &size, SerializeIF::Endianness::BIG);
|
SerializeAdapter::deSerialize(&req.length, lengthPtr, &size, SerializeIF::Endianness::BIG);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "StarTrackerHandler::prepareChecksumCommand: Deserialization of length failed"
|
sif::debug << "StarTrackerHandler::prepareChecksumCommand: Deserialization of length failed"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return result;
|
return result;
|
||||||
@ -1635,20 +1635,20 @@ void StarTrackerHandler::prepareHistogramRequest() {
|
|||||||
ReturnValue_t StarTrackerHandler::prepareParamCommand(const uint8_t* commandData,
|
ReturnValue_t StarTrackerHandler::prepareParamCommand(const uint8_t* commandData,
|
||||||
size_t commandDataLen,
|
size_t commandDataLen,
|
||||||
ArcsecJsonParamBase& paramSet) {
|
ArcsecJsonParamBase& paramSet) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
if (commandDataLen > MAX_PATH_SIZE) {
|
if (commandDataLen > MAX_PATH_SIZE) {
|
||||||
return FILE_PATH_TOO_LONG;
|
return FILE_PATH_TOO_LONG;
|
||||||
}
|
}
|
||||||
std::string fullName(reinterpret_cast<const char*>(commandData), commandDataLen);
|
std::string fullName(reinterpret_cast<const char*>(commandData), commandDataLen);
|
||||||
|
|
||||||
result = paramSet.create(fullName, commandBuffer);
|
result = paramSet.create(fullName, commandBuffer);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
dataLinkLayer.encodeFrame(commandBuffer, paramSet.getSize());
|
dataLinkLayer.encodeFrame(commandBuffer, paramSet.getSize());
|
||||||
rawPacket = dataLinkLayer.getEncodedFrame();
|
rawPacket = dataLinkLayer.getEncodedFrame();
|
||||||
rawPacketLen = dataLinkLayer.getEncodedLength();
|
rawPacketLen = dataLinkLayer.getEncodedLength();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::prepareRequestCameraParams() {
|
ReturnValue_t StarTrackerHandler::prepareRequestCameraParams() {
|
||||||
@ -1657,7 +1657,7 @@ ReturnValue_t StarTrackerHandler::prepareRequestCameraParams() {
|
|||||||
dataLinkLayer.encodeFrame(commandBuffer, length);
|
dataLinkLayer.encodeFrame(commandBuffer, length);
|
||||||
rawPacket = dataLinkLayer.getEncodedFrame();
|
rawPacket = dataLinkLayer.getEncodedFrame();
|
||||||
rawPacketLen = dataLinkLayer.getEncodedLength();
|
rawPacketLen = dataLinkLayer.getEncodedLength();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::prepareRequestLimitsParams() {
|
ReturnValue_t StarTrackerHandler::prepareRequestLimitsParams() {
|
||||||
@ -1666,7 +1666,7 @@ ReturnValue_t StarTrackerHandler::prepareRequestLimitsParams() {
|
|||||||
dataLinkLayer.encodeFrame(commandBuffer, length);
|
dataLinkLayer.encodeFrame(commandBuffer, length);
|
||||||
rawPacket = dataLinkLayer.getEncodedFrame();
|
rawPacket = dataLinkLayer.getEncodedFrame();
|
||||||
rawPacketLen = dataLinkLayer.getEncodedLength();
|
rawPacketLen = dataLinkLayer.getEncodedLength();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::prepareRequestLogLevelParams() {
|
ReturnValue_t StarTrackerHandler::prepareRequestLogLevelParams() {
|
||||||
@ -1675,7 +1675,7 @@ ReturnValue_t StarTrackerHandler::prepareRequestLogLevelParams() {
|
|||||||
dataLinkLayer.encodeFrame(commandBuffer, length);
|
dataLinkLayer.encodeFrame(commandBuffer, length);
|
||||||
rawPacket = dataLinkLayer.getEncodedFrame();
|
rawPacket = dataLinkLayer.getEncodedFrame();
|
||||||
rawPacketLen = dataLinkLayer.getEncodedLength();
|
rawPacketLen = dataLinkLayer.getEncodedLength();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::prepareRequestMountingParams() {
|
ReturnValue_t StarTrackerHandler::prepareRequestMountingParams() {
|
||||||
@ -1684,7 +1684,7 @@ ReturnValue_t StarTrackerHandler::prepareRequestMountingParams() {
|
|||||||
dataLinkLayer.encodeFrame(commandBuffer, length);
|
dataLinkLayer.encodeFrame(commandBuffer, length);
|
||||||
rawPacket = dataLinkLayer.getEncodedFrame();
|
rawPacket = dataLinkLayer.getEncodedFrame();
|
||||||
rawPacketLen = dataLinkLayer.getEncodedLength();
|
rawPacketLen = dataLinkLayer.getEncodedLength();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::prepareRequestImageProcessorParams() {
|
ReturnValue_t StarTrackerHandler::prepareRequestImageProcessorParams() {
|
||||||
@ -1693,7 +1693,7 @@ ReturnValue_t StarTrackerHandler::prepareRequestImageProcessorParams() {
|
|||||||
dataLinkLayer.encodeFrame(commandBuffer, length);
|
dataLinkLayer.encodeFrame(commandBuffer, length);
|
||||||
rawPacket = dataLinkLayer.getEncodedFrame();
|
rawPacket = dataLinkLayer.getEncodedFrame();
|
||||||
rawPacketLen = dataLinkLayer.getEncodedLength();
|
rawPacketLen = dataLinkLayer.getEncodedLength();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::prepareRequestCentroidingParams() {
|
ReturnValue_t StarTrackerHandler::prepareRequestCentroidingParams() {
|
||||||
@ -1702,7 +1702,7 @@ ReturnValue_t StarTrackerHandler::prepareRequestCentroidingParams() {
|
|||||||
dataLinkLayer.encodeFrame(commandBuffer, length);
|
dataLinkLayer.encodeFrame(commandBuffer, length);
|
||||||
rawPacket = dataLinkLayer.getEncodedFrame();
|
rawPacket = dataLinkLayer.getEncodedFrame();
|
||||||
rawPacketLen = dataLinkLayer.getEncodedLength();
|
rawPacketLen = dataLinkLayer.getEncodedLength();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::prepareRequestLisaParams() {
|
ReturnValue_t StarTrackerHandler::prepareRequestLisaParams() {
|
||||||
@ -1711,7 +1711,7 @@ ReturnValue_t StarTrackerHandler::prepareRequestLisaParams() {
|
|||||||
dataLinkLayer.encodeFrame(commandBuffer, length);
|
dataLinkLayer.encodeFrame(commandBuffer, length);
|
||||||
rawPacket = dataLinkLayer.getEncodedFrame();
|
rawPacket = dataLinkLayer.getEncodedFrame();
|
||||||
rawPacketLen = dataLinkLayer.getEncodedLength();
|
rawPacketLen = dataLinkLayer.getEncodedLength();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::prepareRequestMatchingParams() {
|
ReturnValue_t StarTrackerHandler::prepareRequestMatchingParams() {
|
||||||
@ -1720,7 +1720,7 @@ ReturnValue_t StarTrackerHandler::prepareRequestMatchingParams() {
|
|||||||
dataLinkLayer.encodeFrame(commandBuffer, length);
|
dataLinkLayer.encodeFrame(commandBuffer, length);
|
||||||
rawPacket = dataLinkLayer.getEncodedFrame();
|
rawPacket = dataLinkLayer.getEncodedFrame();
|
||||||
rawPacketLen = dataLinkLayer.getEncodedLength();
|
rawPacketLen = dataLinkLayer.getEncodedLength();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::prepareRequestTrackingParams() {
|
ReturnValue_t StarTrackerHandler::prepareRequestTrackingParams() {
|
||||||
@ -1729,7 +1729,7 @@ ReturnValue_t StarTrackerHandler::prepareRequestTrackingParams() {
|
|||||||
dataLinkLayer.encodeFrame(commandBuffer, length);
|
dataLinkLayer.encodeFrame(commandBuffer, length);
|
||||||
rawPacket = dataLinkLayer.getEncodedFrame();
|
rawPacket = dataLinkLayer.getEncodedFrame();
|
||||||
rawPacketLen = dataLinkLayer.getEncodedLength();
|
rawPacketLen = dataLinkLayer.getEncodedLength();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::prepareRequestValidationParams() {
|
ReturnValue_t StarTrackerHandler::prepareRequestValidationParams() {
|
||||||
@ -1738,7 +1738,7 @@ ReturnValue_t StarTrackerHandler::prepareRequestValidationParams() {
|
|||||||
dataLinkLayer.encodeFrame(commandBuffer, length);
|
dataLinkLayer.encodeFrame(commandBuffer, length);
|
||||||
rawPacket = dataLinkLayer.getEncodedFrame();
|
rawPacket = dataLinkLayer.getEncodedFrame();
|
||||||
rawPacketLen = dataLinkLayer.getEncodedLength();
|
rawPacketLen = dataLinkLayer.getEncodedLength();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::prepareRequestAlgoParams() {
|
ReturnValue_t StarTrackerHandler::prepareRequestAlgoParams() {
|
||||||
@ -1747,7 +1747,7 @@ ReturnValue_t StarTrackerHandler::prepareRequestAlgoParams() {
|
|||||||
dataLinkLayer.encodeFrame(commandBuffer, length);
|
dataLinkLayer.encodeFrame(commandBuffer, length);
|
||||||
rawPacket = dataLinkLayer.getEncodedFrame();
|
rawPacket = dataLinkLayer.getEncodedFrame();
|
||||||
rawPacketLen = dataLinkLayer.getEncodedLength();
|
rawPacketLen = dataLinkLayer.getEncodedLength();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::prepareRequestSubscriptionParams() {
|
ReturnValue_t StarTrackerHandler::prepareRequestSubscriptionParams() {
|
||||||
@ -1756,7 +1756,7 @@ ReturnValue_t StarTrackerHandler::prepareRequestSubscriptionParams() {
|
|||||||
dataLinkLayer.encodeFrame(commandBuffer, length);
|
dataLinkLayer.encodeFrame(commandBuffer, length);
|
||||||
rawPacket = dataLinkLayer.getEncodedFrame();
|
rawPacket = dataLinkLayer.getEncodedFrame();
|
||||||
rawPacketLen = dataLinkLayer.getEncodedLength();
|
rawPacketLen = dataLinkLayer.getEncodedLength();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::prepareRequestLogSubscriptionParams() {
|
ReturnValue_t StarTrackerHandler::prepareRequestLogSubscriptionParams() {
|
||||||
@ -1765,7 +1765,7 @@ ReturnValue_t StarTrackerHandler::prepareRequestLogSubscriptionParams() {
|
|||||||
dataLinkLayer.encodeFrame(commandBuffer, length);
|
dataLinkLayer.encodeFrame(commandBuffer, length);
|
||||||
rawPacket = dataLinkLayer.getEncodedFrame();
|
rawPacket = dataLinkLayer.getEncodedFrame();
|
||||||
rawPacketLen = dataLinkLayer.getEncodedLength();
|
rawPacketLen = dataLinkLayer.getEncodedLength();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::prepareRequestDebugCameraParams() {
|
ReturnValue_t StarTrackerHandler::prepareRequestDebugCameraParams() {
|
||||||
@ -1774,7 +1774,7 @@ ReturnValue_t StarTrackerHandler::prepareRequestDebugCameraParams() {
|
|||||||
dataLinkLayer.encodeFrame(commandBuffer, length);
|
dataLinkLayer.encodeFrame(commandBuffer, length);
|
||||||
rawPacket = dataLinkLayer.getEncodedFrame();
|
rawPacket = dataLinkLayer.getEncodedFrame();
|
||||||
rawPacketLen = dataLinkLayer.getEncodedLength();
|
rawPacketLen = dataLinkLayer.getEncodedLength();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::handleSetParamReply() {
|
ReturnValue_t StarTrackerHandler::handleSetParamReply() {
|
||||||
@ -1792,7 +1792,7 @@ ReturnValue_t StarTrackerHandler::handleSetParamReply() {
|
|||||||
if (internalState != InternalState::IDLE) {
|
if (internalState != InternalState::IDLE) {
|
||||||
handleStartup(reply + PARAMETER_ID_OFFSET);
|
handleStartup(reply + PARAMETER_ID_OFFSET);
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::handleActionReply() {
|
ReturnValue_t StarTrackerHandler::handleActionReply() {
|
||||||
@ -1805,13 +1805,13 @@ ReturnValue_t StarTrackerHandler::handleActionReply() {
|
|||||||
<< static_cast<unsigned int>(status) << std::endl;
|
<< static_cast<unsigned int>(status) << std::endl;
|
||||||
return ACTION_FAILED;
|
return ACTION_FAILED;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::handleChecksumReply() {
|
ReturnValue_t StarTrackerHandler::handleChecksumReply() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
result = handleActionReply();
|
result = handleActionReply();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
const uint8_t* replyData = dataLinkLayer.getReply() + ACTION_DATA_OFFSET;
|
const uint8_t* replyData = dataLinkLayer.getReply() + ACTION_DATA_OFFSET;
|
||||||
@ -1834,25 +1834,25 @@ ReturnValue_t StarTrackerHandler::handleChecksumReply() {
|
|||||||
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_STARTRACKER == 1
|
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_STARTRACKER == 1
|
||||||
checksumReply.printChecksum();
|
checksumReply.printChecksum();
|
||||||
#endif /* OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_STARTRACKER == 1 */
|
#endif /* OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_STARTRACKER == 1 */
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::handleParamRequest(LocalPoolDataSetBase& dataset, size_t size) {
|
ReturnValue_t StarTrackerHandler::handleParamRequest(LocalPoolDataSetBase& dataset, size_t size) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
result = dataset.read(TIMEOUT_TYPE, MUTEX_TIMEOUT);
|
result = dataset.read(TIMEOUT_TYPE, MUTEX_TIMEOUT);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
const uint8_t* reply = dataLinkLayer.getReply() + PARAMS_OFFSET;
|
const uint8_t* reply = dataLinkLayer.getReply() + PARAMS_OFFSET;
|
||||||
dataset.setValidityBufferGeneration(false);
|
dataset.setValidityBufferGeneration(false);
|
||||||
result = dataset.deSerialize(&reply, &size, SerializeIF::Endianness::LITTLE);
|
result = dataset.deSerialize(&reply, &size, SerializeIF::Endianness::LITTLE);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "StarTrackerHandler::handleParamRequest Deserialization failed" << std::endl;
|
sif::warning << "StarTrackerHandler::handleParamRequest Deserialization failed" << std::endl;
|
||||||
}
|
}
|
||||||
dataset.setValidityBufferGeneration(true);
|
dataset.setValidityBufferGeneration(true);
|
||||||
dataset.setValidity(true, true);
|
dataset.setValidity(true, true);
|
||||||
result = dataset.commit(TIMEOUT_TYPE, MUTEX_TIMEOUT);
|
result = dataset.commit(TIMEOUT_TYPE, MUTEX_TIMEOUT);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_STARTRACKER == 1
|
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_STARTRACKER == 1
|
||||||
@ -1862,7 +1862,7 @@ ReturnValue_t StarTrackerHandler::handleParamRequest(LocalPoolDataSetBase& datas
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::handlePingReply() {
|
ReturnValue_t StarTrackerHandler::handlePingReply() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
uint32_t pingId = 0;
|
uint32_t pingId = 0;
|
||||||
const uint8_t* reply = dataLinkLayer.getReply();
|
const uint8_t* reply = dataLinkLayer.getReply();
|
||||||
uint8_t status = dataLinkLayer.getStatusField();
|
uint8_t status = dataLinkLayer.getStatusField();
|
||||||
@ -1916,11 +1916,11 @@ ReturnValue_t StarTrackerHandler::checkProgram() {
|
|||||||
<< std::endl;
|
<< std::endl;
|
||||||
return INVALID_PROGRAM;
|
return INVALID_PROGRAM;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::handleTm(LocalPoolDataSetBase& dataset, size_t size) {
|
ReturnValue_t StarTrackerHandler::handleTm(LocalPoolDataSetBase& dataset, size_t size) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
uint8_t status = *(dataLinkLayer.getReply() + STATUS_OFFSET);
|
uint8_t status = *(dataLinkLayer.getReply() + STATUS_OFFSET);
|
||||||
if (status != startracker::STATUS_OK) {
|
if (status != startracker::STATUS_OK) {
|
||||||
sif::warning << "StarTrackerHandler::handleTm: Reply error: "
|
sif::warning << "StarTrackerHandler::handleTm: Reply error: "
|
||||||
@ -1928,19 +1928,19 @@ ReturnValue_t StarTrackerHandler::handleTm(LocalPoolDataSetBase& dataset, size_t
|
|||||||
return REPLY_ERROR;
|
return REPLY_ERROR;
|
||||||
}
|
}
|
||||||
result = dataset.read(TIMEOUT_TYPE, MUTEX_TIMEOUT);
|
result = dataset.read(TIMEOUT_TYPE, MUTEX_TIMEOUT);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
const uint8_t* reply = dataLinkLayer.getReply() + TICKS_OFFSET;
|
const uint8_t* reply = dataLinkLayer.getReply() + TICKS_OFFSET;
|
||||||
dataset.setValidityBufferGeneration(false);
|
dataset.setValidityBufferGeneration(false);
|
||||||
result = dataset.deSerialize(&reply, &size, SerializeIF::Endianness::LITTLE);
|
result = dataset.deSerialize(&reply, &size, SerializeIF::Endianness::LITTLE);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "StarTrackerHandler::handleTm: Deserialization failed" << std::endl;
|
sif::warning << "StarTrackerHandler::handleTm: Deserialization failed" << std::endl;
|
||||||
}
|
}
|
||||||
dataset.setValidityBufferGeneration(true);
|
dataset.setValidityBufferGeneration(true);
|
||||||
dataset.setValidity(true, true);
|
dataset.setValidity(true, true);
|
||||||
result = dataset.commit(TIMEOUT_TYPE, MUTEX_TIMEOUT);
|
result = dataset.commit(TIMEOUT_TYPE, MUTEX_TIMEOUT);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_STARTRACKER == 1
|
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_STARTRACKER == 1
|
||||||
@ -1950,7 +1950,7 @@ ReturnValue_t StarTrackerHandler::handleTm(LocalPoolDataSetBase& dataset, size_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StarTrackerHandler::handleActionReplySet(LocalPoolDataSetBase& dataset, size_t size) {
|
ReturnValue_t StarTrackerHandler::handleActionReplySet(LocalPoolDataSetBase& dataset, size_t size) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
uint8_t status = *(dataLinkLayer.getReply() + STATUS_OFFSET);
|
uint8_t status = *(dataLinkLayer.getReply() + STATUS_OFFSET);
|
||||||
if (status != startracker::STATUS_OK) {
|
if (status != startracker::STATUS_OK) {
|
||||||
sif::warning << "StarTrackerHandler::handleActionReplySet: Reply error: "
|
sif::warning << "StarTrackerHandler::handleActionReplySet: Reply error: "
|
||||||
@ -1958,19 +1958,19 @@ ReturnValue_t StarTrackerHandler::handleActionReplySet(LocalPoolDataSetBase& dat
|
|||||||
return REPLY_ERROR;
|
return REPLY_ERROR;
|
||||||
}
|
}
|
||||||
result = dataset.read(TIMEOUT_TYPE, MUTEX_TIMEOUT);
|
result = dataset.read(TIMEOUT_TYPE, MUTEX_TIMEOUT);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
const uint8_t* reply = dataLinkLayer.getReply() + ACTION_DATA_OFFSET;
|
const uint8_t* reply = dataLinkLayer.getReply() + ACTION_DATA_OFFSET;
|
||||||
dataset.setValidityBufferGeneration(false);
|
dataset.setValidityBufferGeneration(false);
|
||||||
result = dataset.deSerialize(&reply, &size, SerializeIF::Endianness::LITTLE);
|
result = dataset.deSerialize(&reply, &size, SerializeIF::Endianness::LITTLE);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "StarTrackerHandler::handleActionReplySet Deserialization failed" << std::endl;
|
sif::warning << "StarTrackerHandler::handleActionReplySet Deserialization failed" << std::endl;
|
||||||
}
|
}
|
||||||
dataset.setValidityBufferGeneration(true);
|
dataset.setValidityBufferGeneration(true);
|
||||||
dataset.setValidity(true, true);
|
dataset.setValidity(true, true);
|
||||||
result = dataset.commit(TIMEOUT_TYPE, MUTEX_TIMEOUT);
|
result = dataset.commit(TIMEOUT_TYPE, MUTEX_TIMEOUT);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_STARTRACKER == 1
|
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_STARTRACKER == 1
|
||||||
@ -2080,5 +2080,5 @@ ReturnValue_t StarTrackerHandler::checkCommand(ActionId_t actionId) {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -314,7 +314,7 @@ class StarTrackerHandler : public DeviceHandlerBase {
|
|||||||
* @param commandData Pointer to received command data
|
* @param commandData Pointer to received command data
|
||||||
* @param commandDataLen Size of received command data
|
* @param commandDataLen Size of received command data
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if start of execution was successful, otherwise error return value
|
* @return returnvalue::OK if start of execution was successful, otherwise error return value
|
||||||
*/
|
*/
|
||||||
ReturnValue_t executeFlashReadCommand(const uint8_t* commandData, size_t commandDataLen);
|
ReturnValue_t executeFlashReadCommand(const uint8_t* commandData, size_t commandDataLen);
|
||||||
|
|
||||||
@ -385,7 +385,7 @@ class StarTrackerHandler : public DeviceHandlerBase {
|
|||||||
* @param commandDataLen Length of command
|
* @param commandDataLen Length of command
|
||||||
* @param paramSet The object defining the command generation
|
* @param paramSet The object defining the command generation
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if successful, otherwise error return Value
|
* @return returnvalue::OK if successful, otherwise error return Value
|
||||||
*/
|
*/
|
||||||
ReturnValue_t prepareParamCommand(const uint8_t* commandData, size_t commandDataLen,
|
ReturnValue_t prepareParamCommand(const uint8_t* commandData, size_t commandDataLen,
|
||||||
ArcsecJsonParamBase& paramSet);
|
ArcsecJsonParamBase& paramSet);
|
||||||
@ -454,7 +454,7 @@ class StarTrackerHandler : public DeviceHandlerBase {
|
|||||||
* @param dataset Dataset where reply data will be written to
|
* @param dataset Dataset where reply data will be written to
|
||||||
* @param size Size of the dataset
|
* @param size Size of the dataset
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if successful, otherwise error return value
|
* @return returnvalue::OK if successful, otherwise error return value
|
||||||
*/
|
*/
|
||||||
ReturnValue_t handleTm(LocalPoolDataSetBase& dataset, size_t size);
|
ReturnValue_t handleTm(LocalPoolDataSetBase& dataset, size_t size);
|
||||||
|
|
||||||
@ -463,7 +463,7 @@ class StarTrackerHandler : public DeviceHandlerBase {
|
|||||||
*
|
*
|
||||||
* @param actioId Id of received command
|
* @param actioId Id of received command
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if star tracker is in valid mode, otherwise error return value
|
* @return returnvalue::OK if star tracker is in valid mode, otherwise error return value
|
||||||
*/
|
*/
|
||||||
ReturnValue_t checkCommand(ActionId_t actionId);
|
ReturnValue_t checkCommand(ActionId_t actionId);
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -19,14 +19,14 @@ ReturnValue_t StrHelper::initialize() {
|
|||||||
sdcMan = SdCardManager::instance();
|
sdcMan = SdCardManager::instance();
|
||||||
if (sdcMan == nullptr) {
|
if (sdcMan == nullptr) {
|
||||||
sif::warning << "StrHelper::initialize: Invalid SD Card Manager" << std::endl;
|
sif::warning << "StrHelper::initialize: Invalid SD Card Manager" << std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StrHelper::performOperation(uint8_t operationCode) {
|
ReturnValue_t StrHelper::performOperation(uint8_t operationCode) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
semaphore.acquire();
|
semaphore.acquire();
|
||||||
while (true) {
|
while (true) {
|
||||||
switch (internalState) {
|
switch (internalState) {
|
||||||
@ -36,7 +36,7 @@ ReturnValue_t StrHelper::performOperation(uint8_t operationCode) {
|
|||||||
}
|
}
|
||||||
case InternalState::UPLOAD_IMAGE: {
|
case InternalState::UPLOAD_IMAGE: {
|
||||||
result = performImageUpload();
|
result = performImageUpload();
|
||||||
if (result == RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
triggerEvent(IMAGE_UPLOAD_SUCCESSFUL);
|
triggerEvent(IMAGE_UPLOAD_SUCCESSFUL);
|
||||||
} else {
|
} else {
|
||||||
triggerEvent(IMAGE_UPLOAD_FAILED);
|
triggerEvent(IMAGE_UPLOAD_FAILED);
|
||||||
@ -46,7 +46,7 @@ ReturnValue_t StrHelper::performOperation(uint8_t operationCode) {
|
|||||||
}
|
}
|
||||||
case InternalState::DOWNLOAD_IMAGE: {
|
case InternalState::DOWNLOAD_IMAGE: {
|
||||||
result = performImageDownload();
|
result = performImageDownload();
|
||||||
if (result == RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
triggerEvent(IMAGE_DOWNLOAD_SUCCESSFUL);
|
triggerEvent(IMAGE_DOWNLOAD_SUCCESSFUL);
|
||||||
} else {
|
} else {
|
||||||
triggerEvent(IMAGE_DOWNLOAD_FAILED);
|
triggerEvent(IMAGE_DOWNLOAD_FAILED);
|
||||||
@ -56,7 +56,7 @@ ReturnValue_t StrHelper::performOperation(uint8_t operationCode) {
|
|||||||
}
|
}
|
||||||
case InternalState::FLASH_READ: {
|
case InternalState::FLASH_READ: {
|
||||||
result = performFlashRead();
|
result = performFlashRead();
|
||||||
if (result == RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
triggerEvent(FLASH_READ_SUCCESSFUL);
|
triggerEvent(FLASH_READ_SUCCESSFUL);
|
||||||
} else {
|
} else {
|
||||||
triggerEvent(FLASH_READ_FAILED);
|
triggerEvent(FLASH_READ_FAILED);
|
||||||
@ -66,7 +66,7 @@ ReturnValue_t StrHelper::performOperation(uint8_t operationCode) {
|
|||||||
}
|
}
|
||||||
case InternalState::FIRMWARE_UPDATE: {
|
case InternalState::FIRMWARE_UPDATE: {
|
||||||
result = performFirmwareUpdate();
|
result = performFirmwareUpdate();
|
||||||
if (result == RETURN_OK) {
|
if (result == returnvalue::OK) {
|
||||||
triggerEvent(FIRMWARE_UPDATE_SUCCESSFUL);
|
triggerEvent(FIRMWARE_UPDATE_SUCCESSFUL);
|
||||||
} else {
|
} else {
|
||||||
triggerEvent(FIRMWARE_UPDATE_FAILED);
|
triggerEvent(FIRMWARE_UPDATE_FAILED);
|
||||||
@ -85,9 +85,9 @@ ReturnValue_t StrHelper::setComIF(DeviceCommunicationIF* communicationInterface_
|
|||||||
uartComIF = dynamic_cast<UartComIF*>(communicationInterface_);
|
uartComIF = dynamic_cast<UartComIF*>(communicationInterface_);
|
||||||
if (uartComIF == nullptr) {
|
if (uartComIF == nullptr) {
|
||||||
sif::warning << "StrHelper::initialize: Invalid uart com if" << std::endl;
|
sif::warning << "StrHelper::initialize: Invalid uart com if" << std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StrHelper::setComCookie(CookieIF* comCookie_) { comCookie = comCookie_; }
|
void StrHelper::setComCookie(CookieIF* comCookie_) { comCookie = comCookie_; }
|
||||||
@ -95,7 +95,7 @@ void StrHelper::setComCookie(CookieIF* comCookie_) { comCookie = comCookie_; }
|
|||||||
ReturnValue_t StrHelper::startImageUpload(std::string fullname) {
|
ReturnValue_t StrHelper::startImageUpload(std::string fullname) {
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
ReturnValue_t result = checkPath(fullname);
|
ReturnValue_t result = checkPath(fullname);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -106,13 +106,13 @@ ReturnValue_t StrHelper::startImageUpload(std::string fullname) {
|
|||||||
internalState = InternalState::UPLOAD_IMAGE;
|
internalState = InternalState::UPLOAD_IMAGE;
|
||||||
semaphore.release();
|
semaphore.release();
|
||||||
terminate = false;
|
terminate = false;
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StrHelper::startImageDownload(std::string path) {
|
ReturnValue_t StrHelper::startImageDownload(std::string path) {
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
ReturnValue_t result = checkPath(path);
|
ReturnValue_t result = checkPath(path);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -123,7 +123,7 @@ ReturnValue_t StrHelper::startImageDownload(std::string path) {
|
|||||||
internalState = InternalState::DOWNLOAD_IMAGE;
|
internalState = InternalState::DOWNLOAD_IMAGE;
|
||||||
terminate = false;
|
terminate = false;
|
||||||
semaphore.release();
|
semaphore.release();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StrHelper::stopProcess() { terminate = true; }
|
void StrHelper::stopProcess() { terminate = true; }
|
||||||
@ -135,7 +135,7 @@ void StrHelper::setFlashReadFilename(std::string filename) { flashRead.filename
|
|||||||
ReturnValue_t StrHelper::startFirmwareUpdate(std::string fullname) {
|
ReturnValue_t StrHelper::startFirmwareUpdate(std::string fullname) {
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
ReturnValue_t result = checkPath(fullname);
|
ReturnValue_t result = checkPath(fullname);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -148,13 +148,13 @@ ReturnValue_t StrHelper::startFirmwareUpdate(std::string fullname) {
|
|||||||
internalState = InternalState::FIRMWARE_UPDATE;
|
internalState = InternalState::FIRMWARE_UPDATE;
|
||||||
semaphore.release();
|
semaphore.release();
|
||||||
terminate = false;
|
terminate = false;
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StrHelper::startFlashRead(std::string path, uint8_t startRegion, uint32_t length) {
|
ReturnValue_t StrHelper::startFlashRead(std::string path, uint8_t startRegion, uint32_t length) {
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
ReturnValue_t result = checkPath(path);
|
ReturnValue_t result = checkPath(path);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -167,7 +167,7 @@ ReturnValue_t StrHelper::startFlashRead(std::string path, uint8_t startRegion, u
|
|||||||
internalState = InternalState::FLASH_READ;
|
internalState = InternalState::FLASH_READ;
|
||||||
semaphore.release();
|
semaphore.release();
|
||||||
terminate = false;
|
terminate = false;
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StrHelper::disableTimestamping() { timestamping = false; }
|
void StrHelper::disableTimestamping() { timestamping = false; }
|
||||||
@ -192,11 +192,11 @@ ReturnValue_t StrHelper::performImageDownload() {
|
|||||||
while (downloadReq.position < ImageDownload::LAST_POSITION) {
|
while (downloadReq.position < ImageDownload::LAST_POSITION) {
|
||||||
if (terminate) {
|
if (terminate) {
|
||||||
file.close();
|
file.close();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
arc_pack_download_action_req(&downloadReq, commandBuffer, &size);
|
arc_pack_download_action_req(&downloadReq, commandBuffer, &size);
|
||||||
result = sendAndRead(size, downloadReq.position);
|
result = sendAndRead(size, downloadReq.position);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (retries < CONFIG_MAX_DOWNLOAD_RETRIES) {
|
if (retries < CONFIG_MAX_DOWNLOAD_RETRIES) {
|
||||||
uartComIF->flushUartRxBuffer(comCookie);
|
uartComIF->flushUartRxBuffer(comCookie);
|
||||||
retries++;
|
retries++;
|
||||||
@ -206,7 +206,7 @@ ReturnValue_t StrHelper::performImageDownload() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = checkActionReply();
|
result = checkActionReply();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (retries < CONFIG_MAX_DOWNLOAD_RETRIES) {
|
if (retries < CONFIG_MAX_DOWNLOAD_RETRIES) {
|
||||||
uartComIF->flushUartRxBuffer(comCookie);
|
uartComIF->flushUartRxBuffer(comCookie);
|
||||||
retries++;
|
retries++;
|
||||||
@ -216,7 +216,7 @@ ReturnValue_t StrHelper::performImageDownload() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = checkReplyPosition(downloadReq.position);
|
result = checkReplyPosition(downloadReq.position);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (retries < CONFIG_MAX_DOWNLOAD_RETRIES) {
|
if (retries < CONFIG_MAX_DOWNLOAD_RETRIES) {
|
||||||
uartComIF->flushUartRxBuffer(comCookie);
|
uartComIF->flushUartRxBuffer(comCookie);
|
||||||
retries++;
|
retries++;
|
||||||
@ -234,11 +234,11 @@ ReturnValue_t StrHelper::performImageDownload() {
|
|||||||
retries = 0;
|
retries = 0;
|
||||||
}
|
}
|
||||||
file.close();
|
file.close();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StrHelper::performImageUpload() {
|
ReturnValue_t StrHelper::performImageUpload() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
uint32_t size = 0;
|
uint32_t size = 0;
|
||||||
uint32_t imageSize = 0;
|
uint32_t imageSize = 0;
|
||||||
struct UploadActionRequest uploadReq;
|
struct UploadActionRequest uploadReq;
|
||||||
@ -247,7 +247,7 @@ ReturnValue_t StrHelper::performImageUpload() {
|
|||||||
if (not std::filesystem::exists(uploadImage.uploadFile)) {
|
if (not std::filesystem::exists(uploadImage.uploadFile)) {
|
||||||
triggerEvent(STR_HELPER_FILE_NOT_EXISTS, static_cast<uint32_t>(internalState));
|
triggerEvent(STR_HELPER_FILE_NOT_EXISTS, static_cast<uint32_t>(internalState));
|
||||||
internalState = InternalState::IDLE;
|
internalState = InternalState::IDLE;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
std::ifstream file(uploadImage.uploadFile, std::ifstream::binary);
|
std::ifstream file(uploadImage.uploadFile, std::ifstream::binary);
|
||||||
// Set position of next character to end of file input stream
|
// Set position of next character to end of file input stream
|
||||||
@ -260,18 +260,18 @@ ReturnValue_t StrHelper::performImageUpload() {
|
|||||||
while ((uploadReq.position + 1) * SIZE_IMAGE_PART < imageSize) {
|
while ((uploadReq.position + 1) * SIZE_IMAGE_PART < imageSize) {
|
||||||
if (terminate) {
|
if (terminate) {
|
||||||
file.close();
|
file.close();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
file.seekg(uploadReq.position * SIZE_IMAGE_PART, file.beg);
|
file.seekg(uploadReq.position * SIZE_IMAGE_PART, file.beg);
|
||||||
file.read(reinterpret_cast<char*>(uploadReq.data), SIZE_IMAGE_PART);
|
file.read(reinterpret_cast<char*>(uploadReq.data), SIZE_IMAGE_PART);
|
||||||
arc_pack_upload_action_req(&uploadReq, commandBuffer, &size);
|
arc_pack_upload_action_req(&uploadReq, commandBuffer, &size);
|
||||||
result = sendAndRead(size, uploadReq.position);
|
result = sendAndRead(size, uploadReq.position);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
file.close();
|
file.close();
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
result = checkActionReply();
|
result = checkActionReply();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
file.close();
|
file.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -288,25 +288,25 @@ ReturnValue_t StrHelper::performImageUpload() {
|
|||||||
uploadReq.position++;
|
uploadReq.position++;
|
||||||
arc_pack_upload_action_req(&uploadReq, commandBuffer, &size);
|
arc_pack_upload_action_req(&uploadReq, commandBuffer, &size);
|
||||||
result = sendAndRead(size, uploadReq.position);
|
result = sendAndRead(size, uploadReq.position);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
result = checkActionReply();
|
result = checkActionReply();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#if OBSW_DEBUG_STARTRACKER == 1
|
#if OBSW_DEBUG_STARTRACKER == 1
|
||||||
progressPrinter.print((uploadReq.position + 1) * SIZE_IMAGE_PART);
|
progressPrinter.print((uploadReq.position + 1) * SIZE_IMAGE_PART);
|
||||||
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
|
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StrHelper::performFirmwareUpdate() {
|
ReturnValue_t StrHelper::performFirmwareUpdate() {
|
||||||
using namespace startracker;
|
using namespace startracker;
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
result = unlockAndEraseRegions(static_cast<uint32_t>(startracker::FirmwareRegions::FIRST),
|
result = unlockAndEraseRegions(static_cast<uint32_t>(startracker::FirmwareRegions::FIRST),
|
||||||
static_cast<uint32_t>(startracker::FirmwareRegions::LAST));
|
static_cast<uint32_t>(startracker::FirmwareRegions::LAST));
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = performFlashWrite();
|
result = performFlashWrite();
|
||||||
@ -314,7 +314,7 @@ ReturnValue_t StrHelper::performFirmwareUpdate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StrHelper::performFlashWrite() {
|
ReturnValue_t StrHelper::performFlashWrite() {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
uint32_t size = 0;
|
uint32_t size = 0;
|
||||||
uint32_t bytesWritten = 0;
|
uint32_t bytesWritten = 0;
|
||||||
uint32_t fileSize = 0;
|
uint32_t fileSize = 0;
|
||||||
@ -322,14 +322,14 @@ ReturnValue_t StrHelper::performFlashWrite() {
|
|||||||
if (not std::filesystem::exists(flashWrite.fullname)) {
|
if (not std::filesystem::exists(flashWrite.fullname)) {
|
||||||
triggerEvent(STR_HELPER_FILE_NOT_EXISTS, static_cast<uint32_t>(internalState));
|
triggerEvent(STR_HELPER_FILE_NOT_EXISTS, static_cast<uint32_t>(internalState));
|
||||||
internalState = InternalState::IDLE;
|
internalState = InternalState::IDLE;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
std::ifstream file(flashWrite.fullname, std::ifstream::binary);
|
std::ifstream file(flashWrite.fullname, std::ifstream::binary);
|
||||||
file.seekg(0, file.end);
|
file.seekg(0, file.end);
|
||||||
fileSize = file.tellg();
|
fileSize = file.tellg();
|
||||||
if (fileSize > FLASH_REGION_SIZE * (flashWrite.lastRegion - flashWrite.firstRegion)) {
|
if (fileSize > FLASH_REGION_SIZE * (flashWrite.lastRegion - flashWrite.firstRegion)) {
|
||||||
sif::warning << "StrHelper::performFlashWrite: Invalid file" << std::endl;
|
sif::warning << "StrHelper::performFlashWrite: Invalid file" << std::endl;
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
#if OBSW_DEBUG_STARTRACKER == 1
|
#if OBSW_DEBUG_STARTRACKER == 1
|
||||||
ProgressPrinter progressPrinter("Flash write", fileSize);
|
ProgressPrinter progressPrinter("Flash write", fileSize);
|
||||||
@ -341,7 +341,7 @@ ReturnValue_t StrHelper::performFlashWrite() {
|
|||||||
for (uint32_t idx = 0; idx < fileChunks; idx++) {
|
for (uint32_t idx = 0; idx < fileChunks; idx++) {
|
||||||
if (terminate) {
|
if (terminate) {
|
||||||
file.close();
|
file.close();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
file.seekg(idx * CHUNK_SIZE, file.beg);
|
file.seekg(idx * CHUNK_SIZE, file.beg);
|
||||||
file.read(reinterpret_cast<char*>(req.data), CHUNK_SIZE);
|
file.read(reinterpret_cast<char*>(req.data), CHUNK_SIZE);
|
||||||
@ -352,12 +352,12 @@ ReturnValue_t StrHelper::performFlashWrite() {
|
|||||||
req.address = bytesWritten;
|
req.address = bytesWritten;
|
||||||
arc_pack_write_action_req(&req, commandBuffer, &size);
|
arc_pack_write_action_req(&req, commandBuffer, &size);
|
||||||
result = sendAndRead(size, req.address);
|
result = sendAndRead(size, req.address);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
file.close();
|
file.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = checkActionReply();
|
result = checkActionReply();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
file.close();
|
file.close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -379,17 +379,17 @@ ReturnValue_t StrHelper::performFlashWrite() {
|
|||||||
bytesWritten += remainingBytes;
|
bytesWritten += remainingBytes;
|
||||||
arc_pack_write_action_req(&req, commandBuffer, &size);
|
arc_pack_write_action_req(&req, commandBuffer, &size);
|
||||||
result = sendAndRead(size, req.address);
|
result = sendAndRead(size, req.address);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = checkActionReply();
|
result = checkActionReply();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#if OBSW_DEBUG_STARTRACKER == 1
|
#if OBSW_DEBUG_STARTRACKER == 1
|
||||||
progressPrinter.print(fileSize);
|
progressPrinter.print(fileSize);
|
||||||
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
|
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StrHelper::performFlashRead() {
|
ReturnValue_t StrHelper::performFlashRead() {
|
||||||
@ -412,7 +412,7 @@ ReturnValue_t StrHelper::performFlashRead() {
|
|||||||
req.address = 0;
|
req.address = 0;
|
||||||
while (bytesRead < flashRead.size) {
|
while (bytesRead < flashRead.size) {
|
||||||
if (terminate) {
|
if (terminate) {
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
if ((flashRead.size - bytesRead) < CHUNK_SIZE) {
|
if ((flashRead.size - bytesRead) < CHUNK_SIZE) {
|
||||||
req.length = flashRead.size - bytesRead;
|
req.length = flashRead.size - bytesRead;
|
||||||
@ -421,7 +421,7 @@ ReturnValue_t StrHelper::performFlashRead() {
|
|||||||
}
|
}
|
||||||
arc_pack_read_action_req(&req, commandBuffer, &size);
|
arc_pack_read_action_req(&req, commandBuffer, &size);
|
||||||
result = sendAndRead(size, req.address);
|
result = sendAndRead(size, req.address);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (retries < CONFIG_MAX_DOWNLOAD_RETRIES) {
|
if (retries < CONFIG_MAX_DOWNLOAD_RETRIES) {
|
||||||
uartComIF->flushUartRxBuffer(comCookie);
|
uartComIF->flushUartRxBuffer(comCookie);
|
||||||
retries++;
|
retries++;
|
||||||
@ -431,7 +431,7 @@ ReturnValue_t StrHelper::performFlashRead() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = checkActionReply();
|
result = checkActionReply();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (retries < CONFIG_MAX_DOWNLOAD_RETRIES) {
|
if (retries < CONFIG_MAX_DOWNLOAD_RETRIES) {
|
||||||
uartComIF->flushUartRxBuffer(comCookie);
|
uartComIF->flushUartRxBuffer(comCookie);
|
||||||
retries++;
|
retries++;
|
||||||
@ -454,12 +454,12 @@ ReturnValue_t StrHelper::performFlashRead() {
|
|||||||
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
|
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
|
||||||
}
|
}
|
||||||
file.close();
|
file.close();
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StrHelper::sendAndRead(size_t size, uint32_t parameter, uint32_t delayMs) {
|
ReturnValue_t StrHelper::sendAndRead(size_t size, uint32_t parameter, uint32_t delayMs) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
ReturnValue_t decResult = RETURN_OK;
|
ReturnValue_t decResult = returnvalue::OK;
|
||||||
size_t receivedDataLen = 0;
|
size_t receivedDataLen = 0;
|
||||||
uint8_t* receivedData = nullptr;
|
uint8_t* receivedData = nullptr;
|
||||||
size_t bytesLeft = 0;
|
size_t bytesLeft = 0;
|
||||||
@ -467,10 +467,10 @@ ReturnValue_t StrHelper::sendAndRead(size_t size, uint32_t parameter, uint32_t d
|
|||||||
datalinkLayer.encodeFrame(commandBuffer, size);
|
datalinkLayer.encodeFrame(commandBuffer, size);
|
||||||
result = uartComIF->sendMessage(comCookie, datalinkLayer.getEncodedFrame(),
|
result = uartComIF->sendMessage(comCookie, datalinkLayer.getEncodedFrame(),
|
||||||
datalinkLayer.getEncodedLength());
|
datalinkLayer.getEncodedLength());
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "StrHelper::sendAndRead: Failed to send packet" << std::endl;
|
sif::warning << "StrHelper::sendAndRead: Failed to send packet" << std::endl;
|
||||||
triggerEvent(STR_HELPER_SENDING_PACKET_FAILED, result, parameter);
|
triggerEvent(STR_HELPER_SENDING_PACKET_FAILED, result, parameter);
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
decResult = ArcsecDatalinkLayer::DEC_IN_PROGRESS;
|
decResult = ArcsecDatalinkLayer::DEC_IN_PROGRESS;
|
||||||
while (decResult == ArcsecDatalinkLayer::DEC_IN_PROGRESS) {
|
while (decResult == ArcsecDatalinkLayer::DEC_IN_PROGRESS) {
|
||||||
@ -479,23 +479,23 @@ ReturnValue_t StrHelper::sendAndRead(size_t size, uint32_t parameter, uint32_t d
|
|||||||
while (delay.isBusy()) {
|
while (delay.isBusy()) {
|
||||||
}
|
}
|
||||||
result = uartComIF->requestReceiveMessage(comCookie, startracker::MAX_FRAME_SIZE * 2 + 2);
|
result = uartComIF->requestReceiveMessage(comCookie, startracker::MAX_FRAME_SIZE * 2 + 2);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "StrHelper::sendAndRead: Failed to request reply" << std::endl;
|
sif::warning << "StrHelper::sendAndRead: Failed to request reply" << std::endl;
|
||||||
triggerEvent(STR_HELPER_REQUESTING_MSG_FAILED, result, parameter);
|
triggerEvent(STR_HELPER_REQUESTING_MSG_FAILED, result, parameter);
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
result = uartComIF->readReceivedMessage(comCookie, &receivedData, &receivedDataLen);
|
result = uartComIF->readReceivedMessage(comCookie, &receivedData, &receivedDataLen);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "StrHelper::sendAndRead: Failed to read received message" << std::endl;
|
sif::warning << "StrHelper::sendAndRead: Failed to read received message" << std::endl;
|
||||||
triggerEvent(STR_HELPER_READING_REPLY_FAILED, result, parameter);
|
triggerEvent(STR_HELPER_READING_REPLY_FAILED, result, parameter);
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
if (receivedDataLen == 0 && missedReplies < MAX_POLLS) {
|
if (receivedDataLen == 0 && missedReplies < MAX_POLLS) {
|
||||||
missedReplies++;
|
missedReplies++;
|
||||||
continue;
|
continue;
|
||||||
} else if ((receivedDataLen == 0) && (missedReplies >= MAX_POLLS)) {
|
} else if ((receivedDataLen == 0) && (missedReplies >= MAX_POLLS)) {
|
||||||
triggerEvent(STR_HELPER_NO_REPLY, parameter);
|
triggerEvent(STR_HELPER_NO_REPLY, parameter);
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
} else {
|
} else {
|
||||||
missedReplies = 0;
|
missedReplies = 0;
|
||||||
}
|
}
|
||||||
@ -504,14 +504,14 @@ ReturnValue_t StrHelper::sendAndRead(size_t size, uint32_t parameter, uint32_t d
|
|||||||
// This should never happen
|
// This should never happen
|
||||||
sif::warning << "StrHelper::sendAndRead: Bytes left after decoding" << std::endl;
|
sif::warning << "StrHelper::sendAndRead: Bytes left after decoding" << std::endl;
|
||||||
triggerEvent(STR_HELPER_COM_ERROR, result, parameter);
|
triggerEvent(STR_HELPER_COM_ERROR, result, parameter);
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (decResult != RETURN_OK) {
|
if (decResult != returnvalue::OK) {
|
||||||
triggerEvent(STR_HELPER_DEC_ERROR, decResult, parameter);
|
triggerEvent(STR_HELPER_DEC_ERROR, decResult, parameter);
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StrHelper::checkActionReply() {
|
ReturnValue_t StrHelper::checkActionReply() {
|
||||||
@ -526,7 +526,7 @@ ReturnValue_t StrHelper::checkActionReply() {
|
|||||||
<< static_cast<unsigned int>(status) << std::endl;
|
<< static_cast<unsigned int>(status) << std::endl;
|
||||||
return STATUS_ERROR;
|
return STATUS_ERROR;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StrHelper::checkReplyPosition(uint32_t expectedPosition) {
|
ReturnValue_t StrHelper::checkReplyPosition(uint32_t expectedPosition) {
|
||||||
@ -534,9 +534,9 @@ ReturnValue_t StrHelper::checkReplyPosition(uint32_t expectedPosition) {
|
|||||||
std::memcpy(&receivedPosition, datalinkLayer.getReply() + POS_OFFSET, sizeof(receivedPosition));
|
std::memcpy(&receivedPosition, datalinkLayer.getReply() + POS_OFFSET, sizeof(receivedPosition));
|
||||||
if (receivedPosition != expectedPosition) {
|
if (receivedPosition != expectedPosition) {
|
||||||
triggerEvent(POSITION_MISMATCH, receivedPosition);
|
triggerEvent(POSITION_MISMATCH, receivedPosition);
|
||||||
return RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
@ -554,12 +554,12 @@ ReturnValue_t StrHelper::checkPath(std::string name) {
|
|||||||
return SD_NOT_MOUNTED;
|
return SD_NOT_MOUNTED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ReturnValue_t StrHelper::unlockAndEraseRegions(uint32_t from, uint32_t to) {
|
ReturnValue_t StrHelper::unlockAndEraseRegions(uint32_t from, uint32_t to) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
#if OBSW_DEBUG_STARTRACKER == 1
|
#if OBSW_DEBUG_STARTRACKER == 1
|
||||||
ProgressPrinter progressPrinter("Unlock and erase", to - from);
|
ProgressPrinter progressPrinter("Unlock and erase", to - from);
|
||||||
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
|
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
|
||||||
@ -572,7 +572,7 @@ ReturnValue_t StrHelper::unlockAndEraseRegions(uint32_t from, uint32_t to) {
|
|||||||
arc_pack_unlock_action_req(&unlockReq, commandBuffer, &size);
|
arc_pack_unlock_action_req(&unlockReq, commandBuffer, &size);
|
||||||
sendAndRead(size, unlockReq.region);
|
sendAndRead(size, unlockReq.region);
|
||||||
result = checkActionReply();
|
result = checkActionReply();
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "StrHelper::unlockAndEraseRegions: Failed to unlock region with id "
|
sif::warning << "StrHelper::unlockAndEraseRegions: Failed to unlock region with id "
|
||||||
<< static_cast<unsigned int>(unlockReq.region) << std::endl;
|
<< static_cast<unsigned int>(unlockReq.region) << std::endl;
|
||||||
return result;
|
return result;
|
||||||
@ -580,7 +580,7 @@ ReturnValue_t StrHelper::unlockAndEraseRegions(uint32_t from, uint32_t to) {
|
|||||||
eraseReq.region = idx;
|
eraseReq.region = idx;
|
||||||
arc_pack_erase_action_req(&eraseReq, commandBuffer, &size);
|
arc_pack_erase_action_req(&eraseReq, commandBuffer, &size);
|
||||||
result = sendAndRead(size, eraseReq.region, FLASH_ERASE_DELAY);
|
result = sendAndRead(size, eraseReq.region, FLASH_ERASE_DELAY);
|
||||||
if (result != RETURN_OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "StrHelper::unlockAndEraseRegions: Failed to erase region with id "
|
sif::warning << "StrHelper::unlockAndEraseRegions: Failed to erase region with id "
|
||||||
<< static_cast<unsigned int>(eraseReq.region) << std::endl;
|
<< static_cast<unsigned int>(eraseReq.region) << std::endl;
|
||||||
return result;
|
return result;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include "fsfw/devicehandlers/CookieIF.h"
|
#include "fsfw/devicehandlers/CookieIF.h"
|
||||||
#include "fsfw/objectmanager/SystemObject.h"
|
#include "fsfw/objectmanager/SystemObject.h"
|
||||||
#include "fsfw/osal/linux/BinarySemaphore.h"
|
#include "fsfw/osal/linux/BinarySemaphore.h"
|
||||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
#include "fsfw/tasks/ExecutableObjectIF.h"
|
#include "fsfw/tasks/ExecutableObjectIF.h"
|
||||||
#include "fsfw_hal/linux/uart/UartComIF.h"
|
#include "fsfw_hal/linux/uart/UartComIF.h"
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ extern "C" {
|
|||||||
*
|
*
|
||||||
* @author J. Meier
|
* @author J. Meier
|
||||||
*/
|
*/
|
||||||
class StrHelper : public SystemObject, public ExecutableObjectIF, public HasReturnvaluesIF {
|
class StrHelper : public SystemObject, public ExecutableObjectIF {
|
||||||
public:
|
public:
|
||||||
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::STR_HELPER;
|
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::STR_HELPER;
|
||||||
|
|
||||||
@ -270,7 +270,7 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu
|
|||||||
/**
|
/**
|
||||||
* @brief Performs firmware update
|
* @brief Performs firmware update
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if successful, otherwise error return value
|
* @return returnvalue::OK if successful, otherwise error return value
|
||||||
*/
|
*/
|
||||||
ReturnValue_t performFirmwareUpdate();
|
ReturnValue_t performFirmwareUpdate();
|
||||||
|
|
||||||
@ -289,7 +289,7 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu
|
|||||||
*
|
*
|
||||||
* @param ID of first region to write to
|
* @param ID of first region to write to
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if successful, otherwise RETURN_FAILED
|
* @return returnvalue::OK if successful, otherwise returnvalue::FAILED
|
||||||
*/
|
*/
|
||||||
ReturnValue_t performFlashWrite();
|
ReturnValue_t performFlashWrite();
|
||||||
|
|
||||||
@ -307,14 +307,14 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu
|
|||||||
* @param parameter Parameter 2 of trigger event function
|
* @param parameter Parameter 2 of trigger event function
|
||||||
* @param delayMs Delay in milliseconds between send and receive call
|
* @param delayMs Delay in milliseconds between send and receive call
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if successful, otherwise RETURN_FAILED
|
* @return returnvalue::OK if successful, otherwise returnvalue::FAILED
|
||||||
*/
|
*/
|
||||||
ReturnValue_t sendAndRead(size_t size, uint32_t parameter, uint32_t delayMs = 0);
|
ReturnValue_t sendAndRead(size_t size, uint32_t parameter, uint32_t delayMs = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Checks the header (type id and status fields) of the action reply
|
* @brief Checks the header (type id and status fields) of the action reply
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if reply confirms success of packet transfer, otherwise REUTRN_FAILED
|
* @return returnvalue::OK if reply confirms success of packet transfer, otherwise REUTRN_FAILED
|
||||||
*/
|
*/
|
||||||
ReturnValue_t checkActionReply();
|
ReturnValue_t checkActionReply();
|
||||||
|
|
||||||
@ -323,7 +323,8 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu
|
|||||||
*
|
*
|
||||||
* @param expectedPosition Value of expected position
|
* @param expectedPosition Value of expected position
|
||||||
*
|
*
|
||||||
* @return RETURN_OK if received position matches expected position, otherwise RETURN_FAILED
|
* @return returnvalue::OK if received position matches expected position, otherwise
|
||||||
|
* returnvalue::FAILED
|
||||||
*/
|
*/
|
||||||
ReturnValue_t checkReplyPosition(uint32_t expectedPosition);
|
ReturnValue_t checkReplyPosition(uint32_t expectedPosition);
|
||||||
|
|
||||||
@ -331,7 +332,7 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu
|
|||||||
/**
|
/**
|
||||||
* @brief Checks if a path points to an sd card and whether the SD card is monuted.
|
* @brief Checks if a path points to an sd card and whether the SD card is monuted.
|
||||||
*
|
*
|
||||||
* @return SD_NOT_MOUNTED id SD card is not mounted, otherwise RETURN_OK
|
* @return SD_NOT_MOUNTED id SD card is not mounted, otherwise returnvalue::OK
|
||||||
*/
|
*/
|
||||||
ReturnValue_t checkPath(std::string name);
|
ReturnValue_t checkPath(std::string name);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 209 translations.
|
* @brief Auto-generated event translation file. Contains 216 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2022-08-08 17:06:18
|
* Generated on: 2022-08-24 16:44:18
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -165,6 +165,8 @@ const char *MPSOC_EXE_FAILURE_REPORT_STRING = "MPSOC_EXE_FAILURE_REPORT";
|
|||||||
const char *MPSOC_ACK_INVALID_APID_STRING = "MPSOC_ACK_INVALID_APID";
|
const char *MPSOC_ACK_INVALID_APID_STRING = "MPSOC_ACK_INVALID_APID";
|
||||||
const char *MPSOC_EXE_INVALID_APID_STRING = "MPSOC_EXE_INVALID_APID";
|
const char *MPSOC_EXE_INVALID_APID_STRING = "MPSOC_EXE_INVALID_APID";
|
||||||
const char *MPSOC_HELPER_SEQ_CNT_MISMATCH_STRING = "MPSOC_HELPER_SEQ_CNT_MISMATCH";
|
const char *MPSOC_HELPER_SEQ_CNT_MISMATCH_STRING = "MPSOC_HELPER_SEQ_CNT_MISMATCH";
|
||||||
|
const char *MPSOC_TM_SIZE_ERROR_STRING = "MPSOC_TM_SIZE_ERROR";
|
||||||
|
const char *MPSOC_TM_CRC_MISSMATCH_STRING = "MPSOC_TM_CRC_MISSMATCH";
|
||||||
const char *TRANSITION_BACK_TO_OFF_STRING = "TRANSITION_BACK_TO_OFF";
|
const char *TRANSITION_BACK_TO_OFF_STRING = "TRANSITION_BACK_TO_OFF";
|
||||||
const char *NEG_V_OUT_OF_BOUNDS_STRING = "NEG_V_OUT_OF_BOUNDS";
|
const char *NEG_V_OUT_OF_BOUNDS_STRING = "NEG_V_OUT_OF_BOUNDS";
|
||||||
const char *U_DRO_OUT_OF_BOUNDS_STRING = "U_DRO_OUT_OF_BOUNDS";
|
const char *U_DRO_OUT_OF_BOUNDS_STRING = "U_DRO_OUT_OF_BOUNDS";
|
||||||
@ -194,6 +196,8 @@ 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_SUCCESSFUL_STRING = "SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL";
|
||||||
const char *SUPV_EVENT_BUFFER_REQUEST_FAILED_STRING = "SUPV_EVENT_BUFFER_REQUEST_FAILED";
|
const char *SUPV_EVENT_BUFFER_REQUEST_FAILED_STRING = "SUPV_EVENT_BUFFER_REQUEST_FAILED";
|
||||||
const char *SUPV_EVENT_BUFFER_REQUEST_TERMINATED_STRING = "SUPV_EVENT_BUFFER_REQUEST_TERMINATED";
|
const char *SUPV_EVENT_BUFFER_REQUEST_TERMINATED_STRING = "SUPV_EVENT_BUFFER_REQUEST_TERMINATED";
|
||||||
|
const char *SUPV_MEM_CHECK_OK_STRING = "SUPV_MEM_CHECK_OK";
|
||||||
|
const char *SUPV_MEM_CHECK_FAIL_STRING = "SUPV_MEM_CHECK_FAIL";
|
||||||
const char *SUPV_SENDING_COMMAND_FAILED_STRING = "SUPV_SENDING_COMMAND_FAILED";
|
const char *SUPV_SENDING_COMMAND_FAILED_STRING = "SUPV_SENDING_COMMAND_FAILED";
|
||||||
const char *SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING = "SUPV_HELPER_REQUESTING_REPLY_FAILED";
|
const char *SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING = "SUPV_HELPER_REQUESTING_REPLY_FAILED";
|
||||||
const char *SUPV_HELPER_READING_REPLY_FAILED_STRING = "SUPV_HELPER_READING_REPLY_FAILED";
|
const char *SUPV_HELPER_READING_REPLY_FAILED_STRING = "SUPV_HELPER_READING_REPLY_FAILED";
|
||||||
@ -206,6 +210,9 @@ const char *SUPV_EXE_INVALID_APID_STRING = "SUPV_EXE_INVALID_APID";
|
|||||||
const char *ACK_RECEPTION_FAILURE_STRING = "ACK_RECEPTION_FAILURE";
|
const char *ACK_RECEPTION_FAILURE_STRING = "ACK_RECEPTION_FAILURE";
|
||||||
const char *EXE_RECEPTION_FAILURE_STRING = "EXE_RECEPTION_FAILURE";
|
const char *EXE_RECEPTION_FAILURE_STRING = "EXE_RECEPTION_FAILURE";
|
||||||
const char *WRITE_MEMORY_FAILED_STRING = "WRITE_MEMORY_FAILED";
|
const char *WRITE_MEMORY_FAILED_STRING = "WRITE_MEMORY_FAILED";
|
||||||
|
const char *SUPV_REPLY_SIZE_MISSMATCH_STRING = "SUPV_REPLY_SIZE_MISSMATCH";
|
||||||
|
const char *SUPV_REPLY_CRC_MISSMATCH_STRING = "SUPV_REPLY_CRC_MISSMATCH";
|
||||||
|
const char *SUPV_UPDATE_PROGRESS_STRING = "SUPV_UPDATE_PROGRESS";
|
||||||
const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
|
const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
|
||||||
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
||||||
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
|
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
|
||||||
@ -533,6 +540,10 @@ const char *translateEvents(Event event) {
|
|||||||
return MPSOC_EXE_INVALID_APID_STRING;
|
return MPSOC_EXE_INVALID_APID_STRING;
|
||||||
case (12611):
|
case (12611):
|
||||||
return MPSOC_HELPER_SEQ_CNT_MISMATCH_STRING;
|
return MPSOC_HELPER_SEQ_CNT_MISMATCH_STRING;
|
||||||
|
case (12612):
|
||||||
|
return MPSOC_TM_SIZE_ERROR_STRING;
|
||||||
|
case (12613):
|
||||||
|
return MPSOC_TM_CRC_MISSMATCH_STRING;
|
||||||
case (12700):
|
case (12700):
|
||||||
return TRANSITION_BACK_TO_OFF_STRING;
|
return TRANSITION_BACK_TO_OFF_STRING;
|
||||||
case (12701):
|
case (12701):
|
||||||
@ -592,29 +603,39 @@ const char *translateEvents(Event event) {
|
|||||||
case (13607):
|
case (13607):
|
||||||
return SUPV_EVENT_BUFFER_REQUEST_TERMINATED_STRING;
|
return SUPV_EVENT_BUFFER_REQUEST_TERMINATED_STRING;
|
||||||
case (13608):
|
case (13608):
|
||||||
return SUPV_SENDING_COMMAND_FAILED_STRING;
|
return SUPV_MEM_CHECK_OK_STRING;
|
||||||
case (13609):
|
case (13609):
|
||||||
return SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING;
|
return SUPV_MEM_CHECK_FAIL_STRING;
|
||||||
case (13610):
|
|
||||||
return SUPV_HELPER_READING_REPLY_FAILED_STRING;
|
|
||||||
case (13611):
|
|
||||||
return SUPV_MISSING_ACK_STRING;
|
|
||||||
case (13612):
|
|
||||||
return SUPV_MISSING_EXE_STRING;
|
|
||||||
case (13613):
|
|
||||||
return SUPV_ACK_FAILURE_REPORT_STRING;
|
|
||||||
case (13614):
|
|
||||||
return SUPV_EXE_FAILURE_REPORT_STRING;
|
|
||||||
case (13615):
|
|
||||||
return SUPV_ACK_INVALID_APID_STRING;
|
|
||||||
case (13616):
|
case (13616):
|
||||||
return SUPV_EXE_INVALID_APID_STRING;
|
return SUPV_SENDING_COMMAND_FAILED_STRING;
|
||||||
case (13617):
|
case (13617):
|
||||||
return ACK_RECEPTION_FAILURE_STRING;
|
return SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING;
|
||||||
case (13618):
|
case (13618):
|
||||||
return EXE_RECEPTION_FAILURE_STRING;
|
return SUPV_HELPER_READING_REPLY_FAILED_STRING;
|
||||||
case (13619):
|
case (13619):
|
||||||
|
return SUPV_MISSING_ACK_STRING;
|
||||||
|
case (13620):
|
||||||
|
return SUPV_MISSING_EXE_STRING;
|
||||||
|
case (13621):
|
||||||
|
return SUPV_ACK_FAILURE_REPORT_STRING;
|
||||||
|
case (13622):
|
||||||
|
return SUPV_EXE_FAILURE_REPORT_STRING;
|
||||||
|
case (13623):
|
||||||
|
return SUPV_ACK_INVALID_APID_STRING;
|
||||||
|
case (13624):
|
||||||
|
return SUPV_EXE_INVALID_APID_STRING;
|
||||||
|
case (13625):
|
||||||
|
return ACK_RECEPTION_FAILURE_STRING;
|
||||||
|
case (13626):
|
||||||
|
return EXE_RECEPTION_FAILURE_STRING;
|
||||||
|
case (13627):
|
||||||
return WRITE_MEMORY_FAILED_STRING;
|
return WRITE_MEMORY_FAILED_STRING;
|
||||||
|
case (13628):
|
||||||
|
return SUPV_REPLY_SIZE_MISSMATCH_STRING;
|
||||||
|
case (13629):
|
||||||
|
return SUPV_REPLY_CRC_MISSMATCH_STRING;
|
||||||
|
case (13630):
|
||||||
|
return SUPV_UPDATE_PROGRESS_STRING;
|
||||||
case (13700):
|
case (13700):
|
||||||
return ALLOC_FAILURE_STRING;
|
return ALLOC_FAILURE_STRING;
|
||||||
case (13701):
|
case (13701):
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 132 translations.
|
* Contains 133 translations.
|
||||||
* Generated on: 2022-08-08 17:06:18
|
* Generated on: 2022-08-24 16:44:18
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
const char *P60DOCK_TEST_TASK_STRING = "P60DOCK_TEST_TASK";
|
const char *P60DOCK_TEST_TASK_STRING = "P60DOCK_TEST_TASK";
|
||||||
const char *CORE_CONTROLLER_STRING = "CORE_CONTROLLER";
|
|
||||||
const char *ACS_CONTROLLER_STRING = "ACS_CONTROLLER";
|
const char *ACS_CONTROLLER_STRING = "ACS_CONTROLLER";
|
||||||
|
const char *CORE_CONTROLLER_STRING = "CORE_CONTROLLER";
|
||||||
const char *THERMAL_CONTROLLER_STRING = "THERMAL_CONTROLLER";
|
const char *THERMAL_CONTROLLER_STRING = "THERMAL_CONTROLLER";
|
||||||
const char *MGM_0_LIS3_HANDLER_STRING = "MGM_0_LIS3_HANDLER";
|
const char *MGM_0_LIS3_HANDLER_STRING = "MGM_0_LIS3_HANDLER";
|
||||||
const char *GYRO_0_ADIS_HANDLER_STRING = "GYRO_0_ADIS_HANDLER";
|
const char *GYRO_0_ADIS_HANDLER_STRING = "GYRO_0_ADIS_HANDLER";
|
||||||
@ -114,6 +114,7 @@ const char *TC_STORE_STRING = "TC_STORE";
|
|||||||
const char *TM_STORE_STRING = "TM_STORE";
|
const char *TM_STORE_STRING = "TM_STORE";
|
||||||
const char *IPC_STORE_STRING = "IPC_STORE";
|
const char *IPC_STORE_STRING = "IPC_STORE";
|
||||||
const char *TIME_STAMPER_STRING = "TIME_STAMPER";
|
const char *TIME_STAMPER_STRING = "TIME_STAMPER";
|
||||||
|
const char *VERIFICATION_REPORTER_STRING = "VERIFICATION_REPORTER";
|
||||||
const char *FSFW_OBJECTS_END_STRING = "FSFW_OBJECTS_END";
|
const char *FSFW_OBJECTS_END_STRING = "FSFW_OBJECTS_END";
|
||||||
const char *SPI_TEST_STRING = "SPI_TEST";
|
const char *SPI_TEST_STRING = "SPI_TEST";
|
||||||
const char *UART_TEST_STRING = "UART_TEST";
|
const char *UART_TEST_STRING = "UART_TEST";
|
||||||
@ -143,10 +144,10 @@ const char *translateObject(object_id_t object) {
|
|||||||
switch ((object & 0xFFFFFFFF)) {
|
switch ((object & 0xFFFFFFFF)) {
|
||||||
case 0x00005060:
|
case 0x00005060:
|
||||||
return P60DOCK_TEST_TASK_STRING;
|
return P60DOCK_TEST_TASK_STRING;
|
||||||
|
case 0x43000002:
|
||||||
|
return ACS_CONTROLLER_STRING;
|
||||||
case 0x43000003:
|
case 0x43000003:
|
||||||
return CORE_CONTROLLER_STRING;
|
return CORE_CONTROLLER_STRING;
|
||||||
case 0x43100002:
|
|
||||||
return ACS_CONTROLLER_STRING;
|
|
||||||
case 0x43400001:
|
case 0x43400001:
|
||||||
return THERMAL_CONTROLLER_STRING;
|
return THERMAL_CONTROLLER_STRING;
|
||||||
case 0x44120006:
|
case 0x44120006:
|
||||||
@ -357,6 +358,8 @@ const char *translateObject(object_id_t object) {
|
|||||||
return IPC_STORE_STRING;
|
return IPC_STORE_STRING;
|
||||||
case 0x53500010:
|
case 0x53500010:
|
||||||
return TIME_STAMPER_STRING;
|
return TIME_STAMPER_STRING;
|
||||||
|
case 0x53500020:
|
||||||
|
return VERIFICATION_REPORTER_STRING;
|
||||||
case 0x53ffffff:
|
case 0x53ffffff:
|
||||||
return FSFW_OBJECTS_END_STRING;
|
return FSFW_OBJECTS_END_STRING;
|
||||||
case 0x54000010:
|
case 0x54000010:
|
||||||
|
@ -23,12 +23,12 @@ ReturnValue_t pst::pstGpio(FixedTimeslotTaskIF *thisSequence) {
|
|||||||
thisSequence->addSlot(objects::SOLAR_ARRAY_DEPL_HANDLER, length * 0,
|
thisSequence->addSlot(objects::SOLAR_ARRAY_DEPL_HANDLER, length * 0,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
|
||||||
if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) {
|
if (thisSequence->checkSequence() == returnvalue::OK) {
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
sif::error << "PollingSequence::initialize has errors!" << std::endl;
|
sif::error << "PollingSequence::initialize has errors!" << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t pst::pstSpiRw(FixedTimeslotTaskIF *thisSequence) {
|
ReturnValue_t pst::pstSpiRw(FixedTimeslotTaskIF *thisSequence) {
|
||||||
@ -510,13 +510,13 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
|
|||||||
#endif
|
#endif
|
||||||
static_cast<void>(length);
|
static_cast<void>(length);
|
||||||
if (uartPstEmpty) {
|
if (uartPstEmpty) {
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) {
|
if (thisSequence->checkSequence() != returnvalue::OK) {
|
||||||
sif::error << "UART PST initialization failed" << std::endl;
|
sif::error << "UART PST initialization failed" << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t pst::pstGompaceCan(FixedTimeslotTaskIF *thisSequence) {
|
ReturnValue_t pst::pstGompaceCan(FixedTimeslotTaskIF *thisSequence) {
|
||||||
@ -548,12 +548,12 @@ ReturnValue_t pst::pstGompaceCan(FixedTimeslotTaskIF *thisSequence) {
|
|||||||
thisSequence->addSlot(objects::PDU1_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::PDU1_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::PDU2_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::PDU2_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::ACU_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::ACU_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||||
if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) {
|
if (thisSequence->checkSequence() != returnvalue::OK) {
|
||||||
sif::error << "GomSpace PST initialization failed" << std::endl;
|
sif::error << "GomSpace PST initialization failed" << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
static_cast<void>(length);
|
static_cast<void>(length);
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t pst::pstTest(FixedTimeslotTaskIF *thisSequence) {
|
ReturnValue_t pst::pstTest(FixedTimeslotTaskIF *thisSequence) {
|
||||||
@ -583,11 +583,11 @@ ReturnValue_t pst::pstTest(FixedTimeslotTaskIF *thisSequence) {
|
|||||||
#endif
|
#endif
|
||||||
static_cast<void>(length);
|
static_cast<void>(length);
|
||||||
if (not notEmpty) {
|
if (not notEmpty) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) {
|
if (thisSequence->checkSequence() != returnvalue::OK) {
|
||||||
sif::error << "Test PST initialization failed" << std::endl;
|
sif::error << "Test PST initialization failed" << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user