The workings of Operator aka rise_gui:

  1. : main
    1. Fl::args(argc, argv, i) -> switch parser for FLTK
    2. RiSEGUI::RiSEGUI (with arguments)
      • BaseGUI::BaseGUI (with arguments)
        • init_paths()
          • utils::Input::addDirectoryLast(“.”, “CONFIG_DIR”, “GUICONFIG_DIR”)
        • BaseIntf::BaseIntf(this) -> sets up RobotGUI window
        • CommManager::CommManager() -> Create a communications manager which will and resend unacknowledged messages (and ping remote managers) every resend_interval milliseconds. The constructor initiates a thread which has two basic purposes. The main purpose is to resend stream messages which have not yet been acknowledged. A secondary purpose is to notice that it has not heard from a remote communications manager in a while, and if this is the case try and “ping” that module with a dummy stream message which will then be acknowledged. Thus, even if a remote communications manager never explicity sends any information to this module, we can maintain a “heartbeat” to establish that the remote communications manager is actually alive and healthy. The sub-thread runs roughly every resend_millisecs, and it defaults to 200ms. If priority is negative, then it indicates a relative POSIX thread priority of priority less than the current for the communication manager sub-threads. If priority is not negative, it indicates an absolute POSIX thread priority. priority defaults to one priority less than the current.
        • CommManager::initPortal(temp_spec) -> Initialize a communications portal
        • CommManager::openRemoteByHost(_hostname, _dest_port) -> Convenience frunction for opening a remote by a host and port.
        • RemoteManager::setTimeStamp -> resets the RemoteManager timer
        • DBClient::DBClient(...) -> Creates a database client whose manager is _rmt. All periodic operations will happen at an integer multiple of fundamental_rate milliseconds.
        • TaskClient::TaskClient(...)
          • CommManager::createStreamSource(_rmt, 200, id) -> create a stream source to stream with ID “stream_id” on remote manager “dest.” If “exclusive_dest” is non-zero, invalidate this source if the ID of the remote manager on host/port changes from exclusive_dest. Returns NULL for failure.
        • JoyStick::JoyStick()
        • JoyStick::open(“/dev/js0”) -> probably fails for a sim environment ->
        • MsgLogClient::MsgLogClient
          • CommManager::createStreamSource
        • MsgLogClient::newSub(min_priority, max_priority) -> creates a new “subscription” with a range of priorities. Returns NULL if there was a communication error.
        • MsgLogGUI::MsgLogGUI(...) -> starts fltk gui
          • MsgLogFL::MsgLogFL(this)
        • PlotGUI::PlotGUI()
          • opens guiplot.txt
          • PrefIntf::PrefIntf(this) -> “RHex Plotter – Add/Remove”
          • PlotIntf::PlotIntf(this) -> “RHex Plotter”
        • readConfig(config_file)
          • utils::ConfigFile::open(config_file)
          • utils::ConfigFile::getString("panelconfig")
          • PanelManager::PanelManager(_js)
          • clear the mode list
          • clear the panel list
          • clear and deactivate the mode buttons
          • utils::ConfigElem::ConfigElem();
          • ...
      • RiSEHealthGUI::RiSEHealthGUI( _dbClient )
        • RiSEHealthFL::RiSEHealthFL(this) -> “RiSE Health Monitor”
        • initializeWidgets()
        • Fl::add_timeout(...)
      • RiSESimGUI::RiSESimGUI ( _dbClient )
        • RiSESimFL::RiSESimFL(this) -> “RiSE Simulation Controls”
        • initializeWidgets()
    3. signal(SIGINT, sigcatch)
    4. signal(SIGTERM, sigcatch)
    5. BaseGUI::addHandler("risecalibmode")
      • HandlerInfo::HandlerInfo()
      • utils::List::append(h)
      • utils::List::find(ModeInfo::nameMatch, mode)
    6. RiSEGUI::show(argc, argv)
      • Fl::visual(FL_DOUBLE|FL_INDEX)
      • BaseIntf::Fl_Double_Window::xclass("BaseGUI")
      • BaseIntf::Fl_Double_Window::xclass("BaseMode")
      • HealthGUI::initialize()
      • SimGUI::initialize()
      • BaseIntf::Fl_Double_Window::show(argc,argv)
      • BaseIntf::Fl_Group::show
      • BaseIntF::Fl_Group::hide
      • ...
      • initializeWidgets()
    7. RiSEGUI::connect()
      • make_database_connections()
      • setState(CONNECTED)
      • queryMode()
      • -or-
      • suspendMode(true)
      • setState(DISCON)
    8. RiSEGUI::run
      • PanelManager::run()
        • Am_Main_Event_Loop()
-- JonathanKarpick - 22 Sep 2005

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