aboutsummaryrefslogtreecommitdiffstats
path: root/src/fig0_25.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-03-03 18:03:17 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-03-03 18:03:17 +0100
commit618c88a6e3c594b8382b4c61710a968c6adcdf49 (patch)
tree314e99e56cc0715fdcbeed2189fc6056a5c6e4d0 /src/fig0_25.cpp
parent4e196f337303304cc9cb15b5d7d345646486e68f (diff)
downloadetisnoop-618c88a6e3c594b8382b4c61710a968c6adcdf49.tar.gz
etisnoop-618c88a6e3c594b8382b4c61710a968c6adcdf49.tar.bz2
etisnoop-618c88a6e3c594b8382b4c61710a968c6adcdf49.zip
Output YAML
Diffstat (limited to 'src/fig0_25.cpp')
-rw-r--r--src/fig0_25.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/fig0_25.cpp b/src/fig0_25.cpp
index 9aa64c0..bf02d13 100644
--- a/src/fig0_25.cpp
+++ b/src/fig0_25.cpp
@@ -1,6 +1,6 @@
/*
Copyright (C) 2014 CSP Innovazione nelle ICT s.c.a r.l. (http://www.csp.it/)
- Copyright (C) 2017 Matthias P. Braendli (http://www.opendigitalradio.org)
+ Copyright (C) 2018 Matthias P. Braendli (http://www.opendigitalradio.org)
Copyright (C) 2015 Data Path
This program is free software: you can redistribute it and/or modify
@@ -65,7 +65,8 @@ fig_result_t fig0_25(fig0_common_t& fig0, const display_settings_t &disp)
Asu_flags = ((uint16_t)f[i+2] << 8) | (uint16_t)f[i+3];
Rfu = (f[i+4] >> 4);
Number_EIds = (f[i+4] & 0x0F);
- r.msgs.push_back(strprintf("SId=0x%X", SId));
+ r.msgs.emplace_back("-");
+ r.msgs.emplace_back(1, strprintf("SId=0x%X", SId));
r.msgs.emplace_back(1, strprintf("Asu flags=0x%X", Asu_flags));
r.msgs.emplace_back(1, strprintf("Number of EIds=%d", Number_EIds));
@@ -78,26 +79,31 @@ fig_result_t fig0_25(fig0_common_t& fig0, const display_settings_t &disp)
// CEI Change Event Indication
if (Number_EIds == 0) {
- r.msgs.emplace_back(1, "CEI");
+ r.msgs.emplace_back(1, "CEI=true");
}
i += 5;
+ std::stringstream eid_ss;
for (j = 0; j < Number_EIds && i < fig0.figlen - 1; j++) {
// iterate over EIds
EId = ((uint16_t)f[i] << 8) | (uint16_t)f[i+1];
- r.msgs.emplace_back(2, strprintf("EId=0x%X", EId));
+ if (j > 0) {
+ eid_ss << ", ";
+ }
+ eid_ss << strprintf("0x%04x", EId);
i += 2;
}
+ r.msgs.emplace_back(1, "EIds: [" + eid_ss.str() + "]");
if (j < Number_EIds) {
r.errors.push_back("missing EId, fig length too short !");
}
- // decode fig0.oe() announcement support types
+ r.msgs.emplace_back(1, "OE Announcement support:");
+ // decode OE announcement support types
for (j = 0; j < 16; j++) {
if (Asu_flags & (1 << j)) {
- r.msgs.emplace_back(2,
- strprintf("fig0.oe() Announcement support=%s", get_announcement_type(j)));
+ r.msgs.emplace_back(2, strprintf("- %s", get_announcement_type(j)));
}
}
}