diff --git a/op25/gr-op25_repeater/tx/generate-tsbks.py b/op25/gr-op25_repeater/apps/tx/generate-tsbks.py similarity index 100% rename from op25/gr-op25_repeater/tx/generate-tsbks.py rename to op25/gr-op25_repeater/apps/tx/generate-tsbks.py diff --git a/op25/gr-op25_repeater/tx/hackrf-tx.sh b/op25/gr-op25_repeater/apps/tx/hackrf-tx.sh similarity index 100% rename from op25/gr-op25_repeater/tx/hackrf-tx.sh rename to op25/gr-op25_repeater/apps/tx/hackrf-tx.sh diff --git a/op25/gr-op25_repeater/tx/op25_c4fm_mod.py b/op25/gr-op25_repeater/apps/tx/op25_c4fm_mod.py similarity index 100% rename from op25/gr-op25_repeater/tx/op25_c4fm_mod.py rename to op25/gr-op25_repeater/apps/tx/op25_c4fm_mod.py diff --git a/op25/gr-op25_repeater/tx/op25_tx.py b/op25/gr-op25_repeater/apps/tx/op25_tx.py similarity index 100% rename from op25/gr-op25_repeater/tx/op25_tx.py rename to op25/gr-op25_repeater/apps/tx/op25_tx.py diff --git a/op25/gr-op25_repeater/tx/p25craft.py b/op25/gr-op25_repeater/apps/tx/p25craft.py similarity index 100% rename from op25/gr-op25_repeater/tx/p25craft.py rename to op25/gr-op25_repeater/apps/tx/p25craft.py diff --git a/op25/gr-op25_repeater/apps/tx/unpack.py b/op25/gr-op25_repeater/apps/tx/unpack.py new file mode 100755 index 00000000..7cbf05b5 --- /dev/null +++ b/op25/gr-op25_repeater/apps/tx/unpack.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python +from gnuradio import gr, gru, audio, eng_notation, blocks +from gnuradio.eng_option import eng_option +from optparse import OptionParser + +class app_top_block(gr.top_block): + def __init__(self, options): + gr.top_block.__init__(self) + + IN = blocks.file_source(gr.sizeof_char, options.input_file) + bits_per_symbol = 2 + UNPACK = blocks.packed_to_unpacked_bb(bits_per_symbol, gr.GR_MSB_FIRST) + OUT = blocks.file_sink(gr.sizeof_char, options.output) + + self.connect(IN, UNPACK, OUT) + +def main(): + parser = OptionParser(option_class=eng_option) + parser.add_option("-i", "--input-file", type="string", default="in.dat", help="specify the input file") + parser.add_option("-o", "--output", type="string", default="out.dat", help="specify the output file") + + (options, args) = parser.parse_args() + + tb = app_top_block(options) + try: + tb.run() + except KeyboardInterrupt: + tb.stop() + +if __name__ == "__main__": + main()