apply auto-formatter
All checks were successful
fsfw/fsfw example hosted/pipeline/head This commit looks good
All checks were successful
fsfw/fsfw example hosted/pipeline/head This commit looks good
This commit is contained in:
@ -1,73 +1,67 @@
|
||||
#include "ObjectFactory.h"
|
||||
#include "OBSWConfig.h"
|
||||
|
||||
#include <bsp_hosted/fsfwconfig/objects/systemObjectList.h>
|
||||
#include <bsp_hosted/fsfwconfig/tmtc/apid.h>
|
||||
#include <bsp_hosted/fsfwconfig/tmtc/pusIds.h>
|
||||
|
||||
#include "example/test/FsfwTestTask.h"
|
||||
#include "example/utility/TmFunnel.h"
|
||||
#include "example/core/GenericFactory.h"
|
||||
|
||||
#include <fsfw/datapoollocal/LocalDataPoolManager.h>
|
||||
#include <fsfw/monitoring/MonitoringMessageContent.h>
|
||||
#include <fsfw/storagemanager/PoolManager.h>
|
||||
#include <fsfw/datapoollocal/LocalDataPoolManager.h>
|
||||
#include <fsfw/tmtcpacket/pus/tm.h>
|
||||
#include <fsfw/tmtcservices/CommandingServiceBase.h>
|
||||
#include <fsfw/tmtcservices/PusServiceBase.h>
|
||||
|
||||
#if OBSW_USE_TCP_SERVER == 0
|
||||
#include "OBSWConfig.h"
|
||||
#include "example/core/GenericFactory.h"
|
||||
#include "example/test/FsfwTestTask.h"
|
||||
#include "example/utility/TmFunnel.h"
|
||||
|
||||
#if OBSW_USE_TCP_SERVER == 0
|
||||
#include <fsfw/osal/common/UdpTcPollingTask.h>
|
||||
#include <fsfw/osal/common/UdpTmTcBridge.h>
|
||||
#else
|
||||
#include "fsfw/osal/common/TcpTmTcServer.h"
|
||||
#include "fsfw/osal/common/TcpTmTcBridge.h"
|
||||
#include "fsfw/osal/common/TcpTmTcServer.h"
|
||||
#endif
|
||||
|
||||
void ObjectFactory::produce(void* args) {
|
||||
Factory::setStaticFrameworkObjectIds();
|
||||
Factory::setStaticFrameworkObjectIds();
|
||||
|
||||
#if OBSW_ADD_CORE_COMPONENTS == 1
|
||||
{
|
||||
LocalPool::LocalPoolConfig poolCfg = {
|
||||
{16, 100}, {32, 50}, {64, 25}, {128,15}, {1024, 5}
|
||||
};
|
||||
new PoolManager(objects::TC_STORE, poolCfg);
|
||||
}
|
||||
{
|
||||
LocalPool::LocalPoolConfig poolCfg = {{16, 100}, {32, 50}, {64, 25}, {128, 15}, {1024, 5}};
|
||||
new PoolManager(objects::TC_STORE, poolCfg);
|
||||
}
|
||||
|
||||
{
|
||||
LocalPool::LocalPoolConfig poolCfg = {
|
||||
{16, 100}, {32, 50}, {64, 25}, {128,15}, {1024, 5}
|
||||
};
|
||||
new PoolManager(objects::TM_STORE, poolCfg);
|
||||
}
|
||||
{
|
||||
LocalPool::LocalPoolConfig poolCfg = {{16, 100}, {32, 50}, {64, 25}, {128, 15}, {1024, 5}};
|
||||
new PoolManager(objects::TM_STORE, poolCfg);
|
||||
}
|
||||
|
||||
{
|
||||
LocalPool::LocalPoolConfig poolCfg = {
|
||||
{16, 100}, {32, 50}, {64, 25}, {128,15}, {1024, 5}
|
||||
};
|
||||
new PoolManager(objects::IPC_STORE, poolCfg);
|
||||
}
|
||||
{
|
||||
LocalPool::LocalPoolConfig poolCfg = {{16, 100}, {32, 50}, {64, 25}, {128, 15}, {1024, 5}};
|
||||
new PoolManager(objects::IPC_STORE, poolCfg);
|
||||
}
|
||||
|
||||
// TMTC Reception via TCP/IP socket
|
||||
#if OBSW_USE_TCP_SERVER == 0
|
||||
auto tmtcBridge = new UdpTmTcBridge(objects::TCPIP_TMTC_BRIDGE, objects::CCSDS_DISTRIBUTOR);
|
||||
tmtcBridge->setMaxNumberOfPacketsStored(50);
|
||||
sif::info << "Opening UDP TMTC server on port " << tmtcBridge->getUdpPort() << std::endl;
|
||||
new UdpTcPollingTask(objects::TCPIP_TMTC_POLLING_TASK, objects::TCPIP_TMTC_BRIDGE);
|
||||
// TMTC Reception via TCP/IP socket
|
||||
#if OBSW_USE_TCP_SERVER == 0
|
||||
auto tmtcBridge = new UdpTmTcBridge(objects::TCPIP_TMTC_BRIDGE, objects::CCSDS_DISTRIBUTOR);
|
||||
tmtcBridge->setMaxNumberOfPacketsStored(50);
|
||||
sif::info << "Opening UDP TMTC server on port " << tmtcBridge->getUdpPort() << std::endl;
|
||||
new UdpTcPollingTask(objects::TCPIP_TMTC_POLLING_TASK, objects::TCPIP_TMTC_BRIDGE);
|
||||
#else
|
||||
auto tmtcBridge = new TcpTmTcBridge(objects::TCPIP_TMTC_BRIDGE, objects::CCSDS_DISTRIBUTOR);
|
||||
tmtcBridge->setMaxNumberOfPacketsStored(50);
|
||||
auto tmtcServer = new TcpTmTcServer(objects::TCPIP_TMTC_POLLING_TASK, objects::TCPIP_TMTC_BRIDGE);
|
||||
sif::info << "Opening TCP TMTC server on port " << tmtcServer->getTcpPort() << std::endl;
|
||||
auto tmtcBridge = new TcpTmTcBridge(objects::TCPIP_TMTC_BRIDGE, objects::CCSDS_DISTRIBUTOR);
|
||||
tmtcBridge->setMaxNumberOfPacketsStored(50);
|
||||
auto tmtcServer = new TcpTmTcServer(objects::TCPIP_TMTC_POLLING_TASK, objects::TCPIP_TMTC_BRIDGE);
|
||||
sif::info << "Opening TCP TMTC server on port " << tmtcServer->getTcpPort() << std::endl;
|
||||
#endif
|
||||
|
||||
#endif /* OBSW_ADD_CORE_COMPONENTS == 1 */
|
||||
|
||||
bool periodicEvent = false;
|
||||
bool periodicEvent = false;
|
||||
#if OBSW_TASK_PERIODIC_EVENT == 1
|
||||
periodicEvent = true;
|
||||
periodicEvent = true;
|
||||
#endif
|
||||
new FsfwTestTask(objects::TEST_TASK, periodicEvent);
|
||||
new FsfwTestTask(objects::TEST_TASK, periodicEvent);
|
||||
|
||||
ObjectFactory::produceGenericObjects();
|
||||
ObjectFactory::produceGenericObjects();
|
||||
}
|
||||
|
Reference in New Issue
Block a user