From 0616c12772c4995d0a22b803127af156a37a3a7d Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Thu, 27 Apr 2017 01:39:20 +0200 Subject: Refactor FIG0/X message generation --- src/etisnoop.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'src/etisnoop.cpp') diff --git a/src/etisnoop.cpp b/src/etisnoop.cpp index 7137d2e..1ebdf70 100644 --- a/src/etisnoop.cpp +++ b/src/etisnoop.cpp @@ -1,6 +1,6 @@ /* Copyright (C) 2014 CSP Innovazione nelle ICT s.c.a r.l. (http://www.csp.it/) - Copyright (C) 2016 Matthias P. Braendli (http://www.opendigitalradio.org) + Copyright (C) 2017 Matthias P. Braendli (http://www.opendigitalradio.org) Copyright (C) 2015 Data Path This program is free software: you can redistribute it and/or modify @@ -701,8 +701,23 @@ void decodeFIG( figs.push_back(figtype, fig0.ext(), figlen); - bool complete = fig0_select(fig0, disp); - rate_announce_fig(figtype, fig0.ext(), complete); + auto fig_result = fig0_select(fig0, disp); + for (const auto& msg : fig_result.msgs) { + std::string s; + for (int i = 0; i < msg.level; i++) { + s += " "; + } + s += msg.msg; + printbuf(s.c_str(), disp.indent+1, nullptr, 0); + } + if (not fig_result.errors.empty()) { + printf("ERRORS:\n"); + for (const auto& err : fig_result.errors) { + printbuf(err.c_str(), disp.indent+1, nullptr, 0); + } + } + + rate_announce_fig(figtype, fig0.ext(), fig_result.complete); } break; -- cgit v1.2.3