From f550c9a343b1c0eb82cebba5aaa497387f184dc4 Mon Sep 17 00:00:00 2001 From: Naoki Pross Date: Fri, 22 Oct 2021 11:18:03 +0200 Subject: Make gr block compilable --- src/gr-fading_ui/python/qa_rx_ui_sink.py | 7 +++++-- src/gr-fading_ui/python/rx_ui_sink.py | 4 +--- src/shell.nix | 4 +++- 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/gr-fading_ui/python/qa_rx_ui_sink.py b/src/gr-fading_ui/python/qa_rx_ui_sink.py index 6601b52..2cbf90a 100755 --- a/src/gr-fading_ui/python/qa_rx_ui_sink.py +++ b/src/gr-fading_ui/python/qa_rx_ui_sink.py @@ -32,9 +32,12 @@ class qa_rx_ui_sink(gr_unittest.TestCase): self.tb = None def test_001_t(self): - # set up fg + src_data = (-3, 4, -5.5, 2, 3) + src = blocks.vector_source_c(src_data, False) + sink = rx_ui_sink() + + self.tb.connect(src, sink) self.tb.run() - # check data if __name__ == '__main__': diff --git a/src/gr-fading_ui/python/rx_ui_sink.py b/src/gr-fading_ui/python/rx_ui_sink.py index cafe1ba..6dcb93e 100644 --- a/src/gr-fading_ui/python/rx_ui_sink.py +++ b/src/gr-fading_ui/python/rx_ui_sink.py @@ -30,12 +30,10 @@ class rx_ui_sink(gr.sync_block): def __init__(self): gr.sync_block.__init__(self, name="rx_ui_sink", - in_sig=[<+numpy.float32+>, ], + in_sig=[numpy.complex64], out_sig=None) def work(self, input_items, output_items): - in0 = input_items[0] - # <+signal processing here+> return len(input_items[0]) diff --git a/src/shell.nix b/src/shell.nix index ae4375e..edb49a5 100644 --- a/src/shell.nix +++ b/src/shell.nix @@ -12,7 +12,9 @@ in mkShell { gnuradio python38Packages.setuptools # gnuradio block dev dependencies - cmake pkg-config log4cpp mpir boost175 gmp volk + cmake ninja pkg-config log4cpp mpir boost175 gmp volk python38Packages.pybind11 + ]) ++ (with pkgs.python38Packages; [ + numpy ]); } -- cgit v1.2.1