aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-10-09 15:27:35 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-10-09 15:27:35 +0200
commitea70b9953faaf9155b60400e306c71432a049d94 (patch)
treee31e867700f662ea3ddc8f74aa0800d3cb096478
parent4bc1c0cf3e8c5dcc72a4bf971f0b78bbbe35cc57 (diff)
downloadetisnoop-ea70b9953faaf9155b60400e306c71432a049d94.tar.gz
etisnoop-ea70b9953faaf9155b60400e306c71432a049d94.tar.bz2
etisnoop-ea70b9953faaf9155b60400e306c71432a049d94.zip
Add -e option
-rw-r--r--src/etianalyse.cpp74
-rw-r--r--src/etisnoop.cpp1
2 files changed, 40 insertions, 35 deletions
diff --git a/src/etianalyse.cpp b/src/etianalyse.cpp
index df7eca0..8ba1924 100644
--- a/src/etianalyse.cpp
+++ b/src/etianalyse.cpp
@@ -458,25 +458,27 @@ void ETI_Analyser::eti_analyse()
strprintf("Mismatch: %04x %04x", crc, figcrc));
}
- printvalue("FIGs", 3);
-
- bool endmarker = false;
- int figcount = 0;
- while (!endmarker) {
- uint8_t figtype, figlen;
- figtype = (fig[0] & 0xE0) >> 5;
- if (figtype != 7) {
- figlen = fig[0] & 0x1F;
-
- printsequencestart(4);
- decodeFIG(config, figs, fig+1, figlen, figtype, 5, crccorrect);
- fig += figlen + 1;
- figcount += figlen + 1;
- if (figcount >= 29)
+ if (crccorrect or config.ignore_error) {
+ printvalue("FIGs", 3);
+
+ bool endmarker = false;
+ int figcount = 0;
+ while (!endmarker) {
+ uint8_t figtype, figlen;
+ figtype = (fig[0] & 0xE0) >> 5;
+ if (figtype != 7) {
+ figlen = fig[0] & 0x1F;
+
+ printsequencestart(4);
+ decodeFIG(config, figs, fig+1, figlen, figtype, 5, crccorrect);
+ fig += figlen + 1;
+ figcount += figlen + 1;
+ if (figcount >= 29)
+ endmarker = true;
+ }
+ else {
endmarker = true;
- }
- else {
- endmarker = true;
+ }
}
}
@@ -698,26 +700,28 @@ void ETI_Analyser::fic_analyse()
strprintf("Mismatch: %04x %04x", crc, figcrc));
}
- printvalue("FIGs", 3);
+ if (crccorrect or config.ignore_error) {
+ printvalue("FIGs", 3);
- uint8_t *fig = fib;
- bool endmarker = false;
- int figcount = 0;
- while (!endmarker) {
- uint8_t figtype, figlen;
- figtype = (fig[0] & 0xE0) >> 5;
- if (figtype != 7) {
- figlen = fig[0] & 0x1F;
+ uint8_t *fig = fib;
+ bool endmarker = false;
+ int figcount = 0;
+ while (!endmarker) {
+ uint8_t figtype, figlen;
+ figtype = (fig[0] & 0xE0) >> 5;
+ if (figtype != 7) {
+ figlen = fig[0] & 0x1F;
- printsequencestart(4);
- decodeFIG(config, figs, fig+1, figlen, figtype, 5, crccorrect);
- fig += figlen + 1;
- figcount += figlen + 1;
- if (figcount >= 29)
+ printsequencestart(4);
+ decodeFIG(config, figs, fig+1, figlen, figtype, 5, crccorrect);
+ fig += figlen + 1;
+ figcount += figlen + 1;
+ if (figcount >= 29)
+ endmarker = true;
+ }
+ else {
endmarker = true;
- }
- else {
- endmarker = true;
+ }
}
}
diff --git a/src/etisnoop.cpp b/src/etisnoop.cpp
index fa07ea2..45f4f9e 100644
--- a/src/etisnoop.cpp
+++ b/src/etisnoop.cpp
@@ -102,6 +102,7 @@ void usage(void)
" -r analyse FIG rates in FIGs per second\n"
" -R analyse FIG rates in frames per FIG\n"
" -w decode CRC-DABMUX and ODR-DabMux watermark.\n"
+ " -e decode frames with SYNC error and decode FIGs with invalid CRC\n"
" -F <type>/<ext>\n"
" add FIG type/ext to list of FIGs to display.\n"
" if the option is not given, all FIGs are displayed.\n"