예제 #1
0
    def __init__(self):
        gr.top_block.__init__(self)

        usage = "usage: %prog [options] file"
        parser=OptionParser(option_class=eng_option, usage=usage)
        # Add options here
        parser.add_option("-d", "--data-type", type="string", default="int8",
                          help="Input file data type, default=%default, options=[int8, gr_complex]")
        (options, args) = parser.parse_args()
        if len(args) != 1:
            parser.print_help()
            sys.exit(1)

        if options.data_type == "gr_complex":
            size = gr.sizeof_gr_complex
        elif options.data_type == "int8":
            size = gr.sizeof_char
        else:
            print("Invalid data type using int8")
            size = gr.sizeof_char

        input_filename = args[0]

        # Build flow graph
        self.fsrc = blocks.file_source(size, input_filename, False)
        self.samp_buf = LTE_fdd_dl_fs.samp_buf(size)
        self.connect(self.fsrc, self.samp_buf)
예제 #2
0
    def __init__(self):
        gr.top_block.__init__(self)

        usage = "usage: %prog [options] file"
        parser = OptionParser(option_class=eng_option, usage=usage)
        # Add options here
        parser.add_option(
            "-d",
            "--data-type",
            type="string",
            default="int8",
            help=
            "Input file data type, default=%default, options=[int8, gr_complex]"
        )
        (options, args) = parser.parse_args()
        if len(args) != 1:
            parser.print_help()
            sys.exit(1)

        if options.data_type == "gr_complex":
            size = gr.sizeof_gr_complex
        elif options.data_type == "int8":
            size = gr.sizeof_char
        else:
            print("Invalid data type using int8")
            size = gr.sizeof_char

        input_filename = args[0]

        # Build flow graph
        self.fsrc = blocks.file_source(size, input_filename, False)
        self.samp_buf = LTE_fdd_dl_fs.samp_buf(size)
        self.connect(self.fsrc, self.samp_buf)
예제 #3
0
    def __init__(self):
        gr.top_block.__init__(self)

        usage = "usage: %prog [options] file"
        parser=OptionParser(option_class=eng_option, usage=usage)
        # Add options here
        (options, args) = parser.parse_args()
        if len(args) != 1:
            parser.print_help()
            sys.exit(1)

        input_filename = args[0]

        # Build flow graph
        self.fsrc = gr.file_source(gr.sizeof_char, input_filename, False)
        self.samp_buf = LTE_fdd_dl_fs.samp_buf()
        self.connect(self.fsrc, self.samp_buf)
예제 #4
0
    def __init__(self):
        gr.top_block.__init__(self)

        usage = "usage: %prog [options] file"
        parser = OptionParser(option_class=eng_option, usage=usage)
        # Add options here
        (options, args) = parser.parse_args()
        if len(args) != 1:
            parser.print_help()
            sys.exit(1)

        input_filename = args[0]

        # Build flow graph
        self.fsrc = gr.file_source(gr.sizeof_char, input_filename, False)
        self.samp_buf = LTE_fdd_dl_fs.samp_buf()
        self.connect(self.fsrc, self.samp_buf)