new dummy helper functions
This commit is contained in:
parent
2261ccb304
commit
3230efa4aa
@ -16,4 +16,5 @@ target_sources(
|
|||||||
GyroL3GD20Dummy.cpp
|
GyroL3GD20Dummy.cpp
|
||||||
MgmLIS3MDLDummy.cpp
|
MgmLIS3MDLDummy.cpp
|
||||||
PlPcduDummy.cpp
|
PlPcduDummy.cpp
|
||||||
CoreControllerDummy.cpp)
|
CoreControllerDummy.cpp
|
||||||
|
helpers.cpp)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "fsfw_hal/devicehandlers/devicedefinitions/MgmLIS3HandlerDefs.h"
|
#include "fsfw_hal/devicehandlers/devicedefinitions/MgmLIS3HandlerDefs.h"
|
||||||
|
|
||||||
MgmLIS3MDLDummy::MgmLIS3MDLDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
MgmLIS3MDLDummy::MgmLIS3MDLDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||||
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
: DeviceHandlerBase(objectId, comif, comCookie), dataset(this) {}
|
||||||
|
|
||||||
MgmLIS3MDLDummy::~MgmLIS3MDLDummy() {}
|
MgmLIS3MDLDummy::~MgmLIS3MDLDummy() {}
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#define DUMMIES_MGMLIS3MDLDUMMY_H_
|
#define DUMMIES_MGMLIS3MDLDUMMY_H_
|
||||||
|
|
||||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||||
|
#include "fsfw_hal/devicehandlers/devicedefinitions/MgmLIS3HandlerDefs.h"
|
||||||
|
|
||||||
class MgmLIS3MDLDummy : public DeviceHandlerBase {
|
class MgmLIS3MDLDummy : public DeviceHandlerBase {
|
||||||
public:
|
public:
|
||||||
@ -15,6 +16,7 @@ class MgmLIS3MDLDummy : public DeviceHandlerBase {
|
|||||||
virtual ~MgmLIS3MDLDummy();
|
virtual ~MgmLIS3MDLDummy();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
MGMLIS3MDL::MgmPrimaryDataset dataset;
|
||||||
void doStartUp() override;
|
void doStartUp() override;
|
||||||
void doShutDown() override;
|
void doShutDown() override;
|
||||||
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
||||||
|
52
dummies/helpers.cpp
Normal file
52
dummies/helpers.cpp
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
#include <dummies/AcuDummy.h>
|
||||||
|
#include <dummies/BpxDummy.h>
|
||||||
|
#include <dummies/ComCookieDummy.h>
|
||||||
|
#include <dummies/ComIFDummy.h>
|
||||||
|
#include <dummies/CoreControllerDummy.h>
|
||||||
|
#include <dummies/GyroAdisDummy.h>
|
||||||
|
#include <dummies/GyroL3GD20Dummy.h>
|
||||||
|
#include <dummies/ImtqDummy.h>
|
||||||
|
#include <dummies/MgmLIS3MDLDummy.h>
|
||||||
|
#include <dummies/P60DockDummy.h>
|
||||||
|
#include <dummies/PduDummy.h>
|
||||||
|
#include <dummies/PlPcduDummy.h>
|
||||||
|
#include <dummies/RwDummy.h>
|
||||||
|
#include <dummies/StarTrackerDummy.h>
|
||||||
|
#include <dummies/SyrlinksDummy.h>
|
||||||
|
#include "helpers.h"
|
||||||
|
|
||||||
|
using namespace dummy;
|
||||||
|
|
||||||
|
void createDummies(DummyCfg cfg) {
|
||||||
|
new ComIFDummy(objects::DUMMY_COM_IF);
|
||||||
|
ComCookieDummy* comCookieDummy = new ComCookieDummy();
|
||||||
|
new BpxDummy(objects::BPX_BATT_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
if(cfg.addCoreCtrlCfg) {
|
||||||
|
new CoreControllerDummy(objects::CORE_CONTROLLER);
|
||||||
|
}
|
||||||
|
|
||||||
|
new RwDummy(objects::RW1, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new RwDummy(objects::RW2, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new RwDummy(objects::RW3, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new RwDummy(objects::RW4, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new StarTrackerDummy(objects::STAR_TRACKER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new SyrlinksDummy(objects::SYRLINKS_HK_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new ImtqDummy(objects::IMTQ_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
if(cfg.addPowerDummies) {
|
||||||
|
new AcuDummy(objects::ACU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new PduDummy(objects::PDU1_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new PduDummy(objects::PDU2_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new P60DockDummy(objects::P60DOCK_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(cfg.addAcsBoardDummies) {
|
||||||
|
new GyroAdisDummy(objects::GYRO_0_ADIS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new GyroL3GD20Dummy(objects::GYRO_1_L3G_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new GyroAdisDummy(objects::GYRO_2_ADIS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new GyroL3GD20Dummy(objects::GYRO_3_L3G_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new MgmLIS3MDLDummy(objects::MGM_0_LIS3_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new MgmLIS3MDLDummy(objects::MGM_2_LIS3_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
}
|
||||||
|
|
||||||
|
new PlPcduDummy(objects::PLPCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
}
|
13
dummies/helpers.h
Normal file
13
dummies/helpers.h
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace dummy {
|
||||||
|
|
||||||
|
struct DummyCfg {
|
||||||
|
bool addCoreCtrlCfg = true;
|
||||||
|
bool addPowerDummies = true;
|
||||||
|
bool addAcsBoardDummies = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
void createDummies(DummyCfg cfg);
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user