INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

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-2009 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     // alexm: disabled because it's not currently used.
00027 //     AggregatorPolicyWorstHealth,
00028     
00029     // Component health and state are chosen independently: health is the worst health in the system.
00030     // State: 
00031     //  if any subsystem is Idle/Initialising -> component state is set to CompInitialising
00032     //  if all subsystems are Working -> component state is CompWorking
00033     //  if any subsystem is Finalising/Shutdown and 
00034     //     none of those are *not* of type SubsystemEarlyExit -> component is set to CompFinalising
00035     //     else, -> the state of those subsystems are ignored
00036     AggregatorPolicyStateBased
00037 };
00038 
00039 // 
00040 // Aggregates a Component Status based on the status of the component's subsystems
00041 //
00042 class ComponentStatusAggregator
00043 {
00044 
00045 public:
00046     
00047     ComponentStatusAggregator( AggregatorPolicy policy = AggregatorPolicyStateBased );
00048             
00049     void convert( const hydroiceutil::LocalComponentStatus &from,
00050                   const orca::FQComponentName              &name, 
00051                   orca::ComponentStatus                    &to );
00052             
00053 private:
00054     
00055     AggregatorPolicy policy_;
00056     
00057     
00058 };
00059 
00060 }
00061 }
00062 
00063 #endif
00064 
 

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


Generated for Orca Robotics by  doxygen 1.4.5