OBSW Update Commands #302
@ -124,6 +124,15 @@ void initmission::initTasks() {
|
||||
}
|
||||
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
|
||||
|
||||
#if OBSW_ADD_CFDP_COMPONENTS == 1
|
||||
PeriodicTaskIF* cfdpTask = factory->createPeriodicTask(
|
||||
"CFDP Handler", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
||||
result = cfdpTask->addComponent(objects::CFDP_HANDLER);
|
||||
if (result != returnvalue::OK) {
|
||||
initmission::printAddObjectError("CFDP Handler", objects::CFDP_HANDLER);
|
||||
}
|
||||
#endif
|
||||
|
||||
PeriodicTaskIF* acsTask = factory->createPeriodicTask(
|
||||
"ACS_TASK", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||
#if OBSW_ADD_ACS_HANDLERS == 1
|
||||
@ -279,6 +288,10 @@ void initmission::initTasks() {
|
||||
ptmeTestTask->startTask();
|
||||
#endif
|
||||
|
||||
#if OBSW_ADD_CFDP_COMPONENTS == 1
|
||||
cfdpTask->startTask();
|
||||
#endif
|
||||
|
||||
#if OBSW_ADD_STAR_TRACKER == 1
|
||||
strHelperTask->startTask();
|
||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
||||
Subproject commit 95aac7dc8de8290c498cb4eb70ed63f20f39eda7
|
||||
Subproject commit e2c115833762f1887804fef76baebedf914e36d2
|
@ -6,3 +6,4 @@ add_subdirectory(memory)
|
||||
add_subdirectory(tmtc)
|
||||
add_subdirectory(system)
|
||||
add_subdirectory(csp)
|
||||
add_subdirectory(cfdp)
|
||||
|
0
mission/cfdp/CMakeLists.txt
Normal file
0
mission/cfdp/CMakeLists.txt
Normal file
57
mission/cfdp/Config.h
Normal file
57
mission/cfdp/Config.h
Normal file
@ -0,0 +1,57 @@
|
||||
#ifndef MISSION_CFDP_CONFIG_H_
|
||||
#define MISSION_CFDP_CONFIG_H_
|
||||
|
||||
#include "fsfw/cfdp.h"
|
||||
|
||||
namespace cfdp {
|
||||
|
||||
class EiveUserHandler : public cfdp::UserBase {
|
||||
public:
|
||||
explicit EiveUserHandler(HasFileSystemIF& vfs) : cfdp::UserBase(vfs) {}
|
||||
virtual ~EiveUserHandler() = default;
|
||||
|
||||
void transactionIndication(const cfdp::TransactionId& id) override {}
|
||||
void eofSentIndication(const cfdp::TransactionId& id) override {}
|
||||
void transactionFinishedIndication(const cfdp::TransactionFinishedParams& params) override {
|
||||
sif::info << "File transaction finished for transaction with " << params.id << std::endl;
|
||||
}
|
||||
void metadataRecvdIndication(const cfdp::MetadataRecvdParams& params) override {
|
||||
sif::info << "Metadata received for transaction with " << params.id << std::endl;
|
||||
}
|
||||
void fileSegmentRecvdIndication(const cfdp::FileSegmentRecvdParams& params) override {}
|
||||
void reportIndication(const cfdp::TransactionId& id, cfdp::StatusReportIF& report) override {}
|
||||
void suspendedIndication(const cfdp::TransactionId& id, cfdp::ConditionCode code) override {}
|
||||
void resumedIndication(const cfdp::TransactionId& id, size_t progress) override {}
|
||||
void faultIndication(const cfdp::TransactionId& id, cfdp::ConditionCode code,
|
||||
size_t progress) override {}
|
||||
void abandonedIndication(const cfdp::TransactionId& id, cfdp::ConditionCode code,
|
||||
size_t progress) override {}
|
||||
void eofRecvIndication(const cfdp::TransactionId& id) override {
|
||||
sif::info << "EOF PDU received for transaction with " << id << std::endl;
|
||||
}
|
||||
};
|
||||
|
||||
class EiveFaultHandler : public cfdp::FaultHandlerBase {
|
||||
public:
|
||||
void noticeOfSuspensionCb(cfdp::TransactionId& id, cfdp::ConditionCode code) override {
|
||||
sif::warning << "Notice of suspension detected for transaction " << id
|
||||
<< " with condition code: " << cfdp::getConditionCodeString(code) << std::endl;
|
||||
}
|
||||
void noticeOfCancellationCb(cfdp::TransactionId& id, cfdp::ConditionCode code) override {
|
||||
sif::warning << "Notice of suspension detected for transaction " << id
|
||||
<< " with condition code: " << cfdp::getConditionCodeString(code) << std::endl;
|
||||
}
|
||||
void abandonCb(cfdp::TransactionId& id, cfdp::ConditionCode code) override {
|
||||
sif::warning << "Transaction " << id
|
||||
<< " was abandoned, condition code : " << cfdp::getConditionCodeString(code)
|
||||
<< std::endl;
|
||||
}
|
||||
void ignoreCb(cfdp::TransactionId& id, cfdp::ConditionCode code) override {
|
||||
sif::warning << "Fault ignored for transaction " << id
|
||||
<< ", condition code: " << cfdp::getConditionCodeString(code) << std::endl;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* MISSION_CFDP_CONFIG_H_ */
|
@ -1,9 +1,11 @@
|
||||
#include "GenericFactory.h"
|
||||
|
||||
#include <fsfw/cfdp/handler/CfdpHandler.h>
|
||||
#include <fsfw/cfdp/handler/RemoteConfigTableIF.h>
|
||||
#include <fsfw/events/EventManager.h>
|
||||
#include <fsfw/health/HealthTable.h>
|
||||
#include <fsfw/internalerror/InternalErrorReporter.h>
|
||||
#include <fsfw/ipc/QueueFactory.h>
|
||||
#include <fsfw/pus/CService200ModeCommanding.h>
|
||||
#include <fsfw/pus/CService201HealthCommanding.h>
|
||||
#include <fsfw/pus/Service17Test.h>
|
||||
@ -22,6 +24,7 @@
|
||||
#include <mission/tmtc/TmFunnel.h>
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
#include "mission/cfdp/Config.h"
|
||||
#include "eive/definitions.h"
|
||||
#include "fsfw/pus/Service11TelecommandScheduling.h"
|
||||
#include "objects/systemObjectList.h"
|
||||
@ -47,6 +50,20 @@
|
||||
#define OBSW_TM_TO_PTME 0
|
||||
#endif
|
||||
|
||||
namespace cfdp {
|
||||
|
||||
PacketInfoList<64> PACKET_LIST;
|
||||
LostSegmentsList<128> LOST_SEGMENTS;
|
||||
EntityId REMOTE_CFDP_ID(UnsignedByteField<uint16_t>(config::EIVE_GROUND_CFDP_ENTITY_ID));
|
||||
RemoteEntityCfg GROUND_REMOTE_CFG(REMOTE_CFDP_ID);
|
||||
OneRemoteConfigProvider REMOTE_CFG_PROVIDER(GROUND_REMOTE_CFG);
|
||||
HostFilesystem HOST_FS;
|
||||
EiveUserHandler USER_HANDLER(HOST_FS);
|
||||
EiveFaultHandler EIVE_FAULT_HANDLER;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_) {
|
||||
// Framework objects
|
||||
new EventManager(objects::EVENT_MANAGER);
|
||||
@ -135,25 +152,19 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_) {
|
||||
#endif /* OBSW_ADD_TCPIP_BRIDGE == 1 */
|
||||
|
||||
#if OBSW_ADD_CFDP_COMPONENTS == 1
|
||||
auto* hostFs = new HostFilesystem();
|
||||
FsfwHandlerParams params(objects::CFDP_HANDLER, *hostFs, *funnel, *tcStore, *tmStore);
|
||||
using namespace cfdp;
|
||||
auto* msgQueue = QueueFactory::instance()->createMessageQueue(32);
|
||||
FsfwHandlerParams params(objects::CFDP_HANDLER, HOST_FS, *funnel, *tcStore, *tmStore, *msgQueue);
|
||||
cfdp::IndicationCfg indicationCfg;
|
||||
// UnsignedByteField<uint16_t> apid(common::COMMON_CFDP_APID);
|
||||
// cfdp::EntityId localId(apid);
|
||||
// UnsignedByteField<uint16_t> remoteEntityId(common::COMMON_CFDP_CLIENT_ENTITY_ID);
|
||||
// cfdp::EntityId remoteId(remoteEntityId);
|
||||
// cfdp::RemoteEntityCfg remoteCfg(remoteId);
|
||||
// remoteCfg.defaultChecksum = cfdp::ChecksumTypes::CRC_32;
|
||||
// auto* remoteCfgProvider = new cfdp::OneRemoteConfigProvider(remoteCfg);
|
||||
// auto* cfdpUserHandler = new CfdpExampleUserHandler(*hostFs);
|
||||
// auto* cfdpFaultHandler = new CfdpExampleFaultHandler();
|
||||
// cfdp::PacketInfoList<64> packetList;
|
||||
// cfdp::LostSegmentsList<128> lostSegments;
|
||||
// CfdpHandlerCfg cfg(localId, indicationCfg, *cfdpUserHandler, *cfdpFaultHandler, packetList,
|
||||
// lostSegments, *remoteCfgProvider);
|
||||
// auto* cfdpHandler = new CfdpHandler(params, cfg);
|
||||
// CcsdsDistributorIF::DestInfo info("CFDP Destination", common::COMMON_CFDP_APID,
|
||||
// cfdpHandler->getRequestQueue(), true);
|
||||
// ccsdsDistrib->registerApplication(info);
|
||||
UnsignedByteField<uint16_t> apid(config::EIVE_LOCAL_CFDP_ENTITY_ID);
|
||||
cfdp::EntityId localId(apid);
|
||||
GROUND_REMOTE_CFG.defaultChecksum = cfdp::ChecksumType::CRC_32;
|
||||
CfdpHandlerCfg cfg(localId, indicationCfg, USER_HANDLER, EIVE_FAULT_HANDLER, PACKET_LIST,
|
||||
LOST_SEGMENTS, REMOTE_CFG_PROVIDER);
|
||||
auto* cfdpHandler = new CfdpHandler(params, cfg);
|
||||
// All CFDP packets arrive wrapped inside CCSDS space packets
|
||||
CcsdsDistributorIF::DestInfo info("CFDP Destination", config::EIVE_CFDP_APID,
|
||||
cfdpHandler->getRequestQueue(), true);
|
||||
ccsdsDistrib->registerApplication(info);
|
||||
#endif
|
||||
}
|
||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
||||
Subproject commit 603b7e8574d74ba60692115133cde3cd8b8bd423
|
||||
Subproject commit 91f85537ce9903514c411c02654410bc7489d6f4
|
Loading…
Reference in New Issue
Block a user