move HAL and tests folder
This commit is contained in:
hal
src
CMakeLists.txt
fsfw_hal
CMakeLists.txt
common
devicehandlers
CMakeLists.txtGyroL3GD20Handler.cppGyroL3GD20Handler.hMgmLIS3MDLHandler.cppMgmLIS3MDLHandler.hMgmRM3100Handler.cppMgmRM3100Handler.h
devicedefinitions
host
linux
CMakeLists.txtCommandExecutor.cppCommandExecutor.hUnixFileGuard.cppUnixFileGuard.h
gpio
i2c
rpi
spi
uart
uio
utility.cpputility.hstm32h7
fsfw_tests
CMakeLists.txt
integration
CMakeLists.txt
assemblies
controller
devices
CMakeLists.txtTestCookie.cppTestCookie.hTestDeviceHandler.cppTestDeviceHandler.hTestEchoComIF.cppTestEchoComIF.h
devicedefinitions
task
internal
CMakeLists.txtInternalUnitTester.cppInternalUnitTester.hUnittDefinitions.cppUnittDefinitions.h
globalfunctions
osal
serialize
unit
CMakeLists.txtCatchDefinitions.cppCatchDefinitions.hCatchFactory.cppCatchFactory.hCatchRunner.cppCatchRunner.hCatchSetup.cpp
action
cfdp
CMakeLists.txttestAckPdu.cpptestCfdp.cpptestEofPdu.cpptestFileData.cpptestFinishedPdu.cpptestKeepAlivePdu.cpptestMetadataPdu.cpptestNakPdu.cpptestPromptPdu.cpptestTlvsLvs.cpp
container
CMakeLists.txtRingBufferTest.cppTestArrayList.cppTestDynamicFifo.cppTestFifo.cppTestFixedArrayList.cppTestFixedMap.cppTestFixedOrderedMultimap.cppTestPlacementFactory.cpp
datapoollocal
CMakeLists.txtDataSetTest.cppLocalPoolManagerTest.cppLocalPoolOwnerBase.cppLocalPoolOwnerBase.hLocalPoolVariableTest.cppLocalPoolVectorTest.cpp
devicehandler
CMakeLists.txtComIFMock.cppComIFMock.hCookieIFMock.cppCookieIFMock.hDeviceFdirMock.cppDeviceFdirMock.hDeviceHandlerCommander.cppDeviceHandlerCommander.hDeviceHandlerMock.cppDeviceHandlerMock.hTestDeviceHandlerBase.cpp
globalfunctions
CMakeLists.txttestBitutil.cpptestCRC.cpptestDleEncoder.cpptestOpDivider.cpptestTimevalOperations.cpp
hal
internalerror
mocks
CMakeLists.txtHkReceiverMock.hMessageQueueMockBase.hPeriodicTaskIFMock.hPowerSwitcherMock.cppPowerSwitcherMock.h
osal
power
printChar.cppprintChar.hserialize
CMakeLists.txtTestSerialBufferAdapter.cppTestSerialLinkedPacket.cppTestSerialLinkedPacket.hTestSerialization.cpp
storagemanager
testcfg
CMakeLists.txtFSFWConfig.h.inOBSWConfig.h.inTestsConfig.h.in
devices
events
ipc
objects
pollingsequence
returnvalues
tmtc
testtemplate
timemanager
tmtcpacket
version.cpptests
77
src/fsfw_tests/unit/CatchFactory.cpp
Normal file
77
src/fsfw_tests/unit/CatchFactory.cpp
Normal file
@ -0,0 +1,77 @@
|
||||
#include "CatchFactory.h"
|
||||
|
||||
#include <fsfw/datapoollocal/LocalDataPoolManager.h>
|
||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||
#include <fsfw/events/EventManager.h>
|
||||
#include <fsfw/health/HealthTable.h>
|
||||
#include <fsfw/internalerror/InternalErrorReporter.h>
|
||||
#include <fsfw/objectmanager/frameworkObjects.h>
|
||||
#include <fsfw/storagemanager/PoolManager.h>
|
||||
#include <fsfw/tmtcpacket/pus/tm/TmPacketStored.h>
|
||||
#include <fsfw/tmtcservices/CommandingServiceBase.h>
|
||||
#include <fsfw/tmtcservices/PusServiceBase.h>
|
||||
|
||||
#include "datapoollocal/LocalPoolOwnerBase.h"
|
||||
#include "mocks/HkReceiverMock.h"
|
||||
#include "tests/TestsConfig.h"
|
||||
|
||||
#if FSFW_ADD_DEFAULT_FACTORY_FUNCTIONS == 1
|
||||
|
||||
/**
|
||||
* @brief Produces system objects.
|
||||
* @details
|
||||
* Build tasks by using SystemObject Interface (Interface).
|
||||
* Header files of all tasks must be included
|
||||
* Please note that an object has to implement the system object interface
|
||||
* if the interface validity is checked or retrieved later by using the
|
||||
* get<TargetInterface>(object_id) function from the ObjectManagerIF.
|
||||
*
|
||||
* Framework objects are created first.
|
||||
*
|
||||
* @ingroup init
|
||||
*/
|
||||
void Factory::produceFrameworkObjects(void* args) {
|
||||
setStaticFrameworkObjectIds();
|
||||
new EventManager(objects::EVENT_MANAGER);
|
||||
new HealthTable(objects::HEALTH_TABLE);
|
||||
new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER);
|
||||
|
||||
new LocalPoolOwnerBase(objects::TEST_LOCAL_POOL_OWNER_BASE);
|
||||
new HkReceiverMock(objects::HK_RECEIVER_MOCK);
|
||||
|
||||
{
|
||||
PoolManager::LocalPoolConfig poolCfg = {{100, 16}, {50, 32}, {25, 64}, {15, 128}, {5, 1024}};
|
||||
new PoolManager(objects::TC_STORE, poolCfg);
|
||||
}
|
||||
|
||||
{
|
||||
PoolManager::LocalPoolConfig poolCfg = {{100, 16}, {50, 32}, {25, 64}, {15, 128}, {5, 1024}};
|
||||
new PoolManager(objects::TM_STORE, poolCfg);
|
||||
}
|
||||
|
||||
{
|
||||
PoolManager::LocalPoolConfig poolCfg = {{100, 16}, {50, 32}, {25, 64}, {15, 128}, {5, 1024}};
|
||||
new PoolManager(objects::IPC_STORE, poolCfg);
|
||||
}
|
||||
}
|
||||
|
||||
void Factory::setStaticFrameworkObjectIds() {
|
||||
PusServiceBase::packetSource = objects::NO_OBJECT;
|
||||
PusServiceBase::packetDestination = objects::NO_OBJECT;
|
||||
|
||||
CommandingServiceBase::defaultPacketSource = objects::NO_OBJECT;
|
||||
CommandingServiceBase::defaultPacketDestination = objects::NO_OBJECT;
|
||||
|
||||
VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION;
|
||||
|
||||
DeviceHandlerBase::powerSwitcherId = objects::NO_OBJECT;
|
||||
DeviceHandlerBase::rawDataReceiverId = objects::NO_OBJECT;
|
||||
|
||||
LocalDataPoolManager::defaultHkDestination = objects::HK_RECEIVER_MOCK;
|
||||
|
||||
DeviceHandlerFailureIsolation::powerConfirmationId = objects::NO_OBJECT;
|
||||
|
||||
TmPacketBase::timeStamperId = objects::NO_OBJECT;
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user