Monitor.h
Go to the documentation of this file.
00001 #include <string>
00002 #include "hrpsys/util/ThreadedObject.h"
00003 #include "hrpsys/util/LogManager.h"
00004 #include "hrpsys/idl/StateHolderService.hh"
00005 #include "TimedRobotState.h"
00006 #include "hrpModel/Body.h"
00007 
00008 class Monitor : public ThreadedObject
00009 {
00010 public:
00011     Monitor(CORBA::ORB_var orb, const std::string &i_hostname,
00012             int i_port, int i_interval, LogManager<TimedRobotState> *i_log);
00013     bool oneStep();
00014     void showStatus(hrp::BodyPtr &body);
00015     bool isConnected();
00016     void setRobotHardwareName(const char *i_name);
00017     void setStateHolderName(const char *i_name);
00018 private:
00019     CORBA::ORB_var m_orb;
00020     CosNaming::NamingContext_var m_naming;
00021     std::string m_rhCompName, m_shCompName;
00022     OpenHRP::RobotHardwareService_var m_rhService;
00023     OpenHRP::StateHolderService_var   m_shService;
00024     TimedRobotState m_rstate;
00025     LogManager<TimedRobotState> *m_log;
00026     int m_interval;
00027 
00028     void white()  { fprintf(stdout, "\x1b[37m");}
00029     void red()    { fprintf(stdout, "\x1b[31m");}
00030     void yellow() { fprintf(stdout, "\x1b[33m");}
00031     void green()  { fprintf(stdout, "\x1b[32m");}
00032     void blue()   { fprintf(stdout, "\x1b[34m");}
00033     void magenta(){ fprintf(stdout, "\x1b[35m");}
00034     void black()  { fprintf(stdout, "\x1b[30m");}
00035 
00036 };


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Wed Sep 6 2017 02:35:55