start instantiating CFDP components

This commit is contained in:
Robin Müller 2022-09-08 16:26:47 +02:00
parent 75e0ef60ce
commit e0837683fe
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
5 changed files with 29 additions and 13 deletions

View File

@ -11,8 +11,9 @@ using namespace cfdp;
CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwParams, const CfdpHandlerCfg& cfdpCfg)
: SystemObject(fsfwParams.objectId),
UserBase(fsfwParams.vfs),
destHandler(DestHandlerParams(cfdpCfg.cfg, *this, cfdpCfg.remoteCfgProvider,
cfdpCfg.packetInfoList, cfdpCfg.lostSegmentsList),
destHandler(DestHandlerParams(LocalEntityCfg(cfdpCfg.id, cfdpCfg.indicCfg, *this), *this,
cfdpCfg.remoteCfgProvider, cfdpCfg.packetInfoList,
cfdpCfg.lostSegmentsList),
FsfwParams(fsfwParams.packetDest, nullptr, this, fsfwParams.tcStore,
fsfwParams.tmStore)) {
// TODO: Make queue params configurable, or better yet, expect it to be passed externally

View File

@ -21,15 +21,17 @@ struct FsfwHandlerParams {
};
struct CfdpHandlerCfg {
CfdpHandlerCfg(cfdp::LocalEntityCfg cfg, cfdp::PacketInfoListBase& packetInfo,
cfdp::LostSegmentsListBase& lostSegmentsList,
CfdpHandlerCfg(cfdp::EntityId localId, cfdp::IndicationCfg indicationCfg,
cfdp::PacketInfoListBase& packetInfo, cfdp::LostSegmentsListBase& lostSegmentsList,
cfdp::RemoteConfigTableIF& remoteCfgProvider)
: cfg(std::move(cfg)),
: id(std::move(localId)),
indicCfg(indicationCfg),
packetInfoList(packetInfo),
lostSegmentsList(lostSegmentsList),
remoteCfgProvider(remoteCfgProvider) {}
cfdp::LocalEntityCfg cfg;
cfdp::EntityId id;
cfdp::IndicationCfg indicCfg;
cfdp::PacketInfoListBase& packetInfoList;
cfdp::LostSegmentsListBase& lostSegmentsList;
cfdp::RemoteConfigTableIF& remoteCfgProvider;
@ -37,6 +39,7 @@ struct CfdpHandlerCfg {
class CfdpHandler : public SystemObject,
public cfdp::UserBase,
public cfdp::FaultHandlerBase,
public ExecutableObjectIF,
public AcceptsTelecommandsIF {
public:

View File

@ -1,14 +1,15 @@
#include "ObjectFactory.h"
#include "CfdpHandler.h"
#include "OBSWConfig.h"
#include "bsp_hosted/fsfwconfig/objects/systemObjectList.h"
#include "bsp_hosted/fsfwconfig/tmtc/apid.h"
#include "commonConfig.h"
#include "example/core/GenericFactory.h"
#include "example/test/FsfwTestTask.h"
#include "example/utility/TmFunnel.h"
#include "fsfw/storagemanager/PoolManager.h"
#include "fsfw/tmtcservices/CommandingServiceBase.h"
#include "fsfw_hal/host/HostFilesystem.h"
#if OBSW_USE_TCP_SERVER == 0
#include <fsfw/osal/common/UdpTcPollingTask.h>
@ -20,18 +21,19 @@
void ObjectFactory::produce(void* args) {
Factory::setStaticFrameworkObjectIds();
StorageManagerIF* tcStore = nullptr;
StorageManagerIF* tmStore = nullptr;
#if OBSW_ADD_CORE_COMPONENTS == 1
{
LocalPool::LocalPoolConfig poolCfg = {{16, 100}, {32, 50}, {64, 40},
{128, 30}, {1024, 20}, {2048, 10}};
new PoolManager(objects::TC_STORE, poolCfg);
tcStore = new PoolManager(objects::TC_STORE, poolCfg);
}
{
LocalPool::LocalPoolConfig poolCfg = {{16, 100}, {32, 50}, {64, 40},
{128, 30}, {1024, 20}, {2048, 10}};
new PoolManager(objects::TM_STORE, poolCfg);
tmStore = new PoolManager(objects::TM_STORE, poolCfg);
}
{
@ -39,7 +41,8 @@ void ObjectFactory::produce(void* args) {
{128, 30}, {1024, 20}, {2048, 10}};
new PoolManager(objects::IPC_STORE, poolCfg);
}
ObjectFactory::produceGenericObjects();
TmFunnel* funnel;
ObjectFactory::produceGenericObjects(&funnel);
// TMTC Reception via TCP/IP socket
#if OBSW_USE_TCP_SERVER == 0
auto tmtcBridge = new UdpTmTcBridge(objects::TCPIP_TMTC_BRIDGE, objects::CCSDS_DISTRIBUTOR);
@ -60,4 +63,13 @@ void ObjectFactory::produce(void* args) {
periodicEvent = true;
#endif
new FsfwTestTask(objects::TEST_TASK, periodicEvent);
auto* hostFs = new HostFilesystem();
FsfwHandlerParams params(objects::CFDP_HANDLER, *hostFs, *funnel, *tcStore, *tmStore);
cfdp::IndicationCfg indicationCfg;
UnsignedByteField<uint16_t> apid(COMMON_APID);
cfdp::EntityId localId(apid);
cfdp::RemoteEntityCfg cfg;
cfdp::OneRemoteConfigProvider remoteCfgProvider(cfg);
// CfdpHandlerCfg cfg(localId, indicationCfg);
// new CfdpHandler();
}

@ -1 +1 @@
Subproject commit bf36e7f8f987e9c244dfd67f527b4c178fb37643
Subproject commit a36d951209568bc750bb78e314ea4dcd14b74c62

2
fsfw

@ -1 +1 @@
Subproject commit b73754dfd62ec61410160beca8562a558c6e89cc
Subproject commit 34dd478848cc43bf9520d366207f20bdfe2c4962