need to fix all of these TODOs
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Robin Müller 2022-09-29 19:40:00 +02:00
parent 9512a7d280
commit 6af7ccc6a2
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
31 changed files with 143 additions and 156 deletions

View File

@ -31,10 +31,7 @@ xsc::Chip CoreController::CURRENT_CHIP = xsc::Chip::NO_CHIP;
xsc::Copy CoreController::CURRENT_COPY = xsc::Copy::NO_COPY; xsc::Copy CoreController::CURRENT_COPY = xsc::Copy::NO_COPY;
CoreController::CoreController(object_id_t objectId) CoreController::CoreController(object_id_t objectId)
: ExtendedControllerBase(objectId, objects::NO_OBJECT, 5), : ExtendedControllerBase(objectId, 5), opDivider5(5), opDivider10(10), hkSet(this) {
opDivider5(5),
opDivider10(10),
hkSet(this) {
ReturnValue_t result = returnvalue::OK; ReturnValue_t result = returnvalue::OK;
try { try {
result = initWatchdogFifo(); result = initWatchdogFifo();

View File

@ -1,6 +1,7 @@
#include <mission/system/objects/AcsSubsystem.h>
#include "ObjectFactory.h" #include "ObjectFactory.h"
#include <mission/system/objects/AcsSubsystem.h>
#include "OBSWConfig.h" #include "OBSWConfig.h"
#include "bsp_q7s/boardtest/Q7STestTask.h" #include "bsp_q7s/boardtest/Q7STestTask.h"
#include "bsp_q7s/callbacks/gnssCallback.h" #include "bsp_q7s/callbacks/gnssCallback.h"
@ -35,7 +36,6 @@
#include "linux/obc/PdecHandler.h" #include "linux/obc/PdecHandler.h"
#include "linux/obc/Ptme.h" #include "linux/obc/Ptme.h"
#include "linux/obc/PtmeConfig.h" #include "linux/obc/PtmeConfig.h"
#include "mission/csp/CspCookie.h" #include "mission/csp/CspCookie.h"
#include "mission/system/fdir/AcsBoardFdir.h" #include "mission/system/fdir/AcsBoardFdir.h"
#include "mission/system/fdir/GomspacePowerFdir.h" #include "mission/system/fdir/GomspacePowerFdir.h"
@ -46,7 +46,6 @@
#include "mission/system/objects/SusAssembly.h" #include "mission/system/objects/SusAssembly.h"
#include "mission/system/objects/TcsBoardAssembly.h" #include "mission/system/objects/TcsBoardAssembly.h"
#include "mission/system/tree/acsModeTree.h" #include "mission/system/tree/acsModeTree.h"
#include "tmtc/pusIds.h" #include "tmtc/pusIds.h"
#if OBSW_TEST_LIBGPIOD == 1 #if OBSW_TEST_LIBGPIOD == 1
#include "linux/boardtest/LibgpiodTest.h" #include "linux/boardtest/LibgpiodTest.h"
@ -234,7 +233,7 @@ void ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF) {
} }
void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComIF* uartComIF, void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComIF* uartComIF,
PowerSwitchIF* pwrSwitcher, object_id_t acsSubsystemId) { PowerSwitchIF* pwrSwitcher) {
using namespace gpio; using namespace gpio;
GpioCookie* gpioCookieAcsBoard = new GpioCookie(); GpioCookie* gpioCookieAcsBoard = new GpioCookie();
std::vector<std::reference_wrapper<DeviceHandlerBase>> assemblyChildren; std::vector<std::reference_wrapper<DeviceHandlerBase>> assemblyChildren;
@ -475,11 +474,12 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
objects::MGM_0_LIS3_HANDLER, objects::MGM_1_RM3100_HANDLER, objects::MGM_2_LIS3_HANDLER, objects::MGM_0_LIS3_HANDLER, objects::MGM_1_RM3100_HANDLER, objects::MGM_2_LIS3_HANDLER,
objects::MGM_3_RM3100_HANDLER, objects::GYRO_0_ADIS_HANDLER, objects::GYRO_1_L3G_HANDLER, objects::MGM_3_RM3100_HANDLER, objects::GYRO_0_ADIS_HANDLER, objects::GYRO_1_L3G_HANDLER,
objects::GYRO_2_ADIS_HANDLER, objects::GYRO_3_L3G_HANDLER, objects::GPS_CONTROLLER); objects::GYRO_2_ADIS_HANDLER, objects::GYRO_3_L3G_HANDLER, objects::GPS_CONTROLLER);
auto acsAss = new AcsBoardAssembly(objects::ACS_BOARD_ASS, acsSubsystemId, pwrSwitcher, auto acsAss =
acsBoardHelper, gpioComIF); new AcsBoardAssembly(objects::ACS_BOARD_ASS, pwrSwitcher, acsBoardHelper, gpioComIF);
acsAss->connectModeTreeParent(satsystem::ACS_SUBSYSTEM);
static_cast<void>(acsAss); static_cast<void>(acsAss);
auto assQueueId = acsAss->getCommandQueue(); auto assQueueId = acsAss->getCommandQueue();
for (auto& assChild: assemblyChildren) { for (auto& assChild : assemblyChildren) {
assChild.get().setParentQueue(assQueueId); assChild.get().setParentQueue(assQueueId);
} }
#endif /* OBSW_ADD_ACS_HANDLERS == 1 */ #endif /* OBSW_ADD_ACS_HANDLERS == 1 */

View File

@ -28,7 +28,7 @@ void createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
void createTmpComponents(); void createTmpComponents();
void createRadSensorComponent(LinuxLibgpioIF* gpioComIF); void createRadSensorComponent(LinuxLibgpioIF* gpioComIF);
void createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComIF* uartComIF, void createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComIF* uartComIF,
PowerSwitchIF* pwrSwitcher, object_id_t acsSubsystemId); PowerSwitchIF* pwrSwitcher);
void createHeaterComponents(GpioIF* gpioIF, PowerSwitchIF* pwrSwitcher, HealthTableIF* healthTable); void createHeaterComponents(GpioIF* gpioIF, PowerSwitchIF* pwrSwitcher, HealthTableIF* healthTable);
void createImtqComponents(PowerSwitchIF* pwrSwitcher, object_id_t subsystemId); void createImtqComponents(PowerSwitchIF* pwrSwitcher, object_id_t subsystemId);
void createBpxBatteryComponent(); void createBpxBatteryComponent();

View File

@ -31,7 +31,7 @@ void ObjectFactory::produce(void* args) {
createSunSensorComponents(gpioComIF, spiMainComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV); createSunSensorComponents(gpioComIF, spiMainComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
#if OBSW_ADD_ACS_BOARD == 1 #if OBSW_ADD_ACS_BOARD == 1
createAcsBoardComponents(gpioComIF, uartComIF, pwrSwitcher, objects::ACS_SUBSYSTEM); createAcsBoardComponents(gpioComIF, uartComIF, pwrSwitcher);
#endif #endif
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable); createHeaterComponents(gpioComIF, pwrSwitcher, healthTable);
createSolarArrayDeploymentComponents(); createSolarArrayDeploymentComponents();

2
fsfw

@ -1 +1 @@
Subproject commit f78344b8fba94158f3703ee1caa070bf97a04d0a Subproject commit f824004897e29bf90c2b02578625ba3d51786fdf

View File

@ -163,8 +163,7 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
objects::SUS_8_R_LOC_XBYBZB_PT_YB, objects::SUS_9_R_LOC_XBYBZB_PT_YF, objects::SUS_8_R_LOC_XBYBZB_PT_YB, objects::SUS_9_R_LOC_XBYBZB_PT_YF,
objects::SUS_10_N_LOC_XMYBZF_PT_ZF, objects::SUS_11_R_LOC_XBYMZB_PT_ZB}; objects::SUS_10_N_LOC_XMYBZF_PT_ZF, objects::SUS_11_R_LOC_XBYMZB_PT_ZB};
SusAssHelper susAssHelper = SusAssHelper(susIds); SusAssHelper susAssHelper = SusAssHelper(susIds);
auto susAss = auto susAss = new SusAssembly(objects::SUS_BOARD_ASS, pwrSwitcher, susAssHelper);
new SusAssembly(objects::SUS_BOARD_ASS, objects::NO_OBJECT, pwrSwitcher, susAssHelper);
static_cast<void>(susAss); static_cast<void>(susAss);
for (auto& sus : susHandlers) { for (auto& sus : susHandlers) {
if (sus != nullptr) { if (sus != nullptr) {
@ -281,9 +280,8 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
RtdFdir* rtdFdir = nullptr; RtdFdir* rtdFdir = nullptr;
TcsBoardHelper helper(rtdInfos); TcsBoardHelper helper(rtdInfos);
TcsBoardAssembly* tcsBoardAss = TcsBoardAssembly* tcsBoardAss = new TcsBoardAssembly(
new TcsBoardAssembly(objects::TCS_BOARD_ASS, objects::NO_OBJECT, pwrSwitcher, objects::TCS_BOARD_ASS, pwrSwitcher, pcdu::Switches::PDU1_CH0_TCS_BOARD_3V3, helper);
pcdu::Switches::PDU1_CH0_TCS_BOARD_3V3, helper);
static_cast<void>(tcsBoardAss); static_cast<void>(tcsBoardAss);
// Create special low level reader communication interface // Create special low level reader communication interface
new Max31865RtdReader(objects::SPI_RTD_COM_IF, comIF, gpioComIF); new Max31865RtdReader(objects::SPI_RTD_COM_IF, comIF, gpioComIF);
@ -312,10 +310,12 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
} }
void ObjectFactory::createThermalController() { void ObjectFactory::createThermalController() {
new ThermalController(objects::THERMAL_CONTROLLER, objects::NO_OBJECT); new ThermalController(objects::THERMAL_CONTROLLER);
} }
void ObjectFactory::createAcsController() { new AcsController(objects::ACS_CONTROLLER); } AcsController* ObjectFactory::createAcsController() {
return new AcsController(objects::ACS_CONTROLLER);
}
void ObjectFactory::gpioChecker(ReturnValue_t result, std::string output) { void ObjectFactory::gpioChecker(ReturnValue_t result, std::string output) {
if (result != returnvalue::OK) { if (result != returnvalue::OK) {

View File

@ -8,6 +8,7 @@
class GpioIF; class GpioIF;
class SpiComIF; class SpiComIF;
class PowerSwitchIF; class PowerSwitchIF;
class AcsController;
namespace ObjectFactory { namespace ObjectFactory {
@ -19,6 +20,6 @@ void createRtdComponents(std::string spiDev, GpioIF* gpioComIF, PowerSwitchIF* p
void gpioChecker(ReturnValue_t result, std::string output); void gpioChecker(ReturnValue_t result, std::string output);
void createThermalController(); void createThermalController();
void createAcsController(); AcsController* createAcsController();
} // namespace ObjectFactory } // namespace ObjectFactory

View File

@ -3,7 +3,7 @@
#include <fsfw/datapool/PoolReadGuard.h> #include <fsfw/datapool/PoolReadGuard.h>
AcsController::AcsController(object_id_t objectId) AcsController::AcsController(object_id_t objectId)
: ExtendedControllerBase(objectId, objects::NO_OBJECT), mgmData(this) {} : ExtendedControllerBase(objectId), mgmData(this) {}
ReturnValue_t AcsController::handleCommandMessage(CommandMessage *message) { ReturnValue_t AcsController::handleCommandMessage(CommandMessage *message) {
return returnvalue::OK; return returnvalue::OK;

View File

@ -14,8 +14,8 @@
#include <mission/devices/devicedefinitions/payloadPcduDefinitions.h> #include <mission/devices/devicedefinitions/payloadPcduDefinitions.h>
#include <objects/systemObjectList.h> #include <objects/systemObjectList.h>
ThermalController::ThermalController(object_id_t objectId, object_id_t parentId) ThermalController::ThermalController(object_id_t objectId)
: ExtendedControllerBase(objectId, parentId), : ExtendedControllerBase(objectId),
sensorTemperatures(this), sensorTemperatures(this),
susTemperatures(this), susTemperatures(this),
deviceTemperatures(this), deviceTemperatures(this),

View File

@ -12,7 +12,7 @@ class ThermalController : public ExtendedControllerBase {
public: public:
static const uint16_t INVALID_TEMPERATURE = 999; static const uint16_t INVALID_TEMPERATURE = 999;
ThermalController(object_id_t objectId, object_id_t parentId); ThermalController(object_id_t objectId);
ReturnValue_t initialize() override; ReturnValue_t initialize() override;

View File

@ -6,11 +6,10 @@
#include "OBSWConfig.h" #include "OBSWConfig.h"
AcsBoardAssembly::AcsBoardAssembly(object_id_t objectId, object_id_t parentId, AcsBoardAssembly::AcsBoardAssembly(object_id_t objectId, PowerSwitchIF* switcher,
PowerSwitchIF* switcher, AcsBoardHelper helper, GpioIF* gpioIF) AcsBoardHelper helper, GpioIF* gpioIF)
: DualLaneAssemblyBase(objectId, parentId, switcher, SWITCH_A, SWITCH_B, : DualLaneAssemblyBase(objectId, switcher, SWITCH_A, SWITCH_B, POWER_STATE_MACHINE_TIMEOUT,
POWER_STATE_MACHINE_TIMEOUT, SIDE_SWITCH_TRANSITION_NOT_ALLOWED, SIDE_SWITCH_TRANSITION_NOT_ALLOWED, TRANSITION_OTHER_SIDE_FAILED),
TRANSITION_OTHER_SIDE_FAILED),
helper(helper), helper(helper),
gpioIF(gpioIF) { gpioIF(gpioIF) {
if (switcher == nullptr) { if (switcher == nullptr) {
@ -276,41 +275,42 @@ void AcsBoardAssembly::refreshHelperModes() {
} }
ReturnValue_t AcsBoardAssembly::initialize() { ReturnValue_t AcsBoardAssembly::initialize() {
ReturnValue_t result = registerChild(helper.gyro0AdisIdSideA); // TODO: Fix this
if (result != returnvalue::OK) { // ReturnValue_t result = registerChild(helper.gyro0AdisIdSideA);
return result; // if (result != returnvalue::OK) {
} // return result;
result = registerChild(helper.gyro1L3gIdSideA); // }
if (result != returnvalue::OK) { // result = registerChild(helper.gyro1L3gIdSideA);
return result; // if (result != returnvalue::OK) {
} // return result;
result = registerChild(helper.gyro2AdisIdSideB); // }
if (result != returnvalue::OK) { // result = registerChild(helper.gyro2AdisIdSideB);
return result; // if (result != returnvalue::OK) {
} // return result;
result = registerChild(helper.gyro3L3gIdSideB); // }
if (result != returnvalue::OK) { // result = registerChild(helper.gyro3L3gIdSideB);
return result; // if (result != returnvalue::OK) {
} // return result;
result = registerChild(helper.mgm0Lis3IdSideA); // }
if (result != returnvalue::OK) { // result = registerChild(helper.mgm0Lis3IdSideA);
return result; // if (result != returnvalue::OK) {
} // return result;
result = registerChild(helper.mgm1Rm3100IdSideA); // }
if (result != returnvalue::OK) { // result = registerChild(helper.mgm1Rm3100IdSideA);
return result; // if (result != returnvalue::OK) {
} // return result;
result = registerChild(helper.mgm2Lis3IdSideB); // }
if (result != returnvalue::OK) { // result = registerChild(helper.mgm2Lis3IdSideB);
return result; // if (result != returnvalue::OK) {
} // return result;
result = registerChild(helper.mgm3Rm3100IdSideB); // }
if (result != returnvalue::OK) { // result = registerChild(helper.mgm3Rm3100IdSideB);
return result; // if (result != returnvalue::OK) {
} // return result;
result = registerChild(helper.gpsId); // }
if (result != returnvalue::OK) { // result = registerChild(helper.gpsId);
return result; // if (result != returnvalue::OK) {
} // return result;
// }
return AssemblyBase::initialize(); return AssemblyBase::initialize();
} }

View File

@ -94,8 +94,8 @@ class AcsBoardAssembly : public DualLaneAssemblyBase {
static constexpr uint8_t NUMBER_DEVICES_MODE_TABLE = 9; static constexpr uint8_t NUMBER_DEVICES_MODE_TABLE = 9;
AcsBoardAssembly(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher, AcsBoardAssembly(object_id_t objectId, PowerSwitchIF* pwrSwitcher, AcsBoardHelper helper,
AcsBoardHelper helper, GpioIF* gpioIF); GpioIF* gpioIF);
/** /**
* In dual mode, the A side or the B side GPS device can be used, but not both. * In dual mode, the A side or the B side GPS device can be used, but not both.

View File

@ -1,5 +1,5 @@
#include "AcsSubsystem.h" #include "AcsSubsystem.h"
AcsSubsystem::AcsSubsystem(object_id_t setObjectId, object_id_t parent, AcsSubsystem::AcsSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables) uint32_t maxNumberOfTables)
: Subsystem(setObjectId, parent, maxNumberOfSequences, maxNumberOfTables) {} : Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables) {}

View File

@ -5,8 +5,7 @@
class AcsSubsystem : public Subsystem { class AcsSubsystem : public Subsystem {
public: public:
AcsSubsystem(object_id_t setObjectId, object_id_t parent, uint32_t maxNumberOfSequences, AcsSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables);
uint32_t maxNumberOfTables);
private: private:
}; };

View File

@ -1,14 +1,13 @@
target_sources(${LIB_EIVE_MISSION} PRIVATE target_sources(
EiveSystem.cpp ${LIB_EIVE_MISSION}
PRIVATE EiveSystem.cpp
AcsSubsystem.cpp AcsSubsystem.cpp
ComSubsystem.cpp ComSubsystem.cpp
PayloadSubsystem.cpp PayloadSubsystem.cpp
AcsBoardAssembly.cpp AcsBoardAssembly.cpp
SusAssembly.cpp SusAssembly.cpp
RwAssembly.cpp RwAssembly.cpp
DualLanePowerStateMachine.cpp DualLanePowerStateMachine.cpp
PowerStateMachineBase.cpp PowerStateMachineBase.cpp
DualLaneAssemblyBase.cpp DualLaneAssemblyBase.cpp
TcsBoardAssembly.cpp TcsBoardAssembly.cpp)
)

View File

@ -1,5 +1,5 @@
#include "ComSubsystem.h" #include "ComSubsystem.h"
ComSubsystem::ComSubsystem(object_id_t setObjectId, object_id_t parent, ComSubsystem::ComSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables) uint32_t maxNumberOfTables)
: Subsystem(setObjectId, parent, maxNumberOfSequences, maxNumberOfTables) {} : Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables) {}

View File

@ -5,8 +5,7 @@
class ComSubsystem : public Subsystem { class ComSubsystem : public Subsystem {
public: public:
ComSubsystem(object_id_t setObjectId, object_id_t parent, uint32_t maxNumberOfSequences, ComSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables);
uint32_t maxNumberOfTables);
private: private:
}; };

View File

@ -4,12 +4,11 @@
#include "OBSWConfig.h" #include "OBSWConfig.h"
DualLaneAssemblyBase::DualLaneAssemblyBase(object_id_t objectId, object_id_t parentId, DualLaneAssemblyBase::DualLaneAssemblyBase(object_id_t objectId, PowerSwitchIF* pwrSwitcher,
PowerSwitchIF* pwrSwitcher, pcdu::Switches switch1, pcdu::Switches switch1, pcdu::Switches switch2,
pcdu::Switches switch2, Event pwrTimeoutEvent, Event pwrTimeoutEvent, Event sideSwitchNotAllowedEvent,
Event sideSwitchNotAllowedEvent,
Event transitionOtherSideFailedEvent) Event transitionOtherSideFailedEvent)
: AssemblyBase(objectId, parentId, 20), : AssemblyBase(objectId, 20),
pwrStateMachine(switch1, switch2, pwrSwitcher), pwrStateMachine(switch1, switch2, pwrSwitcher),
pwrTimeoutEvent(pwrTimeoutEvent), pwrTimeoutEvent(pwrTimeoutEvent),
sideSwitchNotAllowedEvent(sideSwitchNotAllowedEvent), sideSwitchNotAllowedEvent(sideSwitchNotAllowedEvent),

View File

@ -18,8 +18,8 @@ class DualLaneAssemblyBase : public AssemblyBase, public ConfirmsFailuresIF {
static constexpr UniqueEventId_t POWER_STATE_MACHINE_TIMEOUT_ID = 2; static constexpr UniqueEventId_t POWER_STATE_MACHINE_TIMEOUT_ID = 2;
static constexpr UniqueEventId_t SIDE_SWITCH_TRANSITION_NOT_ALLOWED_ID = 3; static constexpr UniqueEventId_t SIDE_SWITCH_TRANSITION_NOT_ALLOWED_ID = 3;
DualLaneAssemblyBase(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher, DualLaneAssemblyBase(object_id_t objectId, PowerSwitchIF* pwrSwitcher, pcdu::Switches switch1,
pcdu::Switches switch1, pcdu::Switches switch2, Event pwrSwitchTimeoutEvent, pcdu::Switches switch2, Event pwrSwitchTimeoutEvent,
Event sideSwitchNotAllowedEvent, Event transitionOtherSideFailedEvent); Event sideSwitchNotAllowedEvent, Event transitionOtherSideFailedEvent);
protected: protected:

View File

@ -1,5 +1,5 @@
#include "EiveSystem.h" #include "EiveSystem.h"
EiveSystem::EiveSystem(object_id_t setObjectId, object_id_t parent, uint32_t maxNumberOfSequences, EiveSystem::EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
uint32_t maxNumberOfTables) uint32_t maxNumberOfTables)
: Subsystem(setObjectId, parent, maxNumberOfSequences, maxNumberOfTables) {} : Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables) {}

View File

@ -5,8 +5,7 @@
class EiveSystem : public Subsystem { class EiveSystem : public Subsystem {
public: public:
EiveSystem(object_id_t setObjectId, object_id_t parent, uint32_t maxNumberOfSequences, EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables);
uint32_t maxNumberOfTables);
private: private:
}; };

View File

@ -1,5 +1,5 @@
#include "PayloadSubsystem.h" #include "PayloadSubsystem.h"
PayloadSubsystem::PayloadSubsystem(object_id_t setObjectId, object_id_t parent, PayloadSubsystem::PayloadSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables) uint32_t maxNumberOfTables)
: Subsystem(setObjectId, parent, maxNumberOfSequences, maxNumberOfTables) {} : Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables) {}

View File

@ -5,7 +5,7 @@
class PayloadSubsystem : public Subsystem { class PayloadSubsystem : public Subsystem {
public: public:
PayloadSubsystem(object_id_t setObjectId, object_id_t parent, uint32_t maxNumberOfSequences, PayloadSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
uint32_t maxNumberOfTables); uint32_t maxNumberOfTables);
private: private:

View File

@ -169,12 +169,13 @@ bool RwAssembly::isUseable(object_id_t object, Mode_t mode) {
ReturnValue_t RwAssembly::initialize() { ReturnValue_t RwAssembly::initialize() {
ReturnValue_t result = returnvalue::OK; ReturnValue_t result = returnvalue::OK;
for (const auto& obj : helper.rwIds) { // TODO: Fix this
result = registerChild(obj); // for (const auto& obj : helper.rwIds) {
if (result != returnvalue::OK) { // result = registerChild(obj);
return result; // if (result != returnvalue::OK) {
} // return result;
} // }
// }
return SubsystemBase::initialize(); return SubsystemBase::initialize();
} }

View File

@ -4,9 +4,8 @@
#include <fsfw/power/PowerSwitchIF.h> #include <fsfw/power/PowerSwitchIF.h>
#include <fsfw/serviceinterface.h> #include <fsfw/serviceinterface.h>
SusAssembly::SusAssembly(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher, SusAssembly::SusAssembly(object_id_t objectId, PowerSwitchIF* pwrSwitcher, SusAssHelper helper)
SusAssHelper helper) : DualLaneAssemblyBase(objectId, pwrSwitcher, SWITCH_NOM, SWITCH_RED,
: DualLaneAssemblyBase(objectId, parentId, pwrSwitcher, SWITCH_NOM, SWITCH_RED,
POWER_STATE_MACHINE_TIMEOUT, SIDE_SWITCH_TRANSITION_NOT_ALLOWED, POWER_STATE_MACHINE_TIMEOUT, SIDE_SWITCH_TRANSITION_NOT_ALLOWED,
TRANSITION_OTHER_SIDE_FAILED), TRANSITION_OTHER_SIDE_FAILED),
helper(helper), helper(helper),
@ -123,12 +122,13 @@ ReturnValue_t SusAssembly::checkChildrenStateOn(Mode_t wantedMode, Submode_t wan
ReturnValue_t SusAssembly::initialize() { ReturnValue_t SusAssembly::initialize() {
ReturnValue_t result = returnvalue::OK; ReturnValue_t result = returnvalue::OK;
for (const auto& id : helper.susIds) { // TODO: Fix this
result = registerChild(id); // for (const auto& id : helper.susIds) {
if (result != returnvalue::OK) { // result = registerChild(id);
return result; // if (result != returnvalue::OK) {
} // return result;
} // }
// }
return AssemblyBase::initialize(); return AssemblyBase::initialize();
} }

View File

@ -40,8 +40,7 @@ class SusAssembly : public DualLaneAssemblyBase {
static constexpr Event SIDE_SWITCH_TRANSITION_NOT_ALLOWED = static constexpr Event SIDE_SWITCH_TRANSITION_NOT_ALLOWED =
event::makeEvent(SUBSYSTEM_ID, 3, severity::LOW); event::makeEvent(SUBSYSTEM_ID, 3, severity::LOW);
SusAssembly(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher, SusAssembly(object_id_t objectId, PowerSwitchIF* pwrSwitcher, SusAssHelper helper);
SusAssHelper helper);
private: private:
enum class States { IDLE, SWITCHING_POWER, MODE_COMMANDING } state = States::IDLE; enum class States { IDLE, SWITCHING_POWER, MODE_COMMANDING } state = States::IDLE;

View File

@ -3,10 +3,9 @@
#include <fsfw/devicehandlers/DeviceHandlerIF.h> #include <fsfw/devicehandlers/DeviceHandlerIF.h>
#include <fsfw/ipc/QueueFactory.h> #include <fsfw/ipc/QueueFactory.h>
TcsBoardAssembly::TcsBoardAssembly(object_id_t objectId, object_id_t parentId, TcsBoardAssembly::TcsBoardAssembly(object_id_t objectId, PowerSwitchIF* pwrSwitcher,
PowerSwitchIF* pwrSwitcher, power::Switch_t theSwitch, power::Switch_t theSwitch, TcsBoardHelper helper)
TcsBoardHelper helper) : AssemblyBase(objectId, 24), switcher(pwrSwitcher, theSwitch), helper(helper) {
: AssemblyBase(objectId, parentId, 24), switcher(pwrSwitcher, theSwitch), helper(helper) {
eventQueue = QueueFactory::instance()->createMessageQueue(24); eventQueue = QueueFactory::instance()->createMessageQueue(24);
ModeListEntry entry; ModeListEntry entry;
for (uint8_t idx = 0; idx < NUMBER_RTDS; idx++) { for (uint8_t idx = 0; idx < NUMBER_RTDS; idx++) {
@ -92,12 +91,13 @@ ReturnValue_t TcsBoardAssembly::isModeCombinationValid(Mode_t mode, Submode_t su
ReturnValue_t TcsBoardAssembly::initialize() { ReturnValue_t TcsBoardAssembly::initialize() {
ReturnValue_t result = returnvalue::OK; ReturnValue_t result = returnvalue::OK;
for (const auto& obj : helper.rtdInfos) { // TODO: Fix this
result = registerChild(obj.first); // for (const auto& obj : helper.rtdInfos) {
if (result != returnvalue::OK) { // result = registerChild(obj.first);
return result; // if (result != returnvalue::OK) {
} // return result;
} // }
// }
return SubsystemBase::initialize(); return SubsystemBase::initialize();
} }

View File

@ -20,8 +20,8 @@ class TcsBoardAssembly : public AssemblyBase, public ConfirmsFailuresIF {
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::TCS_BOARD_ASS; static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::TCS_BOARD_ASS;
static constexpr Event CHILDREN_LOST_MODE = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM); static constexpr Event CHILDREN_LOST_MODE = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
TcsBoardAssembly(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher, TcsBoardAssembly(object_id_t objectId, PowerSwitchIF* pwrSwitcher, power::Switch_t switcher,
power::Switch_t switcher, TcsBoardHelper helper); TcsBoardHelper helper);
ReturnValue_t initialize() override; ReturnValue_t initialize() override;

View File

@ -1,3 +1 @@
target_sources(${LIB_EIVE_MISSION} PRIVATE target_sources(${LIB_EIVE_MISSION} PRIVATE acsModeTree.cpp)
acsModeTree.cpp
)

View File

@ -1,13 +1,15 @@
#include "acsModeTree.h" #include "acsModeTree.h"
#include "eive/objects.h"
#include <fsfw/devicehandlers/DeviceHandlerIF.h> #include <fsfw/devicehandlers/DeviceHandlerIF.h>
#include <fsfw/modes/HasModesIF.h> #include <fsfw/modes/HasModesIF.h>
#include <fsfw/subsystem/Subsystem.h> #include <fsfw/subsystem/Subsystem.h>
#include <fsfw/subsystem/modes/ModeDefinitions.h> #include <fsfw/subsystem/modes/ModeDefinitions.h>
#include "eive/objects.h"
#include "mission/controller/controllerdefinitions/AcsControllerDefinitions.h" #include "mission/controller/controllerdefinitions/AcsControllerDefinitions.h"
Subsystem satsystem::ACS_SUBSYSTEM(objects::ACS_SUBSYSTEM, 12, 24);
void checkInsert(ReturnValue_t result, const char* ctx); void checkInsert(ReturnValue_t result, const char* ctx);
void buildOffSequence(Subsystem* ss, ModeListEntry& eh); void buildOffSequence(Subsystem* ss, ModeListEntry& eh);
void buildDetumbleSequence(Subsystem* ss, ModeListEntry& entryHelper); void buildDetumbleSequence(Subsystem* ss, ModeListEntry& entryHelper);
@ -75,21 +77,13 @@ auto ACS_TABLE_TARGET_PT_TRANS_1 =
void satsystem::initAcsSubsystem(object_id_t satSystemObjId) { void satsystem::initAcsSubsystem(object_id_t satSystemObjId) {
ModeListEntry entry; ModeListEntry entry;
Subsystem* acsSubsystem = new Subsystem(objects::ACS_SUBSYSTEM, satSystemObjId, 12, 24); buildOffSequence(&ACS_SUBSYSTEM, entry);
acsSubsystem->registerChild(objects::ACS_CONTROLLER); buildSafeSequence(&ACS_SUBSYSTEM, entry);
acsSubsystem->registerChild(objects::IMTQ_HANDLER); buildDetumbleSequence(&ACS_SUBSYSTEM, entry);
acsSubsystem->registerChild(objects::STAR_TRACKER); buildIdleSequence(&ACS_SUBSYSTEM, entry);
acsSubsystem->registerChild(objects::ACS_BOARD_ASS); buildIdleChargeSequence(&ACS_SUBSYSTEM, entry);
acsSubsystem->registerChild(objects::SUS_BOARD_ASS); buildTargetPtSequence(&ACS_SUBSYSTEM, entry);
acsSubsystem->registerChild(objects::IMTQ_HANDLER); ACS_SUBSYSTEM.setInitialMode(HasModesIF::MODE_OFF);
acsSubsystem->registerChild(objects::RW_ASS);
buildOffSequence(acsSubsystem, entry);
buildSafeSequence(acsSubsystem, entry);
buildDetumbleSequence(acsSubsystem, entry);
buildIdleSequence(acsSubsystem, entry);
buildIdleChargeSequence(acsSubsystem, entry);
buildTargetPtSequence(acsSubsystem, entry);
acsSubsystem->setInitialMode(HasModesIF::MODE_OFF);
} }
void buildOffSequence(Subsystem* ss, ModeListEntry& eh) { void buildOffSequence(Subsystem* ss, ModeListEntry& eh) {

View File

@ -4,6 +4,8 @@ class Subsystem;
namespace satsystem { namespace satsystem {
extern Subsystem ACS_SUBSYSTEM;
void initAcsSubsystem(object_id_t satSystemObjId); void initAcsSubsystem(object_id_t satSystemObjId);
} // namespace satsystem } // namespace satsystem