create and schedule CFDP components
This commit is contained in:
parent
e0837683fe
commit
b5ac8cded7
@ -142,3 +142,8 @@ ReturnValue_t CfdpHandler::handleCfdpPacket(TmTcMessage& msg) {
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CfdpHandler::noticeOfSuspensionCb(cfdp::ConditionCode code) {}
|
||||||
|
void CfdpHandler::noticeOfCancellationCb(cfdp::ConditionCode code) {}
|
||||||
|
void CfdpHandler::abandonCb(cfdp::ConditionCode code) {}
|
||||||
|
void CfdpHandler::ignoreCb(cfdp::ConditionCode code) {}
|
||||||
|
@ -66,6 +66,10 @@ class CfdpHandler : public SystemObject,
|
|||||||
void abandonedIndication(const cfdp::TransactionId& id, cfdp::ConditionCode code,
|
void abandonedIndication(const cfdp::TransactionId& id, cfdp::ConditionCode code,
|
||||||
size_t progress) override;
|
size_t progress) override;
|
||||||
void eofRecvIndication(const cfdp::TransactionId& id) override;
|
void eofRecvIndication(const cfdp::TransactionId& id) override;
|
||||||
|
void noticeOfSuspensionCb(cfdp::ConditionCode code) override;
|
||||||
|
void noticeOfCancellationCb(cfdp::ConditionCode code) override;
|
||||||
|
void abandonCb(cfdp::ConditionCode code) override;
|
||||||
|
void ignoreCb(cfdp::ConditionCode code) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MessageQueueIF* msgQueue = nullptr;
|
MessageQueueIF* msgQueue = nullptr;
|
||||||
|
@ -48,11 +48,27 @@ void InitMission::createTasks() {
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
task::printInitError("PUS distributor", objects::PUS_DISTRIBUTOR);
|
task::printInitError("PUS distributor", objects::PUS_DISTRIBUTOR);
|
||||||
}
|
}
|
||||||
|
result = distributerTask->addComponent(objects::CFDP_DISTRIBUTOR);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
task::printInitError("CFDP distributor", objects::CFDP_DISTRIBUTOR);
|
||||||
|
}
|
||||||
result = distributerTask->addComponent(objects::TM_FUNNEL);
|
result = distributerTask->addComponent(objects::TM_FUNNEL);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
task::printInitError("TM funnel", objects::TM_FUNNEL);
|
task::printInitError("TM funnel", objects::TM_FUNNEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if OBSW_ADD_CFDP_COMPONENTS == 1
|
||||||
|
#ifdef __unix__
|
||||||
|
currPrio = 50;
|
||||||
|
#endif
|
||||||
|
PeriodicTaskIF* cfdpTask = taskFactory->createPeriodicTask(
|
||||||
|
"CFDP Handler", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, deadlineMissedFunc);
|
||||||
|
result = cfdpTask->addComponent(objects::CFDP_HANDLER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
task::printInitError("CFDP Handler", objects::CFDP_HANDLER);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __unix__
|
#ifdef __unix__
|
||||||
currPrio = 50;
|
currPrio = 50;
|
||||||
#endif
|
#endif
|
||||||
@ -247,6 +263,10 @@ void InitMission::createTasks() {
|
|||||||
eventTask->startTask();
|
eventTask->startTask();
|
||||||
#endif /* OBSW_ADD_CORE_COMPONENTS == 1 */
|
#endif /* OBSW_ADD_CORE_COMPONENTS == 1 */
|
||||||
|
|
||||||
|
#if OBSW_ADD_CFDP_COMPONENTS == 1
|
||||||
|
cfdpTask->startTask();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if OBSW_ADD_PUS_STACK == 1
|
#if OBSW_ADD_PUS_STACK == 1
|
||||||
pusVerification->startTask();
|
pusVerification->startTask();
|
||||||
pusHighPrio->startTask();
|
pusHighPrio->startTask();
|
||||||
|
@ -42,7 +42,7 @@ void ObjectFactory::produce(void* args) {
|
|||||||
new PoolManager(objects::IPC_STORE, poolCfg);
|
new PoolManager(objects::IPC_STORE, poolCfg);
|
||||||
}
|
}
|
||||||
TmFunnel* funnel;
|
TmFunnel* funnel;
|
||||||
ObjectFactory::produceGenericObjects(&funnel);
|
ObjectFactory::produceGenericObjects(&funnel, *tcStore);
|
||||||
// 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);
|
||||||
@ -63,13 +63,18 @@ void ObjectFactory::produce(void* args) {
|
|||||||
periodicEvent = true;
|
periodicEvent = true;
|
||||||
#endif
|
#endif
|
||||||
new FsfwTestTask(objects::TEST_TASK, periodicEvent);
|
new FsfwTestTask(objects::TEST_TASK, periodicEvent);
|
||||||
|
|
||||||
|
#if OBSW_ADD_CFDP_COMPONENTS == 1
|
||||||
auto* hostFs = new HostFilesystem();
|
auto* hostFs = new HostFilesystem();
|
||||||
FsfwHandlerParams params(objects::CFDP_HANDLER, *hostFs, *funnel, *tcStore, *tmStore);
|
FsfwHandlerParams params(objects::CFDP_HANDLER, *hostFs, *funnel, *tcStore, *tmStore);
|
||||||
cfdp::IndicationCfg indicationCfg;
|
cfdp::IndicationCfg indicationCfg;
|
||||||
UnsignedByteField<uint16_t> apid(COMMON_APID);
|
UnsignedByteField<uint16_t> apid(COMMON_APID);
|
||||||
cfdp::EntityId localId(apid);
|
cfdp::EntityId localId(apid);
|
||||||
cfdp::RemoteEntityCfg cfg;
|
cfdp::RemoteEntityCfg remoteCfg;
|
||||||
cfdp::OneRemoteConfigProvider remoteCfgProvider(cfg);
|
cfdp::OneRemoteConfigProvider remoteCfgProvider(remoteCfg);
|
||||||
// CfdpHandlerCfg cfg(localId, indicationCfg);
|
cfdp::PacketInfoList<64> packetList;
|
||||||
// new CfdpHandler();
|
cfdp::LostSegmentsList<128> lostSegments;
|
||||||
|
CfdpHandlerCfg cfg(localId, indicationCfg, packetList, lostSegments, remoteCfgProvider);
|
||||||
|
new CfdpHandler(params, cfg);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit a36d951209568bc750bb78e314ea4dcd14b74c62
|
Subproject commit 081836621790614f3b44cf10fa8c7186d28eb2cf
|
Loading…
Reference in New Issue
Block a user