Refactor TM handling #450

Merged
muellerr merged 47 commits from refactor_tm_handling into develop 2023-03-11 15:05:22 +01:00
5 changed files with 8 additions and 16 deletions
Showing only changes of commit e6aa582fcb - Show all commits

View File

@ -771,6 +771,7 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) {
auto* vcWithQueue =
new VirtualChannelWithQueue(objects::PTME_VC0_LIVE_TM, ccsds::VC0, "PTME VC0 LIVE TM", *ptme,
LINK_STATE, args.tmStore, 500);
args.liveDestination = vcWithQueue->getReportReceptionQueue(0);
new LiveTmTask(objects::LIVE_TM_TASK, *vcWithQueue);
// Set up log store.

View File

@ -25,21 +25,19 @@ class GpioIF;
namespace ObjectFactory {
struct CcsdsComponentArgs {
CcsdsComponentArgs(LinuxLibgpioIF& gpioIF, PusTmFunnel& funnel, StorageManagerIF& ipcStore,
StorageManagerIF& tmStore, PersistentTmStores& stores,
CcsdsIpCoreHandler** ipCoreHandler)
CcsdsComponentArgs(LinuxLibgpioIF& gpioIF, StorageManagerIF& ipcStore, StorageManagerIF& tmStore,
PersistentTmStores& stores, CcsdsIpCoreHandler** ipCoreHandler)
: gpioComIF(gpioIF),
pusFunnel(funnel),
ipcStore(ipcStore),
tmStore(tmStore),
stores(stores),
ipCoreHandler(ipCoreHandler) {}
LinuxLibgpioIF& gpioComIF;
PusTmFunnel& pusFunnel;
StorageManagerIF& ipcStore;
StorageManagerIF& tmStore;
PersistentTmStores& stores;
CcsdsIpCoreHandler** ipCoreHandler;
AcceptsTelemetryIF* liveDestination = nullptr;
};
void setStatics();

View File

@ -77,10 +77,13 @@ void ObjectFactory::produce(void* args) {
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
#if OBSW_ADD_CCSDS_IP_CORES == 1
CcsdsIpCoreHandler* ipCoreHandler = nullptr;
CcsdsComponentArgs ccsdsArgs(*gpioComIF, *pusFunnel, *ipcStore, *tmStore, stores, &ipCoreHandler);
CcsdsComponentArgs ccsdsArgs(*gpioComIF, *ipcStore, *tmStore, stores, &ipCoreHandler);
createCcsdsComponents(ccsdsArgs);
#if OBSW_TM_TO_PTME == 1
// TODO: Remove this if not needed anymore
if (*ccsdsArgs.liveDestination != nullptr) {
pusFunnel->addLiveDestination("VC0 LIVE TM", *ccsdsArgs.liveDestination, 0);
}
// addTmtcIpCoresToFunnels(*ipCoreHandler, *pusFunnel, *cfdpFunnel);
#endif
#endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */

View File

@ -341,11 +341,3 @@ void ObjectFactory::gpioChecker(ReturnValue_t result, std::string output) {
sif::error << "ObjectFactory: Adding GPIOs failed for " << output << std::endl;
}
}
void ObjectFactory::addTmtcIpCoresToFunnels(CcsdsIpCoreHandler& ipCoreHandler,
PusTmFunnel& pusFunnel, CfdpTmFunnel& cfdpFunnel) {
// TODO: Consider removing this, the only additional object in the dest list will
// be the live VC
// cfdpFunnel.addDestination("PTME IP Core", ipCoreHandler, config::LIVE_TM);
// pusFunnel.addDestination("PTME IP Core", ipCoreHandler, config::LIVE_TM);
}

View File

@ -33,6 +33,4 @@ void gpioChecker(ReturnValue_t result, std::string output);
AcsController* createAcsController(bool connectSubsystem);
void addTmtcIpCoresToFunnels(CcsdsIpCoreHandler& ipCoreHandler, PusTmFunnel& pusFunnel,
CfdpTmFunnel& cfdpFunnel);
} // namespace ObjectFactory