Feature: STR Assembly #437
@ -9,6 +9,7 @@
|
|||||||
#include <mission/devices/MgmRm3100CustomHandler.h>
|
#include <mission/devices/MgmRm3100CustomHandler.h>
|
||||||
#include <mission/system/objects/CamSwitcher.h>
|
#include <mission/system/objects/CamSwitcher.h>
|
||||||
#include <mission/system/objects/ImtqAssembly.h>
|
#include <mission/system/objects/ImtqAssembly.h>
|
||||||
|
#include <mission/system/objects/StrAssembly.h>
|
||||||
#include <mission/system/objects/SyrlinksAssembly.h>
|
#include <mission/system/objects/SyrlinksAssembly.h>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
@ -903,6 +904,8 @@ void ObjectFactory::createTestComponents(LinuxLibgpioIF* gpioComIF) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createStrComponents(PowerSwitchIF* pwrSwitcher) {
|
void ObjectFactory::createStrComponents(PowerSwitchIF* pwrSwitcher) {
|
||||||
|
auto* strAssy = new StrAssembly(objects::STAR_TRACKER);
|
||||||
|
strAssy->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
|
||||||
auto* starTrackerCookie =
|
auto* starTrackerCookie =
|
||||||
new SerialCookie(objects::STAR_TRACKER, q7s::UART_STAR_TRACKER_DEV, uart::STAR_TRACKER_BAUD,
|
new SerialCookie(objects::STAR_TRACKER, q7s::UART_STAR_TRACKER_DEV, uart::STAR_TRACKER_BAUD,
|
||||||
startracker::MAX_FRAME_SIZE * 2 + 2, UartModes::NON_CANONICAL);
|
startracker::MAX_FRAME_SIZE * 2 + 2, UartModes::NON_CANONICAL);
|
||||||
@ -912,7 +915,7 @@ void ObjectFactory::createStrComponents(PowerSwitchIF* pwrSwitcher) {
|
|||||||
new StarTrackerHandler(objects::STAR_TRACKER, objects::UART_COM_IF, starTrackerCookie,
|
new StarTrackerHandler(objects::STAR_TRACKER, objects::UART_COM_IF, starTrackerCookie,
|
||||||
strHelper, pcdu::PDU1_CH2_STAR_TRACKER_5V);
|
strHelper, pcdu::PDU1_CH2_STAR_TRACKER_5V);
|
||||||
starTracker->setPowerSwitcher(pwrSwitcher);
|
starTracker->setPowerSwitcher(pwrSwitcher);
|
||||||
starTracker->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
|
starTracker->connectModeTreeParent(*strAssy);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher) {
|
void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher) {
|
||||||
|
@ -240,30 +240,26 @@ void scheduling::initTasks() {
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
scheduling::printAddObjectError("ACS_SUBSYSTEM", objects::ACS_SUBSYSTEM);
|
scheduling::printAddObjectError("ACS_SUBSYSTEM", objects::ACS_SUBSYSTEM);
|
||||||
}
|
}
|
||||||
#if OBSW_ADD_MGT == 1
|
|
||||||
result = acsSysTask->addComponent(objects::IMTQ_ASSY);
|
result = acsSysTask->addComponent(objects::IMTQ_ASSY);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
scheduling::printAddObjectError("IMTQ_ASSY", objects::IMTQ_ASSY);
|
scheduling::printAddObjectError("IMTQ_ASSY", objects::IMTQ_ASSY);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#if OBSW_ADD_ACS_BOARD == 1
|
|
||||||
result = acsSysTask->addComponent(objects::ACS_BOARD_ASS);
|
result = acsSysTask->addComponent(objects::ACS_BOARD_ASS);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
scheduling::printAddObjectError("ACS_BOARD_ASS", objects::ACS_BOARD_ASS);
|
scheduling::printAddObjectError("ACS_BOARD_ASS", objects::ACS_BOARD_ASS);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_ACS_HANDLERS */
|
|
||||||
#if OBSW_ADD_RW == 1
|
|
||||||
result = acsSysTask->addComponent(objects::RW_ASSY);
|
result = acsSysTask->addComponent(objects::RW_ASSY);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
scheduling::printAddObjectError("RW_ASS", objects::RW_ASSY);
|
scheduling::printAddObjectError("RW_ASS", objects::RW_ASSY);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#if OBSW_ADD_SUS_BOARD_ASS == 1
|
|
||||||
result = acsSysTask->addComponent(objects::SUS_BOARD_ASS);
|
result = acsSysTask->addComponent(objects::SUS_BOARD_ASS);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
scheduling::printAddObjectError("SUS_BOARD_ASS", objects::SUS_BOARD_ASS);
|
scheduling::printAddObjectError("SUS_BOARD_ASS", objects::SUS_BOARD_ASS);
|
||||||
}
|
}
|
||||||
#endif
|
result = acsSysTask->addComponent(objects::STR_ASSY);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("STR_ASSY", objects::STR_ASSY);
|
||||||
|
}
|
||||||
|
|
||||||
PeriodicTaskIF* tcsSystemTask = factory->createPeriodicTask(
|
PeriodicTaskIF* tcsSystemTask = factory->createPeriodicTask(
|
||||||
"TCS_TASK", 55, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.5, missedDeadlineFunc);
|
"TCS_TASK", 55, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.5, missedDeadlineFunc);
|
||||||
|
@ -146,6 +146,7 @@ enum commonObjects : uint32_t {
|
|||||||
CAM_SWITCHER = 0x73000006,
|
CAM_SWITCHER = 0x73000006,
|
||||||
SYRLINKS_ASSY = 0x73000007,
|
SYRLINKS_ASSY = 0x73000007,
|
||||||
IMTQ_ASSY = 0x73000008,
|
IMTQ_ASSY = 0x73000008,
|
||||||
|
STR_ASSY = 0x73000009,
|
||||||
EIVE_SYSTEM = 0x73010000,
|
EIVE_SYSTEM = 0x73010000,
|
||||||
ACS_SUBSYSTEM = 0x73010001,
|
ACS_SUBSYSTEM = 0x73010001,
|
||||||
PL_SUBSYSTEM = 0x73010002,
|
PL_SUBSYSTEM = 0x73010002,
|
||||||
|
@ -13,6 +13,7 @@ target_sources(
|
|||||||
SusAssembly.cpp
|
SusAssembly.cpp
|
||||||
RwAssembly.cpp
|
RwAssembly.cpp
|
||||||
DualLanePowerStateMachine.cpp
|
DualLanePowerStateMachine.cpp
|
||||||
|
StrAssembly.cpp
|
||||||
PowerStateMachineBase.cpp
|
PowerStateMachineBase.cpp
|
||||||
DualLaneAssemblyBase.cpp
|
DualLaneAssemblyBase.cpp
|
||||||
TcsBoardAssembly.cpp)
|
TcsBoardAssembly.cpp)
|
||||||
|
30
mission/system/objects/StrAssembly.cpp
Normal file
30
mission/system/objects/StrAssembly.cpp
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#include "StrAssembly.h"
|
||||||
|
|
||||||
|
#include <eive/objects.h>
|
||||||
|
|
||||||
|
StrAssembly::StrAssembly(object_id_t objectId) {
|
||||||
|
ModeListEntry entry;
|
||||||
|
entry.setObject(objects::STAR_TRACKER);
|
||||||
|
entry.setMode(MODE_OFF);
|
||||||
|
entry.setSubmode(SUBMODE_NONE);
|
||||||
|
commandTable.insert(entry);
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t StrAssembly::commandChildren(Mode_t mode, Submode_t submode) {
|
||||||
|
commandTable[0].setMode(mode);
|
||||||
|
commandTable[0].setSubmode(submode);
|
||||||
|
HybridIterator<ModeListEntry> iter(commandTable.begin(), commandTable.end());
|
||||||
|
executeTable(iter);
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t StrAssembly::checkChildrenStateOn(Mode_t wantedMode, Submode_t wantedSubmode) {
|
||||||
|
if (childrenMap[objects::STAR_TRACKER].mode != wantedMode) {
|
||||||
|
return NOT_ENOUGH_CHILDREN_IN_CORRECT_STATE;
|
||||||
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t StrAssembly::isModeCombinationValid(Mode_t mode, Submode_t submode) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
18
mission/system/objects/StrAssembly.h
Normal file
18
mission/system/objects/StrAssembly.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef MISSION_SYSTEM_OBJECTS_STRASSEMBLY_H_
|
||||||
|
#define MISSION_SYSTEM_OBJECTS_STRASSEMBLY_H_
|
||||||
|
|
||||||
|
#include "fsfw/devicehandlers/AssemblyBase.h"
|
||||||
|
|
||||||
|
class StrAssembly : public AssemblyBase {
|
||||||
|
public:
|
||||||
|
StrAssembly(object_id_t objectId);
|
||||||
|
|
||||||
|
private:
|
||||||
|
FixedArrayList<ModeListEntry, 1> commandTable;
|
||||||
|
|
||||||
|
ReturnValue_t commandChildren(Mode_t mode, Submode_t submode) override;
|
||||||
|
ReturnValue_t checkChildrenStateOn(Mode_t wantedMode, Submode_t wantedSubmode) override;
|
||||||
|
ReturnValue_t isModeCombinationValid(Mode_t mode, Submode_t submode) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* MISSION_SYSTEM_OBJECTS_STRASSEMBLY_H_ */
|
Loading…
Reference in New Issue
Block a user