What it calls when you run the Operator:

Normally you do:

  ./start.sh 3000 {localhost or surise}

This calls "rise_gui", the code for which is in:


This calls stuff which is in:


So anyway, back to rise_gui.cc...

The arguments you pass in are:

3000 = local_port which is used for the logger--so it knows how to store the data files or something.
surise or localhost = hostname
remote port defaults to 5000 -- this is what rport is set to 

Constructor for RiSEGUI:

RiSEGUI::RiSEGUI(unsigned short local_port,  char *hostname, 
                 unsigned short dest_port, int db_id) :
  BaseGUI( local_port, hostname, dest_port, db_id, CONFIG_FILE, NULL ) {

  _health_gui = new RiSEHealthGUI( _dbClient );
  _sim_gui = new RiSESimGUI( _dbClient );

So when you call RiSEGUI contstructor, it would be with the arguments:

RiSEGUI( 3000 == local_port, surise == hostname, 5000 == dest_port, 100 == db_id )

Note that there are several functions that are derived from BaseGUI. BaseGUI is located at:


In rise_gui.cc:

int main( int argc, char *argv[] ) {

  int i;
  bool connect = false;
  Fl::args(argc, argv, i);

  if ( argc-i == 1  || argc-i > 3 ) {
        "Usage: %s [fltk options] [local_port hostname [remote_port]]\n"
        "remote port defaults to 5000\n","rise_gui");

  if ( argc-i == 0)
    rise_gui = new RiSEGUI();
  else {
    unsigned int rport = 5000;
    if (argc-i == 3)
      rport = atoi(argv[i+2]);
    rise_gui = new RiSEGUI(atoi(argv[i+0]), argv[i+1], rport, 100);
    connect = true;

  signal( SIGINT, sigcatch );
  signal( SIGTERM, sigcatch );

  rise_gui->addHandler("risecalibmode", new RiSECalibGUI( rise_gui ) );
//    rise_gui->addHandler("sitmode", new SitGUI(rise_gui));
//    rise_gui->addHandler("walkmode", new WalkGUI(rise_gui));

  rise_gui->show(argc, argv);
  if (connect) rise_gui->connect();


-- AlanAsbeck - 30 Jan 2007

This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback