INTRODUCTION Overview Download and Install Quick Start Documentation Publications NONFRAMEWORK CODE Driver Interfaces Drivers Libraries Utilities FRAMEWORK CODE Interfaces Components Libraries Utilities Full Software Listings DEVELOPER Tutorials Examples Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
pathfollower2dImpl.h00001 #ifndef ORCA_PATHFOLLOWER2D_IMPL_H 00002 #define ORCA_PATHFOLLOWER2D_IMPL_H 00003 00004 #include <memory> 00005 #include <orca/pathfollower2d.h> 00006 #include <gbxsickacfr/gbxiceutilacfr/store.h> 00007 #include <orcaice/context.h> 00008 #include <orcaice/topichandler.h> 00009 00010 namespace gbxutilacfr { class Stoppable; } 00011 00012 namespace orcaifaceimpl 00013 { 00014 00018 class AbstractPathFollowerCallback { 00019 public: 00020 virtual ~AbstractPathFollowerCallback() {} 00021 00022 virtual void setData( const orca::PathFollower2dData &path, bool activateImmediately )=0; 00023 virtual void activateNow()=0; 00024 virtual void setEnabled( bool enabled )=0; 00025 virtual orca::PathFollower2dState getState()=0; 00026 }; 00027 00031 class PathFollower2dImpl : public IceUtil::Shared 00032 { 00033 friend class PathFollower2dI; 00034 00035 public: 00037 PathFollower2dImpl( AbstractPathFollowerCallback &callback, 00038 const std::string &interfaceTag, 00039 const orcaice::Context &context ); 00041 PathFollower2dImpl( AbstractPathFollowerCallback &callback, 00042 const orcaice::Context &context, 00043 const std::string &interfaceName ); 00044 ~PathFollower2dImpl(); 00045 00046 // local functions 00048 void initInterface(); 00049 00052 void initInterface( gbxutilacfr::Stoppable* activity, const std::string& subsysName="", int retryInterval=2 ); 00053 00055 void localSend( const orca::PathFollower2dData &data ); 00056 00059 void localSetAndSend( const orca::PathFollower2dData &data ); 00060 00061 // Local calls to the Impl which get translated into remote calls on subscribers 00062 void localSetState( const orca::PathFollower2dState &state ); 00063 00064 private: 00065 void init(); 00066 00067 // remote call implementations, mimic (but do not inherit) the orca interface 00068 ::orca::PathFollower2dData internalGetData(); 00069 IceStorm::TopicPrx internalSubscribe(const orca::PathFollower2dConsumerPrx& subscriber); 00070 00071 gbxiceutilacfr::Store<orca::PathFollower2dData> dataStore_; 00072 00073 typedef orcaice::TopicHandler<orca::PathFollower2dConsumerPrx,orca::PathFollower2dData> PathFollower2dTopicHandler; 00074 std::auto_ptr<PathFollower2dTopicHandler> topicHandler_; 00075 00076 AbstractPathFollowerCallback &callback_; 00077 00078 Ice::ObjectPtr ptr_; 00079 const std::string interfaceName_; 00080 orcaice::Context context_; 00081 }; 00082 typedef IceUtil::Handle<PathFollower2dImpl> PathFollower2dImplPtr; 00083 00084 } 00085 00086 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)