aboutsummaryrefslogtreecommitdiffstats
path: root/python/gui/static/js
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-01-22 11:40:26 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-01-22 11:40:26 +0100
commit2b3cf8e158901ae7d20dd330c34a14947191606e (patch)
tree11edf32a55e69a4ec584fde5c5a74486cbb103f3 /python/gui/static/js
parentd7a0913ead6724bfd508a5480c7014b2516975ce (diff)
downloaddabmod-2b3cf8e158901ae7d20dd330c34a14947191606e.tar.gz
dabmod-2b3cf8e158901ae7d20dd330c34a14947191606e.tar.bz2
dabmod-2b3cf8e158901ae7d20dd330c34a14947191606e.zip
GUI: Check for late packets
Diffstat (limited to 'python/gui/static/js')
-rw-r--r--python/gui/static/js/odr-home.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/python/gui/static/js/odr-home.js b/python/gui/static/js/odr-home.js
index 2fa873a..56c8eb4 100644
--- a/python/gui/static/js/odr-home.js
+++ b/python/gui/static/js/odr-home.js
@@ -110,6 +110,7 @@ function check_modulating(last_num_frames) {
else {
mark_ok('is_modulating', "Number of frames modulated: " + data);
check_underrunning(0, 0);
+ check_late(0, 0);
}
}
}
@@ -151,6 +152,34 @@ function check_underrunning(iteration, first_underruns) {
});
}
+function check_late(iteration, first_late) {
+ var n_checks = 3;
+
+ apiRequestChain("/api/parameter",
+ {controllable: 'sdr', param: 'latepackets'},
+ function(data) {
+ if (iteration == 0) {
+ mark_pending('is_late', "Checking for late packets");
+ setTimeout(function() { check_late(iteration+1, data); }, 2000);
+ }
+ else if (iteration < n_checks) {
+ mark_pending('is_late', "Check " + iteration + "/" + n_checks + "...");
+ setTimeout(function() { check_late(iteration+1, first_late); }, 2000);
+ }
+ else {
+ if (data == first_late) {
+ mark_ok('is_late', "Number of late packets is not increasing: " + data);
+ }
+ else {
+ mark_fail('is_late', "Late packets observed in last " + n_checks + " seconds: " + data);
+ }
+ }
+ },
+ function(data) {
+ mark_fail('is_late', data);
+ });
+}
+
function check_rate_4x() {
mark_pending('is_rate_4x');
apiRequestChain("/api/parameter",