Closed RalphSteinhagen closed 4 months ago
Great! I've tested this branch with my Head
block in https://github.com/daniestevez/gr4-packet-modem/tree/test-gnuradio4-pr342 and DONE propagation works as expected. A NullSource -> Head(100) -> VectorSink
flowgraph terminates and at the end the VectorSink
contains 100 items (see examples/head.cpp
).
Failed conditions
26.5% Coverage on New Code (required ≥ 80%)
11.4% Duplication on New Code (required ≤ 3%)
When a block detects that it is no longer required (i.e., it has no downstream consumers), this feature ensures that the block declares itself 'DONE' and severs connections to upstream blocks. This feature is controlled by the Block::disconnect_on_done parameter (default: true)
added
buffer().n_writers()
interface tracking the number of writers and when a buffer and/or two or more ports are not connected anymore. Makes the first item simpler/cleaner.added some documented default blocks in-line with GR3: NullSource, NullSink, Copy, HeadBlock, CountingSource, CountingSink -- naming of the 'HeadBlock' -- while ubiquitously used in GR3 -- should be discussed with the architecture team because of semantics.