diff --git a/bsp_q7s/objectFactory.cpp b/bsp_q7s/objectFactory.cpp index 6aa007a3..211aa071 100644 --- a/bsp_q7s/objectFactory.cpp +++ b/bsp_q7s/objectFactory.cpp @@ -1059,7 +1059,6 @@ ReturnValue_t ObjectFactory::readFirmwareVersion() { } ReturnValue_t ObjectFactory::createCcsdsIpComponentsAddTmRouting(CcsdsComponentArgs& ccsdsArgs) { - CcsdsIpCoreHandler* ipCoreHandler = nullptr; ReturnValue_t result = createCcsdsComponents(ccsdsArgs); #if OBSW_TM_TO_PTME == 1 if (ccsdsArgs.normalLiveTmDest != MessageQueueIF::NO_QUEUE) { diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index d746c97d..b90f6adb 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -58,8 +58,8 @@ static constexpr uint32_t NOK_STORE_QUEUE_SIZE = 350; static constexpr uint32_t HK_STORE_QUEUE_SIZE = 300; static constexpr uint32_t CFDP_STORE_QUEUE_SIZE = 300; -static constexpr uint32_t LIVE_CHANNEL_NORMAL_QUEUE_SIZE = 400; -static constexpr uint32_t LIVE_CHANNEL_CFDP_QUEUE_SIZE = 300; +static constexpr uint32_t LIVE_CHANNEL_NORMAL_QUEUE_SIZE = 250; +static constexpr uint32_t LIVE_CHANNEL_CFDP_QUEUE_SIZE = 250; static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_SRC_HANDLER = 50; static constexpr uint32_t CFDP_MAX_FSM_CALL_COUNT_DEST_HANDLER = 300; diff --git a/mission/com/LiveTmTask.cpp b/mission/com/LiveTmTask.cpp index 638f2e43..042104c4 100644 --- a/mission/com/LiveTmTask.cpp +++ b/mission/com/LiveTmTask.cpp @@ -7,6 +7,7 @@ #include "mission/sysDefs.h" +static constexpr bool DEBUG_TM_QUEUE_SPEED = false; std::atomic_bool signals::CFDP_CHANNEL_THROTTLE_SIGNAL = false; LiveTmTask::LiveTmTask(object_id_t objectId, PusTmFunnel& pusFunnel, CfdpTmFunnel& cfdpFunnel, @@ -27,7 +28,11 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) { readCommandQueue(); bool handledTm; ReturnValue_t result; + uint32_t consecutiveRegularCounter = 0; + uint32_t consecutiveCfdpCounter = 0; + bool isCfdp = false; while (true) { + isCfdp = false; // TODO: Must read CFDP TM queue and regular TM queue and forward them. Handle regular queue // first. handledTm = false; @@ -35,9 +40,17 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) { result = handleRegularTmQueue(); if (result == MessageQueueIF::EMPTY) { result = handleCfdpTmQueue(); + isCfdp = true; } if (result == returnvalue::OK) { handledTm = true; + if (DEBUG_TM_QUEUE_SPEED) { + if (isCfdp) { + consecutiveCfdpCounter++; + } else { + consecutiveRegularCounter++; + } + } } } if (channel.isBusy()) { @@ -54,6 +67,17 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) { } // Read command queue during idle times. readCommandQueue(); + if (DEBUG_TM_QUEUE_SPEED) { + if (consecutiveCfdpCounter > 0) { + sif::debug << "Concecutive CFDP TM handled: " << consecutiveCfdpCounter << std::endl; + } + if (consecutiveRegularCounter > 0) { + sif::debug << "Concecutive regular TM handled: " << consecutiveRegularCounter + << std::endl; + } + consecutiveRegularCounter = 0; + consecutiveCfdpCounter = 0; + } // 40 ms IDLE delay. Might tweak this in the future. TaskFactory::delayTask(40); } else {