diff options
author | SARA <sara.halter@ost.ch> | 2021-11-17 19:41:49 +0100 |
---|---|---|
committer | SARA <sara.halter@ost.ch> | 2021-11-17 19:41:49 +0100 |
commit | 37a204861a1ea56f39e68c690d3a5c23d4a3c23e (patch) | |
tree | 59540172ad5cab98b41b784c3535a4593fd5de85 /src/gr-fadingui/python/xor_frame_sync.py | |
parent | Fir filter delay python file (diff) | |
parent | Begin working on frame syncronization (diff) | |
download | Fading-37a204861a1ea56f39e68c690d3a5c23d4a3c23e.tar.gz Fading-37a204861a1ea56f39e68c690d3a5c23d4a3c23e.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to '')
-rw-r--r-- | src/gr-fadingui/python/xor_frame_sync.py | 27 |
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]) + |