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 Project Download Mailing lists
|
homeI.h00001 /* 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_HOME_I_H 00012 #define ORCAICE_HOME_I_H 00013 00014 #include <IceUtil/Mutex.h> 00015 00016 #include <gbxsickacfr/gbxiceutilacfr/timer.h> 00017 #include <orca/home.h> 00018 #include "../home.h" 00019 #include "../component.h" // for ComponentInterfaceFlag 00020 #include "../context.h" 00021 00022 namespace orcaice 00023 { 00024 00025 // An implementation of the (remote) Home interface. 00026 class HomeI : public virtual orca::Home, public virtual orcaice::Home 00027 { 00028 public: 00029 HomeI( ComponentInterfaceFlag flag, const orcaice::Context& context ); 00030 00031 // orca::Home interface 00032 virtual orca::HomeData getInterfaces(const ::Ice::Current& ) const; 00033 virtual int getTimeUp(const ::Ice::Current& ) const; 00034 virtual orca::StringStringDict getProperties(const ::Ice::Current& ) const; 00035 00036 // orcaice::Home interface 00037 virtual void addProvidedInterface( const orca::ProvidedInterface& iface ); 00038 virtual void addRequiredInterface( const orca::RequiredInterface& iface ); 00039 virtual void removeProvidedInterface( const std::string& name ); 00040 virtual void removeRequiredInterface( const std::string& name ); 00041 00042 private: 00043 // we update the timeUp field every time getInterfaces() is called. 00044 mutable orca::HomeData homeData_; 00045 00046 orca::StringStringDict properties_; 00047 00048 // start time is initialized in the constructor. the component's up time 00049 // is counted from here. 00050 gbxsickacfr::gbxiceutilacfr::Timer upTimer_; 00051 00052 // We may have multiple threads talking to us 00053 IceUtil::Mutex mutex_; 00054 }; 00055 00056 } // namespace 00057 00058 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)