From cd6948b18c9f5b127b2bd083dc9b538d72e84545 Mon Sep 17 00:00:00 2001 From: Srivats P Date: Thu, 8 Feb 2018 21:24:44 +0530 Subject: [PATCH] Add preflight check for variableCount > frameCount --- common/streambase.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/common/streambase.cpp b/common/streambase.cpp index 1430c30..d4c8cc8 100644 --- a/common/streambase.cpp +++ b/common/streambase.cpp @@ -631,6 +631,38 @@ bool StreamBase::preflightCheck(QStringList &result) const break; } + if (isFrameVariable()) { + if (frameVariableCount() > frameCount()) + { + if (frameCount() == 1) + { + result << QObject::tr("Variable fields won't change since " + "only 1 frame%1 is configured to be transmitted - " + "increase number of packets to %L2 to have variable " + "fields change across the configured range") + .arg(sendUnit() == e_su_bursts ? + " (number of bursts * packets per burst)" : + "") + .arg(frameVariableCount()); + pass = false; + } + else if (frameCount() > 1) + { + result << QObject::tr("Variable fields will change for " + "%L1 counts since only %L1 frames%2 are configured " + "to be transmitted - increase number of packets " + "from %L1 to %L3 to have variable fields change " + "across the configured range") + .arg(frameCount()) + .arg(sendUnit() == e_su_bursts ? + " (number of bursts * packets per burst)" : + "") + .arg(frameVariableCount()); + pass = false; + } + } + } + if (frameCount() <= averagePacketRate() && nextWhat() != e_nw_goto_id) { result << QObject::tr("Only %L1 frames at the rate of "