From 6f7be281ef90d0a25b6a6aa5659452cea5ae193d Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 18 Jul 2022 08:59:40 +0200 Subject: [PATCH] move HAL and tests folder --- hal/CMakeLists.txt | 48 ---- hal/src/CMakeLists.txt | 9 - src/CMakeLists.txt | 2 + {hal/src => src}/fsfw_hal/CMakeLists.txt | 0 .../fsfw_hal/common/CMakeLists.txt | 0 .../fsfw_hal/common/gpio/CMakeLists.txt | 0 .../fsfw_hal/common/gpio/GpioCookie.cpp | 0 .../fsfw_hal/common/gpio/GpioCookie.h | 0 .../src => src}/fsfw_hal/common/gpio/GpioIF.h | 0 .../fsfw_hal/common/gpio/gpioDefinitions.h | 0 .../fsfw_hal/common/spi/spiCommon.h | 0 .../fsfw_hal/devicehandlers/CMakeLists.txt | 0 .../devicehandlers/GyroL3GD20Handler.cpp | 0 .../devicehandlers/GyroL3GD20Handler.h | 0 .../devicehandlers/MgmLIS3MDLHandler.cpp | 0 .../devicehandlers/MgmLIS3MDLHandler.h | 0 .../devicehandlers/MgmRM3100Handler.cpp | 0 .../devicehandlers/MgmRM3100Handler.h | 0 .../devicedefinitions/GyroL3GD20Definitions.h | 0 .../devicedefinitions/MgmLIS3HandlerDefs.h | 0 .../devicedefinitions/MgmRM3100HandlerDefs.h | 0 {hal/src => src}/fsfw_hal/host/CMakeLists.txt | 0 .../src => src}/fsfw_hal/linux/CMakeLists.txt | 0 .../fsfw_hal/linux/CommandExecutor.cpp | 0 .../fsfw_hal/linux/CommandExecutor.h | 0 .../fsfw_hal/linux/UnixFileGuard.cpp | 0 .../fsfw_hal/linux/UnixFileGuard.h | 0 .../fsfw_hal/linux/gpio/CMakeLists.txt | 0 .../fsfw_hal/linux/gpio/LinuxLibgpioIF.cpp | 0 .../fsfw_hal/linux/gpio/LinuxLibgpioIF.h | 0 .../fsfw_hal/linux/i2c/CMakeLists.txt | 0 .../fsfw_hal/linux/i2c/I2cComIF.cpp | 0 .../src => src}/fsfw_hal/linux/i2c/I2cComIF.h | 0 .../fsfw_hal/linux/i2c/I2cCookie.cpp | 0 .../fsfw_hal/linux/i2c/I2cCookie.h | 0 .../fsfw_hal/linux/rpi/CMakeLists.txt | 0 .../fsfw_hal/linux/rpi/GpioRPi.cpp | 0 {hal/src => src}/fsfw_hal/linux/rpi/GpioRPi.h | 0 .../fsfw_hal/linux/spi/CMakeLists.txt | 0 .../fsfw_hal/linux/spi/SpiComIF.cpp | 0 .../src => src}/fsfw_hal/linux/spi/SpiComIF.h | 0 .../fsfw_hal/linux/spi/SpiCookie.cpp | 0 .../fsfw_hal/linux/spi/SpiCookie.h | 0 .../fsfw_hal/linux/spi/spiDefinitions.h | 0 .../fsfw_hal/linux/uart/CMakeLists.txt | 0 .../fsfw_hal/linux/uart/UartComIF.cpp | 0 .../fsfw_hal/linux/uart/UartComIF.h | 0 .../fsfw_hal/linux/uart/UartCookie.cpp | 0 .../fsfw_hal/linux/uart/UartCookie.h | 0 .../fsfw_hal/linux/uio/CMakeLists.txt | 0 .../fsfw_hal/linux/uio/UioMapper.cpp | 0 .../fsfw_hal/linux/uio/UioMapper.h | 0 {hal/src => src}/fsfw_hal/linux/utility.cpp | 0 {hal/src => src}/fsfw_hal/linux/utility.h | 0 .../fsfw_hal/stm32h7/CMakeLists.txt | 0 .../fsfw_hal/stm32h7/definitions.h | 0 .../stm32h7/devicetest/CMakeLists.txt | 0 .../stm32h7/devicetest/GyroL3GD20H.cpp | 0 .../fsfw_hal/stm32h7/devicetest/GyroL3GD20H.h | 0 {hal/src => src}/fsfw_hal/stm32h7/dma.cpp | 0 {hal/src => src}/fsfw_hal/stm32h7/dma.h | 0 .../fsfw_hal/stm32h7/gpio/CMakeLists.txt | 0 .../fsfw_hal/stm32h7/gpio/gpio.cpp | 0 {hal/src => src}/fsfw_hal/stm32h7/gpio/gpio.h | 0 .../fsfw_hal/stm32h7/i2c/CMakeLists.txt | 0 .../src => src}/fsfw_hal/stm32h7/interrupts.h | 0 .../fsfw_hal/stm32h7/spi/CMakeLists.txt | 0 .../fsfw_hal/stm32h7/spi/SpiComIF.cpp | 0 .../fsfw_hal/stm32h7/spi/SpiComIF.h | 0 .../fsfw_hal/stm32h7/spi/SpiCookie.cpp | 0 .../fsfw_hal/stm32h7/spi/SpiCookie.h | 0 .../fsfw_hal/stm32h7/spi/mspInit.cpp | 0 .../fsfw_hal/stm32h7/spi/mspInit.h | 0 .../fsfw_hal/stm32h7/spi/spiCore.cpp | 0 .../fsfw_hal/stm32h7/spi/spiCore.h | 0 .../fsfw_hal/stm32h7/spi/spiDefinitions.cpp | 0 .../fsfw_hal/stm32h7/spi/spiDefinitions.h | 0 .../fsfw_hal/stm32h7/spi/spiInterrupts.cpp | 0 .../fsfw_hal/stm32h7/spi/spiInterrupts.h | 0 .../fsfw_hal/stm32h7/spi/stm32h743zi.cpp | 0 .../fsfw_hal/stm32h7/spi/stm32h743zi.h | 0 .../fsfw_hal/stm32h7/uart/CMakeLists.txt | 0 {tests/src => src}/fsfw_tests/CMakeLists.txt | 0 .../fsfw_tests/integration/CMakeLists.txt | 0 .../integration/assemblies/CMakeLists.txt | 0 .../integration/assemblies/TestAssembly.cpp | 0 .../integration/assemblies/TestAssembly.h | 0 .../integration/controller/CMakeLists.txt | 0 .../integration/controller/TestController.cpp | 0 .../integration/controller/TestController.h | 0 .../ctrldefinitions/testCtrlDefinitions.h | 0 .../integration/devices/CMakeLists.txt | 0 .../integration/devices/TestCookie.cpp | 0 .../integration/devices/TestCookie.h | 0 .../integration/devices/TestDeviceHandler.cpp | 0 .../integration/devices/TestDeviceHandler.h | 0 .../integration/devices/TestEchoComIF.cpp | 0 .../integration/devices/TestEchoComIF.h | 0 .../devicedefinitions/testDeviceDefinitions.h | 0 .../integration/task/CMakeLists.txt | 0 .../fsfw_tests/integration/task/TestTask.cpp | 0 .../fsfw_tests/integration/task/TestTask.h | 0 .../fsfw_tests/internal/CMakeLists.txt | 0 .../internal/InternalUnitTester.cpp | 0 .../fsfw_tests/internal/InternalUnitTester.h | 0 .../fsfw_tests/internal/UnittDefinitions.cpp | 0 .../fsfw_tests/internal/UnittDefinitions.h | 0 .../internal/globalfunctions/CMakeLists.txt | 0 .../globalfunctions/TestArrayPrinter.cpp | 0 .../globalfunctions/TestArrayPrinter.h | 0 .../fsfw_tests/internal/osal/CMakeLists.txt | 0 .../fsfw_tests/internal/osal/testMq.cpp | 0 .../fsfw_tests/internal/osal/testMq.h | 0 .../fsfw_tests/internal/osal/testMutex.cpp | 0 .../fsfw_tests/internal/osal/testMutex.h | 0 .../internal/osal/testSemaphore.cpp | 0 .../fsfw_tests/internal/osal/testSemaphore.h | 0 .../internal/serialize/CMakeLists.txt | 0 .../serialize/IntTestSerialization.cpp | 0 .../internal/serialize/IntTestSerialization.h | 0 .../fsfw_tests/unit/CMakeLists.txt | 0 .../fsfw_tests/unit/CatchDefinitions.cpp | 0 .../fsfw_tests/unit/CatchDefinitions.h | 0 .../fsfw_tests/unit/CatchFactory.cpp | 0 .../fsfw_tests/unit/CatchFactory.h | 0 .../fsfw_tests/unit/CatchRunner.cpp | 0 .../src => src}/fsfw_tests/unit/CatchRunner.h | 0 .../fsfw_tests/unit/CatchSetup.cpp | 0 .../fsfw_tests/unit/action/CMakeLists.txt | 0 .../unit/action/TestActionHelper.cpp | 0 .../fsfw_tests/unit/action/TestActionHelper.h | 0 .../fsfw_tests/unit/cfdp/CMakeLists.txt | 0 .../fsfw_tests/unit/cfdp/testAckPdu.cpp | 0 .../fsfw_tests/unit/cfdp/testCfdp.cpp | 0 .../fsfw_tests/unit/cfdp/testEofPdu.cpp | 0 .../fsfw_tests/unit/cfdp/testFileData.cpp | 0 .../fsfw_tests/unit/cfdp/testFinishedPdu.cpp | 0 .../fsfw_tests/unit/cfdp/testKeepAlivePdu.cpp | 0 .../fsfw_tests/unit/cfdp/testMetadataPdu.cpp | 0 .../fsfw_tests/unit/cfdp/testNakPdu.cpp | 0 .../fsfw_tests/unit/cfdp/testPromptPdu.cpp | 0 .../fsfw_tests/unit/cfdp/testTlvsLvs.cpp | 0 .../fsfw_tests/unit/container/CMakeLists.txt | 0 .../unit/container/RingBufferTest.cpp | 0 .../unit/container/TestArrayList.cpp | 0 .../unit/container/TestDynamicFifo.cpp | 0 .../fsfw_tests/unit/container/TestFifo.cpp | 0 .../unit/container/TestFixedArrayList.cpp | 0 .../unit/container/TestFixedMap.cpp | 0 .../container/TestFixedOrderedMultimap.cpp | 0 .../unit/container/TestPlacementFactory.cpp | 0 .../unit/datapoollocal/CMakeLists.txt | 0 .../unit/datapoollocal/DataSetTest.cpp | 0 .../datapoollocal/LocalPoolManagerTest.cpp | 0 .../unit/datapoollocal/LocalPoolOwnerBase.cpp | 0 .../unit/datapoollocal/LocalPoolOwnerBase.h | 0 .../datapoollocal/LocalPoolVariableTest.cpp | 0 .../datapoollocal/LocalPoolVectorTest.cpp | 0 .../unit/devicehandler/CMakeLists.txt | 0 .../unit/devicehandler/ComIFMock.cpp | 92 ++++---- .../fsfw_tests/unit/devicehandler/ComIFMock.h | 74 +++---- .../unit/devicehandler/CookieIFMock.cpp | 10 +- .../unit/devicehandler/CookieIFMock.h | 24 +- .../unit/devicehandler/DeviceFdirMock.cpp | 0 .../unit/devicehandler/DeviceFdirMock.h | 0 .../devicehandler/DeviceHandlerCommander.cpp | 128 +++++------ .../devicehandler/DeviceHandlerCommander.h | 100 ++++----- .../unit/devicehandler/DeviceHandlerMock.cpp | 206 +++++++++--------- .../unit/devicehandler/DeviceHandlerMock.h | 92 ++++---- .../devicehandler/TestDeviceHandlerBase.cpp | 190 ++++++++-------- .../unit/globalfunctions/CMakeLists.txt | 0 .../unit/globalfunctions/testBitutil.cpp | 0 .../unit/globalfunctions/testCRC.cpp | 0 .../unit/globalfunctions/testDleEncoder.cpp | 0 .../unit/globalfunctions/testOpDivider.cpp | 0 .../globalfunctions/testTimevalOperations.cpp | 0 .../fsfw_tests/unit/hal/CMakeLists.txt | 0 .../unit/hal/testCommandExecutor.cpp | 0 .../unit/internalerror/CMakeLists.txt | 0 .../TestInternalErrorReporter.cpp | 0 .../fsfw_tests/unit/mocks/CMakeLists.txt | 0 .../fsfw_tests/unit/mocks/HkReceiverMock.h | 0 .../unit/mocks/MessageQueueMockBase.h | 0 .../unit/mocks/PeriodicTaskIFMock.h | 0 .../unit/mocks/PowerSwitcherMock.cpp | 0 .../fsfw_tests/unit/mocks/PowerSwitcherMock.h | 0 .../fsfw_tests/unit/osal/CMakeLists.txt | 0 .../fsfw_tests/unit/osal/TestClock.cpp | 0 .../fsfw_tests/unit/osal/TestMessageQueue.cpp | 0 .../fsfw_tests/unit/osal/TestSemaphore.cpp | 0 .../fsfw_tests/unit/power/CMakeLists.txt | 0 .../unit/power/testPowerSwitcher.cpp | 0 .../src => src}/fsfw_tests/unit/printChar.cpp | 0 .../src => src}/fsfw_tests/unit/printChar.h | 0 .../fsfw_tests/unit/serialize/CMakeLists.txt | 0 .../serialize/TestSerialBufferAdapter.cpp | 0 .../unit/serialize/TestSerialLinkedPacket.cpp | 0 .../unit/serialize/TestSerialLinkedPacket.h | 0 .../unit/serialize/TestSerialization.cpp | 0 .../unit/storagemanager/CMakeLists.txt | 0 .../unit/storagemanager/TestNewAccessor.cpp | 0 .../unit/storagemanager/TestPool.cpp | 0 .../fsfw_tests/unit/testcfg/CMakeLists.txt | 0 .../fsfw_tests/unit/testcfg/FSFWConfig.h.in | 0 .../fsfw_tests/unit/testcfg/OBSWConfig.h.in | 0 .../fsfw_tests/unit/testcfg/TestsConfig.h.in | 0 .../unit/testcfg/devices/logicalAddresses.cpp | 0 .../unit/testcfg/devices/logicalAddresses.h | 0 .../testcfg/devices/powerSwitcherList.cpp | 0 .../unit/testcfg/devices/powerSwitcherList.h | 0 .../unit/testcfg/events/subsystemIdRanges.h | 0 .../unit/testcfg/ipc/MissionMessageTypes.cpp | 0 .../unit/testcfg/ipc/MissionMessageTypes.h | 0 .../unit/testcfg/objects/systemObjectList.h | 68 +++--- .../PollingSequenceFactory.cpp | 0 .../pollingsequence/PollingSequenceFactory.h | 0 .../unit/testcfg/returnvalues/classIds.h | 0 .../fsfw_tests/unit/testcfg/tmtc/apid.h | 0 .../fsfw_tests/unit/testcfg/tmtc/pusIds.h | 0 .../unit/testtemplate/TestTemplate.cpp | 0 .../unit/timemanager/CMakeLists.txt | 0 .../unit/timemanager/TestCCSDSTime.cpp | 0 .../unit/timemanager/TestCountdown.cpp | 0 .../fsfw_tests/unit/tmtcpacket/CMakeLists.txt | 0 .../fsfw_tests/unit/tmtcpacket/PusTmTest.cpp | 0 .../fsfw_tests/unit/tmtcpacket/testCcsds.cpp | 0 .../src => src}/fsfw_tests/unit/version.cpp | 0 tests/CMakeLists.txt | 1 - tests/src/CMakeLists.txt | 9 - 229 files changed, 494 insertions(+), 559 deletions(-) delete mode 100644 hal/CMakeLists.txt delete mode 100644 hal/src/CMakeLists.txt rename {hal/src => src}/fsfw_hal/CMakeLists.txt (100%) rename {hal/src => src}/fsfw_hal/common/CMakeLists.txt (100%) rename {hal/src => src}/fsfw_hal/common/gpio/CMakeLists.txt (100%) rename {hal/src => src}/fsfw_hal/common/gpio/GpioCookie.cpp (100%) rename {hal/src => src}/fsfw_hal/common/gpio/GpioCookie.h (100%) rename {hal/src => src}/fsfw_hal/common/gpio/GpioIF.h (100%) rename {hal/src => src}/fsfw_hal/common/gpio/gpioDefinitions.h (100%) rename {hal/src => src}/fsfw_hal/common/spi/spiCommon.h (100%) rename {hal/src => src}/fsfw_hal/devicehandlers/CMakeLists.txt (100%) rename {hal/src => src}/fsfw_hal/devicehandlers/GyroL3GD20Handler.cpp (100%) rename {hal/src => src}/fsfw_hal/devicehandlers/GyroL3GD20Handler.h (100%) rename {hal/src => src}/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.cpp (100%) rename {hal/src => src}/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h (100%) rename {hal/src => src}/fsfw_hal/devicehandlers/MgmRM3100Handler.cpp (100%) rename {hal/src => src}/fsfw_hal/devicehandlers/MgmRM3100Handler.h (100%) rename {hal/src => src}/fsfw_hal/devicehandlers/devicedefinitions/GyroL3GD20Definitions.h (100%) rename {hal/src => src}/fsfw_hal/devicehandlers/devicedefinitions/MgmLIS3HandlerDefs.h (100%) rename {hal/src => src}/fsfw_hal/devicehandlers/devicedefinitions/MgmRM3100HandlerDefs.h (100%) rename {hal/src => src}/fsfw_hal/host/CMakeLists.txt (100%) rename {hal/src => src}/fsfw_hal/linux/CMakeLists.txt (100%) rename {hal/src => src}/fsfw_hal/linux/CommandExecutor.cpp (100%) rename {hal/src => src}/fsfw_hal/linux/CommandExecutor.h (100%) rename {hal/src => src}/fsfw_hal/linux/UnixFileGuard.cpp (100%) rename {hal/src => src}/fsfw_hal/linux/UnixFileGuard.h (100%) rename {hal/src => src}/fsfw_hal/linux/gpio/CMakeLists.txt (100%) rename {hal/src => src}/fsfw_hal/linux/gpio/LinuxLibgpioIF.cpp (100%) rename {hal/src => src}/fsfw_hal/linux/gpio/LinuxLibgpioIF.h (100%) rename {hal/src => src}/fsfw_hal/linux/i2c/CMakeLists.txt (100%) rename {hal/src => src}/fsfw_hal/linux/i2c/I2cComIF.cpp (100%) rename {hal/src => src}/fsfw_hal/linux/i2c/I2cComIF.h (100%) rename {hal/src => src}/fsfw_hal/linux/i2c/I2cCookie.cpp (100%) rename {hal/src => src}/fsfw_hal/linux/i2c/I2cCookie.h (100%) rename {hal/src => src}/fsfw_hal/linux/rpi/CMakeLists.txt (100%) rename {hal/src => src}/fsfw_hal/linux/rpi/GpioRPi.cpp (100%) rename {hal/src => src}/fsfw_hal/linux/rpi/GpioRPi.h (100%) rename {hal/src => src}/fsfw_hal/linux/spi/CMakeLists.txt (100%) rename {hal/src => src}/fsfw_hal/linux/spi/SpiComIF.cpp (100%) rename {hal/src => src}/fsfw_hal/linux/spi/SpiComIF.h (100%) rename {hal/src => src}/fsfw_hal/linux/spi/SpiCookie.cpp (100%) rename {hal/src => src}/fsfw_hal/linux/spi/SpiCookie.h (100%) rename {hal/src => src}/fsfw_hal/linux/spi/spiDefinitions.h (100%) rename {hal/src => src}/fsfw_hal/linux/uart/CMakeLists.txt (100%) rename {hal/src => src}/fsfw_hal/linux/uart/UartComIF.cpp (100%) rename {hal/src => src}/fsfw_hal/linux/uart/UartComIF.h (100%) rename {hal/src => src}/fsfw_hal/linux/uart/UartCookie.cpp (100%) rename {hal/src => src}/fsfw_hal/linux/uart/UartCookie.h (100%) rename {hal/src => src}/fsfw_hal/linux/uio/CMakeLists.txt (100%) rename {hal/src => src}/fsfw_hal/linux/uio/UioMapper.cpp (100%) rename {hal/src => src}/fsfw_hal/linux/uio/UioMapper.h (100%) rename {hal/src => src}/fsfw_hal/linux/utility.cpp (100%) rename {hal/src => src}/fsfw_hal/linux/utility.h (100%) rename {hal/src => src}/fsfw_hal/stm32h7/CMakeLists.txt (100%) rename {hal/src => src}/fsfw_hal/stm32h7/definitions.h (100%) rename {hal/src => src}/fsfw_hal/stm32h7/devicetest/CMakeLists.txt (100%) rename {hal/src => src}/fsfw_hal/stm32h7/devicetest/GyroL3GD20H.cpp (100%) rename {hal/src => src}/fsfw_hal/stm32h7/devicetest/GyroL3GD20H.h (100%) rename {hal/src => src}/fsfw_hal/stm32h7/dma.cpp (100%) rename {hal/src => src}/fsfw_hal/stm32h7/dma.h (100%) rename {hal/src => src}/fsfw_hal/stm32h7/gpio/CMakeLists.txt (100%) rename {hal/src => src}/fsfw_hal/stm32h7/gpio/gpio.cpp (100%) rename {hal/src => src}/fsfw_hal/stm32h7/gpio/gpio.h (100%) rename {hal/src => src}/fsfw_hal/stm32h7/i2c/CMakeLists.txt (100%) rename {hal/src => src}/fsfw_hal/stm32h7/interrupts.h (100%) rename {hal/src => src}/fsfw_hal/stm32h7/spi/CMakeLists.txt (100%) rename {hal/src => src}/fsfw_hal/stm32h7/spi/SpiComIF.cpp (100%) rename {hal/src => src}/fsfw_hal/stm32h7/spi/SpiComIF.h (100%) rename {hal/src => src}/fsfw_hal/stm32h7/spi/SpiCookie.cpp (100%) rename {hal/src => src}/fsfw_hal/stm32h7/spi/SpiCookie.h (100%) rename {hal/src => src}/fsfw_hal/stm32h7/spi/mspInit.cpp (100%) rename {hal/src => src}/fsfw_hal/stm32h7/spi/mspInit.h (100%) rename {hal/src => src}/fsfw_hal/stm32h7/spi/spiCore.cpp (100%) rename {hal/src => src}/fsfw_hal/stm32h7/spi/spiCore.h (100%) rename {hal/src => src}/fsfw_hal/stm32h7/spi/spiDefinitions.cpp (100%) rename {hal/src => src}/fsfw_hal/stm32h7/spi/spiDefinitions.h (100%) rename {hal/src => src}/fsfw_hal/stm32h7/spi/spiInterrupts.cpp (100%) rename {hal/src => src}/fsfw_hal/stm32h7/spi/spiInterrupts.h (100%) rename {hal/src => src}/fsfw_hal/stm32h7/spi/stm32h743zi.cpp (100%) rename {hal/src => src}/fsfw_hal/stm32h7/spi/stm32h743zi.h (100%) rename {hal/src => src}/fsfw_hal/stm32h7/uart/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/integration/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/integration/assemblies/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/integration/assemblies/TestAssembly.cpp (100%) rename {tests/src => src}/fsfw_tests/integration/assemblies/TestAssembly.h (100%) rename {tests/src => src}/fsfw_tests/integration/controller/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/integration/controller/TestController.cpp (100%) rename {tests/src => src}/fsfw_tests/integration/controller/TestController.h (100%) rename {tests/src => src}/fsfw_tests/integration/controller/ctrldefinitions/testCtrlDefinitions.h (100%) rename {tests/src => src}/fsfw_tests/integration/devices/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/integration/devices/TestCookie.cpp (100%) rename {tests/src => src}/fsfw_tests/integration/devices/TestCookie.h (100%) rename {tests/src => src}/fsfw_tests/integration/devices/TestDeviceHandler.cpp (100%) rename {tests/src => src}/fsfw_tests/integration/devices/TestDeviceHandler.h (100%) rename {tests/src => src}/fsfw_tests/integration/devices/TestEchoComIF.cpp (100%) rename {tests/src => src}/fsfw_tests/integration/devices/TestEchoComIF.h (100%) rename {tests/src => src}/fsfw_tests/integration/devices/devicedefinitions/testDeviceDefinitions.h (100%) rename {tests/src => src}/fsfw_tests/integration/task/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/integration/task/TestTask.cpp (100%) rename {tests/src => src}/fsfw_tests/integration/task/TestTask.h (100%) rename {tests/src => src}/fsfw_tests/internal/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/internal/InternalUnitTester.cpp (100%) rename {tests/src => src}/fsfw_tests/internal/InternalUnitTester.h (100%) rename {tests/src => src}/fsfw_tests/internal/UnittDefinitions.cpp (100%) rename {tests/src => src}/fsfw_tests/internal/UnittDefinitions.h (100%) rename {tests/src => src}/fsfw_tests/internal/globalfunctions/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/internal/globalfunctions/TestArrayPrinter.cpp (100%) rename {tests/src => src}/fsfw_tests/internal/globalfunctions/TestArrayPrinter.h (100%) rename {tests/src => src}/fsfw_tests/internal/osal/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/internal/osal/testMq.cpp (100%) rename {tests/src => src}/fsfw_tests/internal/osal/testMq.h (100%) rename {tests/src => src}/fsfw_tests/internal/osal/testMutex.cpp (100%) rename {tests/src => src}/fsfw_tests/internal/osal/testMutex.h (100%) rename {tests/src => src}/fsfw_tests/internal/osal/testSemaphore.cpp (100%) rename {tests/src => src}/fsfw_tests/internal/osal/testSemaphore.h (100%) rename {tests/src => src}/fsfw_tests/internal/serialize/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/internal/serialize/IntTestSerialization.cpp (100%) rename {tests/src => src}/fsfw_tests/internal/serialize/IntTestSerialization.h (100%) rename {tests/src => src}/fsfw_tests/unit/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/unit/CatchDefinitions.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/CatchDefinitions.h (100%) rename {tests/src => src}/fsfw_tests/unit/CatchFactory.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/CatchFactory.h (100%) rename {tests/src => src}/fsfw_tests/unit/CatchRunner.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/CatchRunner.h (100%) rename {tests/src => src}/fsfw_tests/unit/CatchSetup.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/action/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/unit/action/TestActionHelper.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/action/TestActionHelper.h (100%) rename {tests/src => src}/fsfw_tests/unit/cfdp/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/unit/cfdp/testAckPdu.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/cfdp/testCfdp.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/cfdp/testEofPdu.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/cfdp/testFileData.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/cfdp/testFinishedPdu.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/cfdp/testKeepAlivePdu.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/cfdp/testMetadataPdu.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/cfdp/testNakPdu.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/cfdp/testPromptPdu.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/cfdp/testTlvsLvs.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/container/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/unit/container/RingBufferTest.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/container/TestArrayList.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/container/TestDynamicFifo.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/container/TestFifo.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/container/TestFixedArrayList.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/container/TestFixedMap.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/container/TestFixedOrderedMultimap.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/container/TestPlacementFactory.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/datapoollocal/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/unit/datapoollocal/DataSetTest.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/datapoollocal/LocalPoolManagerTest.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/datapoollocal/LocalPoolOwnerBase.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/datapoollocal/LocalPoolOwnerBase.h (100%) rename {tests/src => src}/fsfw_tests/unit/datapoollocal/LocalPoolVariableTest.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/datapoollocal/LocalPoolVectorTest.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/devicehandler/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/unit/devicehandler/ComIFMock.cpp (96%) rename {tests/src => src}/fsfw_tests/unit/devicehandler/ComIFMock.h (97%) rename {tests/src => src}/fsfw_tests/unit/devicehandler/CookieIFMock.cpp (94%) rename {tests/src => src}/fsfw_tests/unit/devicehandler/CookieIFMock.h (96%) rename {tests/src => src}/fsfw_tests/unit/devicehandler/DeviceFdirMock.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/devicehandler/DeviceFdirMock.h (100%) rename {tests/src => src}/fsfw_tests/unit/devicehandler/DeviceHandlerCommander.cpp (97%) rename {tests/src => src}/fsfw_tests/unit/devicehandler/DeviceHandlerCommander.h (97%) rename {tests/src => src}/fsfw_tests/unit/devicehandler/DeviceHandlerMock.cpp (96%) rename {tests/src => src}/fsfw_tests/unit/devicehandler/DeviceHandlerMock.h (97%) rename {tests/src => src}/fsfw_tests/unit/devicehandler/TestDeviceHandlerBase.cpp (98%) rename {tests/src => src}/fsfw_tests/unit/globalfunctions/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/unit/globalfunctions/testBitutil.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/globalfunctions/testCRC.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/globalfunctions/testDleEncoder.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/globalfunctions/testOpDivider.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/globalfunctions/testTimevalOperations.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/hal/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/unit/hal/testCommandExecutor.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/internalerror/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/unit/internalerror/TestInternalErrorReporter.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/mocks/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/unit/mocks/HkReceiverMock.h (100%) rename {tests/src => src}/fsfw_tests/unit/mocks/MessageQueueMockBase.h (100%) rename {tests/src => src}/fsfw_tests/unit/mocks/PeriodicTaskIFMock.h (100%) rename {tests/src => src}/fsfw_tests/unit/mocks/PowerSwitcherMock.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/mocks/PowerSwitcherMock.h (100%) rename {tests/src => src}/fsfw_tests/unit/osal/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/unit/osal/TestClock.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/osal/TestMessageQueue.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/osal/TestSemaphore.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/power/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/unit/power/testPowerSwitcher.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/printChar.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/printChar.h (100%) rename {tests/src => src}/fsfw_tests/unit/serialize/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/unit/serialize/TestSerialBufferAdapter.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/serialize/TestSerialLinkedPacket.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/serialize/TestSerialLinkedPacket.h (100%) rename {tests/src => src}/fsfw_tests/unit/serialize/TestSerialization.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/storagemanager/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/unit/storagemanager/TestNewAccessor.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/storagemanager/TestPool.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/testcfg/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/unit/testcfg/FSFWConfig.h.in (100%) rename {tests/src => src}/fsfw_tests/unit/testcfg/OBSWConfig.h.in (100%) rename {tests/src => src}/fsfw_tests/unit/testcfg/TestsConfig.h.in (100%) rename {tests/src => src}/fsfw_tests/unit/testcfg/devices/logicalAddresses.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/testcfg/devices/logicalAddresses.h (100%) rename {tests/src => src}/fsfw_tests/unit/testcfg/devices/powerSwitcherList.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/testcfg/devices/powerSwitcherList.h (100%) rename {tests/src => src}/fsfw_tests/unit/testcfg/events/subsystemIdRanges.h (100%) rename {tests/src => src}/fsfw_tests/unit/testcfg/ipc/MissionMessageTypes.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/testcfg/ipc/MissionMessageTypes.h (100%) rename {tests/src => src}/fsfw_tests/unit/testcfg/objects/systemObjectList.h (95%) rename {tests/src => src}/fsfw_tests/unit/testcfg/pollingsequence/PollingSequenceFactory.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/testcfg/pollingsequence/PollingSequenceFactory.h (100%) rename {tests/src => src}/fsfw_tests/unit/testcfg/returnvalues/classIds.h (100%) rename {tests/src => src}/fsfw_tests/unit/testcfg/tmtc/apid.h (100%) rename {tests/src => src}/fsfw_tests/unit/testcfg/tmtc/pusIds.h (100%) rename {tests/src => src}/fsfw_tests/unit/testtemplate/TestTemplate.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/timemanager/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/unit/timemanager/TestCCSDSTime.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/timemanager/TestCountdown.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/tmtcpacket/CMakeLists.txt (100%) rename {tests/src => src}/fsfw_tests/unit/tmtcpacket/PusTmTest.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/tmtcpacket/testCcsds.cpp (100%) rename {tests/src => src}/fsfw_tests/unit/version.cpp (100%) delete mode 100644 tests/CMakeLists.txt delete mode 100644 tests/src/CMakeLists.txt diff --git a/hal/CMakeLists.txt b/hal/CMakeLists.txt deleted file mode 100644 index 7a97ae0f..00000000 --- a/hal/CMakeLists.txt +++ /dev/null @@ -1,48 +0,0 @@ -cmake_minimum_required(VERSION 3.13) - -# Can also be changed by upper CMakeLists.txt file -find_library(LIB_FSFW_NAME fsfw REQUIRED) - -option(FSFW_HAL_ADD_LINUX "Add the Linux HAL to the sources. Requires gpiod library" OFF) -# On by default for now because I did not have an issue including and compiling those files -# and libraries on a Desktop Linux system and the primary target of the FSFW is still embedded -# Linux. The only exception from this is the gpiod library which requires a dedicated installation, -# but CMake is able to determine whether this library is installed with find_library. -option(FSFW_HAL_LINUX_ADD_PERIPHERAL_DRIVERS "Add peripheral drivers for embedded Linux" ON) -option(FSFW_HAL_LINUX_ADD_LIBGPIOD "Target implements libgpiod" ON) - -option(FSFW_HAL_ADD_RASPBERRY_PI "Add Raspberry Pi specific code to the sources" OFF) -option(FSFW_HAL_ADD_STM32H7 "Add the STM32H7 HAL to the sources" OFF) -option(FSFW_HAL_WARNING_SHADOW_LOCAL_GCC "Enable -Wshadow=local warning in GCC" ON) - -set(LINUX_HAL_PATH_NAME linux) -set(STM32H7_PATH_NAME stm32h7) - -add_subdirectory(src) - -foreach(INCLUDE_PATH ${FSFW_HAL_ADDITIONAL_INC_PATHS}) - if(IS_ABSOLUTE ${INCLUDE_PATH}) - set(CURR_ABS_INC_PATH "${INCLUDE_PATH}") - else() - get_filename_component(CURR_ABS_INC_PATH - ${INCLUDE_PATH} REALPATH BASE_DIR ${CMAKE_SOURCE_DIR}) - endif() - - if(CMAKE_VERBOSE) - message(STATUS "FSFW include path: ${CURR_ABS_INC_PATH}") - endif() - - list(APPEND FSFW_HAL_ADD_INC_PATHS_ABS ${CURR_ABS_INC_PATH}) -endforeach() - -target_include_directories(${LIB_FSFW_NAME} PRIVATE - ${FSFW_HAL_ADD_INC_PATHS_ABS} -) - -target_compile_definitions(${LIB_FSFW_NAME} PRIVATE - ${FSFW_HAL_DEFINES} -) - -target_link_libraries(${LIB_FSFW_NAME} PRIVATE - ${FSFW_HAL_LINK_LIBS} -) diff --git a/hal/src/CMakeLists.txt b/hal/src/CMakeLists.txt deleted file mode 100644 index 76ee45c6..00000000 --- a/hal/src/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -target_include_directories(${LIB_FSFW_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} -) - -target_include_directories(${LIB_FSFW_NAME} INTERFACE - ${CMAKE_CURRENT_SOURCE_DIR} -) - -add_subdirectory(fsfw_hal) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 34f21c2f..6d7f83b3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,3 +4,5 @@ target_include_directories(${LIB_FSFW_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) add_subdirectory(fsfw) +add_subdirectory(fsfw_hal) +add_subdirectory(fsfw_tests) diff --git a/hal/src/fsfw_hal/CMakeLists.txt b/src/fsfw_hal/CMakeLists.txt similarity index 100% rename from hal/src/fsfw_hal/CMakeLists.txt rename to src/fsfw_hal/CMakeLists.txt diff --git a/hal/src/fsfw_hal/common/CMakeLists.txt b/src/fsfw_hal/common/CMakeLists.txt similarity index 100% rename from hal/src/fsfw_hal/common/CMakeLists.txt rename to src/fsfw_hal/common/CMakeLists.txt diff --git a/hal/src/fsfw_hal/common/gpio/CMakeLists.txt b/src/fsfw_hal/common/gpio/CMakeLists.txt similarity index 100% rename from hal/src/fsfw_hal/common/gpio/CMakeLists.txt rename to src/fsfw_hal/common/gpio/CMakeLists.txt diff --git a/hal/src/fsfw_hal/common/gpio/GpioCookie.cpp b/src/fsfw_hal/common/gpio/GpioCookie.cpp similarity index 100% rename from hal/src/fsfw_hal/common/gpio/GpioCookie.cpp rename to src/fsfw_hal/common/gpio/GpioCookie.cpp diff --git a/hal/src/fsfw_hal/common/gpio/GpioCookie.h b/src/fsfw_hal/common/gpio/GpioCookie.h similarity index 100% rename from hal/src/fsfw_hal/common/gpio/GpioCookie.h rename to src/fsfw_hal/common/gpio/GpioCookie.h diff --git a/hal/src/fsfw_hal/common/gpio/GpioIF.h b/src/fsfw_hal/common/gpio/GpioIF.h similarity index 100% rename from hal/src/fsfw_hal/common/gpio/GpioIF.h rename to src/fsfw_hal/common/gpio/GpioIF.h diff --git a/hal/src/fsfw_hal/common/gpio/gpioDefinitions.h b/src/fsfw_hal/common/gpio/gpioDefinitions.h similarity index 100% rename from hal/src/fsfw_hal/common/gpio/gpioDefinitions.h rename to src/fsfw_hal/common/gpio/gpioDefinitions.h diff --git a/hal/src/fsfw_hal/common/spi/spiCommon.h b/src/fsfw_hal/common/spi/spiCommon.h similarity index 100% rename from hal/src/fsfw_hal/common/spi/spiCommon.h rename to src/fsfw_hal/common/spi/spiCommon.h diff --git a/hal/src/fsfw_hal/devicehandlers/CMakeLists.txt b/src/fsfw_hal/devicehandlers/CMakeLists.txt similarity index 100% rename from hal/src/fsfw_hal/devicehandlers/CMakeLists.txt rename to src/fsfw_hal/devicehandlers/CMakeLists.txt diff --git a/hal/src/fsfw_hal/devicehandlers/GyroL3GD20Handler.cpp b/src/fsfw_hal/devicehandlers/GyroL3GD20Handler.cpp similarity index 100% rename from hal/src/fsfw_hal/devicehandlers/GyroL3GD20Handler.cpp rename to src/fsfw_hal/devicehandlers/GyroL3GD20Handler.cpp diff --git a/hal/src/fsfw_hal/devicehandlers/GyroL3GD20Handler.h b/src/fsfw_hal/devicehandlers/GyroL3GD20Handler.h similarity index 100% rename from hal/src/fsfw_hal/devicehandlers/GyroL3GD20Handler.h rename to src/fsfw_hal/devicehandlers/GyroL3GD20Handler.h diff --git a/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.cpp b/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.cpp similarity index 100% rename from hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.cpp rename to src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.cpp diff --git a/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h b/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h similarity index 100% rename from hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h rename to src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h diff --git a/hal/src/fsfw_hal/devicehandlers/MgmRM3100Handler.cpp b/src/fsfw_hal/devicehandlers/MgmRM3100Handler.cpp similarity index 100% rename from hal/src/fsfw_hal/devicehandlers/MgmRM3100Handler.cpp rename to src/fsfw_hal/devicehandlers/MgmRM3100Handler.cpp diff --git a/hal/src/fsfw_hal/devicehandlers/MgmRM3100Handler.h b/src/fsfw_hal/devicehandlers/MgmRM3100Handler.h similarity index 100% rename from hal/src/fsfw_hal/devicehandlers/MgmRM3100Handler.h rename to src/fsfw_hal/devicehandlers/MgmRM3100Handler.h diff --git a/hal/src/fsfw_hal/devicehandlers/devicedefinitions/GyroL3GD20Definitions.h b/src/fsfw_hal/devicehandlers/devicedefinitions/GyroL3GD20Definitions.h similarity index 100% rename from hal/src/fsfw_hal/devicehandlers/devicedefinitions/GyroL3GD20Definitions.h rename to src/fsfw_hal/devicehandlers/devicedefinitions/GyroL3GD20Definitions.h diff --git a/hal/src/fsfw_hal/devicehandlers/devicedefinitions/MgmLIS3HandlerDefs.h b/src/fsfw_hal/devicehandlers/devicedefinitions/MgmLIS3HandlerDefs.h similarity index 100% rename from hal/src/fsfw_hal/devicehandlers/devicedefinitions/MgmLIS3HandlerDefs.h rename to src/fsfw_hal/devicehandlers/devicedefinitions/MgmLIS3HandlerDefs.h diff --git a/hal/src/fsfw_hal/devicehandlers/devicedefinitions/MgmRM3100HandlerDefs.h b/src/fsfw_hal/devicehandlers/devicedefinitions/MgmRM3100HandlerDefs.h similarity index 100% rename from hal/src/fsfw_hal/devicehandlers/devicedefinitions/MgmRM3100HandlerDefs.h rename to src/fsfw_hal/devicehandlers/devicedefinitions/MgmRM3100HandlerDefs.h diff --git a/hal/src/fsfw_hal/host/CMakeLists.txt b/src/fsfw_hal/host/CMakeLists.txt similarity index 100% rename from hal/src/fsfw_hal/host/CMakeLists.txt rename to src/fsfw_hal/host/CMakeLists.txt diff --git a/hal/src/fsfw_hal/linux/CMakeLists.txt b/src/fsfw_hal/linux/CMakeLists.txt similarity index 100% rename from hal/src/fsfw_hal/linux/CMakeLists.txt rename to src/fsfw_hal/linux/CMakeLists.txt diff --git a/hal/src/fsfw_hal/linux/CommandExecutor.cpp b/src/fsfw_hal/linux/CommandExecutor.cpp similarity index 100% rename from hal/src/fsfw_hal/linux/CommandExecutor.cpp rename to src/fsfw_hal/linux/CommandExecutor.cpp diff --git a/hal/src/fsfw_hal/linux/CommandExecutor.h b/src/fsfw_hal/linux/CommandExecutor.h similarity index 100% rename from hal/src/fsfw_hal/linux/CommandExecutor.h rename to src/fsfw_hal/linux/CommandExecutor.h diff --git a/hal/src/fsfw_hal/linux/UnixFileGuard.cpp b/src/fsfw_hal/linux/UnixFileGuard.cpp similarity index 100% rename from hal/src/fsfw_hal/linux/UnixFileGuard.cpp rename to src/fsfw_hal/linux/UnixFileGuard.cpp diff --git a/hal/src/fsfw_hal/linux/UnixFileGuard.h b/src/fsfw_hal/linux/UnixFileGuard.h similarity index 100% rename from hal/src/fsfw_hal/linux/UnixFileGuard.h rename to src/fsfw_hal/linux/UnixFileGuard.h diff --git a/hal/src/fsfw_hal/linux/gpio/CMakeLists.txt b/src/fsfw_hal/linux/gpio/CMakeLists.txt similarity index 100% rename from hal/src/fsfw_hal/linux/gpio/CMakeLists.txt rename to src/fsfw_hal/linux/gpio/CMakeLists.txt diff --git a/hal/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.cpp b/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.cpp similarity index 100% rename from hal/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.cpp rename to src/fsfw_hal/linux/gpio/LinuxLibgpioIF.cpp diff --git a/hal/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h b/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h similarity index 100% rename from hal/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h rename to src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h diff --git a/hal/src/fsfw_hal/linux/i2c/CMakeLists.txt b/src/fsfw_hal/linux/i2c/CMakeLists.txt similarity index 100% rename from hal/src/fsfw_hal/linux/i2c/CMakeLists.txt rename to src/fsfw_hal/linux/i2c/CMakeLists.txt diff --git a/hal/src/fsfw_hal/linux/i2c/I2cComIF.cpp b/src/fsfw_hal/linux/i2c/I2cComIF.cpp similarity index 100% rename from hal/src/fsfw_hal/linux/i2c/I2cComIF.cpp rename to src/fsfw_hal/linux/i2c/I2cComIF.cpp diff --git a/hal/src/fsfw_hal/linux/i2c/I2cComIF.h b/src/fsfw_hal/linux/i2c/I2cComIF.h similarity index 100% rename from hal/src/fsfw_hal/linux/i2c/I2cComIF.h rename to src/fsfw_hal/linux/i2c/I2cComIF.h diff --git a/hal/src/fsfw_hal/linux/i2c/I2cCookie.cpp b/src/fsfw_hal/linux/i2c/I2cCookie.cpp similarity index 100% rename from hal/src/fsfw_hal/linux/i2c/I2cCookie.cpp rename to src/fsfw_hal/linux/i2c/I2cCookie.cpp diff --git a/hal/src/fsfw_hal/linux/i2c/I2cCookie.h b/src/fsfw_hal/linux/i2c/I2cCookie.h similarity index 100% rename from hal/src/fsfw_hal/linux/i2c/I2cCookie.h rename to src/fsfw_hal/linux/i2c/I2cCookie.h diff --git a/hal/src/fsfw_hal/linux/rpi/CMakeLists.txt b/src/fsfw_hal/linux/rpi/CMakeLists.txt similarity index 100% rename from hal/src/fsfw_hal/linux/rpi/CMakeLists.txt rename to src/fsfw_hal/linux/rpi/CMakeLists.txt diff --git a/hal/src/fsfw_hal/linux/rpi/GpioRPi.cpp b/src/fsfw_hal/linux/rpi/GpioRPi.cpp similarity index 100% rename from hal/src/fsfw_hal/linux/rpi/GpioRPi.cpp rename to src/fsfw_hal/linux/rpi/GpioRPi.cpp diff --git a/hal/src/fsfw_hal/linux/rpi/GpioRPi.h b/src/fsfw_hal/linux/rpi/GpioRPi.h similarity index 100% rename from hal/src/fsfw_hal/linux/rpi/GpioRPi.h rename to src/fsfw_hal/linux/rpi/GpioRPi.h diff --git a/hal/src/fsfw_hal/linux/spi/CMakeLists.txt b/src/fsfw_hal/linux/spi/CMakeLists.txt similarity index 100% rename from hal/src/fsfw_hal/linux/spi/CMakeLists.txt rename to src/fsfw_hal/linux/spi/CMakeLists.txt diff --git a/hal/src/fsfw_hal/linux/spi/SpiComIF.cpp b/src/fsfw_hal/linux/spi/SpiComIF.cpp similarity index 100% rename from hal/src/fsfw_hal/linux/spi/SpiComIF.cpp rename to src/fsfw_hal/linux/spi/SpiComIF.cpp diff --git a/hal/src/fsfw_hal/linux/spi/SpiComIF.h b/src/fsfw_hal/linux/spi/SpiComIF.h similarity index 100% rename from hal/src/fsfw_hal/linux/spi/SpiComIF.h rename to src/fsfw_hal/linux/spi/SpiComIF.h diff --git a/hal/src/fsfw_hal/linux/spi/SpiCookie.cpp b/src/fsfw_hal/linux/spi/SpiCookie.cpp similarity index 100% rename from hal/src/fsfw_hal/linux/spi/SpiCookie.cpp rename to src/fsfw_hal/linux/spi/SpiCookie.cpp diff --git a/hal/src/fsfw_hal/linux/spi/SpiCookie.h b/src/fsfw_hal/linux/spi/SpiCookie.h similarity index 100% rename from hal/src/fsfw_hal/linux/spi/SpiCookie.h rename to src/fsfw_hal/linux/spi/SpiCookie.h diff --git a/hal/src/fsfw_hal/linux/spi/spiDefinitions.h b/src/fsfw_hal/linux/spi/spiDefinitions.h similarity index 100% rename from hal/src/fsfw_hal/linux/spi/spiDefinitions.h rename to src/fsfw_hal/linux/spi/spiDefinitions.h diff --git a/hal/src/fsfw_hal/linux/uart/CMakeLists.txt b/src/fsfw_hal/linux/uart/CMakeLists.txt similarity index 100% rename from hal/src/fsfw_hal/linux/uart/CMakeLists.txt rename to src/fsfw_hal/linux/uart/CMakeLists.txt diff --git a/hal/src/fsfw_hal/linux/uart/UartComIF.cpp b/src/fsfw_hal/linux/uart/UartComIF.cpp similarity index 100% rename from hal/src/fsfw_hal/linux/uart/UartComIF.cpp rename to src/fsfw_hal/linux/uart/UartComIF.cpp diff --git a/hal/src/fsfw_hal/linux/uart/UartComIF.h b/src/fsfw_hal/linux/uart/UartComIF.h similarity index 100% rename from hal/src/fsfw_hal/linux/uart/UartComIF.h rename to src/fsfw_hal/linux/uart/UartComIF.h diff --git a/hal/src/fsfw_hal/linux/uart/UartCookie.cpp b/src/fsfw_hal/linux/uart/UartCookie.cpp similarity index 100% rename from hal/src/fsfw_hal/linux/uart/UartCookie.cpp rename to src/fsfw_hal/linux/uart/UartCookie.cpp diff --git a/hal/src/fsfw_hal/linux/uart/UartCookie.h b/src/fsfw_hal/linux/uart/UartCookie.h similarity index 100% rename from hal/src/fsfw_hal/linux/uart/UartCookie.h rename to src/fsfw_hal/linux/uart/UartCookie.h diff --git a/hal/src/fsfw_hal/linux/uio/CMakeLists.txt b/src/fsfw_hal/linux/uio/CMakeLists.txt similarity index 100% rename from hal/src/fsfw_hal/linux/uio/CMakeLists.txt rename to src/fsfw_hal/linux/uio/CMakeLists.txt diff --git a/hal/src/fsfw_hal/linux/uio/UioMapper.cpp b/src/fsfw_hal/linux/uio/UioMapper.cpp similarity index 100% rename from hal/src/fsfw_hal/linux/uio/UioMapper.cpp rename to src/fsfw_hal/linux/uio/UioMapper.cpp diff --git a/hal/src/fsfw_hal/linux/uio/UioMapper.h b/src/fsfw_hal/linux/uio/UioMapper.h similarity index 100% rename from hal/src/fsfw_hal/linux/uio/UioMapper.h rename to src/fsfw_hal/linux/uio/UioMapper.h diff --git a/hal/src/fsfw_hal/linux/utility.cpp b/src/fsfw_hal/linux/utility.cpp similarity index 100% rename from hal/src/fsfw_hal/linux/utility.cpp rename to src/fsfw_hal/linux/utility.cpp diff --git a/hal/src/fsfw_hal/linux/utility.h b/src/fsfw_hal/linux/utility.h similarity index 100% rename from hal/src/fsfw_hal/linux/utility.h rename to src/fsfw_hal/linux/utility.h diff --git a/hal/src/fsfw_hal/stm32h7/CMakeLists.txt b/src/fsfw_hal/stm32h7/CMakeLists.txt similarity index 100% rename from hal/src/fsfw_hal/stm32h7/CMakeLists.txt rename to src/fsfw_hal/stm32h7/CMakeLists.txt diff --git a/hal/src/fsfw_hal/stm32h7/definitions.h b/src/fsfw_hal/stm32h7/definitions.h similarity index 100% rename from hal/src/fsfw_hal/stm32h7/definitions.h rename to src/fsfw_hal/stm32h7/definitions.h diff --git a/hal/src/fsfw_hal/stm32h7/devicetest/CMakeLists.txt b/src/fsfw_hal/stm32h7/devicetest/CMakeLists.txt similarity index 100% rename from hal/src/fsfw_hal/stm32h7/devicetest/CMakeLists.txt rename to src/fsfw_hal/stm32h7/devicetest/CMakeLists.txt diff --git a/hal/src/fsfw_hal/stm32h7/devicetest/GyroL3GD20H.cpp b/src/fsfw_hal/stm32h7/devicetest/GyroL3GD20H.cpp similarity index 100% rename from hal/src/fsfw_hal/stm32h7/devicetest/GyroL3GD20H.cpp rename to src/fsfw_hal/stm32h7/devicetest/GyroL3GD20H.cpp diff --git a/hal/src/fsfw_hal/stm32h7/devicetest/GyroL3GD20H.h b/src/fsfw_hal/stm32h7/devicetest/GyroL3GD20H.h similarity index 100% rename from hal/src/fsfw_hal/stm32h7/devicetest/GyroL3GD20H.h rename to src/fsfw_hal/stm32h7/devicetest/GyroL3GD20H.h diff --git a/hal/src/fsfw_hal/stm32h7/dma.cpp b/src/fsfw_hal/stm32h7/dma.cpp similarity index 100% rename from hal/src/fsfw_hal/stm32h7/dma.cpp rename to src/fsfw_hal/stm32h7/dma.cpp diff --git a/hal/src/fsfw_hal/stm32h7/dma.h b/src/fsfw_hal/stm32h7/dma.h similarity index 100% rename from hal/src/fsfw_hal/stm32h7/dma.h rename to src/fsfw_hal/stm32h7/dma.h diff --git a/hal/src/fsfw_hal/stm32h7/gpio/CMakeLists.txt b/src/fsfw_hal/stm32h7/gpio/CMakeLists.txt similarity index 100% rename from hal/src/fsfw_hal/stm32h7/gpio/CMakeLists.txt rename to src/fsfw_hal/stm32h7/gpio/CMakeLists.txt diff --git a/hal/src/fsfw_hal/stm32h7/gpio/gpio.cpp b/src/fsfw_hal/stm32h7/gpio/gpio.cpp similarity index 100% rename from hal/src/fsfw_hal/stm32h7/gpio/gpio.cpp rename to src/fsfw_hal/stm32h7/gpio/gpio.cpp diff --git a/hal/src/fsfw_hal/stm32h7/gpio/gpio.h b/src/fsfw_hal/stm32h7/gpio/gpio.h similarity index 100% rename from hal/src/fsfw_hal/stm32h7/gpio/gpio.h rename to src/fsfw_hal/stm32h7/gpio/gpio.h diff --git a/hal/src/fsfw_hal/stm32h7/i2c/CMakeLists.txt b/src/fsfw_hal/stm32h7/i2c/CMakeLists.txt similarity index 100% rename from hal/src/fsfw_hal/stm32h7/i2c/CMakeLists.txt rename to src/fsfw_hal/stm32h7/i2c/CMakeLists.txt diff --git a/hal/src/fsfw_hal/stm32h7/interrupts.h b/src/fsfw_hal/stm32h7/interrupts.h similarity index 100% rename from hal/src/fsfw_hal/stm32h7/interrupts.h rename to src/fsfw_hal/stm32h7/interrupts.h diff --git a/hal/src/fsfw_hal/stm32h7/spi/CMakeLists.txt b/src/fsfw_hal/stm32h7/spi/CMakeLists.txt similarity index 100% rename from hal/src/fsfw_hal/stm32h7/spi/CMakeLists.txt rename to src/fsfw_hal/stm32h7/spi/CMakeLists.txt diff --git a/hal/src/fsfw_hal/stm32h7/spi/SpiComIF.cpp b/src/fsfw_hal/stm32h7/spi/SpiComIF.cpp similarity index 100% rename from hal/src/fsfw_hal/stm32h7/spi/SpiComIF.cpp rename to src/fsfw_hal/stm32h7/spi/SpiComIF.cpp diff --git a/hal/src/fsfw_hal/stm32h7/spi/SpiComIF.h b/src/fsfw_hal/stm32h7/spi/SpiComIF.h similarity index 100% rename from hal/src/fsfw_hal/stm32h7/spi/SpiComIF.h rename to src/fsfw_hal/stm32h7/spi/SpiComIF.h diff --git a/hal/src/fsfw_hal/stm32h7/spi/SpiCookie.cpp b/src/fsfw_hal/stm32h7/spi/SpiCookie.cpp similarity index 100% rename from hal/src/fsfw_hal/stm32h7/spi/SpiCookie.cpp rename to src/fsfw_hal/stm32h7/spi/SpiCookie.cpp diff --git a/hal/src/fsfw_hal/stm32h7/spi/SpiCookie.h b/src/fsfw_hal/stm32h7/spi/SpiCookie.h similarity index 100% rename from hal/src/fsfw_hal/stm32h7/spi/SpiCookie.h rename to src/fsfw_hal/stm32h7/spi/SpiCookie.h diff --git a/hal/src/fsfw_hal/stm32h7/spi/mspInit.cpp b/src/fsfw_hal/stm32h7/spi/mspInit.cpp similarity index 100% rename from hal/src/fsfw_hal/stm32h7/spi/mspInit.cpp rename to src/fsfw_hal/stm32h7/spi/mspInit.cpp diff --git a/hal/src/fsfw_hal/stm32h7/spi/mspInit.h b/src/fsfw_hal/stm32h7/spi/mspInit.h similarity index 100% rename from hal/src/fsfw_hal/stm32h7/spi/mspInit.h rename to src/fsfw_hal/stm32h7/spi/mspInit.h diff --git a/hal/src/fsfw_hal/stm32h7/spi/spiCore.cpp b/src/fsfw_hal/stm32h7/spi/spiCore.cpp similarity index 100% rename from hal/src/fsfw_hal/stm32h7/spi/spiCore.cpp rename to src/fsfw_hal/stm32h7/spi/spiCore.cpp diff --git a/hal/src/fsfw_hal/stm32h7/spi/spiCore.h b/src/fsfw_hal/stm32h7/spi/spiCore.h similarity index 100% rename from hal/src/fsfw_hal/stm32h7/spi/spiCore.h rename to src/fsfw_hal/stm32h7/spi/spiCore.h diff --git a/hal/src/fsfw_hal/stm32h7/spi/spiDefinitions.cpp b/src/fsfw_hal/stm32h7/spi/spiDefinitions.cpp similarity index 100% rename from hal/src/fsfw_hal/stm32h7/spi/spiDefinitions.cpp rename to src/fsfw_hal/stm32h7/spi/spiDefinitions.cpp diff --git a/hal/src/fsfw_hal/stm32h7/spi/spiDefinitions.h b/src/fsfw_hal/stm32h7/spi/spiDefinitions.h similarity index 100% rename from hal/src/fsfw_hal/stm32h7/spi/spiDefinitions.h rename to src/fsfw_hal/stm32h7/spi/spiDefinitions.h diff --git a/hal/src/fsfw_hal/stm32h7/spi/spiInterrupts.cpp b/src/fsfw_hal/stm32h7/spi/spiInterrupts.cpp similarity index 100% rename from hal/src/fsfw_hal/stm32h7/spi/spiInterrupts.cpp rename to src/fsfw_hal/stm32h7/spi/spiInterrupts.cpp diff --git a/hal/src/fsfw_hal/stm32h7/spi/spiInterrupts.h b/src/fsfw_hal/stm32h7/spi/spiInterrupts.h similarity index 100% rename from hal/src/fsfw_hal/stm32h7/spi/spiInterrupts.h rename to src/fsfw_hal/stm32h7/spi/spiInterrupts.h diff --git a/hal/src/fsfw_hal/stm32h7/spi/stm32h743zi.cpp b/src/fsfw_hal/stm32h7/spi/stm32h743zi.cpp similarity index 100% rename from hal/src/fsfw_hal/stm32h7/spi/stm32h743zi.cpp rename to src/fsfw_hal/stm32h7/spi/stm32h743zi.cpp diff --git a/hal/src/fsfw_hal/stm32h7/spi/stm32h743zi.h b/src/fsfw_hal/stm32h7/spi/stm32h743zi.h similarity index 100% rename from hal/src/fsfw_hal/stm32h7/spi/stm32h743zi.h rename to src/fsfw_hal/stm32h7/spi/stm32h743zi.h diff --git a/hal/src/fsfw_hal/stm32h7/uart/CMakeLists.txt b/src/fsfw_hal/stm32h7/uart/CMakeLists.txt similarity index 100% rename from hal/src/fsfw_hal/stm32h7/uart/CMakeLists.txt rename to src/fsfw_hal/stm32h7/uart/CMakeLists.txt diff --git a/tests/src/fsfw_tests/CMakeLists.txt b/src/fsfw_tests/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/CMakeLists.txt rename to src/fsfw_tests/CMakeLists.txt diff --git a/tests/src/fsfw_tests/integration/CMakeLists.txt b/src/fsfw_tests/integration/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/integration/CMakeLists.txt rename to src/fsfw_tests/integration/CMakeLists.txt diff --git a/tests/src/fsfw_tests/integration/assemblies/CMakeLists.txt b/src/fsfw_tests/integration/assemblies/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/integration/assemblies/CMakeLists.txt rename to src/fsfw_tests/integration/assemblies/CMakeLists.txt diff --git a/tests/src/fsfw_tests/integration/assemblies/TestAssembly.cpp b/src/fsfw_tests/integration/assemblies/TestAssembly.cpp similarity index 100% rename from tests/src/fsfw_tests/integration/assemblies/TestAssembly.cpp rename to src/fsfw_tests/integration/assemblies/TestAssembly.cpp diff --git a/tests/src/fsfw_tests/integration/assemblies/TestAssembly.h b/src/fsfw_tests/integration/assemblies/TestAssembly.h similarity index 100% rename from tests/src/fsfw_tests/integration/assemblies/TestAssembly.h rename to src/fsfw_tests/integration/assemblies/TestAssembly.h diff --git a/tests/src/fsfw_tests/integration/controller/CMakeLists.txt b/src/fsfw_tests/integration/controller/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/integration/controller/CMakeLists.txt rename to src/fsfw_tests/integration/controller/CMakeLists.txt diff --git a/tests/src/fsfw_tests/integration/controller/TestController.cpp b/src/fsfw_tests/integration/controller/TestController.cpp similarity index 100% rename from tests/src/fsfw_tests/integration/controller/TestController.cpp rename to src/fsfw_tests/integration/controller/TestController.cpp diff --git a/tests/src/fsfw_tests/integration/controller/TestController.h b/src/fsfw_tests/integration/controller/TestController.h similarity index 100% rename from tests/src/fsfw_tests/integration/controller/TestController.h rename to src/fsfw_tests/integration/controller/TestController.h diff --git a/tests/src/fsfw_tests/integration/controller/ctrldefinitions/testCtrlDefinitions.h b/src/fsfw_tests/integration/controller/ctrldefinitions/testCtrlDefinitions.h similarity index 100% rename from tests/src/fsfw_tests/integration/controller/ctrldefinitions/testCtrlDefinitions.h rename to src/fsfw_tests/integration/controller/ctrldefinitions/testCtrlDefinitions.h diff --git a/tests/src/fsfw_tests/integration/devices/CMakeLists.txt b/src/fsfw_tests/integration/devices/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/integration/devices/CMakeLists.txt rename to src/fsfw_tests/integration/devices/CMakeLists.txt diff --git a/tests/src/fsfw_tests/integration/devices/TestCookie.cpp b/src/fsfw_tests/integration/devices/TestCookie.cpp similarity index 100% rename from tests/src/fsfw_tests/integration/devices/TestCookie.cpp rename to src/fsfw_tests/integration/devices/TestCookie.cpp diff --git a/tests/src/fsfw_tests/integration/devices/TestCookie.h b/src/fsfw_tests/integration/devices/TestCookie.h similarity index 100% rename from tests/src/fsfw_tests/integration/devices/TestCookie.h rename to src/fsfw_tests/integration/devices/TestCookie.h diff --git a/tests/src/fsfw_tests/integration/devices/TestDeviceHandler.cpp b/src/fsfw_tests/integration/devices/TestDeviceHandler.cpp similarity index 100% rename from tests/src/fsfw_tests/integration/devices/TestDeviceHandler.cpp rename to src/fsfw_tests/integration/devices/TestDeviceHandler.cpp diff --git a/tests/src/fsfw_tests/integration/devices/TestDeviceHandler.h b/src/fsfw_tests/integration/devices/TestDeviceHandler.h similarity index 100% rename from tests/src/fsfw_tests/integration/devices/TestDeviceHandler.h rename to src/fsfw_tests/integration/devices/TestDeviceHandler.h diff --git a/tests/src/fsfw_tests/integration/devices/TestEchoComIF.cpp b/src/fsfw_tests/integration/devices/TestEchoComIF.cpp similarity index 100% rename from tests/src/fsfw_tests/integration/devices/TestEchoComIF.cpp rename to src/fsfw_tests/integration/devices/TestEchoComIF.cpp diff --git a/tests/src/fsfw_tests/integration/devices/TestEchoComIF.h b/src/fsfw_tests/integration/devices/TestEchoComIF.h similarity index 100% rename from tests/src/fsfw_tests/integration/devices/TestEchoComIF.h rename to src/fsfw_tests/integration/devices/TestEchoComIF.h diff --git a/tests/src/fsfw_tests/integration/devices/devicedefinitions/testDeviceDefinitions.h b/src/fsfw_tests/integration/devices/devicedefinitions/testDeviceDefinitions.h similarity index 100% rename from tests/src/fsfw_tests/integration/devices/devicedefinitions/testDeviceDefinitions.h rename to src/fsfw_tests/integration/devices/devicedefinitions/testDeviceDefinitions.h diff --git a/tests/src/fsfw_tests/integration/task/CMakeLists.txt b/src/fsfw_tests/integration/task/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/integration/task/CMakeLists.txt rename to src/fsfw_tests/integration/task/CMakeLists.txt diff --git a/tests/src/fsfw_tests/integration/task/TestTask.cpp b/src/fsfw_tests/integration/task/TestTask.cpp similarity index 100% rename from tests/src/fsfw_tests/integration/task/TestTask.cpp rename to src/fsfw_tests/integration/task/TestTask.cpp diff --git a/tests/src/fsfw_tests/integration/task/TestTask.h b/src/fsfw_tests/integration/task/TestTask.h similarity index 100% rename from tests/src/fsfw_tests/integration/task/TestTask.h rename to src/fsfw_tests/integration/task/TestTask.h diff --git a/tests/src/fsfw_tests/internal/CMakeLists.txt b/src/fsfw_tests/internal/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/internal/CMakeLists.txt rename to src/fsfw_tests/internal/CMakeLists.txt diff --git a/tests/src/fsfw_tests/internal/InternalUnitTester.cpp b/src/fsfw_tests/internal/InternalUnitTester.cpp similarity index 100% rename from tests/src/fsfw_tests/internal/InternalUnitTester.cpp rename to src/fsfw_tests/internal/InternalUnitTester.cpp diff --git a/tests/src/fsfw_tests/internal/InternalUnitTester.h b/src/fsfw_tests/internal/InternalUnitTester.h similarity index 100% rename from tests/src/fsfw_tests/internal/InternalUnitTester.h rename to src/fsfw_tests/internal/InternalUnitTester.h diff --git a/tests/src/fsfw_tests/internal/UnittDefinitions.cpp b/src/fsfw_tests/internal/UnittDefinitions.cpp similarity index 100% rename from tests/src/fsfw_tests/internal/UnittDefinitions.cpp rename to src/fsfw_tests/internal/UnittDefinitions.cpp diff --git a/tests/src/fsfw_tests/internal/UnittDefinitions.h b/src/fsfw_tests/internal/UnittDefinitions.h similarity index 100% rename from tests/src/fsfw_tests/internal/UnittDefinitions.h rename to src/fsfw_tests/internal/UnittDefinitions.h diff --git a/tests/src/fsfw_tests/internal/globalfunctions/CMakeLists.txt b/src/fsfw_tests/internal/globalfunctions/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/internal/globalfunctions/CMakeLists.txt rename to src/fsfw_tests/internal/globalfunctions/CMakeLists.txt diff --git a/tests/src/fsfw_tests/internal/globalfunctions/TestArrayPrinter.cpp b/src/fsfw_tests/internal/globalfunctions/TestArrayPrinter.cpp similarity index 100% rename from tests/src/fsfw_tests/internal/globalfunctions/TestArrayPrinter.cpp rename to src/fsfw_tests/internal/globalfunctions/TestArrayPrinter.cpp diff --git a/tests/src/fsfw_tests/internal/globalfunctions/TestArrayPrinter.h b/src/fsfw_tests/internal/globalfunctions/TestArrayPrinter.h similarity index 100% rename from tests/src/fsfw_tests/internal/globalfunctions/TestArrayPrinter.h rename to src/fsfw_tests/internal/globalfunctions/TestArrayPrinter.h diff --git a/tests/src/fsfw_tests/internal/osal/CMakeLists.txt b/src/fsfw_tests/internal/osal/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/internal/osal/CMakeLists.txt rename to src/fsfw_tests/internal/osal/CMakeLists.txt diff --git a/tests/src/fsfw_tests/internal/osal/testMq.cpp b/src/fsfw_tests/internal/osal/testMq.cpp similarity index 100% rename from tests/src/fsfw_tests/internal/osal/testMq.cpp rename to src/fsfw_tests/internal/osal/testMq.cpp diff --git a/tests/src/fsfw_tests/internal/osal/testMq.h b/src/fsfw_tests/internal/osal/testMq.h similarity index 100% rename from tests/src/fsfw_tests/internal/osal/testMq.h rename to src/fsfw_tests/internal/osal/testMq.h diff --git a/tests/src/fsfw_tests/internal/osal/testMutex.cpp b/src/fsfw_tests/internal/osal/testMutex.cpp similarity index 100% rename from tests/src/fsfw_tests/internal/osal/testMutex.cpp rename to src/fsfw_tests/internal/osal/testMutex.cpp diff --git a/tests/src/fsfw_tests/internal/osal/testMutex.h b/src/fsfw_tests/internal/osal/testMutex.h similarity index 100% rename from tests/src/fsfw_tests/internal/osal/testMutex.h rename to src/fsfw_tests/internal/osal/testMutex.h diff --git a/tests/src/fsfw_tests/internal/osal/testSemaphore.cpp b/src/fsfw_tests/internal/osal/testSemaphore.cpp similarity index 100% rename from tests/src/fsfw_tests/internal/osal/testSemaphore.cpp rename to src/fsfw_tests/internal/osal/testSemaphore.cpp diff --git a/tests/src/fsfw_tests/internal/osal/testSemaphore.h b/src/fsfw_tests/internal/osal/testSemaphore.h similarity index 100% rename from tests/src/fsfw_tests/internal/osal/testSemaphore.h rename to src/fsfw_tests/internal/osal/testSemaphore.h diff --git a/tests/src/fsfw_tests/internal/serialize/CMakeLists.txt b/src/fsfw_tests/internal/serialize/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/internal/serialize/CMakeLists.txt rename to src/fsfw_tests/internal/serialize/CMakeLists.txt diff --git a/tests/src/fsfw_tests/internal/serialize/IntTestSerialization.cpp b/src/fsfw_tests/internal/serialize/IntTestSerialization.cpp similarity index 100% rename from tests/src/fsfw_tests/internal/serialize/IntTestSerialization.cpp rename to src/fsfw_tests/internal/serialize/IntTestSerialization.cpp diff --git a/tests/src/fsfw_tests/internal/serialize/IntTestSerialization.h b/src/fsfw_tests/internal/serialize/IntTestSerialization.h similarity index 100% rename from tests/src/fsfw_tests/internal/serialize/IntTestSerialization.h rename to src/fsfw_tests/internal/serialize/IntTestSerialization.h diff --git a/tests/src/fsfw_tests/unit/CMakeLists.txt b/src/fsfw_tests/unit/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/unit/CMakeLists.txt rename to src/fsfw_tests/unit/CMakeLists.txt diff --git a/tests/src/fsfw_tests/unit/CatchDefinitions.cpp b/src/fsfw_tests/unit/CatchDefinitions.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/CatchDefinitions.cpp rename to src/fsfw_tests/unit/CatchDefinitions.cpp diff --git a/tests/src/fsfw_tests/unit/CatchDefinitions.h b/src/fsfw_tests/unit/CatchDefinitions.h similarity index 100% rename from tests/src/fsfw_tests/unit/CatchDefinitions.h rename to src/fsfw_tests/unit/CatchDefinitions.h diff --git a/tests/src/fsfw_tests/unit/CatchFactory.cpp b/src/fsfw_tests/unit/CatchFactory.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/CatchFactory.cpp rename to src/fsfw_tests/unit/CatchFactory.cpp diff --git a/tests/src/fsfw_tests/unit/CatchFactory.h b/src/fsfw_tests/unit/CatchFactory.h similarity index 100% rename from tests/src/fsfw_tests/unit/CatchFactory.h rename to src/fsfw_tests/unit/CatchFactory.h diff --git a/tests/src/fsfw_tests/unit/CatchRunner.cpp b/src/fsfw_tests/unit/CatchRunner.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/CatchRunner.cpp rename to src/fsfw_tests/unit/CatchRunner.cpp diff --git a/tests/src/fsfw_tests/unit/CatchRunner.h b/src/fsfw_tests/unit/CatchRunner.h similarity index 100% rename from tests/src/fsfw_tests/unit/CatchRunner.h rename to src/fsfw_tests/unit/CatchRunner.h diff --git a/tests/src/fsfw_tests/unit/CatchSetup.cpp b/src/fsfw_tests/unit/CatchSetup.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/CatchSetup.cpp rename to src/fsfw_tests/unit/CatchSetup.cpp diff --git a/tests/src/fsfw_tests/unit/action/CMakeLists.txt b/src/fsfw_tests/unit/action/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/unit/action/CMakeLists.txt rename to src/fsfw_tests/unit/action/CMakeLists.txt diff --git a/tests/src/fsfw_tests/unit/action/TestActionHelper.cpp b/src/fsfw_tests/unit/action/TestActionHelper.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/action/TestActionHelper.cpp rename to src/fsfw_tests/unit/action/TestActionHelper.cpp diff --git a/tests/src/fsfw_tests/unit/action/TestActionHelper.h b/src/fsfw_tests/unit/action/TestActionHelper.h similarity index 100% rename from tests/src/fsfw_tests/unit/action/TestActionHelper.h rename to src/fsfw_tests/unit/action/TestActionHelper.h diff --git a/tests/src/fsfw_tests/unit/cfdp/CMakeLists.txt b/src/fsfw_tests/unit/cfdp/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/unit/cfdp/CMakeLists.txt rename to src/fsfw_tests/unit/cfdp/CMakeLists.txt diff --git a/tests/src/fsfw_tests/unit/cfdp/testAckPdu.cpp b/src/fsfw_tests/unit/cfdp/testAckPdu.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/cfdp/testAckPdu.cpp rename to src/fsfw_tests/unit/cfdp/testAckPdu.cpp diff --git a/tests/src/fsfw_tests/unit/cfdp/testCfdp.cpp b/src/fsfw_tests/unit/cfdp/testCfdp.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/cfdp/testCfdp.cpp rename to src/fsfw_tests/unit/cfdp/testCfdp.cpp diff --git a/tests/src/fsfw_tests/unit/cfdp/testEofPdu.cpp b/src/fsfw_tests/unit/cfdp/testEofPdu.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/cfdp/testEofPdu.cpp rename to src/fsfw_tests/unit/cfdp/testEofPdu.cpp diff --git a/tests/src/fsfw_tests/unit/cfdp/testFileData.cpp b/src/fsfw_tests/unit/cfdp/testFileData.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/cfdp/testFileData.cpp rename to src/fsfw_tests/unit/cfdp/testFileData.cpp diff --git a/tests/src/fsfw_tests/unit/cfdp/testFinishedPdu.cpp b/src/fsfw_tests/unit/cfdp/testFinishedPdu.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/cfdp/testFinishedPdu.cpp rename to src/fsfw_tests/unit/cfdp/testFinishedPdu.cpp diff --git a/tests/src/fsfw_tests/unit/cfdp/testKeepAlivePdu.cpp b/src/fsfw_tests/unit/cfdp/testKeepAlivePdu.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/cfdp/testKeepAlivePdu.cpp rename to src/fsfw_tests/unit/cfdp/testKeepAlivePdu.cpp diff --git a/tests/src/fsfw_tests/unit/cfdp/testMetadataPdu.cpp b/src/fsfw_tests/unit/cfdp/testMetadataPdu.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/cfdp/testMetadataPdu.cpp rename to src/fsfw_tests/unit/cfdp/testMetadataPdu.cpp diff --git a/tests/src/fsfw_tests/unit/cfdp/testNakPdu.cpp b/src/fsfw_tests/unit/cfdp/testNakPdu.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/cfdp/testNakPdu.cpp rename to src/fsfw_tests/unit/cfdp/testNakPdu.cpp diff --git a/tests/src/fsfw_tests/unit/cfdp/testPromptPdu.cpp b/src/fsfw_tests/unit/cfdp/testPromptPdu.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/cfdp/testPromptPdu.cpp rename to src/fsfw_tests/unit/cfdp/testPromptPdu.cpp diff --git a/tests/src/fsfw_tests/unit/cfdp/testTlvsLvs.cpp b/src/fsfw_tests/unit/cfdp/testTlvsLvs.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/cfdp/testTlvsLvs.cpp rename to src/fsfw_tests/unit/cfdp/testTlvsLvs.cpp diff --git a/tests/src/fsfw_tests/unit/container/CMakeLists.txt b/src/fsfw_tests/unit/container/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/unit/container/CMakeLists.txt rename to src/fsfw_tests/unit/container/CMakeLists.txt diff --git a/tests/src/fsfw_tests/unit/container/RingBufferTest.cpp b/src/fsfw_tests/unit/container/RingBufferTest.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/container/RingBufferTest.cpp rename to src/fsfw_tests/unit/container/RingBufferTest.cpp diff --git a/tests/src/fsfw_tests/unit/container/TestArrayList.cpp b/src/fsfw_tests/unit/container/TestArrayList.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/container/TestArrayList.cpp rename to src/fsfw_tests/unit/container/TestArrayList.cpp diff --git a/tests/src/fsfw_tests/unit/container/TestDynamicFifo.cpp b/src/fsfw_tests/unit/container/TestDynamicFifo.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/container/TestDynamicFifo.cpp rename to src/fsfw_tests/unit/container/TestDynamicFifo.cpp diff --git a/tests/src/fsfw_tests/unit/container/TestFifo.cpp b/src/fsfw_tests/unit/container/TestFifo.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/container/TestFifo.cpp rename to src/fsfw_tests/unit/container/TestFifo.cpp diff --git a/tests/src/fsfw_tests/unit/container/TestFixedArrayList.cpp b/src/fsfw_tests/unit/container/TestFixedArrayList.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/container/TestFixedArrayList.cpp rename to src/fsfw_tests/unit/container/TestFixedArrayList.cpp diff --git a/tests/src/fsfw_tests/unit/container/TestFixedMap.cpp b/src/fsfw_tests/unit/container/TestFixedMap.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/container/TestFixedMap.cpp rename to src/fsfw_tests/unit/container/TestFixedMap.cpp diff --git a/tests/src/fsfw_tests/unit/container/TestFixedOrderedMultimap.cpp b/src/fsfw_tests/unit/container/TestFixedOrderedMultimap.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/container/TestFixedOrderedMultimap.cpp rename to src/fsfw_tests/unit/container/TestFixedOrderedMultimap.cpp diff --git a/tests/src/fsfw_tests/unit/container/TestPlacementFactory.cpp b/src/fsfw_tests/unit/container/TestPlacementFactory.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/container/TestPlacementFactory.cpp rename to src/fsfw_tests/unit/container/TestPlacementFactory.cpp diff --git a/tests/src/fsfw_tests/unit/datapoollocal/CMakeLists.txt b/src/fsfw_tests/unit/datapoollocal/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/unit/datapoollocal/CMakeLists.txt rename to src/fsfw_tests/unit/datapoollocal/CMakeLists.txt diff --git a/tests/src/fsfw_tests/unit/datapoollocal/DataSetTest.cpp b/src/fsfw_tests/unit/datapoollocal/DataSetTest.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/datapoollocal/DataSetTest.cpp rename to src/fsfw_tests/unit/datapoollocal/DataSetTest.cpp diff --git a/tests/src/fsfw_tests/unit/datapoollocal/LocalPoolManagerTest.cpp b/src/fsfw_tests/unit/datapoollocal/LocalPoolManagerTest.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/datapoollocal/LocalPoolManagerTest.cpp rename to src/fsfw_tests/unit/datapoollocal/LocalPoolManagerTest.cpp diff --git a/tests/src/fsfw_tests/unit/datapoollocal/LocalPoolOwnerBase.cpp b/src/fsfw_tests/unit/datapoollocal/LocalPoolOwnerBase.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/datapoollocal/LocalPoolOwnerBase.cpp rename to src/fsfw_tests/unit/datapoollocal/LocalPoolOwnerBase.cpp diff --git a/tests/src/fsfw_tests/unit/datapoollocal/LocalPoolOwnerBase.h b/src/fsfw_tests/unit/datapoollocal/LocalPoolOwnerBase.h similarity index 100% rename from tests/src/fsfw_tests/unit/datapoollocal/LocalPoolOwnerBase.h rename to src/fsfw_tests/unit/datapoollocal/LocalPoolOwnerBase.h diff --git a/tests/src/fsfw_tests/unit/datapoollocal/LocalPoolVariableTest.cpp b/src/fsfw_tests/unit/datapoollocal/LocalPoolVariableTest.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/datapoollocal/LocalPoolVariableTest.cpp rename to src/fsfw_tests/unit/datapoollocal/LocalPoolVariableTest.cpp diff --git a/tests/src/fsfw_tests/unit/datapoollocal/LocalPoolVectorTest.cpp b/src/fsfw_tests/unit/datapoollocal/LocalPoolVectorTest.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/datapoollocal/LocalPoolVectorTest.cpp rename to src/fsfw_tests/unit/datapoollocal/LocalPoolVectorTest.cpp diff --git a/tests/src/fsfw_tests/unit/devicehandler/CMakeLists.txt b/src/fsfw_tests/unit/devicehandler/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/unit/devicehandler/CMakeLists.txt rename to src/fsfw_tests/unit/devicehandler/CMakeLists.txt diff --git a/tests/src/fsfw_tests/unit/devicehandler/ComIFMock.cpp b/src/fsfw_tests/unit/devicehandler/ComIFMock.cpp similarity index 96% rename from tests/src/fsfw_tests/unit/devicehandler/ComIFMock.cpp rename to src/fsfw_tests/unit/devicehandler/ComIFMock.cpp index 4d985f94..650b74bd 100644 --- a/tests/src/fsfw_tests/unit/devicehandler/ComIFMock.cpp +++ b/src/fsfw_tests/unit/devicehandler/ComIFMock.cpp @@ -1,46 +1,46 @@ -#include "ComIFMock.h" - -#include "DeviceHandlerMock.h" - -ComIFMock::ComIFMock(object_id_t objectId) : SystemObject(objectId) {} - -ComIFMock::~ComIFMock() {} - -ReturnValue_t ComIFMock::initializeInterface(CookieIF *cookie) { return RETURN_OK; } - -ReturnValue_t ComIFMock::sendMessage(CookieIF *cookie, const uint8_t *sendData, size_t sendLen) { - data = *sendData; - return RETURN_OK; -} - -ReturnValue_t ComIFMock::getSendSuccess(CookieIF *cookie) { return RETURN_OK; } - -ReturnValue_t ComIFMock::requestReceiveMessage(CookieIF *cookie, size_t requestLen) { - return RETURN_OK; -} - -ReturnValue_t ComIFMock::readReceivedMessage(CookieIF *cookie, uint8_t **buffer, size_t *size) { - switch (testCase) { - case TestCase::MISSED_REPLY: { - *size = 0; - return RETURN_OK; - } - case TestCase::SIMPLE_COMMAND_NOMINAL: { - *size = 1; - data = DeviceHandlerMock::SIMPLE_COMMAND_DATA; - *buffer = &data; - break; - } - case TestCase::PERIODIC_REPLY_NOMINAL: { - *size = 1; - data = DeviceHandlerMock::PERIODIC_REPLY_DATA; - *buffer = &data; - break; - } - default: - break; - } - return RETURN_OK; -} - -void ComIFMock::setTestCase(TestCase testCase_) { testCase = testCase_; } +#include "ComIFMock.h" + +#include "DeviceHandlerMock.h" + +ComIFMock::ComIFMock(object_id_t objectId) : SystemObject(objectId) {} + +ComIFMock::~ComIFMock() {} + +ReturnValue_t ComIFMock::initializeInterface(CookieIF *cookie) { return RETURN_OK; } + +ReturnValue_t ComIFMock::sendMessage(CookieIF *cookie, const uint8_t *sendData, size_t sendLen) { + data = *sendData; + return RETURN_OK; +} + +ReturnValue_t ComIFMock::getSendSuccess(CookieIF *cookie) { return RETURN_OK; } + +ReturnValue_t ComIFMock::requestReceiveMessage(CookieIF *cookie, size_t requestLen) { + return RETURN_OK; +} + +ReturnValue_t ComIFMock::readReceivedMessage(CookieIF *cookie, uint8_t **buffer, size_t *size) { + switch (testCase) { + case TestCase::MISSED_REPLY: { + *size = 0; + return RETURN_OK; + } + case TestCase::SIMPLE_COMMAND_NOMINAL: { + *size = 1; + data = DeviceHandlerMock::SIMPLE_COMMAND_DATA; + *buffer = &data; + break; + } + case TestCase::PERIODIC_REPLY_NOMINAL: { + *size = 1; + data = DeviceHandlerMock::PERIODIC_REPLY_DATA; + *buffer = &data; + break; + } + default: + break; + } + return RETURN_OK; +} + +void ComIFMock::setTestCase(TestCase testCase_) { testCase = testCase_; } diff --git a/tests/src/fsfw_tests/unit/devicehandler/ComIFMock.h b/src/fsfw_tests/unit/devicehandler/ComIFMock.h similarity index 97% rename from tests/src/fsfw_tests/unit/devicehandler/ComIFMock.h rename to src/fsfw_tests/unit/devicehandler/ComIFMock.h index 1463deb6..d16cc0a6 100644 --- a/tests/src/fsfw_tests/unit/devicehandler/ComIFMock.h +++ b/src/fsfw_tests/unit/devicehandler/ComIFMock.h @@ -1,37 +1,37 @@ -#ifndef TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_COMIFMOCK_H_ -#define TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_COMIFMOCK_H_ - -#include -#include - -/** - * @brief The ComIFMock supports the simulation of various device communication error cases - * like incomplete or wrong replies and can be used to test the - * DeviceHandlerBase. - */ -class ComIFMock : public DeviceCommunicationIF, public SystemObject { - public: - enum class TestCase { SIMPLE_COMMAND_NOMINAL, PERIODIC_REPLY_NOMINAL, MISSED_REPLY }; - - ComIFMock(object_id_t objectId); - virtual ~ComIFMock(); - - virtual ReturnValue_t initializeInterface(CookieIF *cookie) override; - virtual ReturnValue_t sendMessage(CookieIF *cookie, const uint8_t *sendData, - size_t sendLen) override; - virtual ReturnValue_t getSendSuccess(CookieIF *cookie) override; - virtual ReturnValue_t requestReceiveMessage(CookieIF *cookie, size_t requestLen) override; - virtual ReturnValue_t readReceivedMessage(CookieIF *cookie, uint8_t **buffer, - size_t *size) override; - void setTestCase(TestCase testCase_); - - private: - TestCase testCase = TestCase::SIMPLE_COMMAND_NOMINAL; - - static const uint8_t SIMPLE_COMMAND_DATA = 1; - static const uint8_t PERIODIC_REPLY_DATA = 2; - - uint8_t data = 0; -}; - -#endif /* TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_COMIFMOCK_H_ */ +#ifndef TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_COMIFMOCK_H_ +#define TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_COMIFMOCK_H_ + +#include +#include + +/** + * @brief The ComIFMock supports the simulation of various device communication error cases + * like incomplete or wrong replies and can be used to test the + * DeviceHandlerBase. + */ +class ComIFMock : public DeviceCommunicationIF, public SystemObject { + public: + enum class TestCase { SIMPLE_COMMAND_NOMINAL, PERIODIC_REPLY_NOMINAL, MISSED_REPLY }; + + ComIFMock(object_id_t objectId); + virtual ~ComIFMock(); + + virtual ReturnValue_t initializeInterface(CookieIF *cookie) override; + virtual ReturnValue_t sendMessage(CookieIF *cookie, const uint8_t *sendData, + size_t sendLen) override; + virtual ReturnValue_t getSendSuccess(CookieIF *cookie) override; + virtual ReturnValue_t requestReceiveMessage(CookieIF *cookie, size_t requestLen) override; + virtual ReturnValue_t readReceivedMessage(CookieIF *cookie, uint8_t **buffer, + size_t *size) override; + void setTestCase(TestCase testCase_); + + private: + TestCase testCase = TestCase::SIMPLE_COMMAND_NOMINAL; + + static const uint8_t SIMPLE_COMMAND_DATA = 1; + static const uint8_t PERIODIC_REPLY_DATA = 2; + + uint8_t data = 0; +}; + +#endif /* TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_COMIFMOCK_H_ */ diff --git a/tests/src/fsfw_tests/unit/devicehandler/CookieIFMock.cpp b/src/fsfw_tests/unit/devicehandler/CookieIFMock.cpp similarity index 94% rename from tests/src/fsfw_tests/unit/devicehandler/CookieIFMock.cpp rename to src/fsfw_tests/unit/devicehandler/CookieIFMock.cpp index e9b03a6c..1ae2eb6e 100644 --- a/tests/src/fsfw_tests/unit/devicehandler/CookieIFMock.cpp +++ b/src/fsfw_tests/unit/devicehandler/CookieIFMock.cpp @@ -1,5 +1,5 @@ -#include "CookieIFMock.h" - -CookieIFMock::CookieIFMock() {} - -CookieIFMock::~CookieIFMock() {} +#include "CookieIFMock.h" + +CookieIFMock::CookieIFMock() {} + +CookieIFMock::~CookieIFMock() {} diff --git a/tests/src/fsfw_tests/unit/devicehandler/CookieIFMock.h b/src/fsfw_tests/unit/devicehandler/CookieIFMock.h similarity index 96% rename from tests/src/fsfw_tests/unit/devicehandler/CookieIFMock.h rename to src/fsfw_tests/unit/devicehandler/CookieIFMock.h index 5c868932..1243b0a7 100644 --- a/tests/src/fsfw_tests/unit/devicehandler/CookieIFMock.h +++ b/src/fsfw_tests/unit/devicehandler/CookieIFMock.h @@ -1,12 +1,12 @@ -#ifndef TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_COOKIEIFMOCK_H_ -#define TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_COOKIEIFMOCK_H_ - -#include "fsfw/devicehandlers/CookieIF.h" - -class CookieIFMock : public CookieIF { - public: - CookieIFMock(); - virtual ~CookieIFMock(); -}; - -#endif /* TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_COOKIEIFMOCK_H_ */ +#ifndef TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_COOKIEIFMOCK_H_ +#define TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_COOKIEIFMOCK_H_ + +#include "fsfw/devicehandlers/CookieIF.h" + +class CookieIFMock : public CookieIF { + public: + CookieIFMock(); + virtual ~CookieIFMock(); +}; + +#endif /* TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_COOKIEIFMOCK_H_ */ diff --git a/tests/src/fsfw_tests/unit/devicehandler/DeviceFdirMock.cpp b/src/fsfw_tests/unit/devicehandler/DeviceFdirMock.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/devicehandler/DeviceFdirMock.cpp rename to src/fsfw_tests/unit/devicehandler/DeviceFdirMock.cpp diff --git a/tests/src/fsfw_tests/unit/devicehandler/DeviceFdirMock.h b/src/fsfw_tests/unit/devicehandler/DeviceFdirMock.h similarity index 100% rename from tests/src/fsfw_tests/unit/devicehandler/DeviceFdirMock.h rename to src/fsfw_tests/unit/devicehandler/DeviceFdirMock.h diff --git a/tests/src/fsfw_tests/unit/devicehandler/DeviceHandlerCommander.cpp b/src/fsfw_tests/unit/devicehandler/DeviceHandlerCommander.cpp similarity index 97% rename from tests/src/fsfw_tests/unit/devicehandler/DeviceHandlerCommander.cpp rename to src/fsfw_tests/unit/devicehandler/DeviceHandlerCommander.cpp index 4540a388..d38166ad 100644 --- a/tests/src/fsfw_tests/unit/devicehandler/DeviceHandlerCommander.cpp +++ b/src/fsfw_tests/unit/devicehandler/DeviceHandlerCommander.cpp @@ -1,64 +1,64 @@ -#include "DeviceHandlerCommander.h" - -#include - -DeviceHandlerCommander::DeviceHandlerCommander(object_id_t objectId) - : SystemObject(objectId), commandActionHelper(this) { - auto mqArgs = MqArgs(this->getObjectId()); - commandQueue = QueueFactory::instance()->createMessageQueue( - QUEUE_SIZE, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs); -} - -DeviceHandlerCommander::~DeviceHandlerCommander() {} - -ReturnValue_t DeviceHandlerCommander::performOperation(uint8_t operationCode) { - readCommandQueue(); - return RETURN_OK; -} - -ReturnValue_t DeviceHandlerCommander::initialize() { - ReturnValue_t result = commandActionHelper.initialize(); - if (result != HasReturnvaluesIF::RETURN_OK) { - return result; - } - return HasReturnvaluesIF::RETURN_OK; -} - -MessageQueueIF* DeviceHandlerCommander::getCommandQueuePtr() { return commandQueue; } - -void DeviceHandlerCommander::stepSuccessfulReceived(ActionId_t actionId, uint8_t step) {} - -void DeviceHandlerCommander::stepFailedReceived(ActionId_t actionId, uint8_t step, - ReturnValue_t returnCode) {} - -void DeviceHandlerCommander::dataReceived(ActionId_t actionId, const uint8_t* data, uint32_t size) { -} - -void DeviceHandlerCommander::completionSuccessfulReceived(ActionId_t actionId) { - lastReplyReturnCode = RETURN_OK; -} - -void DeviceHandlerCommander::completionFailedReceived(ActionId_t actionId, - ReturnValue_t returnCode) { - lastReplyReturnCode = returnCode; -} - -void DeviceHandlerCommander::readCommandQueue() { - CommandMessage message; - ReturnValue_t result = HasReturnvaluesIF::RETURN_OK; - for (result = commandQueue->receiveMessage(&message); result == HasReturnvaluesIF::RETURN_OK; - result = commandQueue->receiveMessage(&message)) { - result = commandActionHelper.handleReply(&message); - if (result == HasReturnvaluesIF::RETURN_OK) { - continue; - } - } -} - -ReturnValue_t DeviceHandlerCommander::sendCommand(object_id_t target, ActionId_t actionId) { - return commandActionHelper.commandAction(target, actionId, nullptr, 0); -} - -ReturnValue_t DeviceHandlerCommander::getReplyReturnCode() { return lastReplyReturnCode; } - -void DeviceHandlerCommander::resetReplyReturnCode() { lastReplyReturnCode = RETURN_FAILED; } +#include "DeviceHandlerCommander.h" + +#include + +DeviceHandlerCommander::DeviceHandlerCommander(object_id_t objectId) + : SystemObject(objectId), commandActionHelper(this) { + auto mqArgs = MqArgs(this->getObjectId()); + commandQueue = QueueFactory::instance()->createMessageQueue( + QUEUE_SIZE, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs); +} + +DeviceHandlerCommander::~DeviceHandlerCommander() {} + +ReturnValue_t DeviceHandlerCommander::performOperation(uint8_t operationCode) { + readCommandQueue(); + return RETURN_OK; +} + +ReturnValue_t DeviceHandlerCommander::initialize() { + ReturnValue_t result = commandActionHelper.initialize(); + if (result != HasReturnvaluesIF::RETURN_OK) { + return result; + } + return HasReturnvaluesIF::RETURN_OK; +} + +MessageQueueIF* DeviceHandlerCommander::getCommandQueuePtr() { return commandQueue; } + +void DeviceHandlerCommander::stepSuccessfulReceived(ActionId_t actionId, uint8_t step) {} + +void DeviceHandlerCommander::stepFailedReceived(ActionId_t actionId, uint8_t step, + ReturnValue_t returnCode) {} + +void DeviceHandlerCommander::dataReceived(ActionId_t actionId, const uint8_t* data, uint32_t size) { +} + +void DeviceHandlerCommander::completionSuccessfulReceived(ActionId_t actionId) { + lastReplyReturnCode = RETURN_OK; +} + +void DeviceHandlerCommander::completionFailedReceived(ActionId_t actionId, + ReturnValue_t returnCode) { + lastReplyReturnCode = returnCode; +} + +void DeviceHandlerCommander::readCommandQueue() { + CommandMessage message; + ReturnValue_t result = HasReturnvaluesIF::RETURN_OK; + for (result = commandQueue->receiveMessage(&message); result == HasReturnvaluesIF::RETURN_OK; + result = commandQueue->receiveMessage(&message)) { + result = commandActionHelper.handleReply(&message); + if (result == HasReturnvaluesIF::RETURN_OK) { + continue; + } + } +} + +ReturnValue_t DeviceHandlerCommander::sendCommand(object_id_t target, ActionId_t actionId) { + return commandActionHelper.commandAction(target, actionId, nullptr, 0); +} + +ReturnValue_t DeviceHandlerCommander::getReplyReturnCode() { return lastReplyReturnCode; } + +void DeviceHandlerCommander::resetReplyReturnCode() { lastReplyReturnCode = RETURN_FAILED; } diff --git a/tests/src/fsfw_tests/unit/devicehandler/DeviceHandlerCommander.h b/src/fsfw_tests/unit/devicehandler/DeviceHandlerCommander.h similarity index 97% rename from tests/src/fsfw_tests/unit/devicehandler/DeviceHandlerCommander.h rename to src/fsfw_tests/unit/devicehandler/DeviceHandlerCommander.h index 82183baf..435d0017 100644 --- a/tests/src/fsfw_tests/unit/devicehandler/DeviceHandlerCommander.h +++ b/src/fsfw_tests/unit/devicehandler/DeviceHandlerCommander.h @@ -1,50 +1,50 @@ -#ifndef TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_DEVICEHANDLERCOMMANDER_H_ -#define TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_DEVICEHANDLERCOMMANDER_H_ - -#include "fsfw/action/CommandActionHelper.h" -#include "fsfw/action/CommandsActionsIF.h" -#include "fsfw/objectmanager/SystemObject.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" -#include "fsfw/tasks/ExecutableObjectIF.h" - -class DeviceHandlerCommander : public ExecutableObjectIF, - public SystemObject, - public CommandsActionsIF, - public HasReturnvaluesIF { - public: - DeviceHandlerCommander(object_id_t objectId); - virtual ~DeviceHandlerCommander(); - - ReturnValue_t performOperation(uint8_t operationCode = 0); - ReturnValue_t initialize() override; - MessageQueueIF* getCommandQueuePtr() override; - void stepSuccessfulReceived(ActionId_t actionId, uint8_t step) override; - void stepFailedReceived(ActionId_t actionId, uint8_t step, ReturnValue_t returnCode) override; - void dataReceived(ActionId_t actionId, const uint8_t* data, uint32_t size) override; - void completionSuccessfulReceived(ActionId_t actionId) override; - void completionFailedReceived(ActionId_t actionId, ReturnValue_t returnCode) override; - - /** - * @brief Calling this function will send the command to the device handler object. - * - * @param target Object ID of the device handler - * @param actionId Action ID of the command to send - */ - ReturnValue_t sendCommand(object_id_t target, ActionId_t actionId); - - ReturnValue_t getReplyReturnCode(); - void resetReplyReturnCode(); - - private: - static const uint32_t QUEUE_SIZE = 20; - - MessageQueueIF* commandQueue = nullptr; - - CommandActionHelper commandActionHelper; - - ReturnValue_t lastReplyReturnCode = RETURN_FAILED; - - void readCommandQueue(); -}; - -#endif /* TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_DEVICEHANDLERCOMMANDER_H_ */ +#ifndef TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_DEVICEHANDLERCOMMANDER_H_ +#define TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_DEVICEHANDLERCOMMANDER_H_ + +#include "fsfw/action/CommandActionHelper.h" +#include "fsfw/action/CommandsActionsIF.h" +#include "fsfw/objectmanager/SystemObject.h" +#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/tasks/ExecutableObjectIF.h" + +class DeviceHandlerCommander : public ExecutableObjectIF, + public SystemObject, + public CommandsActionsIF, + public HasReturnvaluesIF { + public: + DeviceHandlerCommander(object_id_t objectId); + virtual ~DeviceHandlerCommander(); + + ReturnValue_t performOperation(uint8_t operationCode = 0); + ReturnValue_t initialize() override; + MessageQueueIF* getCommandQueuePtr() override; + void stepSuccessfulReceived(ActionId_t actionId, uint8_t step) override; + void stepFailedReceived(ActionId_t actionId, uint8_t step, ReturnValue_t returnCode) override; + void dataReceived(ActionId_t actionId, const uint8_t* data, uint32_t size) override; + void completionSuccessfulReceived(ActionId_t actionId) override; + void completionFailedReceived(ActionId_t actionId, ReturnValue_t returnCode) override; + + /** + * @brief Calling this function will send the command to the device handler object. + * + * @param target Object ID of the device handler + * @param actionId Action ID of the command to send + */ + ReturnValue_t sendCommand(object_id_t target, ActionId_t actionId); + + ReturnValue_t getReplyReturnCode(); + void resetReplyReturnCode(); + + private: + static const uint32_t QUEUE_SIZE = 20; + + MessageQueueIF* commandQueue = nullptr; + + CommandActionHelper commandActionHelper; + + ReturnValue_t lastReplyReturnCode = RETURN_FAILED; + + void readCommandQueue(); +}; + +#endif /* TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_DEVICEHANDLERCOMMANDER_H_ */ diff --git a/tests/src/fsfw_tests/unit/devicehandler/DeviceHandlerMock.cpp b/src/fsfw_tests/unit/devicehandler/DeviceHandlerMock.cpp similarity index 96% rename from tests/src/fsfw_tests/unit/devicehandler/DeviceHandlerMock.cpp rename to src/fsfw_tests/unit/devicehandler/DeviceHandlerMock.cpp index 1e05f8f3..ea30ff6a 100644 --- a/tests/src/fsfw_tests/unit/devicehandler/DeviceHandlerMock.cpp +++ b/src/fsfw_tests/unit/devicehandler/DeviceHandlerMock.cpp @@ -1,103 +1,103 @@ -#include "DeviceHandlerMock.h" - -#include - -DeviceHandlerMock::DeviceHandlerMock(object_id_t objectId, object_id_t deviceCommunication, - CookieIF *comCookie, FailureIsolationBase *fdirInstance) - : DeviceHandlerBase(objectId, deviceCommunication, comCookie, fdirInstance) { - mode = MODE_ON; -} - -DeviceHandlerMock::~DeviceHandlerMock() {} - -void DeviceHandlerMock::doStartUp() { setMode(_MODE_TO_ON); } - -void DeviceHandlerMock::doShutDown() { setMode(_MODE_POWER_DOWN); } - -ReturnValue_t DeviceHandlerMock::buildNormalDeviceCommand(DeviceCommandId_t *id) { - return NOTHING_TO_SEND; -} - -ReturnValue_t DeviceHandlerMock::buildTransitionDeviceCommand(DeviceCommandId_t *id) { - return NOTHING_TO_SEND; -} - -ReturnValue_t DeviceHandlerMock::buildCommandFromCommand(DeviceCommandId_t deviceCommand, - const uint8_t *commandData, - size_t commandDataLen) { - switch (deviceCommand) { - case SIMPLE_COMMAND: { - commandBuffer[0] = SIMPLE_COMMAND_DATA; - rawPacket = commandBuffer; - rawPacketLen = sizeof(SIMPLE_COMMAND_DATA); - break; - } - default: - WARN("DeviceHandlerMock::buildCommandFromCommand: Invalid device command"); - break; - } - return RETURN_OK; -} - -ReturnValue_t DeviceHandlerMock::scanForReply(const uint8_t *start, size_t len, - DeviceCommandId_t *foundId, size_t *foundLen) { - switch (*start) { - case SIMPLE_COMMAND_DATA: { - *foundId = SIMPLE_COMMAND; - *foundLen = sizeof(SIMPLE_COMMAND_DATA); - return RETURN_OK; - break; - } - case PERIODIC_REPLY_DATA: { - *foundId = PERIODIC_REPLY; - *foundLen = sizeof(PERIODIC_REPLY_DATA); - return RETURN_OK; - break; - } - default: - break; - } - return RETURN_FAILED; -} - -ReturnValue_t DeviceHandlerMock::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) { - switch (id) { - case SIMPLE_COMMAND: - case PERIODIC_REPLY: { - periodicReplyReceived = true; - break; - } - default: - break; - } - return RETURN_OK; -} - -void DeviceHandlerMock::fillCommandAndReplyMap() { - insertInCommandAndReplyMap(SIMPLE_COMMAND, 0, nullptr, 0, false, false, 0, - &simpleCommandReplyTimeout); - insertInCommandAndReplyMap(PERIODIC_REPLY, 0, nullptr, 0, true, false, 0, - &periodicReplyCountdown); -} - -uint32_t DeviceHandlerMock::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } - -void DeviceHandlerMock::changePeriodicReplyCountdown(uint32_t timeout) { - periodicReplyCountdown.setTimeout(timeout); -} - -void DeviceHandlerMock::changeSimpleCommandReplyCountdown(uint32_t timeout) { - simpleCommandReplyTimeout.setTimeout(timeout); -} - -void DeviceHandlerMock::resetPeriodicReplyState() { periodicReplyReceived = false; } - -bool DeviceHandlerMock::getPeriodicReplyReceived() { return periodicReplyReceived; } - -ReturnValue_t DeviceHandlerMock::enablePeriodicReply(DeviceCommandId_t replyId) { - return updatePeriodicReply(true, replyId); -} - -ReturnValue_t DeviceHandlerMock::disablePeriodicReply(DeviceCommandId_t replyId) { - return updatePeriodicReply(false, replyId); -} +#include "DeviceHandlerMock.h" + +#include + +DeviceHandlerMock::DeviceHandlerMock(object_id_t objectId, object_id_t deviceCommunication, + CookieIF *comCookie, FailureIsolationBase *fdirInstance) + : DeviceHandlerBase(objectId, deviceCommunication, comCookie, fdirInstance) { + mode = MODE_ON; +} + +DeviceHandlerMock::~DeviceHandlerMock() {} + +void DeviceHandlerMock::doStartUp() { setMode(_MODE_TO_ON); } + +void DeviceHandlerMock::doShutDown() { setMode(_MODE_POWER_DOWN); } + +ReturnValue_t DeviceHandlerMock::buildNormalDeviceCommand(DeviceCommandId_t *id) { + return NOTHING_TO_SEND; +} + +ReturnValue_t DeviceHandlerMock::buildTransitionDeviceCommand(DeviceCommandId_t *id) { + return NOTHING_TO_SEND; +} + +ReturnValue_t DeviceHandlerMock::buildCommandFromCommand(DeviceCommandId_t deviceCommand, + const uint8_t *commandData, + size_t commandDataLen) { + switch (deviceCommand) { + case SIMPLE_COMMAND: { + commandBuffer[0] = SIMPLE_COMMAND_DATA; + rawPacket = commandBuffer; + rawPacketLen = sizeof(SIMPLE_COMMAND_DATA); + break; + } + default: + WARN("DeviceHandlerMock::buildCommandFromCommand: Invalid device command"); + break; + } + return RETURN_OK; +} + +ReturnValue_t DeviceHandlerMock::scanForReply(const uint8_t *start, size_t len, + DeviceCommandId_t *foundId, size_t *foundLen) { + switch (*start) { + case SIMPLE_COMMAND_DATA: { + *foundId = SIMPLE_COMMAND; + *foundLen = sizeof(SIMPLE_COMMAND_DATA); + return RETURN_OK; + break; + } + case PERIODIC_REPLY_DATA: { + *foundId = PERIODIC_REPLY; + *foundLen = sizeof(PERIODIC_REPLY_DATA); + return RETURN_OK; + break; + } + default: + break; + } + return RETURN_FAILED; +} + +ReturnValue_t DeviceHandlerMock::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) { + switch (id) { + case SIMPLE_COMMAND: + case PERIODIC_REPLY: { + periodicReplyReceived = true; + break; + } + default: + break; + } + return RETURN_OK; +} + +void DeviceHandlerMock::fillCommandAndReplyMap() { + insertInCommandAndReplyMap(SIMPLE_COMMAND, 0, nullptr, 0, false, false, 0, + &simpleCommandReplyTimeout); + insertInCommandAndReplyMap(PERIODIC_REPLY, 0, nullptr, 0, true, false, 0, + &periodicReplyCountdown); +} + +uint32_t DeviceHandlerMock::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } + +void DeviceHandlerMock::changePeriodicReplyCountdown(uint32_t timeout) { + periodicReplyCountdown.setTimeout(timeout); +} + +void DeviceHandlerMock::changeSimpleCommandReplyCountdown(uint32_t timeout) { + simpleCommandReplyTimeout.setTimeout(timeout); +} + +void DeviceHandlerMock::resetPeriodicReplyState() { periodicReplyReceived = false; } + +bool DeviceHandlerMock::getPeriodicReplyReceived() { return periodicReplyReceived; } + +ReturnValue_t DeviceHandlerMock::enablePeriodicReply(DeviceCommandId_t replyId) { + return updatePeriodicReply(true, replyId); +} + +ReturnValue_t DeviceHandlerMock::disablePeriodicReply(DeviceCommandId_t replyId) { + return updatePeriodicReply(false, replyId); +} diff --git a/tests/src/fsfw_tests/unit/devicehandler/DeviceHandlerMock.h b/src/fsfw_tests/unit/devicehandler/DeviceHandlerMock.h similarity index 97% rename from tests/src/fsfw_tests/unit/devicehandler/DeviceHandlerMock.h rename to src/fsfw_tests/unit/devicehandler/DeviceHandlerMock.h index f5fcb4aa..ef1649c3 100644 --- a/tests/src/fsfw_tests/unit/devicehandler/DeviceHandlerMock.h +++ b/src/fsfw_tests/unit/devicehandler/DeviceHandlerMock.h @@ -1,46 +1,46 @@ -#ifndef TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_DEVICEHANDLERMOCK_H_ -#define TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_DEVICEHANDLERMOCK_H_ - -#include - -class DeviceHandlerMock : public DeviceHandlerBase { - public: - static const DeviceCommandId_t SIMPLE_COMMAND = 1; - static const DeviceCommandId_t PERIODIC_REPLY = 2; - - static const uint8_t SIMPLE_COMMAND_DATA = 1; - static const uint8_t PERIODIC_REPLY_DATA = 2; - - DeviceHandlerMock(object_id_t objectId, object_id_t deviceCommunication, CookieIF *comCookie, - FailureIsolationBase *fdirInstance); - virtual ~DeviceHandlerMock(); - void changePeriodicReplyCountdown(uint32_t timeout); - void changeSimpleCommandReplyCountdown(uint32_t timeout); - void resetPeriodicReplyState(); - bool getPeriodicReplyReceived(); - ReturnValue_t enablePeriodicReply(DeviceCommandId_t replyId); - ReturnValue_t disablePeriodicReply(DeviceCommandId_t replyId); - - protected: - void doStartUp() override; - void doShutDown() override; - ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override; - ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t *id) override; - ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t *commandData, - size_t commandDataLen) override; - ReturnValue_t scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId, - size_t *foundLen) override; - ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) override; - void fillCommandAndReplyMap() override; - uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override; - - private: - Countdown simpleCommandReplyTimeout = Countdown(1000); - Countdown periodicReplyCountdown = Countdown(1000); - - uint8_t commandBuffer[1]; - - bool periodicReplyReceived = false; -}; - -#endif /* TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_DEVICEHANDLERMOCK_H_ */ +#ifndef TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_DEVICEHANDLERMOCK_H_ +#define TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_DEVICEHANDLERMOCK_H_ + +#include + +class DeviceHandlerMock : public DeviceHandlerBase { + public: + static const DeviceCommandId_t SIMPLE_COMMAND = 1; + static const DeviceCommandId_t PERIODIC_REPLY = 2; + + static const uint8_t SIMPLE_COMMAND_DATA = 1; + static const uint8_t PERIODIC_REPLY_DATA = 2; + + DeviceHandlerMock(object_id_t objectId, object_id_t deviceCommunication, CookieIF *comCookie, + FailureIsolationBase *fdirInstance); + virtual ~DeviceHandlerMock(); + void changePeriodicReplyCountdown(uint32_t timeout); + void changeSimpleCommandReplyCountdown(uint32_t timeout); + void resetPeriodicReplyState(); + bool getPeriodicReplyReceived(); + ReturnValue_t enablePeriodicReply(DeviceCommandId_t replyId); + ReturnValue_t disablePeriodicReply(DeviceCommandId_t replyId); + + protected: + void doStartUp() override; + void doShutDown() override; + ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override; + ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t *id) override; + ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t *commandData, + size_t commandDataLen) override; + ReturnValue_t scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId, + size_t *foundLen) override; + ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) override; + void fillCommandAndReplyMap() override; + uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override; + + private: + Countdown simpleCommandReplyTimeout = Countdown(1000); + Countdown periodicReplyCountdown = Countdown(1000); + + uint8_t commandBuffer[1]; + + bool periodicReplyReceived = false; +}; + +#endif /* TESTS_SRC_FSFW_TESTS_UNIT_DEVICEHANDLER_DEVICEHANDLERMOCK_H_ */ diff --git a/tests/src/fsfw_tests/unit/devicehandler/TestDeviceHandlerBase.cpp b/src/fsfw_tests/unit/devicehandler/TestDeviceHandlerBase.cpp similarity index 98% rename from tests/src/fsfw_tests/unit/devicehandler/TestDeviceHandlerBase.cpp rename to src/fsfw_tests/unit/devicehandler/TestDeviceHandlerBase.cpp index 873329c3..e82a39b7 100644 --- a/tests/src/fsfw_tests/unit/devicehandler/TestDeviceHandlerBase.cpp +++ b/src/fsfw_tests/unit/devicehandler/TestDeviceHandlerBase.cpp @@ -1,95 +1,95 @@ -#include - -#include "ComIFMock.h" -#include "DeviceFdirMock.h" -#include "fsfw_tests/unit/devicehandler/CookieIFMock.h" -#include "fsfw_tests/unit/devicehandler/DeviceHandlerCommander.h" -#include "fsfw_tests/unit/devicehandler/DeviceHandlerMock.h" -#include "fsfw_tests/unit/testcfg/objects/systemObjectList.h" - -TEST_CASE("Device Handler Base", "[DeviceHandlerBase]") { - // Will be deleted with DHB destructor - CookieIFMock* cookieIFMock = new CookieIFMock; - ComIFMock comIF(objects::COM_IF_MOCK); - DeviceFdirMock deviceFdirMock(objects::DEVICE_HANDLER_MOCK, objects::NO_OBJECT); - DeviceHandlerMock deviceHandlerMock(objects::DEVICE_HANDLER_MOCK, objects::COM_IF_MOCK, - cookieIFMock, &deviceFdirMock); - ReturnValue_t result = deviceHandlerMock.initialize(); - REQUIRE(result == HasReturnvaluesIF::RETURN_OK); - DeviceHandlerCommander deviceHandlerCommander(objects::DEVICE_HANDLER_COMMANDER); - result = deviceHandlerCommander.initialize(); - REQUIRE(result == HasReturnvaluesIF::RETURN_OK); - - SECTION("Commanding nominal") { - comIF.setTestCase(ComIFMock::TestCase::SIMPLE_COMMAND_NOMINAL); - result = deviceHandlerCommander.sendCommand(objects::DEVICE_HANDLER_MOCK, - DeviceHandlerMock::SIMPLE_COMMAND); - REQUIRE(result == HasReturnvaluesIF::RETURN_OK); - deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION); - deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_WRITE); - deviceHandlerMock.performOperation(DeviceHandlerIF::GET_WRITE); - deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_READ); - deviceHandlerMock.performOperation(DeviceHandlerIF::GET_READ); - deviceHandlerCommander.performOperation(); - result = deviceHandlerCommander.getReplyReturnCode(); - uint32_t missedReplies = deviceFdirMock.getMissedReplyCount(); - REQUIRE(missedReplies == 0); - REQUIRE(result == HasReturnvaluesIF::RETURN_OK); - } - - SECTION("Commanding missed reply") { - comIF.setTestCase(ComIFMock::TestCase::MISSED_REPLY); - deviceHandlerCommander.resetReplyReturnCode(); - // Set the timeout to 0 to immediately timeout the reply - deviceHandlerMock.changeSimpleCommandReplyCountdown(0); - result = deviceHandlerCommander.sendCommand(objects::DEVICE_HANDLER_MOCK, - DeviceHandlerMock::SIMPLE_COMMAND); - REQUIRE(result == HasReturnvaluesIF::RETURN_OK); - deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION); - deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_WRITE); - deviceHandlerMock.performOperation(DeviceHandlerIF::GET_WRITE); - deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_READ); - deviceHandlerMock.performOperation(DeviceHandlerIF::GET_READ); - deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION); - deviceHandlerCommander.performOperation(); - result = deviceHandlerCommander.getReplyReturnCode(); - REQUIRE(result == DeviceHandlerIF::TIMEOUT); - uint32_t missedReplies = deviceFdirMock.getMissedReplyCount(); - REQUIRE(missedReplies == 1); - } - - SECTION("Periodic reply nominal") { - comIF.setTestCase(ComIFMock::TestCase::PERIODIC_REPLY_NOMINAL); - deviceHandlerMock.enablePeriodicReply(DeviceHandlerMock::PERIODIC_REPLY); - deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION); - deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_WRITE); - deviceHandlerMock.performOperation(DeviceHandlerIF::GET_WRITE); - deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_READ); - deviceHandlerMock.performOperation(DeviceHandlerIF::GET_READ); - REQUIRE(deviceHandlerMock.getPeriodicReplyReceived() == true); - } - - SECTION("Missed periodic reply") { - comIF.setTestCase(ComIFMock::TestCase::MISSED_REPLY); - // Set the timeout to 0 to immediately timeout the reply - deviceHandlerMock.changePeriodicReplyCountdown(0); - deviceHandlerMock.enablePeriodicReply(DeviceHandlerMock::PERIODIC_REPLY); - deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION); - deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_WRITE); - deviceHandlerMock.performOperation(DeviceHandlerIF::GET_WRITE); - deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_READ); - deviceHandlerMock.performOperation(DeviceHandlerIF::GET_READ); - uint32_t missedReplies = deviceFdirMock.getMissedReplyCount(); - REQUIRE(missedReplies == 1); - // Test if disabling of periodic reply - deviceHandlerMock.disablePeriodicReply(DeviceHandlerMock::PERIODIC_REPLY); - deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION); - deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_WRITE); - deviceHandlerMock.performOperation(DeviceHandlerIF::GET_WRITE); - deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_READ); - deviceHandlerMock.performOperation(DeviceHandlerIF::GET_READ); - missedReplies = deviceFdirMock.getMissedReplyCount(); - // Should still be 1 because periodic reply is now disabled - REQUIRE(missedReplies == 1); - } -} +#include + +#include "ComIFMock.h" +#include "DeviceFdirMock.h" +#include "fsfw_tests/unit/devicehandler/CookieIFMock.h" +#include "fsfw_tests/unit/devicehandler/DeviceHandlerCommander.h" +#include "fsfw_tests/unit/devicehandler/DeviceHandlerMock.h" +#include "fsfw_tests/unit/testcfg/objects/systemObjectList.h" + +TEST_CASE("Device Handler Base", "[DeviceHandlerBase]") { + // Will be deleted with DHB destructor + CookieIFMock* cookieIFMock = new CookieIFMock; + ComIFMock comIF(objects::COM_IF_MOCK); + DeviceFdirMock deviceFdirMock(objects::DEVICE_HANDLER_MOCK, objects::NO_OBJECT); + DeviceHandlerMock deviceHandlerMock(objects::DEVICE_HANDLER_MOCK, objects::COM_IF_MOCK, + cookieIFMock, &deviceFdirMock); + ReturnValue_t result = deviceHandlerMock.initialize(); + REQUIRE(result == HasReturnvaluesIF::RETURN_OK); + DeviceHandlerCommander deviceHandlerCommander(objects::DEVICE_HANDLER_COMMANDER); + result = deviceHandlerCommander.initialize(); + REQUIRE(result == HasReturnvaluesIF::RETURN_OK); + + SECTION("Commanding nominal") { + comIF.setTestCase(ComIFMock::TestCase::SIMPLE_COMMAND_NOMINAL); + result = deviceHandlerCommander.sendCommand(objects::DEVICE_HANDLER_MOCK, + DeviceHandlerMock::SIMPLE_COMMAND); + REQUIRE(result == HasReturnvaluesIF::RETURN_OK); + deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION); + deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_WRITE); + deviceHandlerMock.performOperation(DeviceHandlerIF::GET_WRITE); + deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_READ); + deviceHandlerMock.performOperation(DeviceHandlerIF::GET_READ); + deviceHandlerCommander.performOperation(); + result = deviceHandlerCommander.getReplyReturnCode(); + uint32_t missedReplies = deviceFdirMock.getMissedReplyCount(); + REQUIRE(missedReplies == 0); + REQUIRE(result == HasReturnvaluesIF::RETURN_OK); + } + + SECTION("Commanding missed reply") { + comIF.setTestCase(ComIFMock::TestCase::MISSED_REPLY); + deviceHandlerCommander.resetReplyReturnCode(); + // Set the timeout to 0 to immediately timeout the reply + deviceHandlerMock.changeSimpleCommandReplyCountdown(0); + result = deviceHandlerCommander.sendCommand(objects::DEVICE_HANDLER_MOCK, + DeviceHandlerMock::SIMPLE_COMMAND); + REQUIRE(result == HasReturnvaluesIF::RETURN_OK); + deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION); + deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_WRITE); + deviceHandlerMock.performOperation(DeviceHandlerIF::GET_WRITE); + deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_READ); + deviceHandlerMock.performOperation(DeviceHandlerIF::GET_READ); + deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION); + deviceHandlerCommander.performOperation(); + result = deviceHandlerCommander.getReplyReturnCode(); + REQUIRE(result == DeviceHandlerIF::TIMEOUT); + uint32_t missedReplies = deviceFdirMock.getMissedReplyCount(); + REQUIRE(missedReplies == 1); + } + + SECTION("Periodic reply nominal") { + comIF.setTestCase(ComIFMock::TestCase::PERIODIC_REPLY_NOMINAL); + deviceHandlerMock.enablePeriodicReply(DeviceHandlerMock::PERIODIC_REPLY); + deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION); + deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_WRITE); + deviceHandlerMock.performOperation(DeviceHandlerIF::GET_WRITE); + deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_READ); + deviceHandlerMock.performOperation(DeviceHandlerIF::GET_READ); + REQUIRE(deviceHandlerMock.getPeriodicReplyReceived() == true); + } + + SECTION("Missed periodic reply") { + comIF.setTestCase(ComIFMock::TestCase::MISSED_REPLY); + // Set the timeout to 0 to immediately timeout the reply + deviceHandlerMock.changePeriodicReplyCountdown(0); + deviceHandlerMock.enablePeriodicReply(DeviceHandlerMock::PERIODIC_REPLY); + deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION); + deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_WRITE); + deviceHandlerMock.performOperation(DeviceHandlerIF::GET_WRITE); + deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_READ); + deviceHandlerMock.performOperation(DeviceHandlerIF::GET_READ); + uint32_t missedReplies = deviceFdirMock.getMissedReplyCount(); + REQUIRE(missedReplies == 1); + // Test if disabling of periodic reply + deviceHandlerMock.disablePeriodicReply(DeviceHandlerMock::PERIODIC_REPLY); + deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION); + deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_WRITE); + deviceHandlerMock.performOperation(DeviceHandlerIF::GET_WRITE); + deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_READ); + deviceHandlerMock.performOperation(DeviceHandlerIF::GET_READ); + missedReplies = deviceFdirMock.getMissedReplyCount(); + // Should still be 1 because periodic reply is now disabled + REQUIRE(missedReplies == 1); + } +} diff --git a/tests/src/fsfw_tests/unit/globalfunctions/CMakeLists.txt b/src/fsfw_tests/unit/globalfunctions/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/unit/globalfunctions/CMakeLists.txt rename to src/fsfw_tests/unit/globalfunctions/CMakeLists.txt diff --git a/tests/src/fsfw_tests/unit/globalfunctions/testBitutil.cpp b/src/fsfw_tests/unit/globalfunctions/testBitutil.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/globalfunctions/testBitutil.cpp rename to src/fsfw_tests/unit/globalfunctions/testBitutil.cpp diff --git a/tests/src/fsfw_tests/unit/globalfunctions/testCRC.cpp b/src/fsfw_tests/unit/globalfunctions/testCRC.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/globalfunctions/testCRC.cpp rename to src/fsfw_tests/unit/globalfunctions/testCRC.cpp diff --git a/tests/src/fsfw_tests/unit/globalfunctions/testDleEncoder.cpp b/src/fsfw_tests/unit/globalfunctions/testDleEncoder.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/globalfunctions/testDleEncoder.cpp rename to src/fsfw_tests/unit/globalfunctions/testDleEncoder.cpp diff --git a/tests/src/fsfw_tests/unit/globalfunctions/testOpDivider.cpp b/src/fsfw_tests/unit/globalfunctions/testOpDivider.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/globalfunctions/testOpDivider.cpp rename to src/fsfw_tests/unit/globalfunctions/testOpDivider.cpp diff --git a/tests/src/fsfw_tests/unit/globalfunctions/testTimevalOperations.cpp b/src/fsfw_tests/unit/globalfunctions/testTimevalOperations.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/globalfunctions/testTimevalOperations.cpp rename to src/fsfw_tests/unit/globalfunctions/testTimevalOperations.cpp diff --git a/tests/src/fsfw_tests/unit/hal/CMakeLists.txt b/src/fsfw_tests/unit/hal/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/unit/hal/CMakeLists.txt rename to src/fsfw_tests/unit/hal/CMakeLists.txt diff --git a/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp b/src/fsfw_tests/unit/hal/testCommandExecutor.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp rename to src/fsfw_tests/unit/hal/testCommandExecutor.cpp diff --git a/tests/src/fsfw_tests/unit/internalerror/CMakeLists.txt b/src/fsfw_tests/unit/internalerror/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/unit/internalerror/CMakeLists.txt rename to src/fsfw_tests/unit/internalerror/CMakeLists.txt diff --git a/tests/src/fsfw_tests/unit/internalerror/TestInternalErrorReporter.cpp b/src/fsfw_tests/unit/internalerror/TestInternalErrorReporter.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/internalerror/TestInternalErrorReporter.cpp rename to src/fsfw_tests/unit/internalerror/TestInternalErrorReporter.cpp diff --git a/tests/src/fsfw_tests/unit/mocks/CMakeLists.txt b/src/fsfw_tests/unit/mocks/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/unit/mocks/CMakeLists.txt rename to src/fsfw_tests/unit/mocks/CMakeLists.txt diff --git a/tests/src/fsfw_tests/unit/mocks/HkReceiverMock.h b/src/fsfw_tests/unit/mocks/HkReceiverMock.h similarity index 100% rename from tests/src/fsfw_tests/unit/mocks/HkReceiverMock.h rename to src/fsfw_tests/unit/mocks/HkReceiverMock.h diff --git a/tests/src/fsfw_tests/unit/mocks/MessageQueueMockBase.h b/src/fsfw_tests/unit/mocks/MessageQueueMockBase.h similarity index 100% rename from tests/src/fsfw_tests/unit/mocks/MessageQueueMockBase.h rename to src/fsfw_tests/unit/mocks/MessageQueueMockBase.h diff --git a/tests/src/fsfw_tests/unit/mocks/PeriodicTaskIFMock.h b/src/fsfw_tests/unit/mocks/PeriodicTaskIFMock.h similarity index 100% rename from tests/src/fsfw_tests/unit/mocks/PeriodicTaskIFMock.h rename to src/fsfw_tests/unit/mocks/PeriodicTaskIFMock.h diff --git a/tests/src/fsfw_tests/unit/mocks/PowerSwitcherMock.cpp b/src/fsfw_tests/unit/mocks/PowerSwitcherMock.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/mocks/PowerSwitcherMock.cpp rename to src/fsfw_tests/unit/mocks/PowerSwitcherMock.cpp diff --git a/tests/src/fsfw_tests/unit/mocks/PowerSwitcherMock.h b/src/fsfw_tests/unit/mocks/PowerSwitcherMock.h similarity index 100% rename from tests/src/fsfw_tests/unit/mocks/PowerSwitcherMock.h rename to src/fsfw_tests/unit/mocks/PowerSwitcherMock.h diff --git a/tests/src/fsfw_tests/unit/osal/CMakeLists.txt b/src/fsfw_tests/unit/osal/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/unit/osal/CMakeLists.txt rename to src/fsfw_tests/unit/osal/CMakeLists.txt diff --git a/tests/src/fsfw_tests/unit/osal/TestClock.cpp b/src/fsfw_tests/unit/osal/TestClock.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/osal/TestClock.cpp rename to src/fsfw_tests/unit/osal/TestClock.cpp diff --git a/tests/src/fsfw_tests/unit/osal/TestMessageQueue.cpp b/src/fsfw_tests/unit/osal/TestMessageQueue.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/osal/TestMessageQueue.cpp rename to src/fsfw_tests/unit/osal/TestMessageQueue.cpp diff --git a/tests/src/fsfw_tests/unit/osal/TestSemaphore.cpp b/src/fsfw_tests/unit/osal/TestSemaphore.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/osal/TestSemaphore.cpp rename to src/fsfw_tests/unit/osal/TestSemaphore.cpp diff --git a/tests/src/fsfw_tests/unit/power/CMakeLists.txt b/src/fsfw_tests/unit/power/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/unit/power/CMakeLists.txt rename to src/fsfw_tests/unit/power/CMakeLists.txt diff --git a/tests/src/fsfw_tests/unit/power/testPowerSwitcher.cpp b/src/fsfw_tests/unit/power/testPowerSwitcher.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/power/testPowerSwitcher.cpp rename to src/fsfw_tests/unit/power/testPowerSwitcher.cpp diff --git a/tests/src/fsfw_tests/unit/printChar.cpp b/src/fsfw_tests/unit/printChar.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/printChar.cpp rename to src/fsfw_tests/unit/printChar.cpp diff --git a/tests/src/fsfw_tests/unit/printChar.h b/src/fsfw_tests/unit/printChar.h similarity index 100% rename from tests/src/fsfw_tests/unit/printChar.h rename to src/fsfw_tests/unit/printChar.h diff --git a/tests/src/fsfw_tests/unit/serialize/CMakeLists.txt b/src/fsfw_tests/unit/serialize/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/unit/serialize/CMakeLists.txt rename to src/fsfw_tests/unit/serialize/CMakeLists.txt diff --git a/tests/src/fsfw_tests/unit/serialize/TestSerialBufferAdapter.cpp b/src/fsfw_tests/unit/serialize/TestSerialBufferAdapter.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/serialize/TestSerialBufferAdapter.cpp rename to src/fsfw_tests/unit/serialize/TestSerialBufferAdapter.cpp diff --git a/tests/src/fsfw_tests/unit/serialize/TestSerialLinkedPacket.cpp b/src/fsfw_tests/unit/serialize/TestSerialLinkedPacket.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/serialize/TestSerialLinkedPacket.cpp rename to src/fsfw_tests/unit/serialize/TestSerialLinkedPacket.cpp diff --git a/tests/src/fsfw_tests/unit/serialize/TestSerialLinkedPacket.h b/src/fsfw_tests/unit/serialize/TestSerialLinkedPacket.h similarity index 100% rename from tests/src/fsfw_tests/unit/serialize/TestSerialLinkedPacket.h rename to src/fsfw_tests/unit/serialize/TestSerialLinkedPacket.h diff --git a/tests/src/fsfw_tests/unit/serialize/TestSerialization.cpp b/src/fsfw_tests/unit/serialize/TestSerialization.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/serialize/TestSerialization.cpp rename to src/fsfw_tests/unit/serialize/TestSerialization.cpp diff --git a/tests/src/fsfw_tests/unit/storagemanager/CMakeLists.txt b/src/fsfw_tests/unit/storagemanager/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/unit/storagemanager/CMakeLists.txt rename to src/fsfw_tests/unit/storagemanager/CMakeLists.txt diff --git a/tests/src/fsfw_tests/unit/storagemanager/TestNewAccessor.cpp b/src/fsfw_tests/unit/storagemanager/TestNewAccessor.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/storagemanager/TestNewAccessor.cpp rename to src/fsfw_tests/unit/storagemanager/TestNewAccessor.cpp diff --git a/tests/src/fsfw_tests/unit/storagemanager/TestPool.cpp b/src/fsfw_tests/unit/storagemanager/TestPool.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/storagemanager/TestPool.cpp rename to src/fsfw_tests/unit/storagemanager/TestPool.cpp diff --git a/tests/src/fsfw_tests/unit/testcfg/CMakeLists.txt b/src/fsfw_tests/unit/testcfg/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/unit/testcfg/CMakeLists.txt rename to src/fsfw_tests/unit/testcfg/CMakeLists.txt diff --git a/tests/src/fsfw_tests/unit/testcfg/FSFWConfig.h.in b/src/fsfw_tests/unit/testcfg/FSFWConfig.h.in similarity index 100% rename from tests/src/fsfw_tests/unit/testcfg/FSFWConfig.h.in rename to src/fsfw_tests/unit/testcfg/FSFWConfig.h.in diff --git a/tests/src/fsfw_tests/unit/testcfg/OBSWConfig.h.in b/src/fsfw_tests/unit/testcfg/OBSWConfig.h.in similarity index 100% rename from tests/src/fsfw_tests/unit/testcfg/OBSWConfig.h.in rename to src/fsfw_tests/unit/testcfg/OBSWConfig.h.in diff --git a/tests/src/fsfw_tests/unit/testcfg/TestsConfig.h.in b/src/fsfw_tests/unit/testcfg/TestsConfig.h.in similarity index 100% rename from tests/src/fsfw_tests/unit/testcfg/TestsConfig.h.in rename to src/fsfw_tests/unit/testcfg/TestsConfig.h.in diff --git a/tests/src/fsfw_tests/unit/testcfg/devices/logicalAddresses.cpp b/src/fsfw_tests/unit/testcfg/devices/logicalAddresses.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/testcfg/devices/logicalAddresses.cpp rename to src/fsfw_tests/unit/testcfg/devices/logicalAddresses.cpp diff --git a/tests/src/fsfw_tests/unit/testcfg/devices/logicalAddresses.h b/src/fsfw_tests/unit/testcfg/devices/logicalAddresses.h similarity index 100% rename from tests/src/fsfw_tests/unit/testcfg/devices/logicalAddresses.h rename to src/fsfw_tests/unit/testcfg/devices/logicalAddresses.h diff --git a/tests/src/fsfw_tests/unit/testcfg/devices/powerSwitcherList.cpp b/src/fsfw_tests/unit/testcfg/devices/powerSwitcherList.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/testcfg/devices/powerSwitcherList.cpp rename to src/fsfw_tests/unit/testcfg/devices/powerSwitcherList.cpp diff --git a/tests/src/fsfw_tests/unit/testcfg/devices/powerSwitcherList.h b/src/fsfw_tests/unit/testcfg/devices/powerSwitcherList.h similarity index 100% rename from tests/src/fsfw_tests/unit/testcfg/devices/powerSwitcherList.h rename to src/fsfw_tests/unit/testcfg/devices/powerSwitcherList.h diff --git a/tests/src/fsfw_tests/unit/testcfg/events/subsystemIdRanges.h b/src/fsfw_tests/unit/testcfg/events/subsystemIdRanges.h similarity index 100% rename from tests/src/fsfw_tests/unit/testcfg/events/subsystemIdRanges.h rename to src/fsfw_tests/unit/testcfg/events/subsystemIdRanges.h diff --git a/tests/src/fsfw_tests/unit/testcfg/ipc/MissionMessageTypes.cpp b/src/fsfw_tests/unit/testcfg/ipc/MissionMessageTypes.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/testcfg/ipc/MissionMessageTypes.cpp rename to src/fsfw_tests/unit/testcfg/ipc/MissionMessageTypes.cpp diff --git a/tests/src/fsfw_tests/unit/testcfg/ipc/MissionMessageTypes.h b/src/fsfw_tests/unit/testcfg/ipc/MissionMessageTypes.h similarity index 100% rename from tests/src/fsfw_tests/unit/testcfg/ipc/MissionMessageTypes.h rename to src/fsfw_tests/unit/testcfg/ipc/MissionMessageTypes.h diff --git a/tests/src/fsfw_tests/unit/testcfg/objects/systemObjectList.h b/src/fsfw_tests/unit/testcfg/objects/systemObjectList.h similarity index 95% rename from tests/src/fsfw_tests/unit/testcfg/objects/systemObjectList.h rename to src/fsfw_tests/unit/testcfg/objects/systemObjectList.h index 17b980e9..7d12e5c6 100644 --- a/tests/src/fsfw_tests/unit/testcfg/objects/systemObjectList.h +++ b/src/fsfw_tests/unit/testcfg/objects/systemObjectList.h @@ -1,34 +1,34 @@ -#ifndef HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ -#define HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ - -#include - -#include "fsfw/objectmanager/frameworkObjects.h" - -// The objects will be instantiated in the ID order -namespace objects { -enum sourceObjects : uint32_t { - /* All addresses between start and end are reserved for the FSFW */ - FSFW_CONFIG_RESERVED_START = PUS_SERVICE_1_VERIFICATION, - FSFW_CONFIG_RESERVED_END = TM_STORE, - - UDP_BRIDGE = 15, - UDP_POLLING_TASK = 16, - - TEST_ECHO_COM_IF = 20, - TEST_DEVICE = 21, - - HK_RECEIVER_MOCK = 22, - TEST_LOCAL_POOL_OWNER_BASE = 25, - - SHARED_SET_ID = 26, - - DUMMY_POWER_SWITCHER = 28, - - DEVICE_HANDLER_MOCK = 29, - COM_IF_MOCK = 30, - DEVICE_HANDLER_COMMANDER = 40, -}; -} - -#endif /* BSP_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ */ +#ifndef HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ +#define HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ + +#include + +#include "fsfw/objectmanager/frameworkObjects.h" + +// The objects will be instantiated in the ID order +namespace objects { +enum sourceObjects : uint32_t { + /* All addresses between start and end are reserved for the FSFW */ + FSFW_CONFIG_RESERVED_START = PUS_SERVICE_1_VERIFICATION, + FSFW_CONFIG_RESERVED_END = TM_STORE, + + UDP_BRIDGE = 15, + UDP_POLLING_TASK = 16, + + TEST_ECHO_COM_IF = 20, + TEST_DEVICE = 21, + + HK_RECEIVER_MOCK = 22, + TEST_LOCAL_POOL_OWNER_BASE = 25, + + SHARED_SET_ID = 26, + + DUMMY_POWER_SWITCHER = 28, + + DEVICE_HANDLER_MOCK = 29, + COM_IF_MOCK = 30, + DEVICE_HANDLER_COMMANDER = 40, +}; +} + +#endif /* BSP_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ */ diff --git a/tests/src/fsfw_tests/unit/testcfg/pollingsequence/PollingSequenceFactory.cpp b/src/fsfw_tests/unit/testcfg/pollingsequence/PollingSequenceFactory.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/testcfg/pollingsequence/PollingSequenceFactory.cpp rename to src/fsfw_tests/unit/testcfg/pollingsequence/PollingSequenceFactory.cpp diff --git a/tests/src/fsfw_tests/unit/testcfg/pollingsequence/PollingSequenceFactory.h b/src/fsfw_tests/unit/testcfg/pollingsequence/PollingSequenceFactory.h similarity index 100% rename from tests/src/fsfw_tests/unit/testcfg/pollingsequence/PollingSequenceFactory.h rename to src/fsfw_tests/unit/testcfg/pollingsequence/PollingSequenceFactory.h diff --git a/tests/src/fsfw_tests/unit/testcfg/returnvalues/classIds.h b/src/fsfw_tests/unit/testcfg/returnvalues/classIds.h similarity index 100% rename from tests/src/fsfw_tests/unit/testcfg/returnvalues/classIds.h rename to src/fsfw_tests/unit/testcfg/returnvalues/classIds.h diff --git a/tests/src/fsfw_tests/unit/testcfg/tmtc/apid.h b/src/fsfw_tests/unit/testcfg/tmtc/apid.h similarity index 100% rename from tests/src/fsfw_tests/unit/testcfg/tmtc/apid.h rename to src/fsfw_tests/unit/testcfg/tmtc/apid.h diff --git a/tests/src/fsfw_tests/unit/testcfg/tmtc/pusIds.h b/src/fsfw_tests/unit/testcfg/tmtc/pusIds.h similarity index 100% rename from tests/src/fsfw_tests/unit/testcfg/tmtc/pusIds.h rename to src/fsfw_tests/unit/testcfg/tmtc/pusIds.h diff --git a/tests/src/fsfw_tests/unit/testtemplate/TestTemplate.cpp b/src/fsfw_tests/unit/testtemplate/TestTemplate.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/testtemplate/TestTemplate.cpp rename to src/fsfw_tests/unit/testtemplate/TestTemplate.cpp diff --git a/tests/src/fsfw_tests/unit/timemanager/CMakeLists.txt b/src/fsfw_tests/unit/timemanager/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/unit/timemanager/CMakeLists.txt rename to src/fsfw_tests/unit/timemanager/CMakeLists.txt diff --git a/tests/src/fsfw_tests/unit/timemanager/TestCCSDSTime.cpp b/src/fsfw_tests/unit/timemanager/TestCCSDSTime.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/timemanager/TestCCSDSTime.cpp rename to src/fsfw_tests/unit/timemanager/TestCCSDSTime.cpp diff --git a/tests/src/fsfw_tests/unit/timemanager/TestCountdown.cpp b/src/fsfw_tests/unit/timemanager/TestCountdown.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/timemanager/TestCountdown.cpp rename to src/fsfw_tests/unit/timemanager/TestCountdown.cpp diff --git a/tests/src/fsfw_tests/unit/tmtcpacket/CMakeLists.txt b/src/fsfw_tests/unit/tmtcpacket/CMakeLists.txt similarity index 100% rename from tests/src/fsfw_tests/unit/tmtcpacket/CMakeLists.txt rename to src/fsfw_tests/unit/tmtcpacket/CMakeLists.txt diff --git a/tests/src/fsfw_tests/unit/tmtcpacket/PusTmTest.cpp b/src/fsfw_tests/unit/tmtcpacket/PusTmTest.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/tmtcpacket/PusTmTest.cpp rename to src/fsfw_tests/unit/tmtcpacket/PusTmTest.cpp diff --git a/tests/src/fsfw_tests/unit/tmtcpacket/testCcsds.cpp b/src/fsfw_tests/unit/tmtcpacket/testCcsds.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/tmtcpacket/testCcsds.cpp rename to src/fsfw_tests/unit/tmtcpacket/testCcsds.cpp diff --git a/tests/src/fsfw_tests/unit/version.cpp b/src/fsfw_tests/unit/version.cpp similarity index 100% rename from tests/src/fsfw_tests/unit/version.cpp rename to src/fsfw_tests/unit/version.cpp diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt deleted file mode 100644 index febd4f0a..00000000 --- a/tests/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory(src) diff --git a/tests/src/CMakeLists.txt b/tests/src/CMakeLists.txt deleted file mode 100644 index 6673f1e4..00000000 --- a/tests/src/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -target_include_directories(${LIB_FSFW_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} -) - -target_include_directories(${LIB_FSFW_NAME} INTERFACE - ${CMAKE_CURRENT_SOURCE_DIR} -) - -add_subdirectory(fsfw_tests)