discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Problem with simple implementation of sink block


From: Maicon Kist
Subject: [Discuss-gnuradio] Problem with simple implementation of sink block
Date: Fri, 12 Feb 2016 00:29:07 -0200

Hi,
I am having a problem with a simple block implementation in GNURadio:

I developed a python block to count the quantity of numbers received. 
The problem arises when I compare the quantity of numbers received by my block with the ones counted in a Qt Histogram.

My flowgraph is:

 ————————                  ——————
| Random Source |———— >| my_block    |
 ————————        |         ————— —
                                      |
                                      |
                                      |        ———————— 
                                      |—  >| QT Histo Sink    |
                                               ————————  

When executing, my block prints it received millions of numbers, whereas the QT Histo Sink is showing only a few hundreds.
Any suggestions?


The work function of my block is as follows: 

####################### my block code
def work(self, input_items, output_items):
in0 = input_items[0]
num_input_items = len(in0)

    self._i += 1
    self._num_input_items_total += num_input_items

        if self._i % 10000 == 0:
print self._i, self._num_input_items_total

    return len(in0)
########################


Best Regards
-- 
Maicon Kist

-- 
Maicon Kist

reply via email to

[Prev in Thread] Current Thread [Next in Thread]