Reputation: 1
I'm trying to display "number of items on the output stream" in the flowgraph.
Is there a way to access the function: block__nitems_written(unsigned int which_output)
from the flowgraph?
So far I have tried "from gnuradio import gr" and then use gr.block__nitems_written(0)
as a value in a variable. The error I get is:
module object has no attribute
block__nitems_written
.
I think I am not calling the function properly. Any help will be appreciated!
Upvotes: 0
Views: 792
Reputation: 36442
You're confusing things! That's not a property of a flow graph.
Each block has its own number of items that it's written to its output ports.
Hence, it's a method of gr.block
, which you can only call with a block instance, i.e. typically as self.nitems_written(0)
within a block's work
method.
Upvotes: 0