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 8268ea24..bfb029be 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
@@ -1140,6 +1141,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 782f112b..7c124103 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"
@@ -57,13 +54,13 @@
#include "linux/boardtest/SpiTestClass.h"
#include "linux/csp/CspComIF.h"
#include "linux/csp/CspCookie.h"
-#include "mission/devices/SolarArrayDeploymentHandler.h"
-#include "mission/devices/SusHandler.h"
-#include "mission/devices/devicedefinitions/SusDefinitions.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 "mission/core/GenericFactory.h"
#include "mission/devices/ACUHandler.h"
#include "mission/devices/BpxBatteryHandler.h"
-#include "linux/devices/GPSHyperionLinuxController.h"
#include "mission/devices/GyroADIS1650XHandler.h"
#include "mission/devices/HeaterHandler.h"
#include "mission/devices/IMTQHandler.h"
@@ -75,6 +72,7 @@
#include "mission/devices/PlocMPSoCHandler.h"
#include "mission/devices/RadiationSensorHandler.h"
#include "mission/devices/RwHandler.h"
+#include "mission/devices/SolarArrayDeploymentHandler.h"
#include "mission/devices/SusHandler.h"
#include "mission/devices/SyrlinksHkHandler.h"
#include "mission/devices/Tmp1075Handler.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/bsp_q7s/devices/startracker/StarTrackerHandler.cpp b/bsp_q7s/devices/startracker/StarTrackerHandler.cpp
deleted file mode 100644
index e5601ac0..00000000
--- a/bsp_q7s/devices/startracker/StarTrackerHandler.cpp
+++ /dev/null
@@ -1,2107 +0,0 @@
-#include "StarTrackerHandler.h"
-
-#include
-#include
-#include
-
-#include
-
-#include "OBSWConfig.h"
-#include "StarTrackerJsonCommands.h"
-extern "C" {
-#include
-#include
-#include
-
-#include "common/misc.h"
-}
-
-using json = nlohmann::json;
-
-StarTrackerHandler::StarTrackerHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie,
- StrHelper* strHelper)
- : DeviceHandlerBase(objectId, comIF, comCookie),
- temperatureSet(this),
- versionSet(this),
- powerSet(this),
- interfaceSet(this),
- timeSet(this),
- solutionSet(this),
- histogramSet(this),
- contrastSet(this),
- checksumSet(this),
- downloadCentroidSet(this),
- downloadMatchedStar(this),
- downloadDbImage(this),
- downloadBlobPixel(this),
- cameraSet(this),
- limitsSet(this),
- blobSet(this),
- strHelper(strHelper) {
- if (comCookie == nullptr) {
- sif::error << "StarTrackerHandler: Invalid com cookie" << std::endl;
- }
- if (strHelper == nullptr) {
- sif::error << "StarTrackerHandler: Invalid str image loader" << std::endl;
- }
- auto mqArgs = MqArgs(this->getObjectId());
- eventQueue = QueueFactory::instance()->createMessageQueue(
- EventMessage::EVENT_MESSAGE_SIZE * 5, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs);
-}
-
-StarTrackerHandler::~StarTrackerHandler() {}
-
-ReturnValue_t StarTrackerHandler::initialize() {
- ReturnValue_t result = RETURN_OK;
- result = DeviceHandlerBase::initialize();
- if (result != RETURN_OK) {
- return result;
- }
-
- EventManagerIF* manager = ObjectManager::instance()->get(objects::EVENT_MANAGER);
- if (manager == nullptr) {
-#if FSFW_CPP_OSTREAM_ENABLED == 1
- sif::error << "StarTrackerHandler::initialize: Invalid event manager" << std::endl;
-#endif
- return ObjectManagerIF::CHILD_INIT_FAILED;
- ;
- }
- result = manager->registerListener(eventQueue->getId());
- if (result != RETURN_OK) {
- return result;
- }
- result = manager->subscribeToEventRange(eventQueue->getId(),
- event::getEventId(StrHelper::IMAGE_UPLOAD_FAILED),
- event::getEventId(StrHelper::FPGA_UPLOAD_FAILED));
- if (result != RETURN_OK) {
-#if FSFW_CPP_OSTREAM_ENABLED == 1
- sif::warning << "StarTrackerHandler::initialize: Failed to subscribe to events from "
- " str helper"
- << std::endl;
-#endif
- return ObjectManagerIF::CHILD_INIT_FAILED;
- }
-
- result = strHelper->setComIF(communicationInterface);
- if (result != RETURN_OK) {
- return ObjectManagerIF::CHILD_INIT_FAILED;
- }
- strHelper->setComCookie(comCookie);
- return RETURN_OK;
-}
-
-ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
- const uint8_t* data, size_t size) {
- ReturnValue_t result = RETURN_OK;
-
- switch (actionId) {
- case (StarTracker::STOP_IMAGE_LOADER): {
- strHelper->stopProcess();
- return EXECUTION_FINISHED;
- }
- case (StarTracker::SET_JSON_FILE_NAME): {
- if (size > MAX_PATH_SIZE) {
- return FILE_PATH_TOO_LONG;
- }
- paramJsonFile = std::string(reinterpret_cast(data), size);
- return EXECUTION_FINISHED;
- }
- default:
- break;
- }
-
- if (strHelperExecuting == true) {
- return IMAGE_LOADER_EXECUTING;
- }
-
- result = checkMode(actionId);
- if (result != RETURN_OK) {
- return result;
- }
-
- // Intercept image loader commands which do not follow the common DHB communication flow
- switch (actionId) {
- case (StarTracker::UPLOAD_IMAGE): {
- result = DeviceHandlerBase::acceptExternalDeviceCommands();
- if (result != RETURN_OK) {
- return result;
- }
- if (size > MAX_PATH_SIZE + MAX_FILE_NAME) {
- return FILE_PATH_TOO_LONG;
- }
- result = strHelper->startImageUpload(std::string(reinterpret_cast(data), size));
- if (result != RETURN_OK) {
- return result;
- }
- strHelperExecuting = true;
- return EXECUTION_FINISHED;
- }
- case (StarTracker::DOWNLOAD_IMAGE): {
- result = DeviceHandlerBase::acceptExternalDeviceCommands();
- if (result != RETURN_OK) {
- return result;
- }
- if (size > MAX_PATH_SIZE) {
- return FILE_PATH_TOO_LONG;
- }
- result =
- strHelper->startImageDownload(std::string(reinterpret_cast(data), size));
- if (result != RETURN_OK) {
- return result;
- }
- strHelperExecuting = true;
- return EXECUTION_FINISHED;
- }
- case (StarTracker::WRITE): {
- result = DeviceHandlerBase::acceptExternalDeviceCommands();
- if (result != RETURN_OK) {
- return result;
- }
- result = executeWriteCommand(data, size);
- if (result != RETURN_OK) {
- return result;
- }
-
- strHelperExecuting = true;
- return EXECUTION_FINISHED;
- }
- case (StarTracker::READ): {
- result = DeviceHandlerBase::acceptExternalDeviceCommands();
- if (result != RETURN_OK) {
- return result;
- }
- result = executeReadCommand(data, size);
- if (result != RETURN_OK) {
- return result;
- }
- strHelperExecuting = true;
- return EXECUTION_FINISHED;
- }
- case (StarTracker::CHANGE_DOWNLOAD_FILE): {
- if (size > MAX_FILE_NAME) {
- return FILENAME_TOO_LONG;
- }
- strHelper->setDownloadImageName(std::string(reinterpret_cast(data), size));
- return EXECUTION_FINISHED;
- }
- case (StarTracker::CHANGE_FPGA_DOWNLOAD_FILE): {
- if (size > MAX_FILE_NAME) {
- return FILENAME_TOO_LONG;
- }
- strHelper->setDownloadFpgaImage(std::string(reinterpret_cast(data), size));
- return EXECUTION_FINISHED;
- }
- case (StarTracker::SET_READ_FILENAME): {
- if (size > MAX_FILE_NAME) {
- return FILENAME_TOO_LONG;
- }
- strHelper->setDownloadImageName(std::string(reinterpret_cast(data), size));
- return EXECUTION_FINISHED;
- }
- case (StarTracker::DOWNLOAD_FPGA_IMAGE): {
- result = DeviceHandlerBase::acceptExternalDeviceCommands();
- if (result != RETURN_OK) {
- return result;
- }
- if (size > MAX_PATH_SIZE) {
- return FILE_PATH_TOO_LONG;
- }
- result = executeFpgaDownloadCommand(data, size);
- if (result != RETURN_OK) {
- return result;
- }
- strHelperExecuting = true;
- return EXECUTION_FINISHED;
- }
- case (StarTracker::UPLOAD_FPGA_IMAGE): {
- result = DeviceHandlerBase::acceptExternalDeviceCommands();
- if (result != RETURN_OK) {
- return result;
- }
- if (size > MAX_PATH_SIZE + MAX_FILE_NAME) {
- return FILE_PATH_TOO_LONG;
- }
- result = strHelper->startFpgaUpload(std::string(reinterpret_cast(data), size));
- if (result != RETURN_OK) {
- return result;
- }
- strHelperExecuting = true;
- return EXECUTION_FINISHED;
- }
- default:
- break;
- }
- return DeviceHandlerBase::executeAction(actionId, commandedBy, data, size);
-}
-
-void StarTrackerHandler::performOperationHook() {
- EventMessage event;
- for (ReturnValue_t result = eventQueue->receiveMessage(&event); result == RETURN_OK;
- result = eventQueue->receiveMessage(&event)) {
- switch (event.getMessageId()) {
- case EventMessage::EVENT_MESSAGE:
- handleEvent(&event);
- break;
- default:
- sif::debug << "CCSDSHandler::checkEvents: Did not subscribe to this event message"
- << std::endl;
- break;
- }
- }
-}
-
-void StarTrackerHandler::doStartUp() {
- switch (startupState) {
- case StartupState::IDLE:
- startupState = StartupState::CHECK_BOOT_STATE;
- return;
- case StartupState::BOOT_DELAY:
- if (bootCountdown.hasTimedOut()) {
- startupState = StartupState::LIMITS;
- }
- return;
- case StartupState::DONE:
- break;
- default:
- return;
- }
- setMode(_MODE_TO_ON);
-}
-
-void StarTrackerHandler::doShutDown() {
- // If star tracker is shutdown also stop all running processes in the image loader task
- strHelper->stopProcess();
- setMode(_MODE_POWER_DOWN);
-}
-
-void StarTrackerHandler::doOffActivity() { startupState = StartupState::IDLE; }
-
-ReturnValue_t StarTrackerHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
- switch (internalState) {
- case InternalState::TEMPERATURE_REQUEST:
- *id = StarTracker::REQ_TEMPERATURE;
- break;
- default:
- sif::debug << "StarTrackerHandler::buildNormalDeviceCommand: Invalid internal step"
- << std::endl;
- break;
- }
- return buildCommandFromCommand(*id, NULL, 0);
-}
-
-ReturnValue_t StarTrackerHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
- if (mode != _MODE_START_UP) {
- return NOTHING_TO_SEND;
- }
- switch (startupState) {
- case StartupState::CHECK_BOOT_STATE:
- *id = StarTracker::REQ_VERSION;
- startupState = StartupState::WAIT_FOR_EXECUTION;
- return buildCommandFromCommand(*id, nullptr, 0);
- case StartupState::BOOT:
- *id = StarTracker::BOOT;
- bootCountdown.setTimeout(BOOT_TIMEOUT);
- startupState = StartupState::BOOT_DELAY;
- return buildCommandFromCommand(*id, nullptr, 0);
- case StartupState::LIMITS:
- startupState = StartupState::WAIT_FOR_EXECUTION;
- *id = StarTracker::LIMITS;
- return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()),
- paramJsonFile.size());
- case StartupState::TRACKING:
- startupState = StartupState::WAIT_FOR_EXECUTION;
- *id = StarTracker::TRACKING;
- return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()),
- paramJsonFile.size());
- case StartupState::MOUNTING:
- startupState = StartupState::WAIT_FOR_EXECUTION;
- *id = StarTracker::MOUNTING;
- return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()),
- paramJsonFile.size());
- case StartupState::CAMERA:
- startupState = StartupState::WAIT_FOR_EXECUTION;
- *id = StarTracker::CAMERA;
- return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()),
- paramJsonFile.size());
- case StartupState::BLOB:
- startupState = StartupState::WAIT_FOR_EXECUTION;
- *id = StarTracker::BLOB;
- return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()),
- paramJsonFile.size());
- case StartupState::CENTROIDING:
- startupState = StartupState::WAIT_FOR_EXECUTION;
- *id = StarTracker::CENTROIDING;
- return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()),
- paramJsonFile.size());
- case StartupState::LISA:
- startupState = StartupState::WAIT_FOR_EXECUTION;
- *id = StarTracker::LISA;
- return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()),
- paramJsonFile.size());
- case StartupState::MATCHING:
- startupState = StartupState::WAIT_FOR_EXECUTION;
- *id = StarTracker::MATCHING;
- return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()),
- paramJsonFile.size());
- case StartupState::VALIDATION:
- startupState = StartupState::WAIT_FOR_EXECUTION;
- *id = StarTracker::VALIDATION;
- return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()),
- paramJsonFile.size());
- case StartupState::ALGO:
- startupState = StartupState::WAIT_FOR_EXECUTION;
- *id = StarTracker::ALGO;
- return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()),
- paramJsonFile.size());
- default:
- break;
- }
- return NOTHING_TO_SEND;
-}
-
-ReturnValue_t StarTrackerHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
- const uint8_t* commandData,
- size_t commandDataLen) {
- ReturnValue_t result = RETURN_OK;
- switch (deviceCommand) {
- case (StarTracker::PING_REQUEST): {
- preparePingRequest();
- return RETURN_OK;
- }
- case (StarTracker::REQ_TIME): {
- prepareTimeRequest();
- return RETURN_OK;
- }
- case (StarTracker::BOOT): {
- prepareBootCommand();
- return RETURN_OK;
- }
- case (StarTracker::REQ_VERSION): {
- prepareVersionRequest();
- return RETURN_OK;
- }
- case (StarTracker::REQ_INTERFACE): {
- prepareInterfaceRequest();
- return RETURN_OK;
- }
- case (StarTracker::REQ_POWER): {
- preparePowerRequest();
- return RETURN_OK;
- }
- case (StarTracker::SWITCH_TO_BOOTLOADER_PROGRAM): {
- prepareRebootCommand();
- return RETURN_OK;
- }
- case (StarTracker::TAKE_IMAGE): {
- prepareTakeImageCommand(commandData);
- return RETURN_OK;
- }
- case (StarTracker::SUBSCRIBE_TO_TM): {
- prepareSubscriptionCommand(commandData);
- return RETURN_OK;
- }
- case (StarTracker::REQ_SOLUTION): {
- prepareSolutionRequest();
- return RETURN_OK;
- }
- case (StarTracker::REQ_TEMPERATURE): {
- prepareTemperatureRequest();
- return RETURN_OK;
- }
- case (StarTracker::REQ_HISTOGRAM): {
- prepareHistogramRequest();
- return RETURN_OK;
- }
- case (StarTracker::REQ_CONTRAST): {
- prepareContrastRequest();
- return RETURN_OK;
- }
- case (StarTracker::RESET_ERROR): {
- prepareErrorResetRequest();
- return RETURN_OK;
- }
- case (StarTracker::LIMITS): {
- Limits limits;
- result = prepareParamCommand(commandData, commandDataLen, limits);
- return result;
- }
- case (StarTracker::MOUNTING): {
- Mounting mounting;
- result = prepareParamCommand(commandData, commandDataLen, mounting);
- return result;
- }
- case (StarTracker::CAMERA): {
- Camera camera;
- result = prepareParamCommand(commandData, commandDataLen, camera);
- return result;
- }
- case (StarTracker::BLOB): {
- Blob blob;
- result = prepareParamCommand(commandData, commandDataLen, blob);
- return result;
- }
- case (StarTracker::CENTROIDING): {
- Centroiding centroiding;
- result = prepareParamCommand(commandData, commandDataLen, centroiding);
- return result;
- }
- case (StarTracker::LISA): {
- Lisa lisa;
- result = prepareParamCommand(commandData, commandDataLen, lisa);
- return result;
- }
- case (StarTracker::MATCHING): {
- Matching matching;
- result = prepareParamCommand(commandData, commandDataLen, matching);
- return result;
- }
- case (StarTracker::VALIDATION): {
- Validation validation;
- result = prepareParamCommand(commandData, commandDataLen, validation);
- return result;
- }
- case (StarTracker::ALGO): {
- Algo algo;
- result = prepareParamCommand(commandData, commandDataLen, algo);
- return result;
- }
- case (StarTracker::TRACKING): {
- Tracking tracking;
- result = prepareParamCommand(commandData, commandDataLen, tracking);
- return result;
- }
- case (StarTracker::ERASE): {
- result = prepareEraseCommand(commandData, commandDataLen);
- return result;
- }
- case (StarTracker::UNLOCK): {
- result = prepareUnlockCommand(commandData, commandDataLen);
- return result;
- }
- case (StarTracker::CHECKSUM): {
- result = prepareChecksumCommand(commandData, commandDataLen);
- return result;
- }
- case (StarTracker::SET_TIME): {
- result = prepareSetTimeCommand(commandData, commandDataLen);
- return result;
- }
- case (StarTracker::DOWNLOAD_CENTROID): {
- result = prepareDownloadCentroidCommand(commandData, commandDataLen);
- return result;
- }
- case (StarTracker::UPLOAD_CENTROID): {
- result = prepareUploadCentroidCommand(commandData, commandDataLen);
- return result;
- }
- case (StarTracker::DOWNLOAD_MATCHED_STAR): {
- result = prepareDownloadMatchedStarCommand(commandData, commandDataLen);
- return result;
- }
- case (StarTracker::DOWNLOAD_DBIMAGE): {
- result = prepareDownloadDbImageCommand(commandData, commandDataLen);
- return result;
- }
- case (StarTracker::DOWNLOAD_BLOBPIXEL): {
- result = prepareDownloadBlobPixelCommand(commandData, commandDataLen);
- return result;
- }
- case (StarTracker::FPGA_ACTION): {
- result = prepareFpgaActionCommand(commandData, commandDataLen);
- return result;
- }
- case (StarTracker::REQ_CAMERA): {
- result = prepareRequestCameraParams();
- return result;
- }
- case (StarTracker::REQ_LIMITS): {
- result = prepareRequestLimitsParams();
- return result;
- }
- case (StarTracker::REQ_BLOB_PARAMS): {
- result = prepareRequestBlobParams();
- return result;
- }
- default:
- return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
- }
- return HasReturnvaluesIF::RETURN_FAILED;
-}
-
-void StarTrackerHandler::fillCommandAndReplyMap() {
- /** Reply lengths are unknown because of the slip encoding. Thus always maximum reply size
- * is specified */
- this->insertInCommandAndReplyMap(StarTracker::PING_REQUEST, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandMap(StarTracker::BOOT);
- this->insertInCommandAndReplyMap(StarTracker::REQ_VERSION, 3, &versionSet,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::REQ_TIME, 3, &timeSet,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandMap(StarTracker::UPLOAD_IMAGE);
- this->insertInCommandMap(StarTracker::DOWNLOAD_IMAGE);
- this->insertInCommandAndReplyMap(StarTracker::REQ_POWER, 3, &powerSet,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::REQ_INTERFACE, 3, &interfaceSet,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- // Reboot has no reply. Star tracker reboots immediately
- this->insertInCommandMap(StarTracker::SWITCH_TO_BOOTLOADER_PROGRAM);
- this->insertInCommandAndReplyMap(StarTracker::SUBSCRIBE_TO_TM, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::REQ_SOLUTION, 3, &solutionSet,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::REQ_TEMPERATURE, 3, &temperatureSet,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::REQ_HISTOGRAM, 3, &histogramSet,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::REQ_CONTRAST, 3, &contrastSet,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::LIMITS, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::MOUNTING, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::CAMERA, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::BLOB, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::CENTROIDING, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::LISA, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::MATCHING, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::TRACKING, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::VALIDATION, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::ALGO, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::TAKE_IMAGE, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::RESET_ERROR, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::ERASE, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::UNLOCK, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::CHECKSUM, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::SET_TIME, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::DOWNLOAD_CENTROID, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::UPLOAD_CENTROID, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::DOWNLOAD_MATCHED_STAR, 3, &downloadMatchedStar,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::DOWNLOAD_DBIMAGE, 3, &downloadDbImage,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::DOWNLOAD_BLOBPIXEL, 3, &downloadBlobPixel,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::FPGA_ACTION, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::REQ_CAMERA, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::REQ_LIMITS, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
- this->insertInCommandAndReplyMap(StarTracker::REQ_BLOB_PARAMS, 3, nullptr,
- StarTracker::MAX_FRAME_SIZE * 2 + 2);
-}
-
-ReturnValue_t StarTrackerHandler::scanForReply(const uint8_t* start, size_t remainingSize,
- DeviceCommandId_t* foundId, size_t* foundLen) {
- ReturnValue_t result = RETURN_OK;
- size_t bytesLeft = 0;
-
- result = dataLinkLayer.decodeFrame(start, remainingSize, &bytesLeft);
- switch (result) {
- case ArcsecDatalinkLayer::DEC_IN_PROGRESS: {
- remainingSize = bytesLeft;
- // Need a second doSendRead pass to reaa in whole packet
- return IGNORE_REPLY_DATA;
- }
- case RETURN_OK: {
- break;
- }
- default:
- remainingSize = bytesLeft;
- return result;
- }
-
- switch (dataLinkLayer.getReplyFrameType()) {
- case TMTC_ACTIONREPLY: {
- *foundLen = remainingSize - bytesLeft;
- result = scanForActionReply(foundId);
- break;
- }
- case TMTC_SETPARAMREPLY: {
- *foundLen = remainingSize - bytesLeft;
- result = scanForSetParameterReply(foundId);
- break;
- }
- case TMTC_PARAMREPLY: {
- *foundLen = remainingSize - bytesLeft;
- result = scanForGetParameterReply(foundId);
- break;
- }
- case TMTC_TELEMETRYREPLYA:
- case TMTC_TELEMETRYREPLY: {
- *foundLen = remainingSize - bytesLeft;
- result = scanForTmReply(foundId);
- break;
- }
- default: {
- sif::debug << "StarTrackerHandler::scanForReply: Reply has invalid type id" << std::endl;
- result = RETURN_FAILED;
- }
- }
-
- remainingSize = bytesLeft;
-
- return result;
-}
-
-ReturnValue_t StarTrackerHandler::interpretDeviceReply(DeviceCommandId_t id,
- const uint8_t* packet) {
- ReturnValue_t result = RETURN_OK;
-
- switch (id) {
- case (StarTracker::SUBSCRIBE_TO_TM): {
- result = handleSetParamReply();
- break;
- }
- case (StarTracker::REQ_TIME): {
- result = handleTm(timeSet, StarTracker::TimeSet::SIZE);
- break;
- }
- case (StarTracker::PING_REQUEST): {
- result = handlePingReply();
- break;
- }
- case (StarTracker::BOOT):
- case (StarTracker::TAKE_IMAGE):
- case (StarTracker::RESET_ERROR):
- case (StarTracker::UNLOCK):
- case (StarTracker::SET_TIME):
- case (StarTracker::FPGA_ACTION): {
- result = handleActionReply();
- break;
- }
- case (StarTracker::DOWNLOAD_CENTROID): {
- result = handleActionReplySet(downloadCentroidSet, StarTracker::DownloadCentroidSet::SIZE);
- break;
- }
- case (StarTracker::DOWNLOAD_MATCHED_STAR): {
- result = handleActionReplySet(downloadMatchedStar, StarTracker::DownloadMatchedStar::SIZE);
- break;
- }
- case (StarTracker::DOWNLOAD_DBIMAGE): {
- result = handleActionReplySet(downloadDbImage, StarTracker::DownloadDBImage::SIZE);
- break;
- }
- case (StarTracker::DOWNLOAD_BLOBPIXEL): {
- result = handleActionReplySet(downloadBlobPixel, StarTracker::DownloadBlobPixel::SIZE);
- break;
- }
- case (StarTracker::UPLOAD_CENTROID): {
- result = handleUploadCentroidReply();
- break;
- }
- case (StarTracker::ERASE): {
- result = handleEraseReply();
- break;
- }
- case (StarTracker::CHECKSUM): {
- result = handleChecksumReply();
- break;
- }
- case (StarTracker::REQ_VERSION): {
- result = handleTm(versionSet, StarTracker::VersionSet::SIZE);
- if (result != RETURN_OK) {
- return result;
- }
- result = checkProgram();
- if (result != RETURN_OK) {
- return result;
- }
- break;
- }
- case (StarTracker::REQ_INTERFACE): {
- result = handleTm(interfaceSet, StarTracker::InterfaceSet::SIZE);
- break;
- }
- case (StarTracker::REQ_POWER): {
- result = handleTm(powerSet, StarTracker::PowerSet::SIZE);
- break;
- }
- case (StarTracker::REQ_SOLUTION): {
- result = handleTm(solutionSet, StarTracker::SolutionSet::SIZE);
- break;
- }
- case (StarTracker::REQ_TEMPERATURE): {
- result = handleTm(temperatureSet, StarTracker::TemperatureSet::SIZE);
- break;
- }
- case (StarTracker::REQ_HISTOGRAM): {
- result = handleTm(histogramSet, StarTracker::HistogramSet::SIZE);
- break;
- }
- case (StarTracker::REQ_CONTRAST): {
- result = handleTm(contrastSet, StarTracker::ContrastSet::SIZE);
- break;
- }
- case (StarTracker::LIMITS):
- case (StarTracker::MOUNTING):
- case (StarTracker::CAMERA):
- case (StarTracker::BLOB):
- case (StarTracker::CENTROIDING):
- case (StarTracker::LISA):
- case (StarTracker::MATCHING):
- case (StarTracker::TRACKING):
- case (StarTracker::VALIDATION):
- case (StarTracker::ALGO): {
- result = handleSetParamReply();
- break;
- }
- case (StarTracker::REQ_CAMERA): {
- handleParamRequest(cameraSet, StarTracker::CameraSet::SIZE);
- break;
- }
- case (StarTracker::REQ_LIMITS): {
- handleParamRequest(limitsSet, StarTracker::LimitsSet::SIZE);
- break;
- }
- case (StarTracker::REQ_BLOB_PARAMS): {
- handleParamRequest(blobSet, StarTracker::BlobSet::SIZE);
- break;
- }
- default: {
- sif::debug << "StarTrackerHandler::interpretDeviceReply: Unknown device reply id:" << id
- << std::endl;
- result = DeviceHandlerIF::UNKNOWN_DEVICE_REPLY;
- }
- }
-
- return result;
-}
-
-void StarTrackerHandler::setNormalDatapoolEntriesInvalid() {}
-
-uint32_t StarTrackerHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 20000; }
-
-ReturnValue_t StarTrackerHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
- LocalDataPoolManager& poolManager) {
- localDataPoolMap.emplace(StarTracker::TICKS_TIME_SET, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::TIME_TIME_SET, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::RUN_TIME, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::UNIX_TIME, new PoolEntry({0}));
-
- localDataPoolMap.emplace(StarTracker::TICKS_VERSION_SET, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::TIME_VERSION_SET, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::PROGRAM, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::MAJOR, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::MINOR, new PoolEntry({0}));
-
- localDataPoolMap.emplace(StarTracker::TICKS_INTERFACE_SET, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::TIME_INTERFACE_SET, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::FRAME_COUNT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CHECKSUM_ERROR_COUNT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::SET_PARAM_COUNT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::SET_PARAM_REPLY_COUNT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::PARAM_REQUEST_COUNT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::PARAM_REPLY_COUNT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::REQ_TM_COUNT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::TM_REPLY_COUNT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::ACTION_REQ_COUNT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::ACTION_REPLY_COUNT, new PoolEntry({0}));
-
- localDataPoolMap.emplace(StarTracker::TICKS_POWER_SET, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::TIME_POWER_SET, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::MCU_CURRENT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::MCU_VOLTAGE, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::FPGA_CORE_CURRENT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::FPGA_CORE_VOLTAGE, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::FPGA_18_CURRENT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::FPGA_18_VOLTAGE, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::FPGA_25_CURRENT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::FPGA_25_VOLTAGE, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CMV_21_CURRENT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CMV_21_VOLTAGE, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CMV_PIX_CURRENT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CMV_PIX_VOLTAGE, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CMV_33_CURRENT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CMV_33_VOLTAGE, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CMV_RES_CURRENT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CMV_RES_VOLTAGE, new PoolEntry({0}));
-
- localDataPoolMap.emplace(StarTracker::TICKS_TEMPERATURE_SET, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::TIME_TEMPERATURE_SET, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::MCU_TEMPERATURE, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CMOS_TEMPERATURE, new PoolEntry({0}));
-
- localDataPoolMap.emplace(StarTracker::TICKS_SOLUTION_SET, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::TIME_SOLUTION_SET, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CALI_QW, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CALI_QX, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CALI_QY, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CALI_QZ, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::TRACK_CONFIDENCE, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::TRACK_QW, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::TRACK_QX, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::TRACK_QY, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::TRACK_QZ, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::TRACK_REMOVED, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::STARS_CENTROIDED, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::STARS_MATCHED_DATABASE, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::LISA_QW, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::LISA_QX, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::LISA_QY, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::LISA_QZ, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::LISA_PERC_CLOSE, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::LISA_NR_CLOSE, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::TRUST_WORTHY, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::STABLE_COUNT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::SOLUTION_STRATEGY, new PoolEntry({0}));
-
- localDataPoolMap.emplace(StarTracker::TICKS_HISTOGRAM_SET, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::TIME_HISTOGRAM_SET, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINA0, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINA1, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINA2, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINA3, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINA4, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINA5, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINA6, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINA7, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINA8, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINB0, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINB1, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINB2, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINB3, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINB4, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINB5, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINB6, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINB7, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINB8, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINC0, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINC1, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINC2, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINC3, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINC4, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINC5, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINC6, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINC7, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BINC8, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BIND0, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BIND1, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BIND2, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BIND3, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BIND4, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BIND5, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BIND6, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BIND7, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::HISTOGRAM_BIND8, new PoolEntry({0}));
-
- localDataPoolMap.emplace(StarTracker::TICKS_CONTRAST_SET, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::TIME_CONTRAST_SET, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINA0, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINA1, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINA2, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINA3, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINA4, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINA5, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINA6, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINA7, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINA8, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINB0, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINB1, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINB2, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINB3, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINB4, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINB5, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINB6, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINB7, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINB8, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINC8, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINC0, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINC1, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINC2, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINC3, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINC4, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINC5, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINC6, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINC7, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BINC8, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BIND0, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BIND1, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BIND2, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BIND3, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BIND4, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BIND5, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BIND6, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BIND7, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CONTRAST_BIND8, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CHKSUM, new PoolEntry({0}));
-
- localDataPoolMap.emplace(StarTracker::DWL_ID, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::DWL_PIXX, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::DWL_PIXY, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::DWL_X_UNCORRECTED, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::DWL_Y_UNCORRECTED, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::DWL_X_CORRECTED, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::DWL_Y_CORRECTED, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::DWL_MAGNITUDE, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::DWL_CXA, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::DWL_CYA, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::DWL_QUALITY, new PoolEntry({0}));
-
- localDataPoolMap.emplace(StarTracker::MATCHEDSTR_ID, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::MATCHEDSTR_CAMFPX, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::MATCHEDSTR_CAMFPY, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::MATCHEDSTR_CAMCARTX, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::MATCHEDSTR_CAMCARTY, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::MATCHEDSTR_CAMCARTZ, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::MATCHEDSTR_CAMMAGNITUDE, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::MATCHEDSTR_DBFPX, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::MATCHEDSTR_DBFPY, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::MATCHEDSTR_DBCARTX, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::MATCHEDSTR_DBCARTY, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::MATCHEDSTR_DBCARTZ, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::MATCHEDSTR_DBMAGNITUDE, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::MATCHEDSTR_CATALOGID, new PoolEntry({0}));
-
- localDataPoolMap.emplace(StarTracker::BLOBPIX_ID, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::BLOBPIX_X, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::BLOBPIX_Y, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::BLOBPIX_TOT_VAL, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::BLOBPIX_IN_USE, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::BLOBPIX_BRIGHT_NEIGHBOURS, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::BLOBPIX_REGION, new PoolEntry({0}));
-
- localDataPoolMap.emplace(StarTracker::CAMERA_MODE, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::FOCALLENGTH, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::EXPOSURE, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::INTERVAL, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CAMERA_OFFSET, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::PGAGAIN, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::ADCGAIN, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CAM_REG1, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CAM_VAL1, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CAM_REG2, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CAM_VAL2, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CAM_REG3, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CAM_VAL3, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CAM_REG4, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::CAM_VAL4, new PoolEntry({0}));
-
- localDataPoolMap.emplace(StarTracker::LIMITS_ACTION, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::LIMITS_FPGA18CURRENT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::LIMITS_FPGA25CURRENT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::LIMITS_FPGA10CURRENT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::LIMITS_MCUCURRENT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::LIMITS_CMOS21CURRENT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::LIMITS_CMOSPIXCURRENT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::LIMITS_CMOS33CURRENT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::LIMITS_CMOSVRESCURRENT, new PoolEntry({0}));
- localDataPoolMap.emplace(StarTracker::LIMITS_CMOSTEMPERATURE, new PoolEntry