Merge remote-tracking branch 'origin/develop' into bugfix_sus_brd_assy
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
commit
d55daebabf
@ -27,6 +27,10 @@ will consitute of a breaking change warranting a new major release:
|
||||
- IMTQ: Sets were filled with wrong data, e.g. Raw MTM was filled with calibrated MTM measurements.
|
||||
- Set RM3100 dataset to valid.
|
||||
|
||||
## Added
|
||||
|
||||
- Added Syrlinks Assembly object to allow recovery handling and to fix faulty FDIR behaviour.
|
||||
|
||||
# [v1.33.0]
|
||||
|
||||
eive-tmtc: v2.16.2
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 267 translations.
|
||||
* @details
|
||||
* Generated on: 2023-03-01 18:34:32
|
||||
* Generated on: 2023-03-02 17:08:11
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 157 translations.
|
||||
* Generated on: 2023-03-01 18:34:32
|
||||
* Contains 158 translations.
|
||||
* Generated on: 2023-03-02 17:08:11
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
@ -142,8 +142,9 @@ const char *HEATER_7_HPA_STRING = "HEATER_7_HPA";
|
||||
const char *ACS_BOARD_ASS_STRING = "ACS_BOARD_ASS";
|
||||
const char *SUS_BOARD_ASS_STRING = "SUS_BOARD_ASS";
|
||||
const char *TCS_BOARD_ASS_STRING = "TCS_BOARD_ASS";
|
||||
const char *RW_ASS_STRING = "RW_ASS";
|
||||
const char *RW_ASSY_STRING = "RW_ASSY";
|
||||
const char *CAM_SWITCHER_STRING = "CAM_SWITCHER";
|
||||
const char *SYRLINKS_ASSY_STRING = "SYRLINKS_ASSY";
|
||||
const char *TM_FUNNEL_STRING = "TM_FUNNEL";
|
||||
const char *PUS_TM_FUNNEL_STRING = "PUS_TM_FUNNEL";
|
||||
const char *CFDP_TM_FUNNEL_STRING = "CFDP_TM_FUNNEL";
|
||||
@ -439,9 +440,11 @@ const char *translateObject(object_id_t object) {
|
||||
case 0x73000003:
|
||||
return TCS_BOARD_ASS_STRING;
|
||||
case 0x73000004:
|
||||
return RW_ASS_STRING;
|
||||
return RW_ASSY_STRING;
|
||||
case 0x73000006:
|
||||
return CAM_SWITCHER_STRING;
|
||||
case 0x73000007:
|
||||
return SYRLINKS_ASSY_STRING;
|
||||
case 0x73000100:
|
||||
return TM_FUNNEL_STRING;
|
||||
case 0x73000101:
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <mission/devices/MgmLis3CustomHandler.h>
|
||||
#include <mission/devices/MgmRm3100CustomHandler.h>
|
||||
#include <mission/system/objects/CamSwitcher.h>
|
||||
#include <mission/system/objects/SyrlinksAssembly.h>
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
#include "bsp_q7s/boardtest/Q7STestTask.h"
|
||||
@ -579,12 +580,14 @@ void ObjectFactory::createSyrlinksComponents(PowerSwitchIF* pwrSwitcher) {
|
||||
syrlinks::MAX_REPLY_SIZE, UartModes::NON_CANONICAL);
|
||||
syrlinksUartCookie->setParityEven();
|
||||
|
||||
auto* syrlinksAssy = new SyrlinksAssembly(objects::SYRLINKS_ASSY);
|
||||
syrlinksAssy->connectModeTreeParent(satsystem::com::SUBSYSTEM);
|
||||
auto syrlinksFdir = new SyrlinksFdir(objects::SYRLINKS_HANDLER);
|
||||
auto syrlinksHandler =
|
||||
new SyrlinksHandler(objects::SYRLINKS_HANDLER, objects::UART_COM_IF, syrlinksUartCookie,
|
||||
pcdu::PDU1_CH1_SYRLINKS_12V, syrlinksFdir);
|
||||
syrlinksHandler->setPowerSwitcher(pwrSwitcher);
|
||||
syrlinksHandler->connectModeTreeParent(satsystem::com::SUBSYSTEM);
|
||||
syrlinksHandler->connectModeTreeParent(*syrlinksAssy);
|
||||
#if OBSW_DEBUG_SYRLINKS == 1
|
||||
syrlinksHandler->setDebugMode(true);
|
||||
#endif
|
||||
|
@ -150,6 +150,10 @@ void scheduling::initTasks() {
|
||||
if (result != returnvalue::OK) {
|
||||
scheduling::printAddObjectError("COM_SUBSYSTEM", objects::COM_SUBSYSTEM);
|
||||
}
|
||||
result = genericSysTask->addComponent(objects::SYRLINKS_ASSY);
|
||||
if (result != returnvalue::OK) {
|
||||
scheduling::printAddObjectError("SYRLINKS_ASSY", objects::SYRLINKS_ASSY);
|
||||
}
|
||||
result = genericSysTask->addComponent(objects::PL_SUBSYSTEM);
|
||||
if (result != returnvalue::OK) {
|
||||
scheduling::printAddObjectError("PL_SUBSYSTEM", objects::PL_SUBSYSTEM);
|
||||
@ -243,9 +247,9 @@ void scheduling::initTasks() {
|
||||
}
|
||||
#endif /* OBSW_ADD_ACS_HANDLERS */
|
||||
#if OBSW_ADD_RW == 1
|
||||
result = acsSysTask->addComponent(objects::RW_ASS);
|
||||
result = acsSysTask->addComponent(objects::RW_ASSY);
|
||||
if (result != returnvalue::OK) {
|
||||
scheduling::printAddObjectError("RW_ASS", objects::RW_ASS);
|
||||
scheduling::printAddObjectError("RW_ASS", objects::RW_ASSY);
|
||||
}
|
||||
#endif
|
||||
#if OBSW_ADD_SUS_BOARD_ASS == 1
|
||||
|
@ -142,8 +142,9 @@ enum commonObjects : uint32_t {
|
||||
ACS_BOARD_ASS = 0x73000001,
|
||||
SUS_BOARD_ASS = 0x73000002,
|
||||
TCS_BOARD_ASS = 0x73000003,
|
||||
RW_ASS = 0x73000004,
|
||||
RW_ASSY = 0x73000004,
|
||||
CAM_SWITCHER = 0x73000006,
|
||||
SYRLINKS_ASSY = 0x73000007,
|
||||
EIVE_SYSTEM = 0x73010000,
|
||||
ACS_SUBSYSTEM = 0x73010001,
|
||||
PL_SUBSYSTEM = 0x73010002,
|
||||
|
@ -134,8 +134,9 @@
|
||||
0x73000001;ACS_BOARD_ASS
|
||||
0x73000002;SUS_BOARD_ASS
|
||||
0x73000003;TCS_BOARD_ASS
|
||||
0x73000004;RW_ASS
|
||||
0x73000004;RW_ASSY
|
||||
0x73000006;CAM_SWITCHER
|
||||
0x73000007;SYRLINKS_ASSY
|
||||
0x73000100;TM_FUNNEL
|
||||
0x73000101;PUS_TM_FUNNEL
|
||||
0x73000102;CFDP_TM_FUNNEL
|
||||
|
|
@ -139,8 +139,9 @@
|
||||
0x73000001;ACS_BOARD_ASS
|
||||
0x73000002;SUS_BOARD_ASS
|
||||
0x73000003;TCS_BOARD_ASS
|
||||
0x73000004;RW_ASS
|
||||
0x73000004;RW_ASSY
|
||||
0x73000006;CAM_SWITCHER
|
||||
0x73000007;SYRLINKS_ASSY
|
||||
0x73000100;TM_FUNNEL
|
||||
0x73000101;PUS_TM_FUNNEL
|
||||
0x73000102;CFDP_TM_FUNNEL
|
||||
|
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 267 translations.
|
||||
* @details
|
||||
* Generated on: 2023-03-01 18:34:32
|
||||
* Generated on: 2023-03-02 17:08:11
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 161 translations.
|
||||
* Generated on: 2023-03-01 18:34:32
|
||||
* Contains 162 translations.
|
||||
* Generated on: 2023-03-02 17:08:11
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
@ -147,8 +147,9 @@ const char *HEATER_7_HPA_STRING = "HEATER_7_HPA";
|
||||
const char *ACS_BOARD_ASS_STRING = "ACS_BOARD_ASS";
|
||||
const char *SUS_BOARD_ASS_STRING = "SUS_BOARD_ASS";
|
||||
const char *TCS_BOARD_ASS_STRING = "TCS_BOARD_ASS";
|
||||
const char *RW_ASS_STRING = "RW_ASS";
|
||||
const char *RW_ASSY_STRING = "RW_ASSY";
|
||||
const char *CAM_SWITCHER_STRING = "CAM_SWITCHER";
|
||||
const char *SYRLINKS_ASSY_STRING = "SYRLINKS_ASSY";
|
||||
const char *TM_FUNNEL_STRING = "TM_FUNNEL";
|
||||
const char *PUS_TM_FUNNEL_STRING = "PUS_TM_FUNNEL";
|
||||
const char *CFDP_TM_FUNNEL_STRING = "CFDP_TM_FUNNEL";
|
||||
@ -453,9 +454,11 @@ const char *translateObject(object_id_t object) {
|
||||
case 0x73000003:
|
||||
return TCS_BOARD_ASS_STRING;
|
||||
case 0x73000004:
|
||||
return RW_ASS_STRING;
|
||||
return RW_ASSY_STRING;
|
||||
case 0x73000006:
|
||||
return CAM_SWITCHER_STRING;
|
||||
case 0x73000007:
|
||||
return SYRLINKS_ASSY_STRING;
|
||||
case 0x73000100:
|
||||
return TM_FUNNEL_STRING;
|
||||
case 0x73000101:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 267 translations.
|
||||
* @details
|
||||
* Generated on: 2023-03-01 18:34:32
|
||||
* Generated on: 2023-03-02 17:08:11
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 161 translations.
|
||||
* Generated on: 2023-03-01 18:34:32
|
||||
* Contains 162 translations.
|
||||
* Generated on: 2023-03-02 17:08:11
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
@ -147,8 +147,9 @@ const char *HEATER_7_HPA_STRING = "HEATER_7_HPA";
|
||||
const char *ACS_BOARD_ASS_STRING = "ACS_BOARD_ASS";
|
||||
const char *SUS_BOARD_ASS_STRING = "SUS_BOARD_ASS";
|
||||
const char *TCS_BOARD_ASS_STRING = "TCS_BOARD_ASS";
|
||||
const char *RW_ASS_STRING = "RW_ASS";
|
||||
const char *RW_ASSY_STRING = "RW_ASSY";
|
||||
const char *CAM_SWITCHER_STRING = "CAM_SWITCHER";
|
||||
const char *SYRLINKS_ASSY_STRING = "SYRLINKS_ASSY";
|
||||
const char *TM_FUNNEL_STRING = "TM_FUNNEL";
|
||||
const char *PUS_TM_FUNNEL_STRING = "PUS_TM_FUNNEL";
|
||||
const char *CFDP_TM_FUNNEL_STRING = "CFDP_TM_FUNNEL";
|
||||
@ -453,9 +454,11 @@ const char *translateObject(object_id_t object) {
|
||||
case 0x73000003:
|
||||
return TCS_BOARD_ASS_STRING;
|
||||
case 0x73000004:
|
||||
return RW_ASS_STRING;
|
||||
return RW_ASSY_STRING;
|
||||
case 0x73000006:
|
||||
return CAM_SWITCHER_STRING;
|
||||
case 0x73000007:
|
||||
return SYRLINKS_ASSY_STRING;
|
||||
case 0x73000100:
|
||||
return TM_FUNNEL_STRING;
|
||||
case 0x73000101:
|
||||
|
@ -139,9 +139,10 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun
|
||||
new CcsdsDistributor(config::EIVE_PUS_APID, objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||
new PusDistributor(config::EIVE_PUS_APID, objects::PUS_PACKET_DISTRIBUTOR, ccsdsDistrib);
|
||||
|
||||
PusTmFunnel::FunnelCfg cfdpFunnelCfg(objects::CFDP_TM_FUNNEL, *tmStore, *ipcStore, 50);
|
||||
PusTmFunnel::FunnelCfg cfdpFunnelCfg(objects::CFDP_TM_FUNNEL, "CfdpTmFunnel", *tmStore, *ipcStore,
|
||||
50);
|
||||
*cfdpFunnel = new CfdpTmFunnel(cfdpFunnelCfg, config::EIVE_CFDP_APID);
|
||||
PusTmFunnel::FunnelCfg pusFunnelCfg(objects::PUS_TM_FUNNEL, *tmStore, *ipcStore,
|
||||
PusTmFunnel::FunnelCfg pusFunnelCfg(objects::PUS_TM_FUNNEL, "PusTmFunnel", *tmStore, *ipcStore,
|
||||
config::MAX_PUS_FUNNEL_QUEUE_DEPTH);
|
||||
*pusFunnel = new PusTmFunnel(pusFunnelCfg, *timeStamper, sdcMan);
|
||||
#if OBSW_ADD_TCPIP_SERVERS == 1
|
||||
@ -236,7 +237,7 @@ void ObjectFactory::createRwAssy(PowerSwitchIF& pwrSwitcher, power::Switch_t the
|
||||
std::array<DeviceHandlerBase*, 4> rws,
|
||||
std::array<object_id_t, 4> rwIds) {
|
||||
RwHelper rwHelper(rwIds);
|
||||
auto* rwAss = new RwAssembly(objects::RW_ASS, &pwrSwitcher, theSwitch, rwHelper);
|
||||
auto* rwAss = new RwAssembly(objects::RW_ASSY, &pwrSwitcher, theSwitch, rwHelper);
|
||||
for (size_t idx = 0; idx < rwIds.size(); idx++) {
|
||||
ReturnValue_t result = rws[idx]->connectModeTreeParent(*rwAss);
|
||||
if (result != returnvalue::OK) {
|
||||
|
@ -47,8 +47,8 @@ ReturnValue_t SyrlinksFdir::eventReceived(EventMessage* event) {
|
||||
}
|
||||
// else
|
||||
if (missedReplyCount.incrementAndCheck()) {
|
||||
// handleRecovery(event->getEvent());
|
||||
triggerEvent(syrlinks::FDIR_REACTION_IGNORED, event->getEvent(), 0);
|
||||
handleRecovery(event->getEvent());
|
||||
// triggerEvent(syrlinks::FDIR_REACTION_IGNORED, event->getEvent(), 0);
|
||||
}
|
||||
break;
|
||||
case StorageManagerIF::GET_DATA_FAILED:
|
||||
@ -80,7 +80,7 @@ ReturnValue_t SyrlinksFdir::eventReceived(EventMessage* event) {
|
||||
break;
|
||||
case Fuse::POWER_BELOW_LOW_LIMIT:
|
||||
// Device might got stuck during boot, retry.
|
||||
// handleRecovery(event->getEvent());
|
||||
handleRecovery(event->getEvent());
|
||||
triggerEvent(syrlinks::FDIR_REACTION_IGNORED, event->getEvent(), 0);
|
||||
break;
|
||||
//****Thermal*****
|
||||
|
@ -7,6 +7,7 @@ target_sources(
|
||||
TcsSubsystem.cpp
|
||||
PayloadSubsystem.cpp
|
||||
AcsBoardAssembly.cpp
|
||||
SyrlinksAssembly.cpp
|
||||
Stack5VHandler.cpp
|
||||
SusAssembly.cpp
|
||||
RwAssembly.cpp
|
||||
|
@ -30,6 +30,7 @@ void ComSubsystem::performChildOperation() {
|
||||
if (countdownActive) {
|
||||
checkTransmitterCountdown();
|
||||
}
|
||||
|
||||
Subsystem::performChildOperation();
|
||||
}
|
||||
|
||||
|
@ -235,3 +235,8 @@ void DualLaneAssemblyBase::setPreferredSide(duallane::Submodes submode) {
|
||||
}
|
||||
this->defaultSubmode = submode;
|
||||
}
|
||||
|
||||
ReturnValue_t DualLaneAssemblyBase::checkAndHandleHealthState(Mode_t deviceMode,
|
||||
Submode_t deviceSubmode) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
@ -74,6 +74,7 @@ class DualLaneAssemblyBase : public AssemblyBase, public ConfirmsFailuresIF {
|
||||
MessageQueueId_t getEventReceptionQueue() override;
|
||||
|
||||
bool sideSwitchTransition(Mode_t mode, Submode_t submode);
|
||||
ReturnValue_t checkAndHandleHealthState(Mode_t deviceMode, Submode_t deviceSubmode);
|
||||
|
||||
/**
|
||||
* Implemented by user. Will be called if a full mode operation has finished.
|
||||
|
57
mission/system/objects/SyrlinksAssembly.cpp
Normal file
57
mission/system/objects/SyrlinksAssembly.cpp
Normal file
@ -0,0 +1,57 @@
|
||||
#include "SyrlinksAssembly.h"
|
||||
|
||||
#include <eive/objects.h>
|
||||
|
||||
using namespace returnvalue;
|
||||
|
||||
SyrlinksAssembly::SyrlinksAssembly(object_id_t objectId) : AssemblyBase(objectId) {
|
||||
ModeListEntry entry;
|
||||
entry.setObject(objects::SYRLINKS_HANDLER);
|
||||
entry.setMode(MODE_OFF);
|
||||
entry.setSubmode(SUBMODE_NONE);
|
||||
commandTable.insert(entry);
|
||||
}
|
||||
|
||||
ReturnValue_t SyrlinksAssembly::commandChildren(Mode_t mode, Submode_t submode) {
|
||||
commandTable[0].setMode(mode);
|
||||
commandTable[0].setSubmode(submode);
|
||||
HybridIterator<ModeListEntry> iter(commandTable.begin(), commandTable.end());
|
||||
if (recoveryState == RECOVERY_IDLE) {
|
||||
ReturnValue_t result = checkAndHandleHealthState(mode, submode);
|
||||
if (result == NEED_TO_CHANGE_HEALTH) {
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
executeTable(iter);
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t SyrlinksAssembly::checkChildrenStateOn(Mode_t wantedMode, Submode_t wantedSubmode) {
|
||||
if (childrenMap[objects::SYRLINKS_HANDLER].mode != wantedMode) {
|
||||
return NOT_ENOUGH_CHILDREN_IN_CORRECT_STATE;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t SyrlinksAssembly::isModeCombinationValid(Mode_t mode, Submode_t submode) {
|
||||
if (mode == MODE_ON or mode == DeviceHandlerIF::MODE_NORMAL or mode == MODE_OFF) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
|
||||
ReturnValue_t SyrlinksAssembly::checkAndHandleHealthState(Mode_t deviceMode,
|
||||
Submode_t deviceSubmode) {
|
||||
HealthState health = healthHelper.healthTable->getHealth(objects::SYRLINKS_HANDLER);
|
||||
if (health == FAULTY or health == PERMANENT_FAULTY) {
|
||||
overwriteDeviceHealth(objects::SYRLINKS_HANDLER, health);
|
||||
return NEED_TO_CHANGE_HEALTH;
|
||||
} else if (health == EXTERNAL_CONTROL) {
|
||||
modeHelper.setForced(true);
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
void SyrlinksAssembly::handleChildrenLostMode(ReturnValue_t result) {
|
||||
startTransition(mode, submode);
|
||||
}
|
20
mission/system/objects/SyrlinksAssembly.h
Normal file
20
mission/system/objects/SyrlinksAssembly.h
Normal file
@ -0,0 +1,20 @@
|
||||
#ifndef MISSION_SYSTEM_OBJECTS_SYRLINKSASSEMBLY_H_
|
||||
#define MISSION_SYSTEM_OBJECTS_SYRLINKSASSEMBLY_H_
|
||||
#include <fsfw/devicehandlers/AssemblyBase.h>
|
||||
|
||||
class SyrlinksAssembly : public AssemblyBase {
|
||||
public:
|
||||
SyrlinksAssembly(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;
|
||||
void handleChildrenLostMode(ReturnValue_t result) override;
|
||||
|
||||
ReturnValue_t checkAndHandleHealthState(Mode_t deviceMode, Submode_t deviceSubmode);
|
||||
};
|
||||
|
||||
#endif /* MISSION_SYSTEM_OBJECTS_SYRLINKSASSEMBLY_H_ */
|
@ -110,7 +110,7 @@ Subsystem& satsystem::acs::init() {
|
||||
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_PTG_TRANS_0.second);
|
||||
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TRANS_0.second);
|
||||
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TRANS_0.second);
|
||||
iht(objects::RW_ASS, NML, 0, ACS_TABLE_PTG_TRANS_0.second);
|
||||
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TRANS_0.second);
|
||||
iht(objects::STAR_TRACKER, NML, 0, ACS_TABLE_PTG_TRANS_0.second);
|
||||
check(ACS_SUBSYSTEM.addTable(
|
||||
TableEntry(ACS_TABLE_PTG_TRANS_0.first, &ACS_TABLE_PTG_TRANS_0.second)),
|
||||
@ -165,7 +165,7 @@ void buildOffSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
iht(objects::IMTQ_HANDLER, OFF, 0, ACS_TABLE_OFF_TRANS_1.second);
|
||||
iht(objects::STAR_TRACKER, OFF, 0, ACS_TABLE_OFF_TRANS_1.second);
|
||||
iht(objects::ACS_BOARD_ASS, OFF, 0, ACS_TABLE_OFF_TRANS_1.second);
|
||||
iht(objects::RW_ASS, OFF, 0, ACS_TABLE_OFF_TRANS_1.second);
|
||||
iht(objects::RW_ASSY, OFF, 0, ACS_TABLE_OFF_TRANS_1.second);
|
||||
check(ss.addTable(TableEntry(ACS_TABLE_OFF_TRANS_1.first, &ACS_TABLE_OFF_TRANS_1.second)), ctxc);
|
||||
|
||||
// Build OFF sequence
|
||||
@ -207,7 +207,7 @@ void buildSafeSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
||||
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
||||
iht(objects::STAR_TRACKER, OFF, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
||||
iht(objects::RW_ASS, OFF, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
||||
iht(objects::RW_ASSY, OFF, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
||||
check(ss.addTable(&ACS_TABLE_SAFE_TRANS_0.second, ACS_TABLE_SAFE_TRANS_0.first, false, true),
|
||||
ctxc);
|
||||
|
||||
@ -262,7 +262,7 @@ void buildDetumbleSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||
iht(objects::STAR_TRACKER, OFF, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||
iht(objects::RW_ASS, OFF, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||
iht(objects::RW_ASSY, OFF, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||
check(ss.addTable(&ACS_TABLE_DETUMBLE_TRANS_0.second, ACS_TABLE_DETUMBLE_TRANS_0.first, false,
|
||||
true),
|
||||
ctxc);
|
||||
@ -305,7 +305,7 @@ void buildIdleSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
// Build IDLE target
|
||||
iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_IDLE, ACS_TABLE_IDLE_TGT.second);
|
||||
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_IDLE_TGT.second);
|
||||
iht(objects::RW_ASS, NML, 0, ACS_TABLE_IDLE_TGT.second);
|
||||
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_IDLE_TGT.second);
|
||||
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_IDLE_TGT.second);
|
||||
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_IDLE_TGT.second);
|
||||
ss.addTable(&ACS_TABLE_IDLE_TGT.second, ACS_TABLE_IDLE_TGT.first, false, true);
|
||||
@ -316,7 +316,7 @@ void buildIdleSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_IDLE_TRANS_0.second);
|
||||
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_IDLE_TRANS_0.second);
|
||||
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_IDLE_TRANS_0.second);
|
||||
iht(objects::RW_ASS, NML, 0, ACS_TABLE_IDLE_TRANS_0.second);
|
||||
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_IDLE_TRANS_0.second);
|
||||
iht(objects::STAR_TRACKER, NML, 0, ACS_TABLE_IDLE_TRANS_0.second);
|
||||
ss.addTable(&ACS_TABLE_IDLE_TRANS_0.second, ACS_TABLE_IDLE_TRANS_0.first, false, true);
|
||||
|
||||
@ -358,7 +358,7 @@ void buildTargetPtSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second);
|
||||
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second);
|
||||
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second);
|
||||
iht(objects::RW_ASS, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second);
|
||||
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second);
|
||||
iht(objects::STAR_TRACKER, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second);
|
||||
check(ss.addTable(&ACS_TABLE_PTG_TARGET_TGT.second, ACS_TABLE_PTG_TARGET_TGT.first, false, true),
|
||||
ctxc);
|
||||
@ -407,7 +407,7 @@ void buildTargetPtNadirSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
|
||||
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
|
||||
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
|
||||
iht(objects::RW_ASS, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
|
||||
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
|
||||
iht(objects::STAR_TRACKER, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
|
||||
check(ss.addTable(TableEntry(ACS_TABLE_PTG_TARGET_NADIR_TGT.first,
|
||||
&ACS_TABLE_PTG_TARGET_NADIR_TGT.second)),
|
||||
@ -458,7 +458,7 @@ void buildTargetPtGsSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
|
||||
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
|
||||
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
|
||||
iht(objects::RW_ASS, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
|
||||
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
|
||||
iht(objects::STAR_TRACKER, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
|
||||
check(ss.addTable(
|
||||
TableEntry(ACS_TABLE_PTG_TARGET_GS_TGT.first, &ACS_TABLE_PTG_TARGET_GS_TGT.second)),
|
||||
@ -508,7 +508,7 @@ void buildTargetPtInertialSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second);
|
||||
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second);
|
||||
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second);
|
||||
iht(objects::RW_ASS, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second);
|
||||
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second);
|
||||
iht(objects::STAR_TRACKER, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second);
|
||||
check(ss.addTable(TableEntry(ACS_TABLE_PTG_TARGET_INERTIAL_TGT.first,
|
||||
&ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second)),
|
||||
|
@ -105,11 +105,11 @@ void buildRxOnlySequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
// Build RX Only table. We could track the state of the CCSDS IP core handler
|
||||
// as well but I do not think this is necessary because enabling that should
|
||||
// not interfere with the Syrlinks Handler.
|
||||
iht(objects::SYRLINKS_HANDLER, NML, ::com::Submode::RX_ONLY, COM_TABLE_RX_ONLY_TGT.second);
|
||||
iht(objects::SYRLINKS_ASSY, NML, ::com::Submode::RX_ONLY, COM_TABLE_RX_ONLY_TGT.second);
|
||||
check(ss.addTable(TableEntry(COM_TABLE_RX_ONLY_TGT.first, &COM_TABLE_RX_ONLY_TGT.second)), ctxc);
|
||||
|
||||
// Build RX Only transition 0
|
||||
iht(objects::SYRLINKS_HANDLER, NML, ::com::Submode::RX_ONLY, COM_TABLE_RX_ONLY_TRANS_0.second);
|
||||
iht(objects::SYRLINKS_ASSY, NML, ::com::Submode::RX_ONLY, COM_TABLE_RX_ONLY_TRANS_0.second);
|
||||
check(ss.addTable(TableEntry(COM_TABLE_RX_ONLY_TRANS_0.first, &COM_TABLE_RX_ONLY_TRANS_0.second)),
|
||||
ctxc);
|
||||
|
||||
@ -147,7 +147,7 @@ void buildTxAndRxLowRateSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
};
|
||||
|
||||
// Build RX and TX low datarate table.
|
||||
iht(objects::SYRLINKS_HANDLER, NML, ::com::Submode::RX_AND_TX_LOW_DATARATE,
|
||||
iht(objects::SYRLINKS_ASSY, NML, ::com::Submode::RX_AND_TX_LOW_DATARATE,
|
||||
COM_TABLE_RX_AND_TX_LOW_RATE_TGT.second);
|
||||
iht(objects::CCSDS_HANDLER, ON, static_cast<Submode_t>(::com::CcsdsSubmode::DATARATE_LOW),
|
||||
COM_TABLE_RX_AND_TX_LOW_RATE_TGT.second);
|
||||
@ -163,7 +163,7 @@ void buildTxAndRxLowRateSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
ctxc);
|
||||
|
||||
// Build TX and RX low transition 1
|
||||
iht(objects::SYRLINKS_HANDLER, NML, ::com::Submode::RX_AND_TX_LOW_DATARATE,
|
||||
iht(objects::SYRLINKS_ASSY, NML, ::com::Submode::RX_AND_TX_LOW_DATARATE,
|
||||
COM_TABLE_RX_AND_TX_LOW_RATE_TRANS_1.second);
|
||||
check(ss.addTable(TableEntry(COM_TABLE_RX_AND_TX_LOW_RATE_TRANS_1.first,
|
||||
&COM_TABLE_RX_AND_TX_LOW_RATE_TRANS_1.second)),
|
||||
@ -199,7 +199,7 @@ void buildTxAndRxHighRateSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
};
|
||||
|
||||
// Build RX and TX high datarate table.
|
||||
iht(objects::SYRLINKS_HANDLER, NML, ::com::Submode::RX_AND_TX_HIGH_DATARATE,
|
||||
iht(objects::SYRLINKS_ASSY, NML, ::com::Submode::RX_AND_TX_HIGH_DATARATE,
|
||||
COM_TABLE_RX_AND_TX_HIGH_RATE_TGT.second);
|
||||
iht(objects::CCSDS_HANDLER, ON, static_cast<Submode_t>(::com::CcsdsSubmode::DATARATE_HIGH),
|
||||
COM_TABLE_RX_AND_TX_HIGH_RATE_TGT.second);
|
||||
@ -215,7 +215,7 @@ void buildTxAndRxHighRateSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
ctxc);
|
||||
|
||||
// Build TX and RX high transition 1
|
||||
iht(objects::SYRLINKS_HANDLER, NML, ::com::Submode::RX_AND_TX_HIGH_DATARATE,
|
||||
iht(objects::SYRLINKS_ASSY, NML, ::com::Submode::RX_AND_TX_HIGH_DATARATE,
|
||||
COM_TABLE_RX_AND_TX_HIGH_RATE_TRANS_1.second);
|
||||
check(ss.addTable(TableEntry(COM_TABLE_RX_AND_TX_HIGH_RATE_TRANS_1.first,
|
||||
&COM_TABLE_RX_AND_TX_HIGH_RATE_TRANS_1.second)),
|
||||
@ -253,7 +253,7 @@ void buildTxAndRxDefaultRateSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
};
|
||||
|
||||
// Build RX and TX default datarate table.
|
||||
iht(objects::SYRLINKS_HANDLER, NML, ::com::Submode::RX_AND_TX_DEFAULT_DATARATE,
|
||||
iht(objects::SYRLINKS_ASSY, NML, ::com::Submode::RX_AND_TX_DEFAULT_DATARATE,
|
||||
COM_TABLE_RX_AND_TX_DEFAULT_RATE_TGT.second);
|
||||
iht(objects::CCSDS_HANDLER, ON, static_cast<Submode_t>(::com::CcsdsSubmode::DATARATE_DEFAULT),
|
||||
COM_TABLE_RX_AND_TX_DEFAULT_RATE_TGT.second);
|
||||
@ -269,7 +269,7 @@ void buildTxAndRxDefaultRateSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
ctxc);
|
||||
|
||||
// Build TX and RX default transition 1
|
||||
iht(objects::SYRLINKS_HANDLER, NML, ::com::Submode::RX_AND_TX_DEFAULT_DATARATE,
|
||||
iht(objects::SYRLINKS_ASSY, NML, ::com::Submode::RX_AND_TX_DEFAULT_DATARATE,
|
||||
COM_TABLE_RX_AND_TX_DEFAULT_RATE_TRANS_1.second);
|
||||
check(ss.addTable(TableEntry(COM_TABLE_RX_AND_TX_DEFAULT_RATE_TRANS_1.first,
|
||||
&COM_TABLE_RX_AND_TX_DEFAULT_RATE_TRANS_1.second)),
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "fsfw/ipc/QueueFactory.h"
|
||||
|
||||
TmFunnelBase::TmFunnelBase(FunnelCfg cfg)
|
||||
: SystemObject(cfg.objectId), tmStore(cfg.tmStore), ipcStore(cfg.ipcStore) {
|
||||
: SystemObject(cfg.objectId), name(cfg.name), tmStore(cfg.tmStore), ipcStore(cfg.ipcStore) {
|
||||
tmQueue = QueueFactory::instance()->createMessageQueue(cfg.tmMsgDepth);
|
||||
}
|
||||
|
||||
@ -37,8 +37,7 @@ ReturnValue_t TmFunnelBase::sendPacketToDestinations(store_address_t origStoreId
|
||||
message.setStorageId(storeId);
|
||||
} else {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "PusTmFunnel::handlePacket: Store too full to create data copy"
|
||||
<< std::endl;
|
||||
sif::error << name << "::handlePacket: Store too full to create data copy" << std::endl;
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
@ -48,7 +47,8 @@ ReturnValue_t TmFunnelBase::sendPacketToDestinations(store_address_t origStoreId
|
||||
result = tmQueue->sendMessage(dest.queueId, &message);
|
||||
if (result != returnvalue::OK) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "PusTmFunnel::handlePacket: Error sending TM to downlink handler" << std::endl;
|
||||
sif::error << name << "::handlePacket: Error sending TM to downlink handler " << dest.name
|
||||
<< std::endl;
|
||||
#endif
|
||||
tmStore.deleteData(message.getStorageId());
|
||||
}
|
||||
|
@ -12,10 +12,15 @@
|
||||
class TmFunnelBase : public AcceptsTelemetryIF, public SystemObject {
|
||||
public:
|
||||
struct FunnelCfg {
|
||||
FunnelCfg(object_id_t objId, StorageManagerIF& tmStore, StorageManagerIF& ipcStore,
|
||||
uint32_t tmMsgDepth)
|
||||
: objectId(objId), tmStore(tmStore), ipcStore(ipcStore), tmMsgDepth(tmMsgDepth) {}
|
||||
FunnelCfg(object_id_t objId, const char* name, StorageManagerIF& tmStore,
|
||||
StorageManagerIF& ipcStore, uint32_t tmMsgDepth)
|
||||
: objectId(objId),
|
||||
name(name),
|
||||
tmStore(tmStore),
|
||||
ipcStore(ipcStore),
|
||||
tmMsgDepth(tmMsgDepth) {}
|
||||
object_id_t objectId;
|
||||
const char* name;
|
||||
StorageManagerIF& tmStore;
|
||||
StorageManagerIF& ipcStore;
|
||||
uint32_t tmMsgDepth;
|
||||
@ -30,6 +35,7 @@ class TmFunnelBase : public AcceptsTelemetryIF, public SystemObject {
|
||||
~TmFunnelBase() override;
|
||||
|
||||
protected:
|
||||
const char* name;
|
||||
StorageManagerIF& tmStore;
|
||||
StorageManagerIF& ipcStore;
|
||||
|
||||
@ -43,7 +49,6 @@ class TmFunnelBase : public AcceptsTelemetryIF, public SystemObject {
|
||||
};
|
||||
|
||||
std::vector<Destination> destinations;
|
||||
|
||||
MessageQueueIF* tmQueue = nullptr;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user