aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsara <sara.halter@gmx.ch>2021-11-06 17:58:23 +0100
committersara <sara.halter@gmx.ch>2021-11-06 17:58:23 +0100
commit8733e3563306a193962d1f87421a2b817eca28f8 (patch)
tree4357c1127d3c993d8c33cb44692d040d42643b58
parentMerge remote-tracking branch 'origin/master' (diff)
downloadFading-8733e3563306a193962d1f87421a2b817eca28f8.tar.gz
Fading-8733e3563306a193962d1f87421a2b817eca28f8.zip
An scr gearbeitet
-rwxr-xr-xsimulation/QPSK/qpsk_nogui.py8
-rwxr-xr-xsrc/sketch.py66
2 files changed, 64 insertions, 10 deletions
diff --git a/simulation/QPSK/qpsk_nogui.py b/simulation/QPSK/qpsk_nogui.py
index 2b32473..ab5b361 100755
--- a/simulation/QPSK/qpsk_nogui.py
+++ b/simulation/QPSK/qpsk_nogui.py
@@ -76,8 +76,8 @@ class qpsk_nogui(gr.top_block):
self.blocks_null_sink_0 = blocks.null_sink(gr.sizeof_float*1)
self.blocks_char_to_float_0 = blocks.char_to_float(1, 1)
self.analog_random_source_x_0 = blocks.vector_source_b(list(map(int, numpy.random.randint(0, 256, 1000))), True)
-
-
+ # print(list(map(int, numpy.random.randint(0, 256, 1000))))
+
##################################################
# Connections
@@ -95,6 +95,7 @@ class qpsk_nogui(gr.top_block):
self.connect((self.digital_map_bb_0, 0), (self.blocks_unpack_k_bits_bb_0, 0))
self.connect((self.digital_pfb_clock_sync_xxx_0, 0), (self.digital_cma_equalizer_cc_0, 0))
+ self.test = "1"
def get_sps(self):
return self.sps
@@ -198,6 +199,8 @@ class qpsk_nogui(gr.top_block):
self.chn_taps = chn_taps
self.channels_channel_model_0.set_taps(self.chn_taps)
+ def test_2(self,x):
+ return "5"
@@ -225,6 +228,7 @@ def main(top_block_cls=qpsk_nogui, options=None):
tb.stop()
tb.wait()
+test = "test variabel"
if __name__ == '__main__':
main()
diff --git a/src/sketch.py b/src/sketch.py
index 02bd012..49efd5e 100755
--- a/src/sketch.py
+++ b/src/sketch.py
@@ -3,7 +3,7 @@
from dearpygui.dearpygui import *
from dearpygui.demo import show_demo
-import qpks
+import qpks as qp
# Create GL context and initialize DearPyGUI
create_context()
@@ -32,11 +32,62 @@ def _on_rx_node_delink(sender, app_data):
#================================================
# Flow Graph Window
-with window(label="RX DSP Flow Graph", width=800, height=800, on_close=_on_params_close, pos=(100,100), tag="rx_win"):
+# with window(label="RX DSP Flow Graph", width=800, height=800, on_close=_on_params_close, pos=(100,100), tag="rx_win"):
+# with node_editor(callback=_on_rx_node_link, delink_callback=_on_rx_node_delink):
+# with node(label="USRP Source", pos=(20,100)):
+# with node_attribute(tag="src_out", attribute_type=mvNode_Attr_Output):
+# add_text("Signal from antenna")
+
+# with node(label="Clock Sync", pos=(200,200)):
+# with node_attribute(tag="clksync_in", attribute_type=mvNode_Attr_Input):
+# add_text("Input")
+
+# with node_attribute(tag="clksync_out", attribute_type=mvNode_Attr_Output):
+# add_text("Synchronized")
+
+# with node(label="Equalizer", pos=(350,100)):
+# with node_attribute(attribute_type=mvNode_Attr_Static):
+# add_input_float(label="Gain", width=150)
+
+# with node_attribute(tag="eq_in", attribute_type=mvNode_Attr_Input):
+# add_text("Input")
+
+# with node_attribute(tag="eq_out", attribute_type=mvNode_Attr_Output):
+# add_text("Equalized")
+
+# with node(label="Phase Locked Loop", pos=(600, 200)):
+# with node_attribute(tag="pll_in", attribute_type=mvNode_Attr_Input):
+# add_text("Input")
+
+# with node_attribute(tag="pll_out", attribute_type=mvNode_Attr_Output):
+# add_text("Locked")
+
+
+# add_node_link(get_alias_id("src_out"), get_alias_id("clksync_in"))
+# add_node_link(get_alias_id("clksync_out"), get_alias_id("eq_in"))
+# add_node_link(get_alias_id("eq_out"), get_alias_id("pll_in"))
+
+
+
+with window(label="Example Window"):
+ add_text("Hello world")
+
+#================================================
+# QPSK Window
+
+q = qp.qpsk_nogui() # Klasse initalisieren !!!
+
+with window(label="QPSK", width=800, height=800, on_close=_on_params_close, pos=(100,100), tag="rx_win"):
with node_editor(callback=_on_rx_node_link, delink_callback=_on_rx_node_delink):
- with node(label="USRP Source", pos=(20,100)):
+
+ with node(label="USRP Source (Random Source)", pos=(20,100)):
with node_attribute(tag="src_out", attribute_type=mvNode_Attr_Output):
add_text("Signal from antenna")
+ print(q.analog_random_source_x_0)
+ add_text(q.analog_random_source_x_0)
+ add_text(qp.test)
+ add_text(q.test_2(1))
+
with node(label="Clock Sync", pos=(200,200)):
with node_attribute(tag="clksync_in", attribute_type=mvNode_Attr_Input):
@@ -67,14 +118,13 @@ with window(label="RX DSP Flow Graph", width=800, height=800, on_close=_on_param
add_node_link(get_alias_id("clksync_out"), get_alias_id("eq_in"))
add_node_link(get_alias_id("eq_out"), get_alias_id("pll_in"))
-
-<<<<<<< HEAD
-with window(label="Example Window"):
+#================================================
+# Plot Window
+with window(label="Plots"):
add_text("Hello world")
-=======
#================================================
# Start window and main loop
->>>>>>> origin/master
+
show_viewport()
start_dearpygui()