[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] Trouble creating simple custom Sink (Python): Unable
From: |
m4rl0v |
Subject: |
[Discuss-gnuradio] Trouble creating simple custom Sink (Python): Unable to coerce endpoint |
Date: |
Mon, 03 Aug 2015 18:05:37 +0000 |
User-agent: |
Roundcube Webmail/1.0.6 |
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] Trouble creating simple custom Sink (Python): Unable to coerce endpoint,
m4rl0v <=