aboutsummaryrefslogtreecommitdiffstats
path: root/src/gr-fadingui/python/xor_frame_sync.py
diff options
context:
space:
mode:
authorSARA <sara.halter@ost.ch>2021-11-17 19:41:49 +0100
committerSARA <sara.halter@ost.ch>2021-11-17 19:41:49 +0100
commit37a204861a1ea56f39e68c690d3a5c23d4a3c23e (patch)
tree59540172ad5cab98b41b784c3535a4593fd5de85 /src/gr-fadingui/python/xor_frame_sync.py
parentFir filter delay python file (diff)
parentBegin working on frame syncronization (diff)
downloadFading-37a204861a1ea56f39e68c690d3a5c23d4a3c23e.tar.gz
Fading-37a204861a1ea56f39e68c690d3a5c23d4a3c23e.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src/gr-fadingui/python/xor_frame_sync.py')
-rw-r--r--src/gr-fadingui/python/xor_frame_sync.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/gr-fadingui/python/xor_frame_sync.py b/src/gr-fadingui/python/xor_frame_sync.py
new file mode 100644
index 0000000..9d9064f
--- /dev/null
+++ b/src/gr-fadingui/python/xor_frame_sync.py
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright 2021 Naoki Pross.
+
+
+import numpy
+from gnuradio import gr
+
+class xor_frame_sync(gr.sync_block):
+ """
+ docstring for block xor_frame_sync
+ """
+ def __init__(self, sync_pattern):
+ gr.sync_block.__init__(self,
+ name="xor_frame_sync",
+ in_sig=[np.byte],
+ out_sig=[np.byte])
+
+ def work(self, input_items, output_items):
+ inp = input_items[0]
+ out = output_items[0]
+
+ out[:] = inp
+
+ return len(output_items[0])
+