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