Monitor.h
Go to the documentation of this file.
1 #include <string>
2 #include "hrpsys/util/ThreadedObject.h"
3 #include "hrpsys/util/LogManager.h"
4 #include "hrpsys/idl/StateHolderService.hh"
5 #include "TimedRobotState.h"
6 #include "hrpModel/Body.h"
7 
8 class Monitor : public ThreadedObject
9 {
10 public:
11  Monitor(CORBA::ORB_var orb, const std::string &i_hostname,
12  int i_port, int i_interval, LogManager<TimedRobotState> *i_log);
13  bool oneStep();
15  bool isConnected();
16  void setRobotHardwareName(const char *i_name);
17  void setStateHolderName(const char *i_name);
18 private:
19  CORBA::ORB_var m_orb;
20  CosNaming::NamingContext_var m_naming;
21  std::string m_rhCompName, m_shCompName;
22  OpenHRP::RobotHardwareService_var m_rhService;
23  OpenHRP::StateHolderService_var m_shService;
27 
28  void white() { fprintf(stdout, "\x1b[37m");}
29  void red() { fprintf(stdout, "\x1b[31m");}
30  void yellow() { fprintf(stdout, "\x1b[33m");}
31  void green() { fprintf(stdout, "\x1b[32m");}
32  void blue() { fprintf(stdout, "\x1b[34m");}
33  void magenta(){ fprintf(stdout, "\x1b[35m");}
34  void black() { fprintf(stdout, "\x1b[30m");}
35 
36 };
CORBA::ORB_var m_orb
Definition: Monitor.h:19
Monitor(CORBA::ORB_var orb, const std::string &i_hostname, int i_port, int i_interval, LogManager< TimedRobotState > *i_log)
Definition: Monitor.cpp:6
OpenHRP::RobotHardwareService_var m_rhService
Definition: Monitor.h:22
bool isConnected()
Definition: Monitor.cpp:114
std::string m_shCompName
Definition: Monitor.h:21
void yellow()
Definition: Monitor.h:30
void setStateHolderName(const char *i_name)
Definition: Monitor.cpp:283
void showStatus(hrp::BodyPtr &body)
Definition: Monitor.cpp:125
std::string m_rhCompName
Definition: Monitor.h:21
bool oneStep()
Definition: Monitor.cpp:28
OpenHRP::StateHolderService_var m_shService
Definition: Monitor.h:23
Definition: Monitor.h:8
CosNaming::NamingContext_var m_naming
Definition: Monitor.h:20
void blue()
Definition: Monitor.h:32
void red()
Definition: Monitor.h:29
void black()
Definition: Monitor.h:34
LogManager< TimedRobotState > * m_log
Definition: Monitor.h:25
void green()
Definition: Monitor.h:31
int m_interval
Definition: Monitor.h:26
TimedRobotState m_rstate
Definition: Monitor.h:24
void magenta()
Definition: Monitor.h:33
void white()
Definition: Monitor.h:28
void setRobotHardwareName(const char *i_name)
Definition: Monitor.cpp:278


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Sat Dec 17 2022 03:52:20