start instantiating CFDP components
This commit is contained in:
parent
75e0ef60ce
commit
e0837683fe
@ -11,8 +11,9 @@ using namespace cfdp;
|
|||||||
CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwParams, const CfdpHandlerCfg& cfdpCfg)
|
CfdpHandler::CfdpHandler(const FsfwHandlerParams& fsfwParams, const CfdpHandlerCfg& cfdpCfg)
|
||||||
: SystemObject(fsfwParams.objectId),
|
: SystemObject(fsfwParams.objectId),
|
||||||
UserBase(fsfwParams.vfs),
|
UserBase(fsfwParams.vfs),
|
||||||
destHandler(DestHandlerParams(cfdpCfg.cfg, *this, cfdpCfg.remoteCfgProvider,
|
destHandler(DestHandlerParams(LocalEntityCfg(cfdpCfg.id, cfdpCfg.indicCfg, *this), *this,
|
||||||
cfdpCfg.packetInfoList, cfdpCfg.lostSegmentsList),
|
cfdpCfg.remoteCfgProvider, cfdpCfg.packetInfoList,
|
||||||
|
cfdpCfg.lostSegmentsList),
|
||||||
FsfwParams(fsfwParams.packetDest, nullptr, this, fsfwParams.tcStore,
|
FsfwParams(fsfwParams.packetDest, nullptr, this, fsfwParams.tcStore,
|
||||||
fsfwParams.tmStore)) {
|
fsfwParams.tmStore)) {
|
||||||
// TODO: Make queue params configurable, or better yet, expect it to be passed externally
|
// TODO: Make queue params configurable, or better yet, expect it to be passed externally
|
||||||
|
@ -21,15 +21,17 @@ struct FsfwHandlerParams {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct CfdpHandlerCfg {
|
struct CfdpHandlerCfg {
|
||||||
CfdpHandlerCfg(cfdp::LocalEntityCfg cfg, cfdp::PacketInfoListBase& packetInfo,
|
CfdpHandlerCfg(cfdp::EntityId localId, cfdp::IndicationCfg indicationCfg,
|
||||||
cfdp::LostSegmentsListBase& lostSegmentsList,
|
cfdp::PacketInfoListBase& packetInfo, cfdp::LostSegmentsListBase& lostSegmentsList,
|
||||||
cfdp::RemoteConfigTableIF& remoteCfgProvider)
|
cfdp::RemoteConfigTableIF& remoteCfgProvider)
|
||||||
: cfg(std::move(cfg)),
|
: id(std::move(localId)),
|
||||||
|
indicCfg(indicationCfg),
|
||||||
packetInfoList(packetInfo),
|
packetInfoList(packetInfo),
|
||||||
lostSegmentsList(lostSegmentsList),
|
lostSegmentsList(lostSegmentsList),
|
||||||
remoteCfgProvider(remoteCfgProvider) {}
|
remoteCfgProvider(remoteCfgProvider) {}
|
||||||
|
|
||||||
cfdp::LocalEntityCfg cfg;
|
cfdp::EntityId id;
|
||||||
|
cfdp::IndicationCfg indicCfg;
|
||||||
cfdp::PacketInfoListBase& packetInfoList;
|
cfdp::PacketInfoListBase& packetInfoList;
|
||||||
cfdp::LostSegmentsListBase& lostSegmentsList;
|
cfdp::LostSegmentsListBase& lostSegmentsList;
|
||||||
cfdp::RemoteConfigTableIF& remoteCfgProvider;
|
cfdp::RemoteConfigTableIF& remoteCfgProvider;
|
||||||
@ -37,6 +39,7 @@ struct CfdpHandlerCfg {
|
|||||||
|
|
||||||
class CfdpHandler : public SystemObject,
|
class CfdpHandler : public SystemObject,
|
||||||
public cfdp::UserBase,
|
public cfdp::UserBase,
|
||||||
|
public cfdp::FaultHandlerBase,
|
||||||
public ExecutableObjectIF,
|
public ExecutableObjectIF,
|
||||||
public AcceptsTelecommandsIF {
|
public AcceptsTelecommandsIF {
|
||||||
public:
|
public:
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
#include "ObjectFactory.h"
|
#include "ObjectFactory.h"
|
||||||
|
|
||||||
|
#include "CfdpHandler.h"
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "bsp_hosted/fsfwconfig/objects/systemObjectList.h"
|
#include "bsp_hosted/fsfwconfig/objects/systemObjectList.h"
|
||||||
#include "bsp_hosted/fsfwconfig/tmtc/apid.h"
|
|
||||||
#include "commonConfig.h"
|
#include "commonConfig.h"
|
||||||
#include "example/core/GenericFactory.h"
|
#include "example/core/GenericFactory.h"
|
||||||
#include "example/test/FsfwTestTask.h"
|
#include "example/test/FsfwTestTask.h"
|
||||||
#include "example/utility/TmFunnel.h"
|
#include "example/utility/TmFunnel.h"
|
||||||
#include "fsfw/storagemanager/PoolManager.h"
|
#include "fsfw/storagemanager/PoolManager.h"
|
||||||
#include "fsfw/tmtcservices/CommandingServiceBase.h"
|
#include "fsfw/tmtcservices/CommandingServiceBase.h"
|
||||||
|
#include "fsfw_hal/host/HostFilesystem.h"
|
||||||
|
|
||||||
#if OBSW_USE_TCP_SERVER == 0
|
#if OBSW_USE_TCP_SERVER == 0
|
||||||
#include <fsfw/osal/common/UdpTcPollingTask.h>
|
#include <fsfw/osal/common/UdpTcPollingTask.h>
|
||||||
@ -20,18 +21,19 @@
|
|||||||
|
|
||||||
void ObjectFactory::produce(void* args) {
|
void ObjectFactory::produce(void* args) {
|
||||||
Factory::setStaticFrameworkObjectIds();
|
Factory::setStaticFrameworkObjectIds();
|
||||||
|
StorageManagerIF* tcStore = nullptr;
|
||||||
|
StorageManagerIF* tmStore = nullptr;
|
||||||
#if OBSW_ADD_CORE_COMPONENTS == 1
|
#if OBSW_ADD_CORE_COMPONENTS == 1
|
||||||
{
|
{
|
||||||
LocalPool::LocalPoolConfig poolCfg = {{16, 100}, {32, 50}, {64, 40},
|
LocalPool::LocalPoolConfig poolCfg = {{16, 100}, {32, 50}, {64, 40},
|
||||||
{128, 30}, {1024, 20}, {2048, 10}};
|
{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},
|
LocalPool::LocalPoolConfig poolCfg = {{16, 100}, {32, 50}, {64, 40},
|
||||||
{128, 30}, {1024, 20}, {2048, 10}};
|
{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}};
|
{128, 30}, {1024, 20}, {2048, 10}};
|
||||||
new PoolManager(objects::IPC_STORE, poolCfg);
|
new PoolManager(objects::IPC_STORE, poolCfg);
|
||||||
}
|
}
|
||||||
ObjectFactory::produceGenericObjects();
|
TmFunnel* funnel;
|
||||||
|
ObjectFactory::produceGenericObjects(&funnel);
|
||||||
// TMTC Reception via TCP/IP socket
|
// TMTC Reception via TCP/IP socket
|
||||||
#if OBSW_USE_TCP_SERVER == 0
|
#if OBSW_USE_TCP_SERVER == 0
|
||||||
auto tmtcBridge = new UdpTmTcBridge(objects::TCPIP_TMTC_BRIDGE, objects::CCSDS_DISTRIBUTOR);
|
auto tmtcBridge = new UdpTmTcBridge(objects::TCPIP_TMTC_BRIDGE, objects::CCSDS_DISTRIBUTOR);
|
||||||
@ -60,4 +63,13 @@ void ObjectFactory::produce(void* args) {
|
|||||||
periodicEvent = true;
|
periodicEvent = true;
|
||||||
#endif
|
#endif
|
||||||
new FsfwTestTask(objects::TEST_TASK, periodicEvent);
|
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
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit b73754dfd62ec61410160beca8562a558c6e89cc
|
Subproject commit 34dd478848cc43bf9520d366207f20bdfe2c4962
|
Loading…
Reference in New Issue
Block a user