diff options
author | Nao Pross <np@0hm.ch> | 2021-11-17 19:39:53 +0100 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2021-11-17 19:39:53 +0100 |
commit | 9628d6e6deaf1ebaefd72a67fac291557baf49c9 (patch) | |
tree | 7a7ad5aeaeac595c8f7133c3222e7a8506898449 /src/gr-fadingui/python/xor_frame_sync.py | |
parent | Merge remote-tracking branch 'origin/master' (diff) | |
download | Fading-9628d6e6deaf1ebaefd72a67fac291557baf49c9.tar.gz Fading-9628d6e6deaf1ebaefd72a67fac291557baf49c9.zip |
Begin working on frame syncronization
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]) + |