add SCEX dummy
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Marius Eggert 2023-02-13 17:24:56 +01:00
parent 17fa9a6e82
commit f5092b27ba
4 changed files with 78 additions and 0 deletions

View File

@ -20,6 +20,7 @@ target_sources(
GyroL3GD20Dummy.cpp GyroL3GD20Dummy.cpp
MgmLIS3MDLDummy.cpp MgmLIS3MDLDummy.cpp
PlPcduDummy.cpp PlPcduDummy.cpp
ScexDummy.cpp
CoreControllerDummy.cpp CoreControllerDummy.cpp
helpers.cpp helpers.cpp
MgmRm3100Dummy.cpp MgmRm3100Dummy.cpp

40
dummies/ScexDummy.cpp Normal file
View File

@ -0,0 +1,40 @@
#include "ScexDummy.h"
ScexDummy::ScexDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
: DeviceHandlerBase(objectId, comif, comCookie) {}
ScexDummy::~ScexDummy() {}
void ScexDummy::doStartUp() {}
void ScexDummy::doShutDown() {}
ReturnValue_t ScexDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; }
ReturnValue_t ScexDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t ScexDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData,
size_t commandDataLen) {
return returnvalue::OK;
}
ReturnValue_t ScexDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
size_t *foundLen) {
return returnvalue::OK;
}
ReturnValue_t ScexDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
return returnvalue::OK;
}
void ScexDummy::fillCommandAndReplyMap() {}
uint32_t ScexDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
ReturnValue_t ScexDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) {
return returnvalue::OK;
}

34
dummies/ScexDummy.h Normal file
View File

@ -0,0 +1,34 @@
#ifndef DUMMIES_SCEXDUMMY_H_
#define DUMMIES_SCEXDUMMY_H_
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
class ScexDummy : 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;
ScexDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
virtual ~ScexDummy();
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;
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) override;
};
#endif /* DUMMIES_SCEXDUMMY_H_ */

View File

@ -17,6 +17,7 @@
#include <dummies/PlPcduDummy.h> #include <dummies/PlPcduDummy.h>
#include <dummies/RwDummy.h> #include <dummies/RwDummy.h>
#include <dummies/SaDeploymentDummy.h> #include <dummies/SaDeploymentDummy.h>
#include <dummies/ScexDummy.h>
#include <dummies/StarTrackerDummy.h> #include <dummies/StarTrackerDummy.h>
#include <dummies/SusDummy.h> #include <dummies/SusDummy.h>
#include <dummies/SyrlinksDummy.h> #include <dummies/SyrlinksDummy.h>
@ -195,5 +196,7 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
} }
auto* camSwitcher = new CamSwitcher(objects::CAM_SWITCHER, pwrSwitcher, power::NO_SWITCH); auto* camSwitcher = new CamSwitcher(objects::CAM_SWITCHER, pwrSwitcher, power::NO_SWITCH);
camSwitcher->connectModeTreeParent(satsystem::pl::SUBSYSTEM); camSwitcher->connectModeTreeParent(satsystem::pl::SUBSYSTEM);
auto* scexDummy = new ScexDummy(objects::SCEX, objects::DUMMY_COM_IF, comCookieDummy);
scexDummy->connectModeTreeParent(satsystem::pl::SUBSYSTEM);
new PlPcduDummy(objects::PLPCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); new PlPcduDummy(objects::PLPCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
} }