diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 9489dbc3..a392bd81 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -68,6 +68,7 @@ #include "fsfw_hal/linux/spi/SpiCookie.h" #include "fsfw_hal/linux/uart/UartComIF.h" #include "fsfw_hal/linux/uart/UartCookie.h" +#include "linux/tmtc/CCSDSHandler.h" #include "mission/core/GenericFactory.h" #include "mission/devices/ACUHandler.h" #include "mission/devices/BpxBatteryHandler.h" @@ -94,7 +95,6 @@ #include "mission/devices/devicedefinitions/SyrlinksDefinitions.h" #include "mission/devices/devicedefinitions/payloadPcduDefinitions.h" #include "mission/system/objects/AcsBoardAssembly.h" -#include "mission/tmtc/CCSDSHandler.h" #include "mission/tmtc/VirtualChannel.h" #include "mission/utility/TmFunnel.h" diff --git a/common/config/commonObjects.h b/common/config/commonObjects.h index fff9b465..5e4d8894 100644 --- a/common/config/commonObjects.h +++ b/common/config/commonObjects.h @@ -105,6 +105,7 @@ enum commonObjects: uint32_t { ACS_SUBSYSTEM = 0x73010001, PL_SUBSYSTEM = 0x73010002, PLOC_SUBSYSTEM = 0x73010003, + COM_SUBSYSTEM = 0x73010004, }; } diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index c183ea60..bbd25cde 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -5,6 +5,7 @@ add_subdirectory(boardtest) add_subdirectory(devices) add_subdirectory(fsfwconfig) add_subdirectory(obc) +add_subdirectory(tmtc) target_sources(${OBSW_NAME} PUBLIC ObjectFactory.cpp diff --git a/linux/obc/PapbVcInterface.h b/linux/obc/PapbVcInterface.h index 0d6382e3..33cfae0e 100644 --- a/linux/obc/PapbVcInterface.h +++ b/linux/obc/PapbVcInterface.h @@ -6,7 +6,7 @@ #include "OBSWConfig.h" #include "fsfw/returnvalues/HasReturnvaluesIF.h" -#include "linux/obc/VcInterfaceIF.h" +#include "mission/tmtc/VcInterfaceIF.h" /** * @brief This class handles the transmission of data to a virtual channel of the PTME IP Core diff --git a/linux/obc/Ptme.h b/linux/obc/Ptme.h index cdb2d6c6..ae2457c7 100644 --- a/linux/obc/Ptme.h +++ b/linux/obc/Ptme.h @@ -9,8 +9,8 @@ #include "OBSWConfig.h" #include "fsfw/returnvalues/HasReturnvaluesIF.h" -#include "linux/obc/PtmeIF.h" -#include "linux/obc/VcInterfaceIF.h" +#include "mission/tmtc/PtmeIF.h" +#include "mission/tmtc/VcInterfaceIF.h" /** * @brief This class handles the interfacing to the telemetry (PTME) IP core responsible for the diff --git a/mission/tmtc/CCSDSHandler.cpp b/linux/tmtc/CCSDSHandler.cpp similarity index 100% rename from mission/tmtc/CCSDSHandler.cpp rename to linux/tmtc/CCSDSHandler.cpp diff --git a/mission/tmtc/CCSDSHandler.h b/linux/tmtc/CCSDSHandler.h similarity index 99% rename from mission/tmtc/CCSDSHandler.h rename to linux/tmtc/CCSDSHandler.h index 1c4fde09..d2fac9af 100644 --- a/mission/tmtc/CCSDSHandler.h +++ b/linux/tmtc/CCSDSHandler.h @@ -4,7 +4,6 @@ #include #include "OBSWConfig.h" -#include "VirtualChannel.h" #include "fsfw/action/ActionHelper.h" #include "fsfw/action/HasActionsIF.h" #include "fsfw/events/EventMessage.h" @@ -18,6 +17,7 @@ #include "fsfw_hal/common/gpio/GpioIF.h" #include "fsfw_hal/common/gpio/gpioDefinitions.h" #include "linux/obc/PtmeConfig.h" +#include "mission/tmtc/VirtualChannel.h" /** * @brief This class handles the data exchange with the CCSDS IP cores implemented in the diff --git a/linux/tmtc/CMakeLists.txt b/linux/tmtc/CMakeLists.txt new file mode 100644 index 00000000..b2f32dab --- /dev/null +++ b/linux/tmtc/CMakeLists.txt @@ -0,0 +1,5 @@ +target_sources(${OBSW_NAME} PUBLIC + CCSDSHandler.cpp +) + + diff --git a/mission/system/tree/CMakeLists.txt b/mission/system/tree/CMakeLists.txt index 908f4b3d..95cfdf67 100644 --- a/mission/system/tree/CMakeLists.txt +++ b/mission/system/tree/CMakeLists.txt @@ -1,6 +1,7 @@ target_sources(${LIB_EIVE_MISSION} PRIVATE acsModeTree.cpp payloadModeTree.cpp + comModeTree.cpp system.cpp util.cpp ) diff --git a/mission/system/tree/comModeTree.cpp b/mission/system/tree/comModeTree.cpp new file mode 100644 index 00000000..9a08d55c --- /dev/null +++ b/mission/system/tree/comModeTree.cpp @@ -0,0 +1,22 @@ +#include "comModeTree.h" + +#include +#include +#include +#include +#include + +#include "util.h" + +const auto check = subsystem::checkInsert; + +static const auto OFF = HasModesIF::MODE_OFF; +static const auto ON = HasModesIF::MODE_ON; +static const auto NML = DeviceHandlerIF::MODE_NORMAL; + +namespace {} + +void satsystem::com::init() { + ModeListEntry entry; + Subsystem* comSubsystem = new Subsystem(objects::COM_SUBSYSTEM, objects::EIVE_SYSTEM, 12, 24); +} diff --git a/mission/system/tree/comModeTree.h b/mission/system/tree/comModeTree.h new file mode 100644 index 00000000..637dd1d6 --- /dev/null +++ b/mission/system/tree/comModeTree.h @@ -0,0 +1,12 @@ +#ifndef MISSION_SYSTEM_TREE_COMMODETREE_H_ +#define MISSION_SYSTEM_TREE_COMMODETREE_H_ + +namespace satsystem { + +namespace com { +void init(); +} + +} // namespace satsystem + +#endif /* MISSION_SYSTEM_TREE_COMMODETREE_H_ */ diff --git a/mission/system/tree/system.cpp b/mission/system/tree/system.cpp index 4455588f..f0d1ef66 100644 --- a/mission/system/tree/system.cpp +++ b/mission/system/tree/system.cpp @@ -1,9 +1,11 @@ #include "system.h" #include "acsModeTree.h" +#include "comModeTree.h" #include "payloadModeTree.h" void satsystem::init() { acs::init(); pl::init(); + com::init(); } diff --git a/mission/tmtc/CMakeLists.txt b/mission/tmtc/CMakeLists.txt index 1d3baae7..1fcd776d 100644 --- a/mission/tmtc/CMakeLists.txt +++ b/mission/tmtc/CMakeLists.txt @@ -1,5 +1,4 @@ target_sources(${LIB_EIVE_MISSION} PRIVATE - CCSDSHandler.cpp VirtualChannel.cpp ) diff --git a/linux/obc/PtmeIF.h b/mission/tmtc/PtmeIF.h similarity index 100% rename from linux/obc/PtmeIF.h rename to mission/tmtc/PtmeIF.h diff --git a/linux/obc/VcInterfaceIF.h b/mission/tmtc/VcInterfaceIF.h similarity index 97% rename from linux/obc/VcInterfaceIF.h rename to mission/tmtc/VcInterfaceIF.h index 45226e21..79a45f6b 100644 --- a/linux/obc/VcInterfaceIF.h +++ b/mission/tmtc/VcInterfaceIF.h @@ -1,7 +1,7 @@ #ifndef LINUX_OBC_VCINTERFACEIF_H_ #define LINUX_OBC_VCINTERFACEIF_H_ -#include +#include #include "fsfw/returnvalues/HasReturnvaluesIF.h" diff --git a/mission/tmtc/VirtualChannel.cpp b/mission/tmtc/VirtualChannel.cpp index 9d413ca7..48d556da 100644 --- a/mission/tmtc/VirtualChannel.cpp +++ b/mission/tmtc/VirtualChannel.cpp @@ -1,6 +1,5 @@ #include "VirtualChannel.h" -#include "CCSDSHandler.h" #include "OBSWConfig.h" #include "fsfw/ipc/QueueFactory.h" #include "fsfw/objectmanager/ObjectManager.h" diff --git a/mission/tmtc/VirtualChannel.h b/mission/tmtc/VirtualChannel.h index c661c4c5..b9a95614 100644 --- a/mission/tmtc/VirtualChannel.h +++ b/mission/tmtc/VirtualChannel.h @@ -1,12 +1,10 @@ -#ifndef VIRTUALCHANNEL_H_ -#define VIRTUALCHANNEL_H_ - -#include -#include +#pragma once #include "OBSWConfig.h" +#include "fsfw/ipc/MessageQueueIF.h" #include "fsfw/returnvalues/HasReturnvaluesIF.h" #include "fsfw/tmtcservices/AcceptsTelemetryIF.h" +#include "mission/tmtc/PtmeIF.h" class StorageManagerIF; @@ -52,5 +50,3 @@ class VirtualChannel : public AcceptsTelemetryIF, public HasReturnvaluesIF { StorageManagerIF* tmStore = nullptr; }; - -#endif /* VIRTUALCHANNEL_H_ */ diff --git a/mission/tmtc/comDefinitions.h b/mission/tmtc/comDefinitions.h new file mode 100644 index 00000000..92fe6977 --- /dev/null +++ b/mission/tmtc/comDefinitions.h @@ -0,0 +1,3 @@ +#pragma once + +namespace com {}