Merge remote-tracking branch 'origin/develop' into scex-additions
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2022-10-10 11:16:19 +02:00
commit c82c4cf9d1
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
25 changed files with 225 additions and 63 deletions

View File

@ -95,11 +95,17 @@ set(OBSW_ADD_SUS_BOARD_ASS
set(OBSW_ADD_ACS_BOARD set(OBSW_ADD_ACS_BOARD
${INIT_VAL} ${INIT_VAL}
CACHE STRING "Add ACS board module") CACHE STRING "Add ACS board module")
set(OBSW_ADD_ACS_HANDLERS set(OBSW_ADD_GPS_CTRL
${INIT_VAL} ${INIT_VAL}
CACHE STRING "Add ACS handlers") CACHE STRING "Add GPS controllers")
set(OBSW_ADD_TCS_CTRL
${INIT_VAL}
CACHE STRING "Add TCS controllers")
set(OBSW_ADD_ACS_CTRL
${INIT_VAL}
CACHE STRING "Add ACS controller")
set(OBSW_ADD_RTD_DEVICES set(OBSW_ADD_RTD_DEVICES
${INIT_VAL} 1
CACHE STRING "Add RTD devices") CACHE STRING "Add RTD devices")
set(OBSW_ADD_RAD_SENSORS set(OBSW_ADD_RAD_SENSORS
${INIT_VAL} ${INIT_VAL}

View File

@ -43,7 +43,7 @@
#include <dummies/SusDummy.h> #include <dummies/SusDummy.h>
#include <dummies/SyrlinksDummy.h> #include <dummies/SyrlinksDummy.h>
#include <dummies/TemperatureSensorsDummy.h> #include <dummies/TemperatureSensorsDummy.h>
#include "dummies/helpers.h"
#include "mission/utility/GlobalConfigHandler.h" #include "mission/utility/GlobalConfigHandler.h"
void Factory::setStaticFrameworkObjectIds() { void Factory::setStaticFrameworkObjectIds() {
@ -64,28 +64,8 @@ void ObjectFactory::produce(void* args) {
Factory::setStaticFrameworkObjectIds(); Factory::setStaticFrameworkObjectIds();
ObjectFactory::produceGenericObjects(); ObjectFactory::produceGenericObjects();
new ComIFDummy(objects::DUMMY_COM_IF); dummy::DummyCfg cfg;
ComCookieDummy* comCookieDummy = new ComCookieDummy(); dummy::createDummies(cfg);
new BpxDummy(objects::BPX_BATT_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
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);
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);
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);
new TemperatureSensorsDummy(); new TemperatureSensorsDummy();
new SusDummy(); new SusDummy();
new ThermalController(objects::THERMAL_CONTROLLER, objects::NO_OBJECT); new ThermalController(objects::THERMAL_CONTROLLER, objects::NO_OBJECT);

View File

@ -30,7 +30,9 @@
#define OBSW_ADD_SUN_SENSORS @OBSW_ADD_SUN_SENSORS@ #define OBSW_ADD_SUN_SENSORS @OBSW_ADD_SUN_SENSORS@
#define OBSW_ADD_SUS_BOARD_ASS @OBSW_ADD_SUS_BOARD_ASS@ #define OBSW_ADD_SUS_BOARD_ASS @OBSW_ADD_SUS_BOARD_ASS@
#define OBSW_ADD_ACS_BOARD @OBSW_ADD_ACS_BOARD@ #define OBSW_ADD_ACS_BOARD @OBSW_ADD_ACS_BOARD@
#define OBSW_ADD_ACS_HANDLERS @OBSW_ADD_ACS_HANDLERS@ #define OBSW_ADD_ACS_CTRL @OBSW_ADD_ACS_CTRL@
#define OBSW_ADD_GPS_CTRL @OBSW_ADD_GPS_CTRL@
#define OBSW_ADD_TCS_CTRL @OBSW_ADD_TCS_CTRL@
#define OBSW_ADD_RW @OBSW_ADD_RW@ #define OBSW_ADD_RW @OBSW_ADD_RW@
#define OBSW_ADD_RTD_DEVICES @OBSW_ADD_RTD_DEVICES@ #define OBSW_ADD_RTD_DEVICES @OBSW_ADD_RTD_DEVICES@
#define OBSW_ADD_SCEX_DEVICE @OBSW_ADD_SCEX_DEVICE@ #define OBSW_ADD_SCEX_DEVICE @OBSW_ADD_SCEX_DEVICE@

View File

@ -140,22 +140,24 @@ void initmission::initTasks() {
PeriodicTaskIF* acsTask = factory->createPeriodicTask( PeriodicTaskIF* acsTask = factory->createPeriodicTask(
"ACS_TASK", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc); "ACS_TASK", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
#if OBSW_ADD_ACS_HANDLERS == 1 #if OBSW_ADD_GPS_CTRL == 1
result = acsTask->addComponent(objects::GPS_CONTROLLER); result = acsTask->addComponent(objects::GPS_CONTROLLER);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
initmission::printAddObjectError("GPS_CTRL", objects::GPS_CONTROLLER); initmission::printAddObjectError("GPS_CTRL", objects::GPS_CONTROLLER);
} }
#endif /* OBSW_ADD_ACS_HANDLERS */ #endif /* OBSW_ADD_GPS_CTRL */
#if OBSW_ADD_ACS_CTRL == 1
acsTask->addComponent(objects::ACS_CONTROLLER); acsTask->addComponent(objects::ACS_CONTROLLER);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
initmission::printAddObjectError("ACS_CTRL", objects::ACS_CONTROLLER); initmission::printAddObjectError("ACS_CTRL", objects::ACS_CONTROLLER);
} }
#endif
PeriodicTaskIF* sysTask = factory->createPeriodicTask( PeriodicTaskIF* sysTask = factory->createPeriodicTask(
"SYS_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc); "SYS_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
static_cast<void>(sysTask); static_cast<void>(sysTask);
#if OBSW_ADD_ACS_HANDLERS == 1 #if OBSW_ADD_ACS_BOARD == 1
result = sysTask->addComponent(objects::ACS_BOARD_ASS); result = sysTask->addComponent(objects::ACS_BOARD_ASS);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
initmission::printAddObjectError("ACS_BOARD_ASS", objects::ACS_BOARD_ASS); initmission::printAddObjectError("ACS_BOARD_ASS", objects::ACS_BOARD_ASS);
@ -201,8 +203,7 @@ void initmission::initTasks() {
objects::RTD_14_IC17_TCS_BOARD, objects::RTD_14_IC17_TCS_BOARD,
objects::RTD_15_IC18_IMTQ, objects::RTD_15_IC18_IMTQ,
}; };
tcsTask->addComponent(objects::TCS_BOARD_ASS);
tcsTask->addComponent(objects::THERMAL_CONTROLLER);
for (const auto& rtd : rtdIds) { for (const auto& rtd : rtdIds) {
tcsTask->addComponent(rtd, DeviceHandlerIF::PERFORM_OPERATION); tcsTask->addComponent(rtd, DeviceHandlerIF::PERFORM_OPERATION);
tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_WRITE); tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_WRITE);
@ -210,8 +211,13 @@ void initmission::initTasks() {
tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_READ); tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_READ);
tcsTask->addComponent(rtd, DeviceHandlerIF::GET_READ); tcsTask->addComponent(rtd, DeviceHandlerIF::GET_READ);
} }
tcsTask->addComponent(objects::TCS_BOARD_ASS);
#endif /* OBSW_ADD_RTD_DEVICES */ #endif /* OBSW_ADD_RTD_DEVICES */
#if OBSW_ADD_TCS_CTRL == 1
tcsTask->addComponent(objects::THERMAL_CONTROLLER);
#endif
#if OBSW_ADD_STAR_TRACKER == 1 #if OBSW_ADD_STAR_TRACKER == 1
PeriodicTaskIF* strHelperTask = factory->createPeriodicTask( PeriodicTaskIF* strHelperTask = factory->createPeriodicTask(
"STR_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc); "STR_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
@ -307,9 +313,7 @@ void initmission::initTasks() {
strHelperTask->startTask(); strHelperTask->startTask();
#endif /* OBSW_ADD_STAR_TRACKER == 1 */ #endif /* OBSW_ADD_STAR_TRACKER == 1 */
#if OBSW_ADD_ACS_HANDLERS == 1
acsTask->startTask(); acsTask->startTask();
#endif /* OBSW_ADD_ACS_HANDLERS == 1 */
sysTask->startTask(); sysTask->startTask();
#if OBSW_ADD_RTD_DEVICES == 1 #if OBSW_ADD_RTD_DEVICES == 1
tcsPollingTask->startTask(); tcsPollingTask->startTask();

View File

@ -332,7 +332,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
AcsBoardFdir* fdir = nullptr; AcsBoardFdir* fdir = nullptr;
static_cast<void>(fdir); static_cast<void>(fdir);
#if OBSW_ADD_ACS_HANDLERS == 1 #if OBSW_ADD_ACS_BOARD == 1
std::string spiDev = q7s::SPI_DEFAULT_DEV; std::string spiDev = q7s::SPI_DEFAULT_DEV;
SpiCookie* spiCookie = SpiCookie* spiCookie =
new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, MGMLIS3MDL::MAX_BUFFER_SIZE, new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, MGMLIS3MDL::MAX_BUFFER_SIZE,

View File

@ -1,10 +1,12 @@
#include <fsfw/health/HealthTableIF.h> #include <fsfw/health/HealthTableIF.h>
#include <fsfw/power/DummyPowerSwitcher.h>
#include "OBSWConfig.h" #include "OBSWConfig.h"
#include "bsp_q7s/core/CoreController.h" #include "bsp_q7s/core/CoreController.h"
#include "bsp_q7s/core/ObjectFactory.h" #include "bsp_q7s/core/ObjectFactory.h"
#include "busConf.h" #include "busConf.h"
#include "devConf.h" #include "devConf.h"
#include "dummies/helpers.h"
#include "eive/objects.h" #include "eive/objects.h"
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h" #include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
#include "linux/ObjectFactory.h" #include "linux/ObjectFactory.h"
@ -20,31 +22,34 @@ void ObjectFactory::produce(void* args) {
UartComIF* uartComIF = nullptr; UartComIF* uartComIF = nullptr;
SpiComIF* spiMainComIF = nullptr; SpiComIF* spiMainComIF = nullptr;
I2cComIF* i2cComIF = nullptr; I2cComIF* i2cComIF = nullptr;
PowerSwitchIF* pwrSwitcher = nullptr;
SpiComIF* spiRwComIF = nullptr; SpiComIF* spiRwComIF = nullptr;
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiMainComIF, &i2cComIF, &spiRwComIF); createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiMainComIF, &i2cComIF, &spiRwComIF);
createTmpComponents();
// Hardware is usually not connected to EM, so we need to create dummies which replace lower
// level components.
dummy::DummyCfg dummyCfg;
dummyCfg.addCoreCtrlCfg = false;
dummy::createDummies(dummyCfg);
new CoreController(objects::CORE_CONTROLLER); new CoreController(objects::CORE_CONTROLLER);
gpioCallbacks::disableAllDecoder(gpioComIF); gpioCallbacks::disableAllDecoder(gpioComIF);
createPcduComponents(gpioComIF, &pwrSwitcher); PowerSwitchIF* pwrSwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
// Regular FM code, does not work for EM if the hardware is not connected
// createPcduComponents(gpioComIF, &pwrSwitcher);
// createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
// createSyrlinksComponents(pwrSwitcher);
// createSunSensorComponents(gpioComIF, spiMainComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
// createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF);
// createTmpComponents();
createRadSensorComponent(gpioComIF); createRadSensorComponent(gpioComIF);
createSunSensorComponents(gpioComIF, spiMainComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
#if OBSW_ADD_ACS_BOARD == 1 #if OBSW_ADD_ACS_BOARD == 1
createAcsBoardComponents(gpioComIF, uartComIF, pwrSwitcher); createAcsBoardComponents(gpioComIF, uartComIF, pwrSwitcher);
#endif #endif
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable); createHeaterComponents(gpioComIF, pwrSwitcher, healthTable);
createSolarArrayDeploymentComponents(); createSolarArrayDeploymentComponents();
createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
#if OBSW_ADD_SYRLINKS == 1
#if OBSW_Q7S_EM == 1
createSyrlinksComponents(nullptr);
#else
createSyrlinksComponents(pwrSwitcher);
#endif /* OBSW_Q7S_EM == 1 */
#endif /* OBSW_ADD_SYRLINKS == 1 */
createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF);
createPayloadComponents(gpioComIF); createPayloadComponents(gpioComIF);
#if OBSW_ADD_MGT == 1 #if OBSW_ADD_MGT == 1
@ -68,4 +73,5 @@ void ObjectFactory::produce(void* args) {
#endif /* OBSW_ADD_TEST_CODE == 1 */ #endif /* OBSW_ADD_TEST_CODE == 1 */
createMiscComponents(); createMiscComponents();
createAcsController();
} }

View File

@ -109,6 +109,9 @@ enum commonObjects : uint32_t {
SYRLINKS_HK_HANDLER = 0x445300A3, SYRLINKS_HK_HANDLER = 0x445300A3,
/* 0x49 ('I') for Communication Interfaces */
SPI_RTD_COM_IF = 0x49020006,
// 0x60 for other stuff // 0x60 for other stuff
HEATER_0_PLOC_PROC_BRD = 0x60000000, HEATER_0_PLOC_PROC_BRD = 0x60000000,
HEATER_1_PCDU_BRD = 0x60000001, HEATER_1_PCDU_BRD = 0x60000001,

View File

@ -16,4 +16,6 @@ target_sources(
GyroL3GD20Dummy.cpp GyroL3GD20Dummy.cpp
MgmLIS3MDLDummy.cpp MgmLIS3MDLDummy.cpp
PlPcduDummy.cpp PlPcduDummy.cpp
CoreControllerDummy.cpp) CoreControllerDummy.cpp
helpers.cpp
MgmRm3100Dummy.cpp)

View File

@ -3,7 +3,7 @@
#include "mission/devices/devicedefinitions/GyroADIS1650XDefinitions.h" #include "mission/devices/devicedefinitions/GyroADIS1650XDefinitions.h"
GyroAdisDummy::GyroAdisDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) GyroAdisDummy::GyroAdisDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
: DeviceHandlerBase(objectId, comif, comCookie) {} : DeviceHandlerBase(objectId, comif, comCookie), dataset(this) {}
GyroAdisDummy::~GyroAdisDummy() {} GyroAdisDummy::~GyroAdisDummy() {}

View File

@ -3,6 +3,8 @@
#include <fsfw/devicehandlers/DeviceHandlerBase.h> #include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include "mission/devices/devicedefinitions/GyroADIS1650XDefinitions.h"
class GyroAdisDummy : public DeviceHandlerBase { class GyroAdisDummy : public DeviceHandlerBase {
public: public:
static const DeviceCommandId_t SIMPLE_COMMAND = 1; static const DeviceCommandId_t SIMPLE_COMMAND = 1;
@ -15,6 +17,7 @@ class GyroAdisDummy : public DeviceHandlerBase {
virtual ~GyroAdisDummy(); virtual ~GyroAdisDummy();
protected: protected:
AdisGyroPrimaryDataset 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;

View File

@ -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() {}

View File

@ -3,6 +3,8 @@
#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:
static const DeviceCommandId_t SIMPLE_COMMAND = 1; static const DeviceCommandId_t SIMPLE_COMMAND = 1;
@ -15,6 +17,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;

View File

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

29
dummies/MgmRm3100Dummy.h Normal file
View File

@ -0,0 +1,29 @@
#ifndef DUMMIES_MGMRM3100DUMMY_H_
#define DUMMIES_MGMRM3100DUMMY_H_
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
#include "fsfw_hal/devicehandlers/devicedefinitions/MgmRM3100HandlerDefs.h"
class MgmRm3100Dummy : public DeviceHandlerBase {
public:
MgmRm3100Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
virtual ~MgmRm3100Dummy();
protected:
RM3100::Rm3100PrimaryDataset dataset;
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_MGMRM3100DUMMY_H_ */

67
dummies/helpers.cpp Normal file
View File

@ -0,0 +1,67 @@
#include "helpers.h"
#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/MgmRm3100Dummy.h>
#include <dummies/P60DockDummy.h>
#include <dummies/PduDummy.h>
#include <dummies/PlPcduDummy.h>
#include <dummies/RwDummy.h>
#include <dummies/StarTrackerDummy.h>
#include <dummies/SusDummy.h>
#include <dummies/SyrlinksDummy.h>
#include <dummies/TemperatureSensorsDummy.h>
using namespace dummy;
void dummy::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);
}
if (cfg.addRtdComIFDummy) {
new ComIFDummy(objects::SPI_RTD_COM_IF);
}
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 MgmRm3100Dummy(objects::MGM_1_RM3100_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new MgmRm3100Dummy(objects::MGM_3_RM3100_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
}
if (cfg.addSusDummies) {
new SusDummy();
}
if (cfg.addTempSensorDummies) {
new TemperatureSensorsDummy();
}
new PlPcduDummy(objects::PLPCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
}

16
dummies/helpers.h Normal file
View File

@ -0,0 +1,16 @@
#pragma once
namespace dummy {
struct DummyCfg {
bool addCoreCtrlCfg = true;
bool addPowerDummies = true;
bool addAcsBoardDummies = true;
bool addSusDummies = true;
bool addTempSensorDummies = true;
bool addRtdComIFDummy = true;
};
void createDummies(DummyCfg cfg);
} // namespace dummy

View File

@ -1,7 +1,7 @@
/** /**
* @brief Auto-generated event translation file. Contains 225 translations. * @brief Auto-generated event translation file. Contains 225 translations.
* @details * @details
* Generated on: 2022-10-10 10:17:44 * Generated on: 2022-10-10 11:15:49
*/ */
#include "translateEvents.h" #include "translateEvents.h"

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file. * @brief Auto-generated object translation file.
* @details * @details
* Contains 138 translations. * Contains 138 translations.
* Generated on: 2022-10-10 10:17:44 * Generated on: 2022-10-10 11:15:49
*/ */
#include "translateObjects.h" #include "translateObjects.h"

View File

@ -1,7 +1,7 @@
/** /**
* @brief Auto-generated event translation file. Contains 225 translations. * @brief Auto-generated event translation file. Contains 225 translations.
* @details * @details
* Generated on: 2022-10-10 10:17:44 * Generated on: 2022-10-10 11:15:49
*/ */
#include "translateEvents.h" #include "translateEvents.h"

View File

@ -53,7 +53,6 @@ enum sourceObjects : uint32_t {
/* Custom device handler */ /* Custom device handler */
SPI_RW_COM_IF = 0x49020005, SPI_RW_COM_IF = 0x49020005,
SPI_RTD_COM_IF = 0x49020006,
/* 0x54 ('T') for test handlers */ /* 0x54 ('T') for test handlers */
TEST_TASK = 0x54694269, TEST_TASK = 0x54694269,

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file. * @brief Auto-generated object translation file.
* @details * @details
* Contains 138 translations. * Contains 138 translations.
* Generated on: 2022-10-10 10:17:44 * Generated on: 2022-10-10 11:15:49
*/ */
#include "translateObjects.h" #include "translateObjects.h"

View File

@ -370,7 +370,7 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.8, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::RAD_SENSOR, length * 0.8, DeviceHandlerIF::GET_READ);
#endif #endif
#if OBSW_ADD_ACS_BOARD == 1 && OBSW_ADD_ACS_HANDLERS == 1 #if OBSW_ADD_ACS_BOARD == 1
bool enableAside = true; bool enableAside = true;
bool enableBside = true; bool enableBside = true;
if (enableAside) { if (enableAside) {
@ -436,7 +436,7 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.7, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.7, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.85, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * 0.85, DeviceHandlerIF::GET_READ);
} }
#endif /* OBSW_ADD_ACS_BOARD == 1 && OBSW_ADD_ACS_HANDLERS == 1 */ #endif /* OBSW_ADD_ACS_BOARD == 1 */
return thisSequence->checkSequence(); return thisSequence->checkSequence();
} }

View File

@ -57,7 +57,7 @@
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries> <sourceEntries>
<entry excluding="cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> <entry excluding="cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries> </sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>
@ -119,7 +119,7 @@
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries> <sourceEntries>
<entry excluding="cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> <entry excluding="cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries> </sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>
@ -187,7 +187,7 @@
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries> <sourceEntries>
<entry excluding="cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> <entry excluding="cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries> </sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>
@ -255,7 +255,7 @@
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries> <sourceEntries>
<entry excluding="cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> <entry excluding="cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries> </sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>

View File

@ -113,6 +113,8 @@ class AdisGyroPrimaryDataset : public StaticLocalDataSet<8> {
private: private:
friend class GyroADIS1650XHandler; friend class GyroADIS1650XHandler;
friend class GyroAdisDummy;
/** Constructor for the data creator */ /** Constructor for the data creator */
AdisGyroPrimaryDataset(HasLocalDataPoolIF* hkOwner) AdisGyroPrimaryDataset(HasLocalDataPoolIF* hkOwner)
: StaticLocalDataSet(hkOwner, ADIS1650X::ADIS_DATASET_ID) {} : StaticLocalDataSet(hkOwner, ADIS1650X::ADIS_DATASET_ID) {}

2
tmtc

@ -1 +1 @@
Subproject commit a91d40f3337a948bc061b033e194dd629fd34be1 Subproject commit f35c96eecc893f529fe0494dd526b60d25ab669c