summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-03-29 08:51:20 +0200
committerHarald Welte <laforge@gnumonks.org>2018-03-29 08:51:20 +0200
commit5c49ba4393079bd2ac5b8ba0198b799da7eb587a (patch)
tree8a180da9cc19cdf7aac6388132c591f66f61cc71
parent1af4033a7b8168a817d314352f8e00019e651282 (diff)
RTP_Emulation: Add f_rtpem_stats_compare() to match a pair of stats
-rw-r--r--library/RTP_Emulation.ttcn12
1 files changed, 12 insertions, 0 deletions
diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn
index 90a769c..0bf5cbd 100644
--- a/library/RTP_Emulation.ttcn
+++ b/library/RTP_Emulation.ttcn
@@ -188,6 +188,18 @@ function f_rtpem_stats_get(RTPEM_CTRL_PT pt, boolean rtcp := false) return Rtpem
return stats;
}
+function f_rtpem_stats_compare(RtpemStats a, RtpemStats b) return boolean {
+ log("stats A: ", a);
+ log("stats B: ", b);
+
+ if (a.num_pkts_tx != b.num_pkts_rx or
+ a.num_pkts_rx != b.num_pkts_tx or
+ a.bytes_payload_tx != b.bytes_payload_rx or
+ a.bytes_payload_rx != b.bytes_payload_tx) {
+ return false;
+ }
+ return true;
+}
template PDU_RTP ts_RTP(BIT32_BO_LAST ssrc, INT7b pt, LIN2_BO_LAST seq, uint32_t ts,