Exemplo n.º 1
0
def main():
    try:
        # Get command line parameters
        (options, args) = usrp_siggen.get_options()

        # Create the top block using these
        tb = usrp_siggen.top_block(options, args)

        # Create the GUI application
        app = gui.app(top_block=tb,                    # Constructed top block
                      gui=app_gui,                     # User interface class
                      options=options,                 # Command line options
                      args=args,                       # Command line args
                      title="USRP Signal Generator",  # Top window title
                      nstatus=1,                       # Number of status lines
                      start=True,                      # Whether to start flowgraph
                      realtime=True)                   # Whether to set realtime priority

        # And run it
        app.MainLoop()

    except RuntimeError, e:
        print e
        sys.exit(1)
Exemplo n.º 2
0
        u2_hbox = forms.static_box_sizer(parent=self.panel, label="USRP Status", orient=wx.HORIZONTAL, bold=True)
        self.vbox.Add(u2_hbox, 0, wx.EXPAND)
        self.vbox.AddSpacer(10)
        self.vbox.AddStretchSpacer()
        u2_hbox.AddSpacer(10)
        forms.static_text(
            parent=self.panel, sizer=u2_hbox, ps=self.tb, key=usrp_siggen.DESC_KEY, converter=forms.str_converter()
        )
        self.vbox.AddSpacer(5)
        self.vbox.AddStretchSpacer()


if __name__ == "__main__":
    try:
        # Get command line parameters
        (options, args) = usrp_siggen.get_options()

        # Create the top block using these
        tb = usrp_siggen.top_block(options, args)

        # Create the GUI application
        app = gui.app(
            top_block=tb,  # Constructed top block
            gui=app_gui,  # User interface class
            options=options,  # Command line options
            args=args,  # Command line args
            title="USRP Signal Generator",  # Top window title
            nstatus=1,  # Number of status lines
            start=True,  # Whether to start flowgraph
            realtime=True,
        )  # Whether to set realtime priority