INTRODUCTION
Overview
Download and Install
Documentation
Publications

REPOSITORY
Libraries

DEVELOPER
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

status.h

00001 /*
00002  * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
00003  *               http://gearbox.sf.net/
00004  * Copyright (c) 2004-2008 Alex Brooks, Alexei Makarenko, Tobias Kaupp
00005  *
00006  * This distribution is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 
00011 #ifndef GBXUTILACFR_STATUS_H
00012 #define GBXUTILACFR_STATUS_H
00013 
00014 #include <string>
00015 #include <vector>
00016 
00017 namespace gbxutilacfr {
00018 
00020 enum SubsystemStatusType
00021 {
00023     SubsystemStatusInitialising,
00025     SubsystemStatusOk,
00027     SubsystemStatusWarning,
00029     SubsystemStatusFault,
00031     SubsystemStatusStalled
00032 };
00033 
00035 struct SubsystemStatus
00036 {
00038     SubsystemStatusType type;
00039 
00041     std::string message;
00042 
00046     float sinceHeartbeat;
00047 };
00048 
00084 class Status
00085 {
00086 
00087 public:
00088 
00089     virtual ~Status() {};
00090 
00103     virtual void addSubsystem( const std::string& subsystem, double maxHeartbeatIntervalSec=-1.0 )=0;
00104 
00108     virtual void removeSubsystem( const std::string& subsystem )=0;
00109 
00111     virtual std::vector<std::string> subsystems()=0;
00112 
00115     virtual SubsystemStatus subsystemStatus( const std::string& subsystem )=0;
00116 
00120     virtual void setMaxHeartbeatInterval( const std::string& subsystem, double intervalSec )=0;
00121 
00124     virtual void initialising( const std::string& subsystem, const std::string& message="" )=0;
00125 
00128     virtual void ok( const std::string& subsystem, const std::string& message="" )=0;
00129 
00132     virtual void warning( const std::string& subsystem, const std::string& message )=0;
00133 
00136     virtual void fault( const std::string& subsystem, const std::string& message )=0;
00137 
00141     virtual void heartbeat( const std::string& subsystem )=0;
00142 
00145     virtual void process()=0;
00146 };
00147 
00148 } // namespace
00149 
00150 #endif
 

Generated for GearBox by  doxygen 1.4.5