added some missing acs board ass code
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:
@ -1,6 +1,7 @@
|
||||
#ifndef MISSION_SYSTEM_ACSBOARDASSEMBLY_H_
|
||||
#define MISSION_SYSTEM_ACSBOARDASSEMBLY_H_
|
||||
|
||||
#include <common/config/commonSubsystemIds.h>
|
||||
#include <devices/powerSwitcherList.h>
|
||||
#include <fsfw/devicehandlers/AssemblyBase.h>
|
||||
#include <fsfw/objectmanager/frameworkObjects.h>
|
||||
@ -54,17 +55,30 @@ enum ModeTableIdx : uint8_t {
|
||||
};
|
||||
|
||||
class PowerSwitchIF;
|
||||
class GpioIF;
|
||||
|
||||
class AcsBoardAssembly : public AssemblyBase {
|
||||
public:
|
||||
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::ACS_BOARD_ASS;
|
||||
static constexpr Event TRANSITION_OTHER_SIDE_FAILED =
|
||||
event::makeEvent(SUBSYSTEM_ID, 0, severity::HIGH);
|
||||
static constexpr Event NOT_ENOUGH_DEVICES_DUAL_MODE =
|
||||
event::makeEvent(SUBSYSTEM_ID, 1, severity::HIGH);
|
||||
static constexpr uint8_t NUMBER_DEVICES_MODE_TABLE = 9;
|
||||
|
||||
static constexpr Submode_t A_SIDE = 0;
|
||||
static constexpr Submode_t B_SIDE = 1;
|
||||
static constexpr Submode_t DUAL_MODE = 2;
|
||||
enum Submodes : Submode_t { A_SIDE = 0, B_SIDE = 1, DUAL_MODE = 2 };
|
||||
|
||||
AcsBoardAssembly(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher,
|
||||
AcsBoardHelper helper);
|
||||
AcsBoardHelper helper, GpioIF* gpioIF);
|
||||
|
||||
void setPreferredSide(Submodes submode);
|
||||
|
||||
/**
|
||||
* In dual mode, the A side or the B side GPS device can be used, but not both.
|
||||
* This function can be used to switch the used GPS device.
|
||||
* @param side
|
||||
*/
|
||||
void selectGpsInDualMode(Submodes side);
|
||||
|
||||
private:
|
||||
static constexpr pcduSwitches::Switches SWITCH_A =
|
||||
@ -75,8 +89,11 @@ class AcsBoardAssembly : public AssemblyBase {
|
||||
enum class States { IDLE, SWITCHING_POWER, MODE_COMMANDING } state = States::IDLE;
|
||||
|
||||
PowerSwitchIF* pwrSwitcher = nullptr;
|
||||
|
||||
bool tryingOtherSide = false;
|
||||
AcsBoardHelper helper;
|
||||
GpioIF* gpioIF = nullptr;
|
||||
Submodes defaultSubmode = Submodes::A_SIDE;
|
||||
bool dualModeErrorSwitch = true;
|
||||
FixedArrayList<ModeListEntry, NUMBER_DEVICES_MODE_TABLE> modeTable;
|
||||
|
||||
ReturnValue_t initialize() override;
|
||||
@ -87,6 +104,7 @@ class AcsBoardAssembly : public AssemblyBase {
|
||||
ReturnValue_t isModeCombinationValid(Mode_t mode, Submode_t submode) override;
|
||||
void handleModeReached() override;
|
||||
void handleModeTransitionFailed(ReturnValue_t result) override;
|
||||
void handleChildrenLostMode(ReturnValue_t result) override;
|
||||
|
||||
/**
|
||||
* Check whether it makes sense to send mode commands to the device
|
||||
|
Reference in New Issue
Block a user