|
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
|
localise2dImpl.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 ORCA_ORCAIFACEIMPL_LOCALISE2D_IMPL_H 00012 #define ORCA_ORCAIFACEIMPL_LOCALISE2D_IMPL_H 00013 00014 #include <orca/localise2d.h> 00015 #include <IceStorm/IceStorm.h> 00016 00017 // utilities 00018 #include <gbxsickacfr/gbxiceutilacfr/store.h> 00019 #include <orcaice/context.h> 00020 00021 namespace gbxiceutilacfr { class Thread; } 00022 00023 namespace orcaifaceimpl { 00024 00025 // experimental. 00026 // Determines whether the IceStorm topic is destroyed when the Impl is destroyed. 00027 enum TopicPolicy 00028 { 00029 DestroyTopic, 00030 NoTopicDestruction 00031 }; 00032 00036 class Localise2dImpl : public IceUtil::Shared 00037 { 00038 friend class Localise2dI; 00039 00040 public: 00044 Localise2dImpl( const orca::VehicleGeometryDescriptionPtr &geometry, 00045 const std::string &interfaceTag, 00046 const orcaice::Context &context, 00047 TopicPolicy policy=NoTopicDestruction ); 00049 Localise2dImpl( const orca::VehicleGeometryDescriptionPtr &geometry, 00050 const orcaice::Context &context, 00051 const std::string &interfaceName, 00052 TopicPolicy policy=NoTopicDestruction ); 00053 ~Localise2dImpl(); 00054 00055 // Local calls: 00057 void initInterface(); 00058 00061 void initInterface( gbxiceutilacfr::Thread* thread, const std::string& subsysName="", int retryInterval=2 ); 00062 00064 void localSet( const orca::Localise2dData &data ); 00065 00068 void localSetAndSend( const orca::Localise2dData &data ); 00069 00070 private: 00071 // remote call implementations, mimic (but do not inherit) the orca interface 00072 ::orca::Localise2dData internalGetData() const; 00073 ::orca::VehicleGeometryDescriptionPtr internalGetVehicleGeometry() const; 00074 void internalSubscribe(const ::orca::Localise2dConsumerPrx& ); 00075 void internalUnsubscribe(const ::orca::Localise2dConsumerPrx& ); 00076 00077 orca::VehicleGeometryDescriptionPtr geometry_; 00078 00079 gbxiceutilacfr::Store<orca::Localise2dData> dataStore_; 00080 00081 orca::Localise2dConsumerPrx publisherPrx_; 00082 IceStorm::TopicPrx topicPrx_; 00083 TopicPolicy policy_; 00084 00085 // Hang onto this so we can remove from the adapter and control when things get deleted 00086 Ice::ObjectPtr ptr_; 00087 00088 const std::string interfaceName_; 00089 const std::string topicName_; 00090 orcaice::Context context_; 00091 }; 00092 typedef IceUtil::Handle<Localise2dImpl> Localise2dImplPtr; 00093 00094 } // namespace 00095 00096 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)
1.4.5