Merge branch 'edmondj-dump_flowgraph' into next

This commit is contained in:
Carles Fernandez committed 2026-11-17 10:26:46 +01:00
commit 369cd625f7
2 files changed
+19 -1

No files matched your search

+4
View File
@@ -300,6 +300,10 @@ All notable changes to GNSS-SDR will be documented in this file.
the receiver computed no position and wrote no RINEX files. When only some
constellations provide a band pair, the log names those whose satellites are
left out of the solution.
- Added the option to write the receiver's GNU Radio flow graph to a file in
Graphviz DOT format. Set `GNSS-SDR.dump_flowgraph=true` and, optionally,
`GNSS-SDR.flowgraph_dump_filename` (default `flowgraph.dot`). Contributed by
@edmondj.
See the definitions of concepts and metrics at
https://gnss-sdr.org/design-forces/
+15 -1
View File
@@ -543,7 +543,21 @@ void GNSSFlowgraph::connect()
connected_ = true;
LOG(INFO) << "Flowgraph connected";
top_block_->dump();
if (configuration_->property("GNSS-SDR.dump_flowgraph", false))
{
const auto dump_file = configuration_->property("GNSS-SDR.flowgraph_dump_filename", std::string("flowgraph.dot"));
std::ofstream file(dump_file);
file << gr::dot_graph(top_block_);
file.close();
if (file)
{
LOG(INFO) << "Flowgraph dumped to " << dump_file;
}
else
{
LOG(WARNING) << "Unable to write flowgraph dump file " << dump_file;
}
}
}