From 834febb9aa0dac463f43914cb028be931f85de73 Mon Sep 17 00:00:00 2001 From: sara Date: Thu, 2 Dec 2021 20:02:16 +0100 Subject: =?UTF-8?q?BER=20Block=20erstellt,=20l=C3=A4uft=20noch=20nichtwie?= =?UTF-8?q?=20gew=C3=BCnscht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gr-fadingui/python/qa_ber.py | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 src/gr-fadingui/python/qa_ber.py (limited to 'src/gr-fadingui/python/qa_ber.py') diff --git a/src/gr-fadingui/python/qa_ber.py b/src/gr-fadingui/python/qa_ber.py new file mode 100755 index 0000000..8b6d56e --- /dev/null +++ b/src/gr-fadingui/python/qa_ber.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# Copyright 2021 Sara Cinzia Halter. +# +# This is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# This software is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this software; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +from gnuradio import gr, gr_unittest +from gnuradio import blocks +from ber import ber + +class qa_ber(gr_unittest.TestCase): + + def setUp(self): + self.tb = gr.top_block() + + def tearDown(self): + self.tb = None + + def test_001_t(self): + # set up fg + self.tb.run() + # check data + + +if __name__ == '__main__': + gr_unittest.run(qa_ber) -- cgit v1.2.1 From cafce753722ec8d396cadfdf991b5c6f5a18dc12 Mon Sep 17 00:00:00 2001 From: sara Date: Fri, 3 Dec 2021 20:46:20 +0100 Subject: BER Block Fertig gestellt --- src/gr-fadingui/python/qa_ber.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/gr-fadingui/python/qa_ber.py') diff --git a/src/gr-fadingui/python/qa_ber.py b/src/gr-fadingui/python/qa_ber.py index 8b6d56e..cb6c198 100755 --- a/src/gr-fadingui/python/qa_ber.py +++ b/src/gr-fadingui/python/qa_ber.py @@ -22,6 +22,7 @@ from gnuradio import gr, gr_unittest from gnuradio import blocks from ber import ber +import numpy as np class qa_ber(gr_unittest.TestCase): @@ -32,9 +33,15 @@ class qa_ber(gr_unittest.TestCase): self.tb = None def test_001_t(self): - # set up fg - self.tb.run() - # check data + # pattern = np.array([0xaa], dtype=np.uint8) + # testdata = np.array([0xc0, 0xfa, 0xae] * 4, dtype=np.uint8) + + # src = blocks.vector_source_b(testdata) + # op = ber(pattern) + + # self.tb.connect(src, op) + # self.tb.run() + pass if __name__ == '__main__': -- cgit v1.2.1