2021-06-08 13:36:08 +02:00
|
|
|
#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 <test/TestTask.h>
|
|
|
|
|
|
|
|
#include <mission/utility/TmFunnel.h>
|
|
|
|
#include <mission/core/GenericFactory.h>
|
|
|
|
|
|
|
|
#include <fsfw/monitoring/MonitoringMessageContent.h>
|
|
|
|
#include <fsfw/storagemanager/PoolManager.h>
|
|
|
|
#include <fsfw/datapoollocal/LocalDataPoolManager.h>
|
2021-06-17 12:04:54 +02:00
|
|
|
#include <fsfw/tmtcpacket/pus/tm.h>
|
2021-06-08 13:36:08 +02:00
|
|
|
#include <fsfw/tmtcservices/CommandingServiceBase.h>
|
|
|
|
#include <fsfw/tmtcservices/PusServiceBase.h>
|
|
|
|
|
|
|
|
#include <fsfw/osal/common/UdpTcPollingTask.h>
|
|
|
|
#include <fsfw/osal/common/UdpTmTcBridge.h>
|
|
|
|
|
|
|
|
void ObjectFactory::produce(void* args) {
|
|
|
|
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::TM_STORE, poolCfg);
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
LocalPool::LocalPoolConfig poolCfg = {
|
|
|
|
{16, 100}, {32, 50}, {64, 25}, {128,15}, {1024, 5}
|
|
|
|
};
|
|
|
|
new PoolManager(objects::IPC_STORE, poolCfg);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* TMTC Reception via UDP socket */
|
|
|
|
auto tmtcBridge = new UdpTmTcBridge(objects::UDP_BRIDGE, objects::CCSDS_DISTRIBUTOR);
|
|
|
|
tmtcBridge->setMaxNumberOfPacketsStored(20);
|
2021-08-10 11:23:06 +02:00
|
|
|
sif::info << "Opening UDP TMTC server on port " << tmtcBridge->getUdpPort() <<
|
|
|
|
std::endl;
|
2021-06-08 13:36:08 +02:00
|
|
|
new UdpTcPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE);
|
|
|
|
|
|
|
|
#endif /* OBSW_ADD_CORE_COMPONENTS == 1 */
|
|
|
|
|
2021-06-30 10:00:20 +02:00
|
|
|
bool periodicEvent = false;
|
|
|
|
#if OBSW_TASK_PERIODIC_EVENT == 1
|
|
|
|
periodicEvent = true;
|
|
|
|
#endif
|
|
|
|
new TestTask(objects::TEST_TASK, false, periodicEvent);
|
2021-06-08 13:36:08 +02:00
|
|
|
|
|
|
|
ObjectFactory::produceGenericObjects();
|
|
|
|
}
|