Revision d5bd7bdc

View differences:

server/src/main.cpp
45 45
using namespace boost;
46 46

  
47 47
int main(int argc, char *argv[]) {
48
    if ((argc != 4) && (argc != 5)){
49
        printf("> ERROR: invalid number of parameters passed to server!\n\nusage: %s <mw_hlrc> <mw_humotion> <base scopename> [<audio output>]  (example: %s RSB RSB /flobi1/ pulse )\n",argv[0],argv[0]);
48
    if ((argc != 5) && (argc != 6)){
49
        printf("> ERROR: invalid number of parameters passed to server!\n\nusage: %s <mw_hlrc> <mw_humotion> <base scopename hlrc> <base scopename humotion> [<audio output>]  (example: %s RSB RSB /flobi1/ pulse )\n",argv[0],argv[0]);
50 50
        printf("          audio output is optional and can be {pulse,oss,alsa,null,sndio,..}\n\n");
51 51
        exit(EXIT_FAILURE);
52 52
    }
......
54 54
    printf("> hlrc_server starting\n");
55 55

  
56 56
    //fetch scope from cmd line
57
    std::string scope = argv[3];
57
    std::string scope_hlrc = argv[3];
58
    std::string scope_humotion = argv[4];
58 59

  
59 60
    //fetch middleware from cmd line
60 61
    std::string mw = argv[1];
......
65 66

  
66 67
    //arbiter
67 68
    std::string sound_output = "pulse";
68
    if (argc == 5){
69
        sound_output = argv[4];
69
    if (argc == 6){
70
        sound_output = argv[5];
70 71
    }
71 72
    arbiter = new Arbiter(sound_output);
72 73

  
73 74
    //mw connection
74 75
    Middleware *middleware;
75 76
    if (mw == "ROS"){
76
        middleware = new MiddlewareROS(arbiter, scope);
77
        middleware = new MiddlewareROS(arbiter, scope_hlrc);
77 78
    }else{
78
        middleware = new MiddlewareRSB(arbiter, scope);
79
        middleware = new MiddlewareRSB(arbiter, scope_hlrc);
79 80
    }
80 81

  
81 82
    //human motion connection:
82
    humotion::client::Client *client = new humotion::client::Client(scope, mw_humotion);
83
    humotion::client::Client *client = new humotion::client::Client(scope_humotion, mw_humotion);
83 84

  
84 85
    printf("> all done. hlrc server ready\n");
85 86

  

Also available in: Unified diff