diff --git a/CMakeLists.txt b/CMakeLists.txt
index c4497b22..2587740e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -99,7 +99,7 @@ pre_source_hw_os_config()
if(TGT_BSP)
if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/raspberrypi"
- OR TGT_BSP MATCHES "arm/beagleboneblack"
+ OR TGT_BSP MATCHES "arm/beagleboneblack" OR TGT_BSP MATCHES "arm/egse"
)
set(FSFW_CONFIG_PATH "linux/fsfwconfig")
if(NOT BUILD_Q7S_SIMPLE_MODE)
@@ -109,11 +109,17 @@ if(TGT_BSP)
endif()
endif()
- if(TGT_BSP MATCHES "arm/raspberrypi")
+ if(TGT_BSP MATCHES "arm/raspberrypi" )
# Used by configure file
set(RASPBERRY_PI ON)
set(FSFW_HAL_ADD_RASPBERRY_PI ON)
endif()
+
+ if(TGT_BSP MATCHES "arm/egse")
+ # Used by configure file
+ set(EGSE ON)
+ set(FSFW_HAL_LINUX_ADD_LIBGPIOD OFF)
+ endif()
if(TGT_BSP MATCHES "arm/beagleboneblack")
# Used by configure file
@@ -140,7 +146,7 @@ configure_file(${FSFW_CONFIG_PATH}/FSFWConfig.h.in FSFWConfig.h)
configure_file(${FSFW_CONFIG_PATH}/OBSWConfig.h.in OBSWConfig.h)
if(TGT_BSP MATCHES "arm/q7s")
configure_file(${BSP_PATH}/boardconfig/q7sConfig.h.in q7sConfig.h)
-elseif(TGT_BSP MATCHES "arm/raspberrypi")
+elseif(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/egse")
configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h)
endif()
@@ -266,7 +272,11 @@ if(TGT_BSP MATCHES "arm/q7s")
)
endif()
-
+if(TGT_BSP MATCHES "arm/egse")
+ target_link_libraries(${OBSW_NAME} PRIVATE
+ ${LIB_ARCSEC}
+ )
+endif()
if(ADD_CSP_LIB)
target_link_libraries(${OBSW_NAME} PRIVATE
@@ -305,7 +315,7 @@ target_include_directories(${LIB_EIVE_MISSION} PUBLIC
${LIB_ARCSEC_PATH}
)
-if(TGT_BSP MATCHES "arm/q7s")
+if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/egse")
target_include_directories(${LIB_EIVE_MISSION} PUBLIC
${ARCSEC_LIB_PATH}
)
diff --git a/README.md b/README.md
index 262132fd..0effabb8 100644
--- a/README.md
+++ b/README.md
@@ -19,9 +19,10 @@
12. [Static Code Analysis](#static-code-analysis)
13. [Eclipse](#eclipse)
14. [Running the OBSW on a Raspberry Pi](#rpi)
-15. [Manually preparing sysroots to compile gpsd](#gpsd)
-16. [FSFW](#fsfw)
-17. [Coding Style](#coding-style)
+15. [Running OBSW on EGSE](#egse)
+16. [Manually preparing sysroots to compile gpsd](#gpsd)
+17. [FSFW](#fsfw)
+18. [Coding Style](#coding-style)
# General information
@@ -1152,6 +1153,35 @@ sudo apt-get install gpiod libgpiod-dev
to install the required GPIO libraries before cloning the system root folder.
+# Running OBSW on EGSE
+The EGSE is a test system from arcsec build arround a raspberry pi 4 to test the star tracker. The IP address of the EGSE (raspberry pi) is 192.168.18.31. An ssh session can be opened with
+````
+ssh pi@192.168.18.31
+````
+Password: raspberry
+
+To run the obsw perform the following steps:
+1. Build the cmake EGSE Configuration
+ * the sysroots for the EGSE can be found [here](https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Software/egse&fileid=1190471)
+ * toolchain for linux host can be downloaded from [here](https://github.com/Pro/raspi-toolchain)
+ * toolchain for windows host from [here](https://gnutoolchains.com/raspberry/) (the raspios-buster-armhf toolchain is the right one for the EGSE)
+2. Disable the ser2net systemd service on the EGSE
+````sh
+$ sudo systemctl stop ser2net.service
+````
+3. Power on the star tracker by running
+````sh
+$ ~/powerctrl/enable0.sh`
+````
+4. Run portforwarding script for tmtc tcp connection and tcf agent on host PC
+````sh
+$ ./scripts/egse-port.sh
+````
+5. The star tracker can be powered off by running
+````sh
+$ ~/powerctrl/disable0.sh
+````
+
# Manually preparing sysroots to compile gpsd
Copy all header files from [here](https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Software/gpsd&fileid=1189985) to the /usr/include directory and all static libraries to /usr/lib.
diff --git a/bsp_egse/CMakeLists.txt b/bsp_egse/CMakeLists.txt
new file mode 100644
index 00000000..cb02f937
--- /dev/null
+++ b/bsp_egse/CMakeLists.txt
@@ -0,0 +1,7 @@
+target_sources(${OBSW_NAME} PUBLIC
+ InitMission.cpp
+ main.cpp
+ ObjectFactory.cpp
+)
+
+add_subdirectory(boardconfig)
diff --git a/bsp_egse/InitMission.cpp b/bsp_egse/InitMission.cpp
new file mode 100644
index 00000000..d6b192c2
--- /dev/null
+++ b/bsp_egse/InitMission.cpp
@@ -0,0 +1,192 @@
+#include "InitMission.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+#include "OBSWConfig.h"
+#include "ObjectFactory.h"
+#include "objects/systemObjectList.h"
+#include "pollingsequence/pollingSequenceFactory.h"
+
+ServiceInterfaceStream sif::debug("DEBUG");
+ServiceInterfaceStream sif::info("INFO");
+ServiceInterfaceStream sif::warning("WARNING");
+ServiceInterfaceStream sif::error("ERROR");
+
+ObjectManagerIF* objectManager = nullptr;
+
+void initmission::initMission() {
+ sif::info << "Make sure the systemd service ser2net on the egse has been stopped "
+ << "(alias stop-ser2net)" << std::endl;
+ sif::info << "Make sure the power lines of the star tracker have been enabled "
+ << "(alias enable-startracker)" << std::endl;
+ sif::info << "Building global objects.." << std::endl;
+ /* Instantiate global object manager and also create all objects */
+ ObjectManager::instance()->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
+ sif::info << "Initializing all objects.." << std::endl;
+ ObjectManager::instance()->initialize();
+
+ /* This function creates and starts all tasks */
+ initTasks();
+}
+
+void initmission::initTasks() {
+ TaskFactory* factory = TaskFactory::instance();
+ ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
+ if (factory == nullptr) {
+ /* Should never happen ! */
+ return;
+ }
+#if OBSW_PRINT_MISSED_DEADLINES == 1
+ void (*missedDeadlineFunc)(void) = TaskFactory::printMissedDeadline;
+#else
+ void (*missedDeadlineFunc)(void) = nullptr;
+#endif
+
+ /* TMTC Distribution */
+ PeriodicTaskIF* tmtcDistributor = factory->createPeriodicTask(
+ "DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
+ result = tmtcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
+ if (result != HasReturnvaluesIF::RETURN_OK) {
+ sif::error << "Object add component failed" << std::endl;
+ }
+ result = tmtcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
+ if (result != HasReturnvaluesIF::RETURN_OK) {
+ sif::error << "Object add component failed" << std::endl;
+ }
+ result = tmtcDistributor->addComponent(objects::TM_FUNNEL);
+ if (result != HasReturnvaluesIF::RETURN_OK) {
+ sif::error << "Object add component failed" << std::endl;
+ }
+
+ PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
+ "TMTC_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
+ result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
+ if (result != HasReturnvaluesIF::RETURN_OK) {
+ sif::error << "Add component TMTC Bridge failed" << std::endl;
+ }
+ PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
+ "TMTC_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
+ result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
+ if (result != HasReturnvaluesIF::RETURN_OK) {
+ sif::error << "Add component TMTC Polling failed" << std::endl;
+ }
+
+ /* PUS Services */
+ std::vector pusTasks;
+ createPusTasks(*factory, missedDeadlineFunc, pusTasks);
+
+ std::vector pstTasks;
+ FixedTimeslotTaskIF* pst = factory->createFixedTimeslotTask(
+ "STAR_TRACKER_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
+ result = pst::pstUart(pst);
+ if (result != HasReturnvaluesIF::RETURN_OK) {
+ sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
+ }
+ pstTasks.push_back(pst);
+
+ PeriodicTaskIF* strHelperTask = factory->createPeriodicTask(
+ "STR_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
+ result = strHelperTask->addComponent(objects::STR_HELPER);
+ if (result != HasReturnvaluesIF::RETURN_OK) {
+ initmission::printAddObjectError("STR_HELPER", objects::STR_HELPER);
+ }
+ pstTasks.push_back(strHelperTask);
+
+ auto taskStarter = [](std::vector& taskVector, std::string name) {
+ for (const auto& task : taskVector) {
+ if (task != nullptr) {
+ task->startTask();
+ } else {
+ sif::error << "Task in vector " << name << " is invalid!" << std::endl;
+ }
+ }
+ };
+
+ sif::info << "Starting tasks.." << std::endl;
+ tmtcDistributor->startTask();
+ tmtcBridgeTask->startTask();
+ tmtcPollingTask->startTask();
+
+ taskStarter(pstTasks, "PST Tasks");
+ taskStarter(pusTasks, "PUS Tasks");
+
+ sif::info << "Tasks started.." << std::endl;
+}
+
+void initmission::createPusTasks(TaskFactory& factory,
+ TaskDeadlineMissedFunction missedDeadlineFunc,
+ std::vector& taskVec) {
+ ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
+ PeriodicTaskIF* pusVerification = factory.createPeriodicTask(
+ "PUS_VERIF", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
+ result = pusVerification->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
+ if (result != HasReturnvaluesIF::RETURN_OK) {
+ sif::error << "Object add component failed" << std::endl;
+ }
+ taskVec.push_back(pusVerification);
+
+ PeriodicTaskIF* pusEvents = factory.createPeriodicTask(
+ "PUS_EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
+ result = pusEvents->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
+ if (result != HasReturnvaluesIF::RETURN_OK) {
+ initmission::printAddObjectError("PUS_EVENTS", objects::PUS_SERVICE_5_EVENT_REPORTING);
+ }
+ result = pusEvents->addComponent(objects::EVENT_MANAGER);
+ if (result != HasReturnvaluesIF::RETURN_OK) {
+ initmission::printAddObjectError("PUS_MGMT", objects::EVENT_MANAGER);
+ }
+ taskVec.push_back(pusEvents);
+
+ PeriodicTaskIF* pusHighPrio = factory.createPeriodicTask(
+ "PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
+ result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
+ if (result != HasReturnvaluesIF::RETURN_OK) {
+ initmission::printAddObjectError("PUS2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
+ }
+ result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
+ if (result != HasReturnvaluesIF::RETURN_OK) {
+ initmission::printAddObjectError("PUS9", objects::PUS_SERVICE_9_TIME_MGMT);
+ }
+ taskVec.push_back(pusHighPrio);
+
+ PeriodicTaskIF* pusMedPrio = factory.createPeriodicTask(
+ "PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
+ result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
+ if (result != HasReturnvaluesIF::RETURN_OK) {
+ initmission::printAddObjectError("PUS8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
+ }
+ result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
+ if (result != HasReturnvaluesIF::RETURN_OK) {
+ initmission::printAddObjectError("PUS200", objects::PUS_SERVICE_200_MODE_MGMT);
+ }
+ result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
+ if (result != HasReturnvaluesIF::RETURN_OK) {
+ initmission::printAddObjectError("PUS20", objects::PUS_SERVICE_20_PARAMETERS);
+ }
+ result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
+ if (result != HasReturnvaluesIF::RETURN_OK) {
+ initmission::printAddObjectError("PUS3", objects::PUS_SERVICE_3_HOUSEKEEPING);
+ }
+ taskVec.push_back(pusMedPrio);
+
+ PeriodicTaskIF* pusLowPrio = factory.createPeriodicTask(
+ "PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
+ result = pusLowPrio->addComponent(objects::PUS_SERVICE_17_TEST);
+ if (result != HasReturnvaluesIF::RETURN_OK) {
+ initmission::printAddObjectError("PUS17", objects::PUS_SERVICE_17_TEST);
+ }
+ result = pusLowPrio->addComponent(objects::INTERNAL_ERROR_REPORTER);
+ if (result != HasReturnvaluesIF::RETURN_OK) {
+ initmission::printAddObjectError("INT_ERR_RPRT", objects::INTERNAL_ERROR_REPORTER);
+ }
+ taskVec.push_back(pusLowPrio);
+}
diff --git a/bsp_egse/InitMission.h b/bsp_egse/InitMission.h
new file mode 100644
index 00000000..c3ba58ec
--- /dev/null
+++ b/bsp_egse/InitMission.h
@@ -0,0 +1,21 @@
+#ifndef BSP_LINUX_INITMISSION_H_
+#define BSP_LINUX_INITMISSION_H_
+
+#include
+
+#include "fsfw/tasks/Typedef.h"
+
+class PeriodicTaskIF;
+class TaskFactory;
+
+namespace initmission {
+void initMission();
+void initTasks();
+
+void createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
+ std::vector& taskVec);
+void createPusTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
+ std::vector& taskVec);
+}; // namespace initmission
+
+#endif /* BSP_LINUX_INITMISSION_H_ */
diff --git a/bsp_egse/ObjectFactory.cpp b/bsp_egse/ObjectFactory.cpp
new file mode 100644
index 00000000..10eea471
--- /dev/null
+++ b/bsp_egse/ObjectFactory.cpp
@@ -0,0 +1,49 @@
+#include "ObjectFactory.h"
+
+#include
+#include
+#include
+#include
+
+#include "OBSWConfig.h"
+#include "busConf.h"
+#include "fsfw/datapoollocal/LocalDataPoolManager.h"
+#include "fsfw/tmtcpacket/pus/tm.h"
+#include "fsfw/tmtcservices/CommandingServiceBase.h"
+#include "fsfw/tmtcservices/PusServiceBase.h"
+#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
+#include "linux/devices/startracker/StarTrackerHandler.h"
+#include "mission/core/GenericFactory.h"
+#include "mission/utility/TmFunnel.h"
+#include "objects/systemObjectList.h"
+#include "tmtc/apid.h"
+#include "tmtc/pusIds.h"
+
+void Factory::setStaticFrameworkObjectIds() {
+ PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR;
+ PusServiceBase::packetDestination = objects::TM_FUNNEL;
+
+ CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
+ CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
+
+ TmFunnel::downlinkDestination = objects::TMTC_BRIDGE;
+ TmFunnel::storageDestination = objects::NO_OBJECT;
+
+ VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION;
+ TmPacketBase::timeStamperId = objects::TIME_STAMPER;
+}
+
+void ObjectFactory::produce(void* args) {
+ Factory::setStaticFrameworkObjectIds();
+ ObjectFactory::produceGenericObjects();
+
+ UartCookie* starTrackerCookie =
+ new UartCookie(objects::STAR_TRACKER, egse::STAR_TRACKER_UART, UartModes::NON_CANONICAL,
+ uart::STAR_TRACKER_BAUD, startracker::MAX_FRAME_SIZE * 2 + 2);
+ new UartComIF(objects::UART_COM_IF);
+ starTrackerCookie->setNoFixedSizeReply();
+ StrHelper* strHelper = new StrHelper(objects::STR_HELPER);
+ StarTrackerHandler* starTrackerHandler = new StarTrackerHandler(
+ objects::STAR_TRACKER, objects::UART_COM_IF, starTrackerCookie, strHelper);
+ starTrackerHandler->setStartUpImmediately();
+}
diff --git a/bsp_egse/ObjectFactory.h b/bsp_egse/ObjectFactory.h
new file mode 100644
index 00000000..b24dd321
--- /dev/null
+++ b/bsp_egse/ObjectFactory.h
@@ -0,0 +1,8 @@
+#ifndef BSP_LINUX_OBJECTFACTORY_H_
+#define BSP_LINUX_OBJECTFACTORY_H_
+
+namespace ObjectFactory {
+void produce(void* args);
+}; // namespace ObjectFactory
+
+#endif /* BSP_LINUX_OBJECTFACTORY_H_ */
diff --git a/bsp_egse/boardconfig/CMakeLists.txt b/bsp_egse/boardconfig/CMakeLists.txt
new file mode 100644
index 00000000..f9136e3e
--- /dev/null
+++ b/bsp_egse/boardconfig/CMakeLists.txt
@@ -0,0 +1,7 @@
+target_sources(${OBSW_NAME} PRIVATE
+ print.c
+)
+
+target_include_directories(${OBSW_NAME} PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
diff --git a/bsp_egse/boardconfig/busConf.h b/bsp_egse/boardconfig/busConf.h
new file mode 100644
index 00000000..4df55edc
--- /dev/null
+++ b/bsp_egse/boardconfig/busConf.h
@@ -0,0 +1,8 @@
+#ifndef BSP_EGSE_BOARDCONFIG_BUSCONF_H_
+#define BSP_EGSE_BOARDCONFIG_BUSCONF_H_
+
+namespace egse {
+static constexpr char STAR_TRACKER_UART[] = "/dev/serial0";
+}
+
+#endif /* BSP_EGSE_BOARDCONFIG_BUSCONF_H_ */
diff --git a/bsp_egse/boardconfig/etl_profile.h b/bsp_egse/boardconfig/etl_profile.h
new file mode 100644
index 00000000..54aca344
--- /dev/null
+++ b/bsp_egse/boardconfig/etl_profile.h
@@ -0,0 +1,38 @@
+///\file
+
+/******************************************************************************
+The MIT License(MIT)
+
+Embedded Template Library.
+https://github.com/ETLCPP/etl
+https://www.etlcpp.com
+
+Copyright(c) 2019 jwellbelove
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files(the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions :
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+******************************************************************************/
+#ifndef __ETL_PROFILE_H__
+#define __ETL_PROFILE_H__
+
+#define ETL_CHECK_PUSH_POP
+
+#define ETL_CPP11_SUPPORTED 1
+#define ETL_NO_NULLPTR_SUPPORT 0
+
+#endif
diff --git a/bsp_egse/boardconfig/gcov.h b/bsp_egse/boardconfig/gcov.h
new file mode 100644
index 00000000..80acdd86
--- /dev/null
+++ b/bsp_egse/boardconfig/gcov.h
@@ -0,0 +1,15 @@
+#ifndef LINUX_GCOV_H_
+#define LINUX_GCOV_H_
+#include
+
+#ifdef GCOV
+extern "C" void __gcov_flush();
+#else
+void __gcov_flush() {
+ sif::info << "GCC GCOV: Please supply GCOV=1 in Makefile if "
+ "coverage information is desired.\n"
+ << std::flush;
+}
+#endif
+
+#endif /* LINUX_GCOV_H_ */
diff --git a/bsp_egse/boardconfig/print.c b/bsp_egse/boardconfig/print.c
new file mode 100644
index 00000000..5b3a0f91
--- /dev/null
+++ b/bsp_egse/boardconfig/print.c
@@ -0,0 +1,10 @@
+#include
+#include
+
+void printChar(const char* character, bool errStream) {
+ if (errStream) {
+ putc(*character, stderr);
+ return;
+ }
+ putc(*character, stdout);
+}
diff --git a/bsp_egse/boardconfig/print.h b/bsp_egse/boardconfig/print.h
new file mode 100644
index 00000000..8e7e2e5d
--- /dev/null
+++ b/bsp_egse/boardconfig/print.h
@@ -0,0 +1,8 @@
+#ifndef HOSTED_BOARDCONFIG_PRINT_H_
+#define HOSTED_BOARDCONFIG_PRINT_H_
+
+#include
+
+void printChar(const char* character, bool errStream);
+
+#endif /* HOSTED_BOARDCONFIG_PRINT_H_ */
diff --git a/bsp_egse/boardconfig/rpiConfig.h.in b/bsp_egse/boardconfig/rpiConfig.h.in
new file mode 100644
index 00000000..af4f0dd2
--- /dev/null
+++ b/bsp_egse/boardconfig/rpiConfig.h.in
@@ -0,0 +1,6 @@
+#ifndef BSP_RPI_BOARDCONFIG_RPI_CONFIG_H_
+#define BSP_RPI_BOARDCONFIG_RPI_CONFIG_H_
+
+#include
+
+#endif /* BSP_RPI_BOARDCONFIG_RPI_CONFIG_H_ */
diff --git a/bsp_egse/main.cpp b/bsp_egse/main.cpp
new file mode 100644
index 00000000..ce7966ff
--- /dev/null
+++ b/bsp_egse/main.cpp
@@ -0,0 +1,28 @@
+#include
+
+#include "InitMission.h"
+#include "OBSWConfig.h"
+#include "OBSWVersion.h"
+#include "fsfw/FSFWVersion.h"
+#include "fsfw/tasks/TaskFactory.h"
+
+/**
+ * @brief This is the main program entry point for the egse (raspberry pi 4)
+ * @return
+ */
+int main(void) {
+ std::cout << "-- EIVE OBSW --" << std::endl;
+ std::cout << "-- Compiled for EGSE from Arcsec"
+ << " --" << std::endl;
+ std::cout << "-- OBSW " << SW_NAME << " v" << SW_VERSION << "." << SW_SUBVERSION << "."
+ << SW_REVISION << ", FSFW v" << FSFW_VERSION << "." << FSFW_SUBVERSION << FSFW_REVISION
+ << "--" << std::endl;
+ std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;
+
+ initmission::initMission();
+
+ for (;;) {
+ /* Suspend main thread by sleeping it. */
+ TaskFactory::delayTask(5000);
+ }
+}
diff --git a/bsp_linux_board/InitMission.cpp b/bsp_linux_board/InitMission.cpp
index b8da1b3e..6dfe3af1 100644
--- a/bsp_linux_board/InitMission.cpp
+++ b/bsp_linux_board/InitMission.cpp
@@ -64,17 +64,17 @@ void initmission::initTasks() {
}
/* UDP bridge */
- PeriodicTaskIF* udpBridgeTask = factory->createPeriodicTask(
- "UDP_UNIX_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
- result = udpBridgeTask->addComponent(objects::TMTC_BRIDGE);
+ PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
+ "TMTC_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
+ result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
if (result != HasReturnvaluesIF::RETURN_OK) {
- sif::error << "Add component UDP Unix Bridge failed" << std::endl;
+ sif::error << "Add component TMTC Bridge failed" << std::endl;
}
- PeriodicTaskIF* udpPollingTask = factory->createPeriodicTask(
- "UDP_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
- result = udpPollingTask->addComponent(objects::TMTC_POLLING_TASK);
+ PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
+ "TMTC_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
+ result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
if (result != HasReturnvaluesIF::RETURN_OK) {
- sif::error << "Add component UDP Polling failed" << std::endl;
+ sif::error << "Add component TMTC Polling failed" << std::endl;
}
/* PUS Services */
@@ -100,8 +100,8 @@ void initmission::initTasks() {
sif::info << "Starting tasks.." << std::endl;
tmTcDistributor->startTask();
- udpBridgeTask->startTask();
- udpPollingTask->startTask();
+ tmtcBridgeTask->startTask();
+ tmtcPollingTask->startTask();
taskStarter(pusTasks, "PUS Tasks");
#if OBSW_ADD_TEST_CODE == 1
diff --git a/bsp_linux_board/boardconfig/print.c b/bsp_linux_board/boardconfig/print.c
index 3aba2d73..c2b2e15d 100644
--- a/bsp_linux_board/boardconfig/print.c
+++ b/bsp_linux_board/boardconfig/print.c
@@ -1,4 +1,4 @@
-#include
+#include
#include
void printChar(const char* character, bool errStream) {
diff --git a/bsp_q7s/core/InitMission.cpp b/bsp_q7s/core/InitMission.cpp
index c4e3805d..76807438 100644
--- a/bsp_q7s/core/InitMission.cpp
+++ b/bsp_q7s/core/InitMission.cpp
@@ -86,7 +86,7 @@ void initmission::initTasks() {
"TCPIP_TMTC_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
if (result != HasReturnvaluesIF::RETURN_OK) {
- initmission::printAddObjectError("UDP_BRIDGE", objects::TMTC_BRIDGE);
+ initmission::printAddObjectError("TMTC_BRIDGE", objects::TMTC_BRIDGE);
}
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
"TMTC_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
@@ -135,9 +135,9 @@ void initmission::initTasks() {
}
#if OBSW_ADD_STAR_TRACKER == 1
- PeriodicTaskIF* strImgLoaderTask = factory->createPeriodicTask(
+ PeriodicTaskIF* strHelperTask = factory->createPeriodicTask(
"STR_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
- result = strImgLoaderTask->addComponent(objects::STR_HELPER);
+ result = strHelperTask->addComponent(objects::STR_HELPER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("STR_HELPER", objects::STR_HELPER);
}
@@ -204,7 +204,7 @@ void initmission::initTasks() {
#if BOARD_TE0720 == 0
fsTask->startTask();
#if OBSW_ADD_STAR_TRACKER == 1
- strImgLoaderTask->startTask();
+ strHelperTask > startTask();
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
#endif
@@ -266,7 +266,7 @@ void initmission::createPstTasks(TaskFactory& factory,
sif::error << "InitMission::initTasks: GomSpace PST initialization failed!" << std::endl;
}
taskVec.push_back(gomSpacePstTask);
-#else /* BOARD_TE7020 == 0 */
+#else /* BOARD_TE7020 == 0 */
FixedTimeslotTaskIF* pollingSequenceTaskTE0720 = factory.createFixedTimeslotTask(
"PST_TASK_TE0720", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE * 8, 3.0, missedDeadlineFunc);
result = pst::pollingSequenceTE0720(pollingSequenceTaskTE0720);
diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp
index 2000f3d5..3999425a 100644
--- a/bsp_q7s/core/ObjectFactory.cpp
+++ b/bsp_q7s/core/ObjectFactory.cpp
@@ -16,9 +16,6 @@
#include "bsp_q7s/devices/PlocMemoryDumper.h"
#include "bsp_q7s/devices/PlocSupervisorHandler.h"
#include "bsp_q7s/devices/PlocUpdater.h"
-#include "bsp_q7s/devices/startracker/StarTrackerDefinitions.h"
-#include "bsp_q7s/devices/startracker/StarTrackerHandler.h"
-#include "bsp_q7s/devices/startracker/StrHelper.h"
#include "bsp_q7s/memory/FileSystemHandler.h"
#include "busConf.h"
#include "ccsdsConfig.h"
@@ -32,6 +29,12 @@
#include "linux/csp/CspComIF.h"
#include "linux/csp/CspCookie.h"
#include "linux/devices/GPSHyperionLinuxController.h"
+#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
+#include "linux/devices/startracker/StarTrackerHandler.h"
+#include "linux/devices/startracker/StrHelper.h"
+#include "linux/boardtest/SpiTestClass.h"
+#include "linux/csp/CspComIF.h"
+#include "linux/csp/CspCookie.h"
#include "tmtc/apid.h"
#include "tmtc/pusIds.h"
#if OBSW_TEST_LIBGPIOD == 1
@@ -55,9 +58,7 @@
#include "fsfw_hal/linux/spi/SpiCookie.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "fsfw_hal/linux/uart/UartCookie.h"
-#include "linux/boardtest/SpiTestClass.h"
-#include "linux/csp/CspComIF.h"
-#include "linux/csp/CspCookie.h"
+
#include "mission/core/GenericFactory.h"
#include "mission/devices/ACUHandler.h"
#include "mission/devices/BpxBatteryHandler.h"
diff --git a/bsp_q7s/devices/CMakeLists.txt b/bsp_q7s/devices/CMakeLists.txt
index eed234f5..e0f6ee2f 100644
--- a/bsp_q7s/devices/CMakeLists.txt
+++ b/bsp_q7s/devices/CMakeLists.txt
@@ -2,6 +2,4 @@ target_sources(${OBSW_NAME} PRIVATE
PlocSupervisorHandler.cpp
PlocUpdater.cpp
PlocMemoryDumper.cpp
-)
-
-add_subdirectory(startracker)
\ No newline at end of file
+)
\ No newline at end of file
diff --git a/cmake/HardwareOsPreConfig.cmake b/cmake/HardwareOsPreConfig.cmake
index 3ff67565..88df808c 100644
--- a/cmake/HardwareOsPreConfig.cmake
+++ b/cmake/HardwareOsPreConfig.cmake
@@ -47,7 +47,7 @@ if(CMAKE_CROSSCOMPILING)
set_property(CACHE TGT_BSP
PROPERTY STRINGS
- "arm/q7s" "arm/raspberrypi"
+ "arm/q7s" "arm/raspberrypi" "arm/egse"
)
endif()
@@ -57,6 +57,8 @@ if(TGT_BSP)
set(BSP_PATH "bsp_linux_board")
elseif(TGT_BSP MATCHES "arm/q7s")
set(BSP_PATH "bsp_q7s")
+ elseif(TGT_BSP MATCHES "arm/egse")
+ set(BSP_PATH "bsp_egse")
else()
message(WARNING "CMake not configured for this target!")
message(FATAL_ERROR "Target: ${TGT_BSP}!")
diff --git a/cmake/PreProjectConfig.cmake b/cmake/PreProjectConfig.cmake
index fa64c7d8..fa50baf3 100644
--- a/cmake/PreProjectConfig.cmake
+++ b/cmake/PreProjectConfig.cmake
@@ -17,8 +17,7 @@ if(FSFW_OSAL MATCHES linux AND TGT_BSP)
"${CMAKE_SCRIPT_PATH}/Q7SCrossCompileConfig.cmake"
PARENT_SCOPE
)
-
- elseif(TGT_BSP MATCHES "arm/raspberrypi")
+ elseif(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/egse")
if(NOT DEFINED ENV{LINUX_ROOTFS})
if(NOT DEFINED LINUX_ROOTFS)
message(WARNING "No LINUX_ROOTFS environmental or CMake variable set!")
diff --git a/cmake/scripts/Q7S/q7s-env-win.sh b/cmake/scripts/Q7S/q7s-env-win.sh
index a8352331..2cbc0bab 100644
--- a/cmake/scripts/Q7S/q7s-env-win.sh
+++ b/cmake/scripts/Q7S/q7s-env-win.sh
@@ -1,5 +1,49 @@
#!/bin/sh
-export PATH=$PATH:"/c/Xilinx/SDK/2018.2/gnu/aarch32/nt/gcc-arm-linux-gnueabi/bin"
-export CROSS_COMPILE="arm-linux-gnueabihf"
+# Run with: source q7s-env-win-sh [OPTIONS]
+function help () {
+ echo "source q7s-env-win-sh [options] -t|--toolchain= -s|--sysroot="
+}
-export Q7S_SYSROOT="/c/Users/${USER}/Documents/EIVE/cortexa9hf-neon-xiphos-linux-gnueabi"
+TOOLCHAIN_PATH="/c/Xilinx/Vitis/2019.2/gnu/aarch32/nt/gcc-arm-linux-gnueabi/bin"
+SYSROOT="/c/Users/${USER}/eive-software/cortexa9hf-neon-xiphos-linux-gnueabi"
+
+for i in "$@"; do
+ case $i in
+ -t=*|--toolchain=*)
+ TOOLCHAIN_PATH="${i#*=}"
+ shift
+ ;;
+ -s=*|--sysroot=*)
+ SYSROOT="${i#*=}"
+ shift
+ ;;
+ -h|--help)
+ help
+ shift
+ ;;
+ -*|--*)
+ echo "Unknown option $i"
+ help
+ return
+ ;;
+ *)
+ ;;
+ esac
+done
+
+if [ -d "$TOOLCHAIN_PATH" ]; then
+ export PATH=$PATH:"/c/Xilinx/Vitis/2019.2/gnu/aarch32/nt/gcc-arm-linux-gnueabi/bin"
+ export CROSS_COMPILE="arm-linux-gnueabihf"
+ echo "Set toolchain path to /c/Xilinx/Vitis/2019.2/gnu/aarch32/nt/gcc-arm-linux-gnueabi/bin"
+else
+ echo "Toolchain path $TOOLCHAIN_PATH does not exist"
+ return
+fi
+
+if [ -d "$SYSROOT" ]; then
+ export Q7S_SYSROOT=$SYSROOT
+ echo "Set sysroot path to $SYSROOT"
+else
+ echo "Sysroot path $SYSROOT does not exist"
+ return
+fi
\ No newline at end of file
diff --git a/cmake/scripts/egse/egse_path_helper_win.sh b/cmake/scripts/egse/egse_path_helper_win.sh
new file mode 100644
index 00000000..4bda17b0
--- /dev/null
+++ b/cmake/scripts/egse/egse_path_helper_win.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+# Script to set path to raspberry pi toolchain
+# Run script with: source egse_path_helper_win.sh
+TOOLCHAIN_PATH="/c/SysGCC/raspberry/bin"
+if [ $# -eq 1 ];then
+ export PATH=$PATH:"$1"
+else
+ export PATH=$PATH:$TOOLCHAIN_PATH
+fi
+
+echo "Path of toolchain set to $TOOLCHAIN_PATH"
+export CROSS_COMPILE="arm-linux-gnueabihf"
+export RASPBERRY_VERSION="4"
\ No newline at end of file
diff --git a/cmake/scripts/egse/make-debug-cfg.sh b/cmake/scripts/egse/make-debug-cfg.sh
new file mode 100644
index 00000000..9a611373
--- /dev/null
+++ b/cmake/scripts/egse/make-debug-cfg.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+counter=0
+cfg_script_name="cmake-build-cfg.py"
+while [ ${counter} -lt 5 ]
+do
+ cd ..
+ if [ -f ${cfg_script_name} ];then
+ break
+ fi
+ counter=$((counter=counter + 1))
+done
+
+if [ "${counter}" -ge 5 ];then
+ echo "${cfg_script_name} not found in upper directories!"
+ exit 1
+fi
+
+
+os_fsfw="linux"
+tgt_bsp="arm/egse"
+build_generator="make"
+build_dir="build-Debug-egse"
+if [ "${OS}" = "Windows_NT" ]; then
+ python="py"
+# Could be other OS but this works for now.
+else
+ python="python3"
+fi
+
+echo "Running command (without the leading +):"
+set -x # Print command
+${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
+ -l"${build_dir}"
+# set +x
diff --git a/common/config/devConf.h b/common/config/devConf.h
index deea6aa2..ae730e46 100644
--- a/common/config/devConf.h
+++ b/common/config/devConf.h
@@ -48,9 +48,9 @@ namespace uart {
static constexpr size_t HYPERION_GPS_REPLY_MAX_BUFFER = 1024;
static constexpr uint32_t SYRLINKS_BAUD = 38400;
static constexpr uint32_t GNSS_BAUD = 9600;
-static constexpr uint32_t PLOC_MPSOC_BAUD = 115200;
+static constexpr uint32_t PLOC_MPSOC_BAUD = 921600;
static constexpr uint32_t PLOC_SUPERVISOR_BAUD = 115200;
-static constexpr uint32_t STAR_TRACKER_BAUD = 115200;
+static constexpr uint32_t STAR_TRACKER_BAUD = 921600;
}
diff --git a/fsfw b/fsfw
index 123f2ff3..2d9216ba 160000
--- a/fsfw
+++ b/fsfw
@@ -1 +1 @@
-Subproject commit 123f2ff360e71228e1c0c786d80a4c93d7144a2e
+Subproject commit 2d9216ba19f1931225daa5b6b6f244a48c09f1b9
diff --git a/generators/.run/events.run.xml b/generators/.run/events.run.xml
index 18f71033..f495007e 100644
--- a/generators/.run/events.run.xml
+++ b/generators/.run/events.run.xml
@@ -6,9 +6,9 @@
-
+
-
+
diff --git a/generators/bsp_q7s_events.csv b/generators/bsp_q7s_events.csv
index 67151d8d..ee04763d 100644
--- a/generators/bsp_q7s_events.csv
+++ b/generators/bsp_q7s_events.csv
@@ -100,12 +100,14 @@
11207;SELF_TEST_COIL_CURRENT_FAILURE;LOW;Get self test result returns failure indicating that the coil current was outside of the expected range P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;./mission/devices/IMTQHandler.h
11208;INVALID_ERROR_BYTE;LOW;Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC.;./mission/devices/IMTQHandler.h
11301;ERROR_STATE;HIGH;Reaction wheel signals an error state;./mission/devices/RwHandler.h
+11401;BOOTING_FIRMWARE_FAILED;LOW;Failed to boot firmware;./linux/devices/startracker/StarTrackerHandler.h
+11402;BOOTING_BOOTLOADER_FAILED;LOW;Failed to boot star tracker into bootloader mode;./linux/devices/startracker/StarTrackerHandler.h
11501;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;./bsp_q7s/devices/PlocSupervisorHandler.h
11502;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;./bsp_q7s/devices/PlocSupervisorHandler.h
11503;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report;./bsp_q7s/devices/PlocSupervisorHandler.h
11504;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;./bsp_q7s/devices/PlocSupervisorHandler.h
-11600;SANITIZATION_FAILED;LOW;;./bsp_q7s/memory/SdCardManager.h
-11601;MOUNTED_SD_CARD;INFO;;./bsp_q7s/memory/SdCardManager.h
+11600;ALLOC_FAILURE;MEDIUM;;./bsp_q7s/core/CoreController.h
+11601;REBOOT_SW;MEDIUM; Software reboot occured. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;./bsp_q7s/core/CoreController.h
11603;REBOOT_HW;MEDIUM;;./bsp_q7s/core/CoreController.h
11700;UPDATE_FILE_NOT_EXISTS;LOW;;./bsp_q7s/devices/PlocUpdater.h
11701;ACTION_COMMANDING_FAILED;LOW;Failed to send command to supervisor handler P1: Return value of CommandActionHelper::commandAction P2: Action ID of command to send;./bsp_q7s/devices/PlocUpdater.h
@@ -120,26 +122,23 @@
11902;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;./linux/obc/PdecHandler.h
11903;CARRIER_LOCK;INFO;Carrier lock detected;./linux/obc/PdecHandler.h
11904;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);./linux/obc/PdecHandler.h
-12000;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;./bsp_q7s/devices/startracker/StrHelper.h
-12001;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;./bsp_q7s/devices/startracker/StrHelper.h
-12002;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;./bsp_q7s/devices/startracker/StrHelper.h
-12003;IMAGE_DOWNLOAD_SUCCESSFUL;LOW;Image download was successful;./bsp_q7s/devices/startracker/StrHelper.h
-12004;FLASH_WRITE_SUCCESSFUL;LOW;Finished flash write procedure successfully;./bsp_q7s/devices/startracker/StrHelper.h
-12005;FLASH_READ_SUCCESSFUL;LOW;Finished flash read procedure successfully;./bsp_q7s/devices/startracker/StrHelper.h
-12006;FLASH_WRITE_FAILED;LOW;Flash write procedure failed;./bsp_q7s/devices/startracker/StrHelper.h
-12007;FLASH_READ_FAILED;LOW;Flash read procedure failed;./bsp_q7s/devices/startracker/StrHelper.h
-12008;FPGA_DOWNLOAD_SUCCESSFUL;LOW;Download of FPGA image successful;./bsp_q7s/devices/startracker/StrHelper.h
-12009;FPGA_DOWNLOAD_FAILED;LOW;Download of FPGA image failed;./bsp_q7s/devices/startracker/StrHelper.h
-12010;FPGA_UPLOAD_SUCCESSFUL;LOW;Upload of FPGA image successful;./bsp_q7s/devices/startracker/StrHelper.h
-12011;FPGA_UPLOAD_FAILED;LOW;Upload of FPGA image failed;./bsp_q7s/devices/startracker/StrHelper.h
-12012;STR_HELPER_READING_REPLY_FAILED;LOW;Failed to read communication interface reply data P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;./bsp_q7s/devices/startracker/StrHelper.h
-12013;STR_HELPER_COM_ERROR;LOW;Unexpected stop of decoding sequence P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;./bsp_q7s/devices/startracker/StrHelper.h
-12014;STR_HELPER_NO_REPLY;LOW;Star tracker did not send replies (maybe device is powered off) P1: Position of upload or download packet for which no reply was sent;./bsp_q7s/devices/startracker/StrHelper.h
-12015;STR_HELPER_DEC_ERROR;LOW;Error during decoding of received reply occurred P1: Return value of decoding function P2: Position of upload/download packet, or address of flash write/read request;./bsp_q7s/devices/startracker/StrHelper.h
-12016;POSITION_MISMATCH;LOW;Position mismatch P1: The expected position and thus the position for which the image upload/download failed;./bsp_q7s/devices/startracker/StrHelper.h
-12017;STR_HELPER_FILE_NOT_EXISTS;LOW;Specified file does not exist P1: Internal state of str helper;./bsp_q7s/devices/startracker/StrHelper.h
-12018;STR_HELPER_SENDING_PACKET_FAILED;LOW;;./bsp_q7s/devices/startracker/StrHelper.h
-12019;STR_HELPER_REQUESTING_MSG_FAILED;LOW;;./bsp_q7s/devices/startracker/StrHelper.h
+12000;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;./linux/devices/startracker/StrHelper.h
+12001;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;./linux/devices/startracker/StrHelper.h
+12002;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;./linux/devices/startracker/StrHelper.h
+12003;IMAGE_DOWNLOAD_SUCCESSFUL;LOW;Image download was successful;./linux/devices/startracker/StrHelper.h
+12004;FLASH_WRITE_SUCCESSFUL;LOW;Finished flash write procedure successfully;./linux/devices/startracker/StrHelper.h
+12005;FLASH_READ_SUCCESSFUL;LOW;Finished flash read procedure successfully;./linux/devices/startracker/StrHelper.h
+12006;FLASH_READ_FAILED;LOW;Flash read procedure failed;./linux/devices/startracker/StrHelper.h
+12007;FIRMWARE_UPDATE_SUCCESSFUL;LOW;Firmware update was successful;./linux/devices/startracker/StrHelper.h
+12008;FIRMWARE_UPDATE_FAILED;LOW;Firmware update failed;./linux/devices/startracker/StrHelper.h
+12009;STR_HELPER_READING_REPLY_FAILED;LOW;Failed to read communication interface reply data P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;./linux/devices/startracker/StrHelper.h
+12010;STR_HELPER_COM_ERROR;LOW;Unexpected stop of decoding sequence P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;./linux/devices/startracker/StrHelper.h
+12011;STR_HELPER_NO_REPLY;LOW;Star tracker did not send replies (maybe device is powered off) P1: Position of upload or download packet for which no reply was sent;./linux/devices/startracker/StrHelper.h
+12012;STR_HELPER_DEC_ERROR;LOW;Error during decoding of received reply occurred P1: Return value of decoding function P2: Position of upload/download packet, or address of flash write/read request;./linux/devices/startracker/StrHelper.h
+12013;POSITION_MISMATCH;LOW;Position mismatch P1: The expected position and thus the position for which the image upload/download failed;./linux/devices/startracker/StrHelper.h
+12014;STR_HELPER_FILE_NOT_EXISTS;LOW;Specified file does not exist P1: Internal state of str helper;./linux/devices/startracker/StrHelper.h
+12015;STR_HELPER_SENDING_PACKET_FAILED;LOW;;./linux/devices/startracker/StrHelper.h
+12016;STR_HELPER_REQUESTING_MSG_FAILED;LOW;;./linux/devices/startracker/StrHelper.h
12101;NEG_V_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;./mission/devices/PayloadPcduHandler.h
12102;U_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;./mission/devices/PayloadPcduHandler.h
12103;I_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;./mission/devices/PayloadPcduHandler.h
diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp
index 8b5b974e..9acb6136 100644
--- a/generators/events/translateEvents.cpp
+++ b/generators/events/translateEvents.cpp
@@ -1,7 +1,7 @@
/**
- * @brief Auto-generated event translation file. Contains 153 translations.
+ * @brief Auto-generated event translation file. Contains 152 translations.
* @details
- * Generated on: 2022-02-26 13:53:13
+ * Generated on: 2022-03-01 15:15:11
*/
#include "translateEvents.h"
@@ -107,12 +107,14 @@ const char *SELF_TEST_MTM_RANGE_FAILURE_STRING = "SELF_TEST_MTM_RANGE_FAILURE";
const char *SELF_TEST_COIL_CURRENT_FAILURE_STRING = "SELF_TEST_COIL_CURRENT_FAILURE";
const char *INVALID_ERROR_BYTE_STRING = "INVALID_ERROR_BYTE";
const char *ERROR_STATE_STRING = "ERROR_STATE";
+const char *BOOTING_FIRMWARE_FAILED_STRING = "BOOTING_FIRMWARE_FAILED";
+const char *BOOTING_BOOTLOADER_FAILED_STRING = "BOOTING_BOOTLOADER_FAILED";
const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_FAILURE";
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
-const char *SANITIZATION_FAILED_STRING = "SANITIZATION_FAILED";
-const char *MOUNTED_SD_CARD_STRING = "MOUNTED_SD_CARD";
+const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
+const char *REBOOT_SW_STRING = "REBOOT_SW";
const char *REBOOT_HW_STRING = "REBOOT_HW";
const char *UPDATE_FILE_NOT_EXISTS_STRING = "UPDATE_FILE_NOT_EXISTS";
const char *ACTION_COMMANDING_FAILED_STRING = "ACTION_COMMANDING_FAILED";
@@ -133,12 +135,9 @@ const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL";
const char *IMAGE_DOWNLOAD_SUCCESSFUL_STRING = "IMAGE_DOWNLOAD_SUCCESSFUL";
const char *FLASH_WRITE_SUCCESSFUL_STRING = "FLASH_WRITE_SUCCESSFUL";
const char *FLASH_READ_SUCCESSFUL_STRING = "FLASH_READ_SUCCESSFUL";
-const char *FLASH_WRITE_FAILED_STRING = "FLASH_WRITE_FAILED";
const char *FLASH_READ_FAILED_STRING = "FLASH_READ_FAILED";
-const char *FPGA_DOWNLOAD_SUCCESSFUL_STRING = "FPGA_DOWNLOAD_SUCCESSFUL";
-const char *FPGA_DOWNLOAD_FAILED_STRING = "FPGA_DOWNLOAD_FAILED";
-const char *FPGA_UPLOAD_SUCCESSFUL_STRING = "FPGA_UPLOAD_SUCCESSFUL";
-const char *FPGA_UPLOAD_FAILED_STRING = "FPGA_UPLOAD_FAILED";
+const char *FIRMWARE_UPDATE_SUCCESSFUL_STRING = "FIRMWARE_UPDATE_SUCCESSFUL";
+const char *FIRMWARE_UPDATE_FAILED_STRING = "FIRMWARE_UPDATE_FAILED";
const char *STR_HELPER_READING_REPLY_FAILED_STRING = "STR_HELPER_READING_REPLY_FAILED";
const char *STR_HELPER_COM_ERROR_STRING = "STR_HELPER_COM_ERROR";
const char *STR_HELPER_NO_REPLY_STRING = "STR_HELPER_NO_REPLY";
@@ -365,6 +364,10 @@ const char *translateEvents(Event event) {
return INVALID_ERROR_BYTE_STRING;
case (11301):
return ERROR_STATE_STRING;
+ case (11401):
+ return BOOTING_FIRMWARE_FAILED_STRING;
+ case (11402):
+ return BOOTING_BOOTLOADER_FAILED_STRING;
case (11501):
return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING;
case (11502):
@@ -374,9 +377,9 @@ const char *translateEvents(Event event) {
case (11504):
return SUPV_CRC_FAILURE_EVENT_STRING;
case (11600):
- return SANITIZATION_FAILED_STRING;
+ return ALLOC_FAILURE_STRING;
case (11601):
- return MOUNTED_SD_CARD_STRING;
+ return REBOOT_SW_STRING;
case (11603):
return REBOOT_HW_STRING;
case (11700):
@@ -418,32 +421,26 @@ const char *translateEvents(Event event) {
case (12005):
return FLASH_READ_SUCCESSFUL_STRING;
case (12006):
- return FLASH_WRITE_FAILED_STRING;
- case (12007):
return FLASH_READ_FAILED_STRING;
+ case (12007):
+ return FIRMWARE_UPDATE_SUCCESSFUL_STRING;
case (12008):
- return FPGA_DOWNLOAD_SUCCESSFUL_STRING;
+ return FIRMWARE_UPDATE_FAILED_STRING;
case (12009):
- return FPGA_DOWNLOAD_FAILED_STRING;
- case (12010):
- return FPGA_UPLOAD_SUCCESSFUL_STRING;
- case (12011):
- return FPGA_UPLOAD_FAILED_STRING;
- case (12012):
return STR_HELPER_READING_REPLY_FAILED_STRING;
- case (12013):
+ case (12010):
return STR_HELPER_COM_ERROR_STRING;
- case (12014):
+ case (12011):
return STR_HELPER_NO_REPLY_STRING;
- case (12015):
+ case (12012):
return STR_HELPER_DEC_ERROR_STRING;
- case (12016):
+ case (12013):
return POSITION_MISMATCH_STRING;
- case (12017):
+ case (12014):
return STR_HELPER_FILE_NOT_EXISTS_STRING;
- case (12018):
+ case (12015):
return STR_HELPER_SENDING_PACKET_FAILED_STRING;
- case (12019):
+ case (12016):
return STR_HELPER_REQUESTING_MSG_FAILED_STRING;
case (12101):
return NEG_V_OUT_OF_BOUNDS_STRING;
diff --git a/generators/objects/translateObjects.cpp b/generators/objects/translateObjects.cpp
index 2a45ff73..0dbda5e9 100644
--- a/generators/objects/translateObjects.cpp
+++ b/generators/objects/translateObjects.cpp
@@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 112 translations.
- * Generated on: 2022-02-26 14:03:55
+ * Generated on: 2022-03-01 15:15:27
*/
#include "translateObjects.h"
diff --git a/linux/boardtest/SpiTestClass.cpp b/linux/boardtest/SpiTestClass.cpp
index 101c7a15..9a050fa8 100644
--- a/linux/boardtest/SpiTestClass.cpp
+++ b/linux/boardtest/SpiTestClass.cpp
@@ -337,6 +337,8 @@ void SpiTestClass::performMax1227Test() {
std::string deviceName = q7s::SPI_DEFAULT_DEV;
#elif defined(RASPBERRY_PI)
std::string deviceName = "";
+#elif defined(EGSE)
+ std::string deviceName = "";
#endif
int fd = 0;
UnixFileGuard fileHelper(deviceName, &fd, O_RDWR, "SpiComIF::initializeInterface");
diff --git a/linux/devices/CMakeLists.txt b/linux/devices/CMakeLists.txt
index 6baf161c..7d39837d 100644
--- a/linux/devices/CMakeLists.txt
+++ b/linux/devices/CMakeLists.txt
@@ -1,9 +1,7 @@
-target_sources(${OBSW_NAME} PRIVATE
- GPSHyperionLinuxController.cpp
-)
-
if(EIVE_BUILD_GPSD_GPS_HANDLER)
target_sources(${OBSW_NAME} PRIVATE
GPSHyperionLinuxController.cpp
)
endif()
+
+add_subdirectory(startracker)
diff --git a/bsp_q7s/devices/startracker/StarTrackerDefinitions.h b/linux/devices/devicedefinitions/StarTrackerDefinitions.h
similarity index 52%
rename from bsp_q7s/devices/startracker/StarTrackerDefinitions.h
rename to linux/devices/devicedefinitions/StarTrackerDefinitions.h
index 1e0564d9..f7059c66 100644
--- a/bsp_q7s/devices/startracker/StarTrackerDefinitions.h
+++ b/linux/devices/devicedefinitions/StarTrackerDefinitions.h
@@ -1,5 +1,5 @@
-#ifndef MISSION_STARTRACKER_DEFINITIONS_H_
-#define MISSION_STARTRACKER_DEFINITIONS_H_
+#ifndef LINUX_DEVICES_DEVICEDEFINITIONS_STARTRACKER_DEFINITIONS_H_
+#define LINUX_DEVICES_DEVICEDEFINITIONS_STARTRACKER_DEFINITIONS_H_
#include
#include
@@ -9,7 +9,7 @@
#include "objects/systemObjectList.h"
-namespace StarTracker {
+namespace startracker {
/** This is the address of the star tracker */
static const uint8_t ADDRESS = 33;
@@ -60,6 +60,7 @@ enum PoolIds : lp_id_t {
TIME_TEMPERATURE_SET,
MCU_TEMPERATURE,
CMOS_TEMPERATURE,
+ FPGA_TEMPERATURE,
TICKS_SOLUTION_SET,
TIME_SOLUTION_SET,
CALI_QW,
@@ -121,83 +122,7 @@ enum PoolIds : lp_id_t {
HISTOGRAM_BIND6,
HISTOGRAM_BIND7,
HISTOGRAM_BIND8,
- TICKS_CONTRAST_SET,
- TIME_CONTRAST_SET,
- CONTRAST_BINA0,
- CONTRAST_BINA1,
- CONTRAST_BINA2,
- CONTRAST_BINA3,
- CONTRAST_BINA4,
- CONTRAST_BINA5,
- CONTRAST_BINA6,
- CONTRAST_BINA7,
- CONTRAST_BINA8,
- CONTRAST_BINB0,
- CONTRAST_BINB1,
- CONTRAST_BINB2,
- CONTRAST_BINB3,
- CONTRAST_BINB4,
- CONTRAST_BINB5,
- CONTRAST_BINB6,
- CONTRAST_BINB7,
- CONTRAST_BINB8,
- CONTRAST_BINC0,
- CONTRAST_BINC1,
- CONTRAST_BINC2,
- CONTRAST_BINC3,
- CONTRAST_BINC4,
- CONTRAST_BINC5,
- CONTRAST_BINC6,
- CONTRAST_BINC7,
- CONTRAST_BINC8,
- CONTRAST_BIND0,
- CONTRAST_BIND1,
- CONTRAST_BIND2,
- CONTRAST_BIND3,
- CONTRAST_BIND4,
- CONTRAST_BIND5,
- CONTRAST_BIND6,
- CONTRAST_BIND7,
- CONTRAST_BIND8,
CHKSUM,
- DWL_ID,
- DWL_PIXX,
- DWL_PIXY,
- DWL_X_UNCORRECTED,
- DWL_Y_UNCORRECTED,
- DWL_X_CORRECTED,
- DWL_Y_CORRECTED,
- DWL_MAGNITUDE,
- DWL_CXA,
- DWL_CYA,
- DWL_QUALITY,
- MATCHEDSTR_ID,
- MATCHEDSTR_CAMFPX,
- MATCHEDSTR_CAMFPY,
- MATCHEDSTR_CAMCARTX,
- MATCHEDSTR_CAMCARTY,
- MATCHEDSTR_CAMCARTZ,
- MATCHEDSTR_CAMMAGNITUDE,
- MATCHEDSTR_DBFPX,
- MATCHEDSTR_DBFPY,
- MATCHEDSTR_DBCARTX,
- MATCHEDSTR_DBCARTY,
- MATCHEDSTR_DBCARTZ,
- MATCHEDSTR_DBMAGNITUDE,
- MATCHEDSTR_CATALOGID,
- DBIMAGE_ID,
- DBIMAGE_PIXX,
- DBIMAGE_PIXY,
- DBIMAGE_X,
- DBIMAGE_Y,
- DBIMAGE_MAGNITUDE,
- BLOBPIX_ID,
- BLOBPIX_X,
- BLOBPIX_Y,
- BLOBPIX_TOT_VAL,
- BLOBPIX_IN_USE,
- BLOBPIX_BRIGHT_NEIGHBOURS,
- BLOBPIX_REGION,
CAMERA_MODE,
FOCALLENGTH,
EXPOSURE,
@@ -213,6 +138,15 @@ enum PoolIds : lp_id_t {
CAM_VAL3,
CAM_REG4,
CAM_VAL4,
+ CAM_REG5,
+ CAM_VAL5,
+ CAM_REG6,
+ CAM_VAL6,
+ CAM_REG7,
+ CAM_VAL7,
+ CAM_REG8,
+ CAM_VAL8,
+ CAM_FREQ_1,
LIMITS_ACTION,
LIMITS_FPGA18CURRENT,
LIMITS_FPGA25CURRENT,
@@ -238,7 +172,96 @@ enum PoolIds : lp_id_t {
BLOB_DARK_THRESHOLD,
BLOB_ENABLE_HISTOGRAM,
BLOB_ENABLE_CONTRAST,
- BLOB_BIN_MODE
+ BLOB_BIN_MODE,
+ LOGLEVEL1,
+ LOGLEVEL2,
+ LOGLEVEL3,
+ LOGLEVEL4,
+ LOGLEVEL5,
+ LOGLEVEL6,
+ LOGLEVEL7,
+ LOGLEVEL8,
+ LOGLEVEL9,
+ LOGLEVEL10,
+ LOGLEVEL11,
+ LOGLEVEL12,
+ LOGLEVEL13,
+ LOGLEVEL14,
+ LOGLEVEL15,
+ LOGLEVEL16,
+ MOUNTING_QW,
+ MOUNTING_QX,
+ MOUNTING_QY,
+ MOUNTING_QZ,
+ IMAGE_PROCESSOR_MODE,
+ IMAGE_PROCESSOR_STORE,
+ IMAGE_PROCESSOR_SIGNALTHRESHOLD,
+ IMAGE_PROCESSOR_DARKTHRESHOLD,
+ IMAGE_PROCESSOR_BACKGROUNDCOMPENSATION,
+ CENTROIDING_ENABLE_FILTER,
+ CENTROIDING_MAX_QUALITY,
+ CENTROIDING_DARK_THRESHOLD,
+ CENTROIDING_MIN_QUALITY,
+ CENTROIDING_MAX_INTENSITY,
+ CENTROIDING_MIN_INTENSITY,
+ CENTROIDING_MAX_MAGNITUDE,
+ CENTROIDING_GAUSSIAN_CMAX,
+ CENTROIDING_GAUSSIAN_CMIN,
+ CENTROIDING_TRANSMATRIX00,
+ CENTROIDING_TRANSMATRIX01,
+ CENTROIDING_TRANSMATRIX10,
+ CENTROIDING_TRANSMATRIX11,
+ LISA_MODE,
+ LISA_PREFILTER_DIST_THRESHOLD,
+ LISA_PREFILTER_ANGLE_THRESHOLD,
+ LISA_FOV_WIDTH,
+ LISA_FOV_HEIGHT,
+ LISA_FLOAT_STAR_LIMIT,
+ LISA_CLOSE_STAR_LIMIT,
+ LISA_RATING_WEIGHT_CLOSE_STAR_COUNT,
+ LISA_RATING_WEIGHT_FRACTION_CLOSE,
+ LISA_RATING_WEIGHT_MEAN_SUM,
+ LISA_RATING_WEIGHT_DB_STAR_COUNT,
+ LISA_MAX_COMBINATIONS,
+ LISA_NR_STARS_STOP,
+ LISA_FRACTION_CLOSE_STOP,
+ MATCHING_SQUARED_DISTANCE_LIMIT,
+ MATCHING_SQUARED_SHIFT_LIMIT,
+ TRACKING_THIN_LIMIT,
+ TRACKING_OUTLIER_THRESHOLD,
+ TRACKING_OUTLIER_THRESHOLD_QUEST,
+ TRACKING_TRACKER_CHOICE,
+ VALIDATION_STABLE_COUNT,
+ VALIDATION_MAX_DIFFERENCE,
+ VALIDATION_MIN_TRACKER_CONFIDENCE,
+ VALIDATION_MIN_MATCHED_STARS,
+ ALGO_MODE,
+ ALGO_I2T_MIN_CONFIDENCE,
+ ALGO_I2T_MIN_MATCHED,
+ ALGO_I2L_MIN_CONFIDENCE,
+ ALGO_I2L_MIN_MATCHED,
+ SUBSCRIPTION_TM1,
+ SUBSCRIPTION_TM2,
+ SUBSCRIPTION_TM3,
+ SUBSCRIPTION_TM4,
+ SUBSCRIPTION_TM5,
+ SUBSCRIPTION_TM6,
+ SUBSCRIPTION_TM7,
+ SUBSCRIPTION_TM8,
+ SUBSCRIPTION_TM9,
+ SUBSCRIPTION_TM10,
+ SUBSCRIPTION_TM11,
+ SUBSCRIPTION_TM12,
+ SUBSCRIPTION_TM13,
+ SUBSCRIPTION_TM14,
+ SUBSCRIPTION_TM15,
+ SUBSCRIPTION_TM16,
+ LOG_SUBSCRIPTION_LEVEL1,
+ LOG_SUBSCRIPTION_MODULE1,
+ LOG_SUBSCRIPTION_LEVEL2,
+ LOG_SUBSCRIPTION_MODULE2,
+ DEBUG_CAMERA_TIMING,
+ DEBUG_CAMERA_TEST
};
static const DeviceCommandId_t PING_REQUEST = 0;
@@ -247,24 +270,19 @@ static const DeviceCommandId_t BOOT = 1;
static const DeviceCommandId_t REQ_VERSION = 2;
static const DeviceCommandId_t REQ_INTERFACE = 3;
static const DeviceCommandId_t REQ_TIME = 4;
-static const DeviceCommandId_t ERASE = 5;
-static const DeviceCommandId_t UNLOCK = 6;
static const DeviceCommandId_t SWITCH_TO_BOOTLOADER_PROGRAM = 7;
static const DeviceCommandId_t DOWNLOAD_IMAGE = 9;
static const DeviceCommandId_t UPLOAD_IMAGE = 10;
static const DeviceCommandId_t REQ_POWER = 11;
static const DeviceCommandId_t TAKE_IMAGE = 15;
-static const DeviceCommandId_t DOWNLOAD_CENTROID = 16;
-static const DeviceCommandId_t UPLOAD_CENTROID = 17;
-static const DeviceCommandId_t SUBSCRIBE_TO_TM = 18;
+static const DeviceCommandId_t SUBSCRIPTION = 18;
+static const DeviceCommandId_t IMAGE_PROCESSOR = 19;
static const DeviceCommandId_t REQ_SOLUTION = 24;
static const DeviceCommandId_t REQ_TEMPERATURE = 25;
static const DeviceCommandId_t REQ_HISTOGRAM = 28;
-static const DeviceCommandId_t REQ_CONTRAST = 29;
static const DeviceCommandId_t LIMITS = 40;
static const DeviceCommandId_t MOUNTING = 41;
static const DeviceCommandId_t CAMERA = 42;
-static const DeviceCommandId_t BLOB = 43;
static const DeviceCommandId_t CENTROIDING = 44;
static const DeviceCommandId_t LISA = 45;
static const DeviceCommandId_t MATCHING = 46;
@@ -272,24 +290,31 @@ static const DeviceCommandId_t TRACKING = 47;
static const DeviceCommandId_t VALIDATION = 48;
static const DeviceCommandId_t ALGO = 49;
static const DeviceCommandId_t CHECKSUM = 50;
-static const DeviceCommandId_t READ = 51;
-static const DeviceCommandId_t WRITE = 52;
-static const DeviceCommandId_t DOWNLOAD_MATCHED_STAR = 53;
+static const DeviceCommandId_t FLASH_READ = 51;
static const DeviceCommandId_t STOP_IMAGE_LOADER = 55;
-static const DeviceCommandId_t RESET_ERROR = 56;
-static const DeviceCommandId_t CHANGE_DOWNLOAD_FILE = 57;
+static const DeviceCommandId_t CHANGE_IMAGE_DOWNLOAD_FILE = 57;
static const DeviceCommandId_t SET_JSON_FILE_NAME = 58;
-static const DeviceCommandId_t SET_READ_FILENAME = 59;
-static const DeviceCommandId_t SET_TIME = 60;
-static const DeviceCommandId_t DOWNLOAD_DBIMAGE = 61;
-static const DeviceCommandId_t DOWNLOAD_BLOBPIXEL = 62;
-static const DeviceCommandId_t DOWNLOAD_FPGA_IMAGE = 63;
-static const DeviceCommandId_t CHANGE_FPGA_DOWNLOAD_FILE = 64;
-static const DeviceCommandId_t UPLOAD_FPGA_IMAGE = 65;
-static const DeviceCommandId_t FPGA_ACTION = 66;
+static const DeviceCommandId_t SET_FLASH_READ_FILENAME = 59;
static const DeviceCommandId_t REQ_CAMERA = 67;
static const DeviceCommandId_t REQ_LIMITS = 68;
-static const DeviceCommandId_t REQ_BLOB_PARAMS = 69;
+static const DeviceCommandId_t REQ_LOG_LEVEL = 69;
+static const DeviceCommandId_t REQ_MOUNTING = 70;
+static const DeviceCommandId_t REQ_IMAGE_PROCESSOR = 71;
+static const DeviceCommandId_t REQ_CENTROIDING = 72;
+static const DeviceCommandId_t REQ_LISA = 73;
+static const DeviceCommandId_t REQ_MATCHING = 74;
+static const DeviceCommandId_t REQ_TRACKING = 75;
+static const DeviceCommandId_t REQ_VALIDATION = 76;
+static const DeviceCommandId_t REQ_ALGO = 77;
+static const DeviceCommandId_t REQ_SUBSCRIPTION = 78;
+static const DeviceCommandId_t REQ_LOG_SUBSCRIPTION = 79;
+static const DeviceCommandId_t REQ_DEBUG_CAMERA = 80;
+static const DeviceCommandId_t LOGLEVEL = 81;
+static const DeviceCommandId_t LOGSUBSCRIPTION = 82;
+static const DeviceCommandId_t DEBUG_CAMERA = 83;
+static const DeviceCommandId_t FIRMWARE_UPDATE = 84;
+static const DeviceCommandId_t DISABLE_TIMESTAMP_GENERATION = 85;
+static const DeviceCommandId_t ENABLE_TIMESTAMP_GENERATION = 86;
static const DeviceCommandId_t NONE = 0xFFFFFFFF;
static const uint32_t VERSION_SET_ID = REQ_VERSION;
@@ -299,35 +324,47 @@ static const uint32_t TEMPERATURE_SET_ID = REQ_TEMPERATURE;
static const uint32_t TIME_SET_ID = REQ_TIME;
static const uint32_t SOLUTION_SET_ID = REQ_SOLUTION;
static const uint32_t HISTOGRAM_SET_ID = REQ_HISTOGRAM;
-static const uint32_t CONTRAST_SET_ID = REQ_CONTRAST;
static const uint32_t CHECKSUM_SET_ID = CHECKSUM;
-static const uint32_t DOWNLOADCENTROID_SET_ID = DOWNLOAD_CENTROID;
-static const uint32_t DOWNLOAD_MATCHED_STAR_SET_ID = DOWNLOAD_MATCHED_STAR;
-static const uint32_t DOWNLOAD_DBIMAGE_SET_ID = DOWNLOAD_DBIMAGE;
-static const uint32_t DOWNLOAD_BLOBPIXEL_SET_ID = DOWNLOAD_BLOBPIXEL;
static const uint32_t CAMERA_SET_ID = REQ_CAMERA;
static const uint32_t LIMITS_SET_ID = REQ_LIMITS;
-static const uint32_t BLOB_SET_ID = REQ_BLOB_PARAMS;
+static const uint32_t LOG_LEVEL_SET_ID = REQ_LOG_LEVEL;
+static const uint32_t MOUNTING_SET_ID = REQ_MOUNTING;
+static const uint32_t IMAGE_PROCESSOR_SET_ID = REQ_IMAGE_PROCESSOR;
+static const uint32_t CENTROIDING_SET_ID = REQ_CENTROIDING;
+static const uint32_t LISA_SET_ID = REQ_LISA;
+static const uint32_t MATCHING_SET_ID = REQ_MATCHING;
+static const uint32_t TRACKING_SET_ID = REQ_TRACKING;
+static const uint32_t VALIDATION_SET_ID = REQ_VALIDATION;
+static const uint32_t ALGO_SET_ID = REQ_ALGO;
+static const uint32_t SUBSCRIPTION_SET_ID = REQ_SUBSCRIPTION;
+static const uint32_t LOG_SUBSCRIPTION_SET_ID = REQ_LOG_SUBSCRIPTION;
+static const uint32_t DEBUG_CAMERA_SET_ID = REQ_DEBUG_CAMERA;
/** Max size of unencoded frame */
static const size_t MAX_FRAME_SIZE = 1200;
-static const uint8_t TEMPERATURE_SET_ENTRIES = 4;
+static const uint8_t TEMPERATURE_SET_ENTRIES = 5;
static const uint8_t VERSION_SET_ENTRIES = 5;
static const uint8_t INTERFACE_SET_ENTRIES = 4;
static const uint8_t POWER_SET_ENTRIES = 18;
static const uint8_t TIME_SET_ENTRIES = 4;
static const uint8_t SOLUTION_SET_ENTRIES = 23;
static const uint8_t HISTOGRAM_SET_ENTRIES = 38;
-static const uint8_t CONTRAST_SET_ENTRIES = 38;
static const uint8_t CHECKSUM_SET_ENTRIES = 1;
-static const uint8_t DOWNLOAD_CENTROID_SET_ENTRIES = 11;
-static const uint8_t DOWNLOAD_MATCHED_STAR_SET_ENTRIES = 14;
-static const uint8_t DOWNLOAD_DBIMAGE_SET_ENTRIES = 6;
-static const uint8_t DOWNLOAD_BLOBPIXEL_SET_ENTRIES = 7;
-static const uint8_t CAMERA_SET_ENTRIES = 15;
+static const uint8_t CAMERA_SET_ENTRIES = 24;
static const uint8_t LIMITS_SET_ENTRIES = 11;
-static const uint8_t BLOB_SET_ENTRIES = 15;
+static const uint8_t LOG_LEVEL_SET_ENTRIES = 16;
+static const uint8_t MOUNTING_SET_ENTRIES = 4;
+static const uint8_t IMAGE_PROCESSOR_SET_ENTRIES = 5;
+static const uint8_t CENTROIDING_PARAMS_SET_ENTRIES = 13;
+static const uint8_t LISA_SET_ENTRIES = 14;
+static const uint8_t MATCHING_SET_ENTRIES = 2;
+static const uint8_t TRACKING_SET_ENTRIES = 4;
+static const uint8_t VALIDATION_SET_ENTRIES = 4;
+static const uint8_t ALGO_SET_ENTRIES = 5;
+static const uint8_t SUBSCRIPTION_SET_ENTRIES = 16;
+static const uint8_t LOG_SUBSCRIPTION_SET_ENTRIES = 4;
+static const uint8_t DEBUG_CAMERA_SET_ENTRIES = 2;
// Action, parameter and telemetry IDs
namespace ID {
@@ -337,8 +374,8 @@ static const uint8_t VERSION = 2;
static const uint8_t INTERFACE = 3;
static const uint8_t LIMITS = 5;
static const uint8_t MOUNTING = 6;
+static const uint8_t IMAGE_PROCESSOR = 10;
static const uint8_t CAMERA = 9;
-static const uint8_t BLOB = 10;
static const uint8_t CENTROIDING = 11;
static const uint8_t LISA = 12;
static const uint8_t MATCHING = 13;
@@ -349,25 +386,19 @@ static const uint8_t REBOOT = 7;
static const uint8_t UPLOAD_IMAGE = 10;
static const uint8_t POWER = 11;
static const uint8_t SET_TIME = 14;
-static const uint8_t SUBSCRIBE = 18;
+static const uint8_t SUBSCRIPTION = 18;
static const uint8_t SOLUTION = 24;
-static const uint8_t TEMPERATURE = 25;
+static const uint8_t TEMPERATURE = 27;
static const uint8_t HISTOGRAM = 28;
static const uint8_t CONTRAST = 29;
static const uint8_t TIME = 1;
static const uint8_t WRITE = 2;
static const uint8_t READ = 3;
static const uint8_t CHECKSUM = 4;
-static const uint8_t ERASE = 5;
-static const uint8_t UNLOCK = 6;
static const uint8_t TAKE_IMAGE = 15;
-static const uint8_t ERROR_RESET = 12;
-static const uint8_t DOWNLOAD_CENTROID = 16;
-static const uint8_t UPLOAD_CENTROID = 17;
-static const uint8_t DOWNLOAD_MATCHED_STAR = 18;
-static const uint8_t DOWNLOAD_DBIMAGE = 19;
-static const uint8_t DOWNLOAD_BLOBPIXEL = 24;
-static const uint8_t FPGA_ACTION = 22;
+static const uint8_t LOG_LEVEL = 3;
+static const uint8_t LOG_SUBSCRIPTION = 19;
+static const uint8_t DEBUG_CAMERA = 20;
} // namespace ID
namespace Program {
@@ -375,12 +406,47 @@ static const uint8_t BOOTLOADER = 1;
static const uint8_t FIRMWARE = 2;
} // namespace Program
+namespace region_secrets {
+static const uint32_t REGION_0_SECRET = 0xd1a220d3;
+static const uint32_t REGION_1_SECRET = 0xdc770fa8;
+static const uint32_t REGION_2_SECRET = 0xdf9066b0;
+static const uint32_t REGION_3_SECRET = 0x5f6a0423;
+static const uint32_t REGION_4_SECRET = 0xbbaad5d8;
+static const uint32_t REGION_5_SECRET = 0xa81c3678;
+static const uint32_t REGION_6_SECRET = 0xe10f76f8;
+static const uint32_t REGION_7_SECRET = 0x83220919;
+static const uint32_t REGION_8_SECRET = 0xec37289d;
+static const uint32_t REGION_9_SECRET = 0x27ac0ef8;
+static const uint32_t REGION_10_SECRET = 0xf017e43d;
+static const uint32_t REGION_11_SECRET = 0xbc7f7f49;
+static const uint32_t REGION_12_SECRET = 0x42fedef6;
+static const uint32_t REGION_13_SECRET = 0xe53cf10d;
+static const uint32_t REGION_14_SECRET = 0xe862b70b;
+static const uint32_t REGION_15_SECRET = 0x79b537ca;
+static const uint32_t secret[16]{
+ REGION_0_SECRET, REGION_1_SECRET, REGION_2_SECRET, REGION_3_SECRET,
+ REGION_4_SECRET, REGION_5_SECRET, REGION_6_SECRET, REGION_7_SECRET,
+ REGION_8_SECRET, REGION_9_SECRET, REGION_10_SECRET, REGION_11_SECRET,
+ REGION_12_SECRET, REGION_13_SECRET, REGION_14_SECRET, REGION_15_SECRET};
+} // namespace region_secrets
+
+enum class FlashSections : uint8_t {
+ BOOTLOADER_SECTION = 0,
+ MAIN_FIRMWARE_SECTION = 1,
+ ARC_CONFIG_SECTION = 2
+};
+
+// Flash region IDs of firmware partition
+enum class FirmwareRegions : uint32_t { FIRST = 1, LAST = 8 };
+
+static const uint32_t FLASH_REGION_SIZE = 0x20000;
+
/**
* @brief This dataset can be used to store the temperature of a reaction wheel.
*/
class TemperatureSet : public StaticLocalDataSet {
public:
- static const size_t SIZE = 20;
+ static const size_t SIZE = 24;
TemperatureSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, TEMPERATURE_SET_ID) {}
@@ -392,14 +458,17 @@ class TemperatureSet : public StaticLocalDataSet {
lp_var_t time = lp_var_t(sid.objectId, PoolIds::TIME_TEMPERATURE_SET, this);
lp_var_t mcuTemperature = lp_var_t(sid.objectId, PoolIds::MCU_TEMPERATURE, this);
lp_var_t cmosTemperature = lp_var_t(sid.objectId, PoolIds::CMOS_TEMPERATURE, this);
+ lp_var_t fpgaTemperature = lp_var_t(sid.objectId, PoolIds::FPGA_TEMPERATURE, this);
void printSet() {
sif::info << "TemperatureSet::printSet: Ticks: " << this->ticks << std::endl;
sif::info << "TemperatureSet::printSet: Time: " << this->time << " us" << std::endl;
sif::info << "TemperatureSet::printSet: MCU Temperature: " << this->mcuTemperature << " °C"
<< std::endl;
- sif::info << "TemperatureSet::printSet: CMOS Temperature: " << this->cmosTemperature << " °C"
+ sif::info << "TemperatureSet::printSet: CMOS Temperature (raw): " << this->cmosTemperature
<< std::endl;
+ sif::info << "TemperatureSet::printSet: FPGA Temperature (random value): "
+ << this->fpgaTemperature << " °C" << std::endl;
}
};
@@ -740,100 +809,6 @@ class HistogramSet : public StaticLocalDataSet {
}
};
-/**
- * @brief Dataset to store the contrast telemetry data
- */
-class ContrastSet : public StaticLocalDataSet {
- public:
- // Size of dataset
- static const size_t SIZE = 156;
-
- ContrastSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, CONTRAST_SET_ID) {}
-
- ContrastSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, CONTRAST_SET_ID)) {}
-
- lp_var_t ticks = lp_var_t(sid.objectId, PoolIds::TICKS_CONTRAST_SET, this);
- lp_var_t time = lp_var_t(sid.objectId, PoolIds::TIME_CONTRAST_SET, this);
- lp_var_t binA0 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINA0, this);
- lp_var_t binA1 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINA1, this);
- lp_var_t binA2 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINA2, this);
- lp_var_t binA3 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINA3, this);
- lp_var_t binA4 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINA4, this);
- lp_var_t binA5 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINA5, this);
- lp_var_t binA6 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINA6, this);
- lp_var_t binA7 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINA7, this);
- lp_var_t binA8 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINA8, this);
- lp_var_t binb0 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINB0, this);
- lp_var_t binB1 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINB1, this);
- lp_var_t binB2 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINB2, this);
- lp_var_t binB3 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINB3, this);
- lp_var_t binB4 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINB4, this);
- lp_var_t binB5 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINB5, this);
- lp_var_t binB6 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINB6, this);
- lp_var_t binB7 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINB7, this);
- lp_var_t binB8 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINB8, this);
- lp_var_t binC0 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINC0, this);
- lp_var_t binC1 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINC1, this);
- lp_var_t binC2 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINC2, this);
- lp_var_t binC3 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINC3, this);
- lp_var_t binC4 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINC4, this);
- lp_var_t binC5 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINC5, this);
- lp_var_t binC6 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINC6, this);
- lp_var_t binC7 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINC7, this);
- lp_var_t binC8 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINC8, this);
- lp_var_t binD0 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BIND0, this);
- lp_var_t binD1 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BIND1, this);
- lp_var_t binD2 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BIND2, this);
- lp_var_t binD3 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BIND3, this);
- lp_var_t binD4 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BIND4, this);
- lp_var_t binD5 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BIND5, this);
- lp_var_t binD6 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BIND6, this);
- lp_var_t binD7 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BIND7, this);
- lp_var_t binD8 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BIND8, this);
-
- void printSet() {
- PoolReadGuard rg(this);
- sif::info << "ContrastSet::printSet: Ticks: " << this->ticks << std::endl;
- sif::info << "ContrastSet::printSet: Time (time stamp): " << this->time << " us" << std::endl;
- sif::info << "ContrastSet::printSet: BinA0: " << this->binA0 << std::endl;
- sif::info << "ContrastSet::printSet: BinA1: " << this->binA1 << std::endl;
- sif::info << "ContrastSet::printSet: BinA2: " << this->binA2 << std::endl;
- sif::info << "ContrastSet::printSet: BinA3: " << this->binA3 << std::endl;
- sif::info << "ContrastSet::printSet: BinA4: " << this->binA4 << std::endl;
- sif::info << "ContrastSet::printSet: BinA5: " << this->binA5 << std::endl;
- sif::info << "ContrastSet::printSet: BinA6: " << this->binA6 << std::endl;
- sif::info << "ContrastSet::printSet: BinA7: " << this->binA7 << std::endl;
- sif::info << "ContrastSet::printSet: BinA8: " << this->binA8 << std::endl;
- sif::info << "ContrastSet::printSet: BinB0: " << this->binA0 << std::endl;
- sif::info << "ContrastSet::printSet: BinB1: " << this->binB1 << std::endl;
- sif::info << "ContrastSet::printSet: BinB2: " << this->binB2 << std::endl;
- sif::info << "ContrastSet::printSet: BinB3: " << this->binB3 << std::endl;
- sif::info << "ContrastSet::printSet: BinB4: " << this->binB4 << std::endl;
- sif::info << "ContrastSet::printSet: BinB5: " << this->binB5 << std::endl;
- sif::info << "ContrastSet::printSet: BinB6: " << this->binB6 << std::endl;
- sif::info << "ContrastSet::printSet: BinB7: " << this->binB7 << std::endl;
- sif::info << "ContrastSet::printSet: BinB8: " << this->binB8 << std::endl;
- sif::info << "ContrastSet::printSet: BinC0: " << this->binC0 << std::endl;
- sif::info << "ContrastSet::printSet: BinC1: " << this->binC1 << std::endl;
- sif::info << "ContrastSet::printSet: BinC2: " << this->binC2 << std::endl;
- sif::info << "ContrastSet::printSet: BinC3: " << this->binC3 << std::endl;
- sif::info << "ContrastSet::printSet: BinC4: " << this->binC4 << std::endl;
- sif::info << "ContrastSet::printSet: BinC5: " << this->binC5 << std::endl;
- sif::info << "ContrastSet::printSet: BinC6: " << this->binC6 << std::endl;
- sif::info << "ContrastSet::printSet: BinC7: " << this->binC7 << std::endl;
- sif::info << "ContrastSet::printSet: BinC8: " << this->binC8 << std::endl;
- sif::info << "ContrastSet::printSet: BinD0: " << this->binD0 << std::endl;
- sif::info << "ContrastSet::printSet: BinD1: " << this->binD1 << std::endl;
- sif::info << "ContrastSet::printSet: BinD2: " << this->binD2 << std::endl;
- sif::info << "ContrastSet::printSet: BinD3: " << this->binD3 << std::endl;
- sif::info << "ContrastSet::printSet: BinD4: " << this->binD4 << std::endl;
- sif::info << "ContrastSet::printSet: BinD5: " << this->binD5 << std::endl;
- sif::info << "ContrastSet::printSet: BinD6: " << this->binD6 << std::endl;
- sif::info << "ContrastSet::printSet: BinD7: " << this->binD7 << std::endl;
- sif::info << "ContrastSet::printSet: BinD8: " << this->binD8 << std::endl;
- }
-};
-
/**
* @brief Helper Class to extract information from bytestream.
*/
@@ -894,16 +869,6 @@ class ChecksumReply {
uint32_t checksum = 0;
};
-class EraseReply {
- public:
- EraseReply(const uint8_t* datafield) { region = *datafield; }
-
- uint8_t getRegion() { return region; }
-
- private:
- uint8_t region = 0;
-};
-
class ChecksumSet : public StaticLocalDataSet {
public:
// Size of dataset
@@ -916,185 +881,6 @@ class ChecksumSet : public StaticLocalDataSet {
lp_var_t checksum = lp_var_t(sid.objectId, PoolIds::CHKSUM, this);
};
-/**
- * @brief Dataset to store download centroid response
- */
-class DownloadCentroidSet : public StaticLocalDataSet {
- public:
- // Size of dataset
- static const size_t SIZE = 38;
-
- DownloadCentroidSet(HasLocalDataPoolIF* owner)
- : StaticLocalDataSet(owner, DOWNLOADCENTROID_SET_ID) {}
-
- DownloadCentroidSet(object_id_t objectId)
- : StaticLocalDataSet(sid_t(objectId, DOWNLOADCENTROID_SET_ID)) {}
-
- lp_var_t id = lp_var_t(sid.objectId, PoolIds::DWL_ID, this);
- lp_var_t pixx = lp_var_t(sid.objectId, PoolIds::DWL_PIXX, this);
- lp_var_t pixy = lp_var_t(sid.objectId, PoolIds::DWL_PIXY, this);
- lp_var_t xUncorrected = lp_var_t(sid.objectId, PoolIds::DWL_X_UNCORRECTED, this);
- lp_var_t yUncorrected = lp_var_t(sid.objectId, PoolIds::DWL_Y_UNCORRECTED, this);
- lp_var_t xCorrected = lp_var_t(sid.objectId, PoolIds::DWL_X_CORRECTED, this);
- lp_var_t yCorrected = lp_var_t(sid.objectId, PoolIds::DWL_Y_CORRECTED, this);
- lp_var_t magnitude = lp_var_t(sid.objectId, PoolIds::DWL_MAGNITUDE, this);
- lp_var_t cxa = lp_var_t(sid.objectId, PoolIds::DWL_CXA, this);
- lp_var_t cya = lp_var_t(sid.objectId, PoolIds::DWL_CYA, this);
- lp_var_t quality = lp_var_t(sid.objectId, PoolIds::DWL_QUALITY, this);
-
- void printSet() {
- PoolReadGuard rg(this);
- sif::info << "DownloadCentroidSet::printSet: id: " << static_cast(this->id.value)
- << std::endl;
- sif::info << "DownloadCentroidSet::printSet: pixx: " << this->pixx << std::endl;
- sif::info << "DownloadCentroidSet::printSet: pixy: " << this->pixy << std::endl;
- sif::info << "DownloadCentroidSet::printSet: xUncorrected: " << this->xUncorrected << std::endl;
- sif::info << "DownloadCentroidSet::printSet: yUncorrected: " << this->yUncorrected << std::endl;
- sif::info << "DownloadCentroidSet::printSet: xCorrected: " << this->xCorrected << std::endl;
- sif::info << "DownloadCentroidSet::printSet: yCorrected: " << this->yCorrected << std::endl;
- sif::info << "DownloadCentroidSet::printSet: magnitude: " << this->magnitude << std::endl;
- sif::info << "DownloadCentroidSet::printSet: cxa: " << this->cxa << std::endl;
- sif::info << "DownloadCentroidSet::printSet: cya: " << this->cya << std::endl;
- sif::info << "DownloadCentroidSet::printSet: quality: " << this->quality << std::endl;
- }
-};
-
-namespace UploadCentroidKeys {
-static const char id[] = "id";
-static const char pixx[] = "pixx";
-static const char pixy[] = "pixy";
-static const char x_uncorrected[] = "x_uncorrected";
-static const char y_uncorrected[] = "y_uncorrected";
-static const char x_corrected[] = "x_corrected";
-static const char y_corrected[] = "y_corrected";
-static const char magnitude[] = "magnitude";
-static const char cxa[] = "cxa";
-static const char cya[] = "cya";
-static const char quality[] = "quality";
-}; // namespace UploadCentroidKeys
-
-/**
- * @brief Dataset to store matched star information
- */
-class DownloadMatchedStar : public StaticLocalDataSet {
- public:
- // Size of dataset
- static const size_t SIZE = 53;
-
- DownloadMatchedStar(HasLocalDataPoolIF* owner)
- : StaticLocalDataSet(owner, DOWNLOAD_MATCHED_STAR_SET_ID) {}
-
- DownloadMatchedStar(object_id_t objectId)
- : StaticLocalDataSet(sid_t(objectId, DOWNLOAD_MATCHED_STAR_SET_ID)) {}
-
- lp_var_t id = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_ID, this);
- lp_var_t camfpx = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_CAMFPX, this);
- lp_var_t camfpy = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_CAMFPY, this);
- lp_var_t camcartx = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_CAMCARTX, this);
- lp_var_t camcarty = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_CAMCARTY, this);
- lp_var_t camcartz = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_CAMCARTZ, this);
- lp_var_t cammagnitude =
- lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_CAMMAGNITUDE, this);
- lp_var_t dbfpx = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_DBFPX, this);
- lp_var_t dbfpy = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_DBFPY, this);
- lp_var_t dbcartx = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_DBCARTX, this);
- lp_var_t dbcarty = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_DBCARTY, this);
- lp_var_t dbcartz = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_DBCARTZ, this);
- lp_var_t dbmagnitude =
- lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_DBMAGNITUDE, this);
- lp_var_t catalogid =
- lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_CATALOGID, this);
-
- void printSet() {
- PoolReadGuard rg(this);
- sif::info << "DownloadMatchedStar::printSet: id: " << static_cast(this->id.value)
- << std::endl;
- sif::info << "DownloadMatchedStar::printSet: camfpx: " << this->camfpx << std::endl;
- sif::info << "DownloadMatchedStar::printSet: camfpy: " << this->camfpy << std::endl;
- sif::info << "DownloadMatchedStar::printSet: camcartx: " << this->camcartx << std::endl;
- sif::info << "DownloadMatchedStar::printSet: camcarty: " << this->camcarty << std::endl;
- sif::info << "DownloadMatchedStar::printSet: camcartz: " << this->camcartz << std::endl;
- sif::info << "DownloadMatchedStar::printSet: cammagnitude: " << this->cammagnitude << std::endl;
- sif::info << "DownloadMatchedStar::printSet: dbfpx: " << this->dbfpx << std::endl;
- sif::info << "DownloadMatchedStar::printSet: dbfpy: " << this->dbfpy << std::endl;
- sif::info << "DownloadMatchedStar::printSet: dbcartx: " << this->dbcartx << std::endl;
- sif::info << "DownloadMatchedStar::printSet: dbcarty: " << this->dbcarty << std::endl;
- sif::info << "DownloadMatchedStar::printSet: dbcartz: " << this->dbcartz << std::endl;
- sif::info << "DownloadMatchedStar::printSet: dbmagnitude: " << this->dbmagnitude << std::endl;
- sif::info << "DownloadMatchedStar::printSet: catalogid: " << this->catalogid << std::endl;
- }
-};
-
-/**
- * @brief Dataset to store the response to the DownloadDBImage request
- */
-class DownloadDBImage : public StaticLocalDataSet {
- public:
- // Size of dataset
- static const size_t SIZE = 21;
-
- DownloadDBImage(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, DOWNLOAD_DBIMAGE_SET_ID) {}
-
- DownloadDBImage(object_id_t objectId)
- : StaticLocalDataSet(sid_t(objectId, DOWNLOAD_DBIMAGE_SET_ID)) {}
-
- lp_var_t id = lp_var_t(sid.objectId, PoolIds::DBIMAGE_ID, this);
- lp_var_t pixx = lp_var_t(sid.objectId, PoolIds::DBIMAGE_PIXX, this);
- lp_var_t pixy = lp_var_t(sid.objectId, PoolIds::DBIMAGE_PIXY, this);
- lp_var_t x = lp_var_t(sid.objectId, PoolIds::DBIMAGE_X, this);
- lp_var_t y = lp_var_t(sid.objectId, PoolIds::DBIMAGE_Y, this);
- lp_var_t magnitude = lp_var_t(sid.objectId, PoolIds::DBIMAGE_MAGNITUDE, this);
-
- void printSet() {
- PoolReadGuard rg(this);
- sif::info << "DownloadDBImage::printSet: id: " << static_cast(this->id.value)
- << std::endl;
- sif::info << "DownloadDBImage::printSet: pixx: " << this->pixx << std::endl;
- sif::info << "DownloadDBImage::printSet: pixy: " << this->pixy << std::endl;
- sif::info << "DownloadDBImage::printSet: x: " << this->x << std::endl;
- sif::info << "DownloadDBImage::printSet: y: " << this->y << std::endl;
- sif::info << "DownloadDBImage::printSet: magnitude: " << this->magnitude << std::endl;
- }
-};
-
-/**
- * @brief Dataset to store the response to the download blob pixel action request
- */
-class DownloadBlobPixel : public StaticLocalDataSet {
- public:
- // Size of dataset
- static const size_t SIZE = 22;
-
- DownloadBlobPixel(HasLocalDataPoolIF* owner)
- : StaticLocalDataSet(owner, DOWNLOAD_BLOBPIXEL_SET_ID) {}
-
- DownloadBlobPixel(object_id_t objectId)
- : StaticLocalDataSet(sid_t(objectId, DOWNLOAD_BLOBPIXEL_SET_ENTRIES)) {}
-
- lp_var_t id = lp_var_t(sid.objectId, PoolIds::BLOBPIX_ID, this);
- lp_var_t x = lp_var_t(sid.objectId, PoolIds::BLOBPIX_X, this);
- lp_var_t y = lp_var_t(sid.objectId, PoolIds::BLOBPIX_Y, this);
- lp_var_t totalValue = lp_var_t(sid.objectId, PoolIds::BLOBPIX_TOT_VAL, this);
- lp_var_t inUse = lp_var_t(sid.objectId, PoolIds::BLOBPIX_IN_USE, this);
- lp_var_t brightNeighbours =
- lp_var_t(sid.objectId, PoolIds::BLOBPIX_BRIGHT_NEIGHBOURS, this);
- lp_var_t region = lp_var_t(sid.objectId, PoolIds::BLOBPIX_REGION, this);
-
- void printSet() {
- PoolReadGuard rg(this);
- sif::info << "DownloadBlobPixel::printSet: id: " << static_cast(this->id.value)
- << std::endl;
- sif::info << "DownloadBlobPixel::printSet: x: " << this->x << std::endl;
- sif::info << "DownloadBlobPixel::printSet: y: " << this->y << std::endl;
- sif::info << "DownloadBlobPixel::printSet: totalValue: " << this->totalValue << std::endl;
- sif::info << "DownloadBlobPixel::printSet: inUse: "
- << static_cast(this->inUse.value) << std::endl;
- sif::info << "DownloadBlobPixel::printSet: brightNeighbours: " << this->brightNeighbours
- << std::endl;
- sif::info << "DownloadBlobPixel::printSet: region: " << this->region << std::endl;
- }
-};
-
/**
* @brief Will store the camera parameters set in the star tracker which are retrieved with
* a get parameter request.
@@ -1102,7 +888,7 @@ class DownloadBlobPixel : public StaticLocalDataSet {
public:
// Size of dataset
- static const size_t SIZE = 25;
+ static const size_t SIZE = 34;
CameraSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, CAMERA_SET_ID) {}
@@ -1123,6 +909,15 @@ class CameraSet : public StaticLocalDataSet {
lp_var_t val3 = lp_var_t(sid.objectId, PoolIds::CAM_VAL3, this);
lp_var_t reg4 = lp_var_t(sid.objectId, PoolIds::CAM_REG4, this);
lp_var_t val4 = lp_var_t(sid.objectId, PoolIds::CAM_VAL4, this);
+ lp_var_t reg5 = lp_var_t(sid.objectId, PoolIds::CAM_REG5, this);
+ lp_var_t val5 = lp_var_t(sid.objectId, PoolIds::CAM_VAL5, this);
+ lp_var_t reg6 = lp_var_t(sid.objectId, PoolIds::CAM_REG6, this);
+ lp_var_t val6 = lp_var_t(sid.objectId, PoolIds::CAM_VAL6, this);
+ lp_var_t reg7 = lp_var_t(sid.objectId, PoolIds::CAM_REG7, this);
+ lp_var_t val7 = lp_var_t(sid.objectId, PoolIds::CAM_VAL7, this);
+ lp_var_t reg8 = lp_var_t(sid.objectId, PoolIds::CAM_REG8, this);
+ lp_var_t val8 = lp_var_t(sid.objectId, PoolIds::CAM_VAL8, this);
+ lp_var_t freq1 = lp_var_t(sid.objectId, PoolIds::CAM_FREQ_1, this);
void printSet() {
PoolReadGuard rg(this);
@@ -1152,6 +947,24 @@ class CameraSet : public StaticLocalDataSet {
<< std::endl;
sif::info << "CameraSet::printSet: Val 4: " << static_cast(this->val4.value)
<< std::endl;
+ sif::info << "CameraSet::printSet: Reg 5: " << static_cast(this->reg5.value)
+ << std::endl;
+ sif::info << "CameraSet::printSet: Val 5: " << static_cast(this->val5.value)
+ << std::endl;
+ sif::info << "CameraSet::printSet: Reg 6: " << static_cast(this->reg6.value)
+ << std::endl;
+ sif::info << "CameraSet::printSet: Val 6: " << static_cast(this->val6.value)
+ << std::endl;
+ sif::info << "CameraSet::printSet: Reg 7: " << static_cast(this->reg7.value)
+ << std::endl;
+ sif::info << "CameraSet::printSet: Val 7: " << static_cast(this->val7.value)
+ << std::endl;
+ sif::info << "CameraSet::printSet: Reg 8: " << static_cast(this->reg8.value)
+ << std::endl;
+ sif::info << "CameraSet::printSet: Val 8: " << static_cast(this->val8.value)
+ << std::endl;
+ sif::info << "CameraSet::printSet: Freq 1: " << static_cast(this->freq1.value)
+ << std::endl;
}
};
@@ -1188,86 +1001,511 @@ class LimitsSet : public StaticLocalDataSet {
void printSet() {
PoolReadGuard rg(this);
- sif::info << "CameraSet::printSet: action: " << static_cast(this->action.value)
+ sif::info << "LimitsSet::printSet: action: " << static_cast(this->action.value)
<< std::endl;
- sif::info << "CameraSet::printSet: FPGA18Current: " << this->fpga18current << std::endl;
- sif::info << "CameraSet::printSet: FPGA25Current: " << this->fpga25current << std::endl;
- sif::info << "CameraSet::printSet: FPGA10Current: " << this->fpga10current << std::endl;
- sif::info << "CameraSet::printSet: MCUCurrent: " << this->mcuCurrent << std::endl;
- sif::info << "CameraSet::printSet: CMOS21Current: " << this->cmos21current << std::endl;
- sif::info << "CameraSet::printSet: CMOSPixCurrent: " << this->cmosPixCurrent << std::endl;
- sif::info << "CameraSet::printSet: CMOS33Current: " << this->cmos33current << std::endl;
- sif::info << "CameraSet::printSet: CMOSVResCurrent: " << this->cmosVresCurrent << std::endl;
- sif::info << "CameraSet::printSet: CMOSTemperature: " << this->cmosTemperature << std::endl;
+ sif::info << "LimitsSet::printSet: FPGA18Current: " << this->fpga18current << std::endl;
+ sif::info << "LimitsSet::printSet: FPGA25Current: " << this->fpga25current << std::endl;
+ sif::info << "LimitsSet::printSet: FPGA10Current: " << this->fpga10current << std::endl;
+ sif::info << "LimitsSet::printSet: MCUCurrent: " << this->mcuCurrent << std::endl;
+ sif::info << "LimitsSet::printSet: CMOS21Current: " << this->cmos21current << std::endl;
+ sif::info << "LimitsSet::printSet: CMOSPixCurrent: " << this->cmosPixCurrent << std::endl;
+ sif::info << "LimitsSet::printSet: CMOS33Current: " << this->cmos33current << std::endl;
+ sif::info << "LimitsSet::printSet: CMOSVResCurrent: " << this->cmosVresCurrent << std::endl;
+ sif::info << "LimitsSet::printSet: CMOSTemperature: " << this->cmosTemperature << std::endl;
}
};
/**
- * @brief Will store the request of the blob parameters.
+ * @brief Will store the requested log level parameters
*/
-class BlobSet : public StaticLocalDataSet {
+class LogLevelSet : public StaticLocalDataSet {
public:
// Size of dataset
- static const size_t SIZE = 22;
+ static const size_t SIZE = 16;
- BlobSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, BLOB_SET_ID) {}
+ LogLevelSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, LOG_LEVEL_SET_ID) {}
- BlobSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, BLOB_SET_ID)) {}
+ LogLevelSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, LOG_LEVEL_SET_ID)) {}
- lp_var_t mode = lp_var_t(sid.objectId, PoolIds::BLOB_MODE, this);
- lp_var_t