Changeset 330 in flair-src for trunk/tools/VrpnLite/src/main.cpp


Ignore:
Timestamp:
09/25/19 15:29:26 (3 years ago)
Author:
Sanahuja Guillaume
Message:

use less bandwidth in vprnlite

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/VrpnLite/src/main.cpp

    r308 r330  
    2222
    2323string xml_file;
    24 string clientAddress,serverAddress;
    25 int port;
     24string vrpnServerAddress;
     25int gcsPort,vrpnLitePort;
    2626
    2727void parseOptions(int argc, char **argv);
     
    3232  FrameworkManager *manager;
    3333  manager = new FrameworkManager("vrpnforwarder");
    34   manager->SetupConnection("127.0.0.1", port);
     34  manager->SetupConnection("127.0.0.1", gcsPort);
    3535  manager->SetupUserInterface(xml_file);
    3636 
    37   VrpnLite* vrpnlite=new VrpnLite(clientAddress,serverAddress);
     37  VrpnLite* vrpnlite=new VrpnLite(vrpnLitePort,vrpnServerAddress);
    3838 
    3939  vrpnlite->Start();
     
    4747    CmdLine cmd("Command description message", ' ', "0.1");
    4848
    49     ValueArg<string> clientaddressArg("c", "caddress","client address", true,
    50                                 "127.0.0.1:3884", "string");
    51     cmd.add(clientaddressArg);
     49    ValueArg<int> vrpnLitePortArg("v", "vport","vrpn lite port", true,
     50                                3884, "int");
     51    cmd.add(vrpnLitePortArg);
    5252   
    5353    ValueArg<string> serveraddressArg("s", "saddress","server address", true,
     
    5555    cmd.add(serveraddressArg);
    5656
    57     ValueArg<int> portArg("p", "port","local port used to connect to the ground station",
     57    ValueArg<int> gcsPortArg("p", "port","local port used to connect to the ground station",
    5858                          false, 9000, "int");
    59     cmd.add(portArg);
     59    cmd.add(gcsPortArg);
    6060
    6161
     
    6666    cmd.parse(argc, argv);
    6767
    68     clientAddress = clientaddressArg.getValue();
    69     serverAddress = serveraddressArg.getValue();
    70     port = portArg.getValue();
     68    vrpnLitePort = vrpnLitePortArg.getValue();
     69    vrpnServerAddress = serveraddressArg.getValue();
     70    gcsPort = gcsPortArg.getValue();
    7171    xml_file = xmlArg.getValue();
    7272
Note: See TracChangeset for help on using the changeset viewer.