wu_xinjun
2022-02-28 9411c4e47500e271d8fb88143c86e6dcb2d89684
src/Client.py
@@ -13,6 +13,26 @@
    sys.exit()
if __name__ == '__main__':
    def help():
        print("Usage: Client.py [MQhost] [MQuser] [MQpassword] [QUEUEname] [DEVICEname] [SERVERhost] [MICROWAVEhost]")
        print("EXAMPLE: Client.py 172.17.17.206 chai password123 aerial_rpc pod1 http://172.17.17.206/api 192.168.2.65")
        exit(1)
    if len(sys.argv) != 8:
        help()
    try:
        MQhost = str(sys.argv[1])
        MQuser = str(sys.argv[2])
        MQpassword = str(sys.argv[3])
        QUEUEname = str(sys.argv[4])
        DEVICEname = str(sys.argv[5])
        SERVERhost = str(sys.argv[6])
        MICROWAVEhost = str(sys.argv[7])
    except Exception as e:
        print(e)
        help()
    print("Start AcquisitionMain")
    signal.signal(signal.SIGINT, quit)
    signal.signal(signal.SIGTERM, quit)
@@ -21,12 +41,12 @@
    config_dir = os.path.join(__file__, "..", "config.json" )
    config_path = os.path.abspath(config_dir)
    config = Config(config_path)
    client = AcquisitionMain('localhost',
                             'chai',
                             'password123',
                             'aerial_rpc',
                             'pod1',
                             'http://localhost:5000/api',
                             'localhost', # udp server host, 192.168.2.65 for production
    client = AcquisitionMain(MQhost,
                             MQuser,
                             MQpassword,
                             QUEUEname,
                             DEVICEname,
                             SERVERhost,
                             MICROWAVEhost, # udp server host, 192.168.2.65 for production
                             config)
    client.start()