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

SourceForge.net Logo
Project
Download
Mailing lists

 

         

rangescanner2dImpl.h

00001 /*
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_RANGESCANNER2D_IMPL_H
00012 #define ORCA_RANGESCANNER2D_IMPL_H
00013 
00014 #include <IceStorm/IceStorm.h>
00015 
00016 // include provided interfaces
00017 #include <orca/rangescanner2d.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 RangeScanner2dImpl : public IceUtil::Shared
00031 {
00032 friend class RangeScanner2dI;
00033 
00034 public:
00036     RangeScanner2dImpl( const orca::RangeScanner2dDescription &descr,
00037                         const std::string                     &interfaceTag,
00038                         const orcaice::Context                &context );
00040     RangeScanner2dImpl( const orca::RangeScanner2dDescription &descr,
00041                         const orcaice::Context                &context,
00042                         const std::string                     &interfaceName );                        
00043     ~RangeScanner2dImpl();
00044 
00045     // local interface:
00047     void initInterface();
00048 
00051     void initInterface( gbxsickacfr::gbxiceutilacfr::Thread* thread, const std::string& subsysName="", int retryInterval=2 );
00052 
00054     void localSet( const orca::RangeScanner2dDataPtr& data );
00055 
00058     void localSetAndSend( const ::orca::RangeScanner2dDataPtr &data );
00059 
00060 private:
00061     // remote call implementations, mimic (but do not inherit) the orca interface
00062     ::orca::RangeScanner2dDataPtr     internalGetData() const;
00063     ::orca::RangeScanner2dDescription internalGetDescription() const;
00064     void internalSubscribe(const ::orca::RangeScanner2dConsumerPrx& );
00065     void internalUnsubscribe(const ::orca::RangeScanner2dConsumerPrx& );
00066 
00067     // Holds the latest data
00068     orcaice::PtrStore<orca::RangeScanner2dDataPtr> dataStore_;
00069 
00070     orca::RangeScanner2dDescription descr_;
00071 
00072     // The topic to which we'll publish
00073     IceStorm::TopicPrx              topicPrx_;
00074     // The interface to which we'll publish
00075     orca::RangeScanner2dConsumerPrx consumerPrx_;
00076 
00077     // Hang onto this so we can remove from the adapter and control when things get deleted
00078     Ice::ObjectPtr          ptr_;
00079 
00080     const std::string        interfaceName_;
00081     const std::string        topicName_;
00082     orcaice::Context   context_;
00083 };
00084 typedef IceUtil::Handle<RangeScanner2dImpl> RangeScanner2dImplPtr;
00085 
00086 } // namespace
00087 
00088 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5