PLOC SUPV dummy has switch now
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
This commit is contained in:
parent
b1d2f73b01
commit
3c6eb265c7
@ -1,8 +1,10 @@
|
|||||||
#include "PlocSupervisorDummy.h"
|
#include "PlocSupervisorDummy.h"
|
||||||
|
|
||||||
PlocSupervisorDummy::PlocSupervisorDummy(object_id_t objectId, object_id_t comif,
|
PlocSupervisorDummy::PlocSupervisorDummy(object_id_t objectId, object_id_t comif,
|
||||||
CookieIF *comCookie)
|
CookieIF *comCookie, PowerSwitchIF &pwrSwitcher)
|
||||||
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
: DeviceHandlerBase(objectId, comif, comCookie) {
|
||||||
|
setPowerSwitcher(&pwrSwitcher);
|
||||||
|
}
|
||||||
|
|
||||||
PlocSupervisorDummy::~PlocSupervisorDummy() {}
|
PlocSupervisorDummy::~PlocSupervisorDummy() {}
|
||||||
|
|
||||||
@ -42,3 +44,10 @@ ReturnValue_t PlocSupervisorDummy::initializeLocalDataPool(localpool::DataPool &
|
|||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PlocSupervisorDummy::getSwitches(const uint8_t **switches,
|
||||||
|
uint8_t *numberOfSwitches) {
|
||||||
|
*numberOfSwitches = 1;
|
||||||
|
*switches = reinterpret_cast<const uint8_t *>(&switchId);
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||||
|
#include <mission/powerDefs.h>
|
||||||
|
|
||||||
class PlocSupervisorDummy : public DeviceHandlerBase {
|
class PlocSupervisorDummy : public DeviceHandlerBase {
|
||||||
public:
|
public:
|
||||||
@ -10,10 +11,13 @@ class PlocSupervisorDummy : public DeviceHandlerBase {
|
|||||||
static const uint8_t SIMPLE_COMMAND_DATA = 1;
|
static const uint8_t SIMPLE_COMMAND_DATA = 1;
|
||||||
static const uint8_t PERIODIC_REPLY_DATA = 2;
|
static const uint8_t PERIODIC_REPLY_DATA = 2;
|
||||||
|
|
||||||
PlocSupervisorDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
|
PlocSupervisorDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie,
|
||||||
|
PowerSwitchIF &pwrSwitcher);
|
||||||
virtual ~PlocSupervisorDummy();
|
virtual ~PlocSupervisorDummy();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
const power::Switches switchId = power::Switches::PDU1_CH6_PLOC_12V;
|
||||||
|
|
||||||
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;
|
||||||
@ -27,4 +31,5 @@ class PlocSupervisorDummy : public DeviceHandlerBase {
|
|||||||
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
||||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) override;
|
LocalDataPoolManager &poolManager) override;
|
||||||
|
ReturnValue_t getSwitches(const uint8_t **switches, uint8_t *numberOfSwitches) override;
|
||||||
};
|
};
|
||||||
|
@ -221,8 +221,8 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
|
|||||||
auto* plocMpsocDummy =
|
auto* plocMpsocDummy =
|
||||||
new PlocMpsocDummy(objects::PLOC_MPSOC_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
new PlocMpsocDummy(objects::PLOC_MPSOC_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
plocMpsocDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
plocMpsocDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
||||||
auto* plocSupervisorDummy = new PlocSupervisorDummy(objects::PLOC_SUPERVISOR_HANDLER,
|
auto* plocSupervisorDummy = new PlocSupervisorDummy(
|
||||||
objects::DUMMY_COM_IF, comCookieDummy);
|
objects::PLOC_SUPERVISOR_HANDLER, objects::DUMMY_COM_IF, comCookieDummy, pwrSwitcher);
|
||||||
plocSupervisorDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
plocSupervisorDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user