Exemplo n.º 1
0
    options.ssid = options.ssid.upper()
    if (options.ssid != 'VUL') and (options.ssid != '3M0') and (
            options.ssid != '4M5') and (options.ssid != 'WX'):
        print 'INVALID SSID Specified'
        print 'Valid Options: \'VUL\',\'3M0\',\'4M5\',\'WX\''
        print 'Please Specify a valid SSID'
        print 'Exiting...'
        sys.exit()

    if options.ssid == 'VUL':
        port = int(2000)
    elif options.ssid == '3M0':
        port = int(2001)
    elif options.ssid == '4M5':
        port = int(2002)
    elif options.ssid == 'WX':
        port = int(2003)

    if options.port != None:
        port = options.port

    track = vtp(options.ip, port, options.uid, options.ssid, 2.0)

    app = QtGui.QApplication(sys.argv)
    win = MainWindow(options)
    win.set_callback(track)
    #win.setGpredictCallback(gpred)
    sys.exit(app.exec_())
    sys.exit()
Exemplo n.º 2
0
if __name__ == '__main__':

    #--------START Command Line option parser------------------------------------------------
    usage = "usage: %prog -a <Server Address> -p <Server Port> "
    parser = OptionParser(usage=usage)
    a_help = "IP address of Tracking Daemon, Default: 192.168.42.10"
    p_help = "TCP port number of Tracking Daemon, Default: 2000"
    parser.add_option("-a",
                      dest="ip",
                      action="store",
                      type="string",
                      default="192.168.42.10",
                      help=a_help)
    parser.add_option("-p",
                      dest="port",
                      action="store",
                      type="int",
                      default="2000",
                      help=p_help)
    (options, args) = parser.parse_args()
    #--------END Command Line option parser-------------------------------------------------

    track = vtp(options.ip, options.port, 'VUL', 2.0)

    app = QtGui.QApplication(sys.argv)
    win = MainWindow(options.ip, options.port)
    win.setCallback(track)
    #win.setGpredictCallback(gpred)
    sys.exit(app.exec_())
    sys.exit()
Exemplo n.º 3
0
    if args.ip != None:
        cfg.update({'daemon_ip': args.ip})

    args.ssid = args.ssid.lower()
    #if (options.ssid != 'VUL') and (options.ssid != '3M0') and (options.ssid != '4M5') and (options.ssid != 'WX'):
    ssid_list = []
    for ssid in cfg['ssid']:
        ssid_list.append(ssid['name'])
    if args.ssid is not None:
        if args.ssid not in ssid_list:
            print 'INVALID SSID Specified'
            print 'Valid Options: ', ssid_list
            print 'Please Specify a valid SSID'
            print 'Exiting...'
            sys.exit()
        else:
            cfg.update({'startup_ssid': args.ssid})

    print json.dumps(cfg, indent=4)

    #track = vtp(options.ip, port, options.uid, options.ssid, 2.0)
    track = vtp(cfg)

    app = QtGui.QApplication(sys.argv)
    win = MainWindow(cfg)
    win.set_callback(track)
    #win.setGpredictCallback(gpred)
    sys.exit(app.exec_())
    sys.exit()