From d84528e643a7381c85553a9bec89c7ebdbae0c15 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 11 Oct 2023 13:47:38 +0200 Subject: [PATCH] CFDP file segment len is configurable via definitions.h now --- common/config/eive/definitions.h | 2 ++ mission/genericFactory.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index 86a83ac8..2edf434f 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -48,6 +48,8 @@ static constexpr uint32_t LEGACY_SA_DEPL_CHANNEL_ALTERNATION_INTERVAL_SECS = 5; // Maximum allowed burn time allowed by the software. static constexpr uint32_t SA_DEPL_MAX_BURN_TIME = 180; +static constexpr size_t CFDP_MAX_FILE_SEGMENT_LEN = 300; + static constexpr uint32_t CCSDS_HANDLER_QUEUE_SIZE = 50; static constexpr uint8_t NUMBER_OF_VIRTUAL_CHANNELS = 4; static constexpr uint32_t VC0_LIVE_TM_QUEUE_SIZE = 300; diff --git a/mission/genericFactory.cpp b/mission/genericFactory.cpp index 006b295a..0dd965eb 100644 --- a/mission/genericFactory.cpp +++ b/mission/genericFactory.cpp @@ -289,7 +289,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun UnsignedByteField apid(config::EIVE_LOCAL_CFDP_ENTITY_ID); cfdp::EntityId localId(apid); GROUND_REMOTE_CFG.defaultChecksum = cfdp::ChecksumType::CRC_32; - GROUND_REMOTE_CFG.maxFileSegmentLen = 990; + GROUND_REMOTE_CFG.maxFileSegmentLen = config::CFDP_MAX_FILE_SEGMENT_LEN; CfdpHandlerCfg cfdpCfg(localId, indicationCfg, *eiveUserHandler, EIVE_FAULT_HANDLER, PACKET_LIST, LOST_SEGMENTS, REMOTE_CFG_PROVIDER); auto* cfdpHandler = new CfdpHandler(params, cfdpCfg);