moved config flag to cmmon config

This commit is contained in:
2021-07-26 13:51:00 +02:00
parent 590d5e11e1
commit 261fc8b58f
6 changed files with 31 additions and 18 deletions

View File

@ -1,6 +1,5 @@
#include "ObjectFactory.h"
#include <OBSWConfig.h>
#include "OBSWConfig.h"
#include <objects/systemObjectList.h>
#include <tmtc/apid.h>
#include <tmtc/pusIds.h>
@ -11,8 +10,13 @@
#include <mission/core/GenericFactory.h>
#include <mission/utility/TmFunnel.h>
#include <fsfw/osal/common/UdpTcPollingTask.h>
#include <fsfw/osal/common/UdpTmTcBridge.h>
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
#include "fsfw/osal/common/UdpTcPollingTask.h"
#include "fsfw/osal/common/UdpTmTcBridge.h"
#else
#include "fsfw/osal/common/TcpTmTcBridge.h"
#include "fsfw/osal/common/TcpTmTcServer.h"
#endif
#include <fsfw/tmtcpacket/pus/tm.h>
@ -40,7 +44,16 @@ void ObjectFactory::produce(void* args){
Factory::setStaticFrameworkObjectIds();
ObjectFactory::produceGenericObjects();
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
sif::info << "Setting up UDP TMTC bridge with listener port " <<
UdpTmTcBridge::DEFAULT_SERVER_PORT << std::endl;
new UdpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
new UdpTcPollingTask(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
#else
sif::info << "Setting up TCP TMTC bridge with listener port " <<
TcpTmTcBridge::DEFAULT_SERVER_PORT << std::endl;
new TcpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
new TcpTmTcServer(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
#endif
}