orca-robotics


INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

REPOSITORY
Interfaces
Components
Libraries
Utilities
Software Map

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard
Wiki
login/pass: orca/orca

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

componentstatusaggregator.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2008 Alex Brooks, Alexei Makarenko, Tobias Kaupp
00005  *
00006  * This copy of Orca is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 
00011 #ifndef ORCAICE_COMONENTSTATUS_AGGREGATOR_H
00012 #define ORCAICE_COMONENTSTATUS_AGGREGATOR_H
00013 
00014 #include <hydroiceutil/localstatus.h>
00015 #include <orca/status.h>
00016 
00017 namespace orcaice
00018 {
00019 namespace detail
00020 {
00021     
00022 enum AggregatorPolicy
00023 {
00024 
00025     // The subsystem with the "worst" health and its corresponding state define the component state and health
00026     AggregatorPolicyWorstHealth,
00027     
00028     // Component health and state are chosen independently: health is the worst health in the system.
00029     // State: if any subsystem is idle/initialising -> component state is set to initialising
00030     //        if all subsystems are ok -> component state is ok
00031     //        if any subsystem is finalising/shutdown and they are *not* of type SubsystemEarlyExit -> component is set to finalising/shutdown
00032     //        if a subsystem is finalising/shutdown and is of type SubsystemEarlyExit, its state is ignored
00033     AggregatorPolicyStateBased
00034 };
00035 
00036 // 
00037 // Aggregates a Component Status based on the status of the component's subsystems
00038 //
00039 class ComponentStatusAggregator
00040 {
00041 
00042 public:
00043     
00044     ComponentStatusAggregator( AggregatorPolicy policy = AggregatorPolicyStateBased );
00045             
00046     void convert( const hydroiceutil::LocalComponentStatus &from,
00047                   const orca::FQComponentName              &name, 
00048                   orca::ComponentStatus                    &to );
00049             
00050 private:
00051     
00052     AggregatorPolicy policy_;
00053     
00054     
00055 };
00056 
00057 }
00058 }
00059 
00060 #endif
00061 
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5