I'd like to implement a simple custom sink block in Python.

AFAIK, a sink is a 1:0 basic block, with one input port, and no output port.

I define it as a class:

class MySink(gr.basic_block):
    def __init__(self, src_block):
gr.basic_block.__init__(self, name='MySink', in_sig=[numpy.float32], out_sig=None)
    gr.top_block().connect(src_block, self)

Then, in the top block constructor:
    # ....
    self.gsm_fcch_detector_0 = grgsm.fcch_detector(4)
    # Line bellow raises an 'Unable to coerce endpoint' exception
    self.my_sink = MySink(self.gsm_fcch_detector_0)

As you may already have guessed, I'm a newcomer here, and I'm sure I miss something obvious. I thought the connect line should wire the FCCH detector output port to my custom sink input port, but instead it raises an exception.

I will really appreciate any direction, as I'm a bit stuck here: could someone point me toward what I clearly misunderstand ?

Thanks in advance.

_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to