Update of /cvsroot/playerstage/code/player/libplayercore
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8365/libplayercore

Modified Files:
        interface_util.cc player.h 
Log Message:
Added health proxy for monitoring system statistics


Index: player.h
===================================================================
RCS file: /cvsroot/playerstage/code/player/libplayercore/player.h,v
retrieving revision 1.110
retrieving revision 1.111
diff -C2 -d -r1.110 -r1.111
*** player.h    26 Jul 2006 17:14:16 -0000      1.110
--- player.h    7 Aug 2006 14:17:59 -0000       1.111
***************
*** 158,161 ****
--- 158,162 ----
  #define PLAYER_WSN_CODE            57  // Wireless Sensor Networks interface
  #define PLAYER_GRAPHICS3D_CODE     58  // Graphics3D interface
+ #define PLAYER_HEALTH_CODE       59  // Statgrab Health interface
  /** @} */
  
***************
*** 184,189 ****
  #define PLAYER_FIDUCIAL_STRING        "fiducial"
  #define PLAYER_GPS_STRING             "gps"
! #define PLAYER_GRAPHICS2D_STRING       "graphics2d"
! #define PLAYER_GRAPHICS3D_STRING       "graphics3d"
  #define PLAYER_IR_STRING              "ir"
  #define PLAYER_JOYSTICK_STRING        "joystick"
--- 185,191 ----
  #define PLAYER_FIDUCIAL_STRING        "fiducial"
  #define PLAYER_GPS_STRING             "gps"
! #define PLAYER_GRAPHICS2D_STRING      "graphics2d"
! #define PLAYER_GRAPHICS3D_STRING      "graphics3d"
! #define PLAYER_HEALTH_STRING        "health"
  #define PLAYER_IR_STRING              "ir"
  #define PLAYER_JOYSTICK_STRING        "joystick"
***************
*** 2086,2089 ****
--- 2088,2144 ----
  // 
/////////////////////////////////////////////////////////////////////////////
  /** @ingroup interfaces
+  * @defgroup interface_health health
+  * @brief Statgrab - System Infos
+ 
+ The HEALTH driver allows for a user to get general systems data concerning a 
+ specific robot. Allows a user to look at cpu and memory usage of the robot. 
+ 
+  */
+ 
+ /** @ingroup interface_health
+  * @{ */
+ 
+ /** Data subtypes                                                             
  */
+ #define PLAYER_HEALTH_DATA           1
+ 
+ /** @brief Structure describing the cpu */
+ typedef struct player_health_cpu
+ {
+     /** The idle cpu load                                                   */
+     float idle;
+     /** The system cpu load                                                 */
+     float system;
+     /** The user's cpu load                                               */
+     float user;
+ } player_health_cpu_t;
+ 
+ /** @brief Structure describing the memory */
+ typedef struct player_health_memory
+ {
+     /** Total memory                                                          
*/
+     int64_t total;
+     /** Used memory                                                           
*/
+     int64_t used;
+     /** Free memory                                                           
*/
+     int64_t free;
+ } player_health_memory_t;
+ /** @brief Structure describing the HEALTH's data packet.                     
  */
+ 
+ typedef struct player_health_data
+ {
+     /** The current cpu usage                                                 
*/
+     player_health_cpu_t cpu_usage;
+     /** The memory stats                                                      
*/
+     player_health_memory_t mem;
+     /** The swap stats                                                        
        */
+     player_health_memory_t swap;
+     
+ } player_health_data_t;
+ /** @} */
+ 
+ 
+ 
+ // 
/////////////////////////////////////////////////////////////////////////////
+ /** @ingroup interfaces
   * @defgroup interface_ir ir
   * @brief Array of infrared rangers

Index: interface_util.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/libplayercore/interface_util.cc,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** interface_util.cc   1 May 2006 09:09:17 -0000       1.14
--- interface_util.cc   7 Aug 2006 14:17:59 -0000       1.15
***************
*** 59,62 ****
--- 59,63 ----
    {PLAYER_TRUTH_CODE, PLAYER_TRUTH_STRING},
    {PLAYER_GPS_CODE, PLAYER_GPS_STRING},
+   {PLAYER_HEALTH_CODE, PLAYER_HEALTH_STRING},
    {PLAYER_SIMULATION_CODE, PLAYER_SIMULATION_STRING},
    {PLAYER_BLINKENLIGHT_CODE, PLAYER_BLINKENLIGHT_STRING},


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to