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
|
polarfeature2dImpl.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_IFACEIMPL_POLARFEATURE2D_IMPL_H 00012 #define ORCA_IFACEIMPL_POLARFEATURE2D_IMPL_H 00013 00014 #include <IceStorm/IceStorm.h> 00015 00016 // include provided interfaces 00017 #include <orca/polarfeature2d.h> 00018 00019 // utilities 00020 #include <gbxsickacfr/gbxiceutilacfr/store.h> 00021 #include <orcaice/context.h> 00022 00023 namespace gbxsickacfr { namespace gbxiceutilacfr { class Thread; } } 00024 00025 namespace orcaifaceimpl { 00026 00030 class PolarFeature2dImpl : public IceUtil::Shared 00031 { 00032 friend class PolarFeature2dI; 00033 00034 public: 00036 PolarFeature2dImpl( const orca::PolarFeature2dDescription &descr, 00037 const std::string &interfaceTag, 00038 const orcaice::Context &context ); 00040 PolarFeature2dImpl( const orca::PolarFeature2dDescription &descr, 00041 const orcaice::Context &context, 00042 const std::string &interfaceName ); 00043 ~PolarFeature2dImpl(); 00044 00045 // 00046 // Local calls: 00047 // 00049 void initInterface(); 00050 00053 void initInterface( gbxsickacfr::gbxiceutilacfr::Thread* thread, const std::string& subsysName="", int retryInterval=2 ); 00054 00056 void localSet( const orca::PolarFeature2dData &data ); 00057 00060 void localSetAndSend( const ::orca::PolarFeature2dData &data ); 00061 00062 private: 00063 // remote call implementations, mimic (but do not inherit) the orca interface 00064 ::orca::PolarFeature2dData internalGetData() const; 00065 ::orca::PolarFeature2dDescription internalGetDescription() const; 00066 void internalSubscribe(const ::orca::PolarFeature2dConsumerPrx&); 00067 void internalUnsubscribe(const ::orca::PolarFeature2dConsumerPrx&); 00068 00069 // Holds the latest data 00070 gbxsickacfr::gbxiceutilacfr::Store<orca::PolarFeature2dData> dataStore_; 00071 00072 orca::PolarFeature2dDescription descr_; 00073 00074 // The topic to which we'll publish 00075 IceStorm::TopicPrx topicPrx_; 00076 // The interface to which we'll publish 00077 orca::PolarFeature2dConsumerPrx consumerPrx_; 00078 00079 // Hang onto this so we can remove from the adapter and control when things get deleted 00080 Ice::ObjectPtr ptr_; 00081 00082 const std::string interfaceName_; 00083 const std::string topicName_; 00084 orcaice::Context context_; 00085 }; 00086 typedef IceUtil::Handle<PolarFeature2dImpl> PolarFeature2dImplPtr; 00087 00088 } // namespace 00089 00090 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)