these queue sizes are sufficient
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2023-09-14 10:38:43 +02:00
parent 9243f917cc
commit 8071a5713f
Signed by: muellerr
GPG Key ID: A649FB78196E3849
3 changed files with 26 additions and 3 deletions

View File

@ -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) {

View File

@ -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;

View File

@ -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 {