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

 

         

ogmapImpl.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 #ifndef __ogmapIface_h__
00011 #define __ogmapIface_h__
00012 
00013 // include defnition of Ice runtime
00014 #include <Ice/Ice.h>
00015 #include <IceStorm/IceStorm.h>
00016 
00017 // include provided interfaces
00018 #include <orca/ogmap.h>
00019 
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 OgMapImpl : public IceUtil::Shared
00031 {
00032 friend class OgMapI;
00033 
00034 public:
00036     OgMapImpl( const std::string      &interfaceTag,
00037                const orcaice::Context &context );
00039     OgMapImpl( const orcaice::Context &context,
00040                const std::string      &interfaceName );               
00041     ~OgMapImpl();
00042 
00043     // Local calls:
00045     void initInterface();
00046 
00049     void initInterface( gbxsickacfr::gbxiceutilacfr::Thread* thread, const std::string& subsysName="", int retryInterval=2 );
00050 
00053     void localSetAndSend( const ::orca::OgMapData &data );
00054 
00055 private:
00056     // remote call implementations, mimic (but do not inherit) the orca interface
00057     orca::OgMapData internalGetData() const;
00058     void internalSubscribe(const ::orca::OgMapConsumerPrx& );
00059     void internalUnsubscribe(const ::orca::OgMapConsumerPrx& );
00060 
00061     // Holds the latest data
00062     gbxsickacfr::gbxiceutilacfr::Store<orca::OgMapData> dataStore_;
00063 
00064     // The topic to which we'll publish
00065     IceStorm::TopicPrx             topicPrx_;
00066     // The interface to which we'll publish
00067     orca::OgMapConsumerPrx         consumerPrx_;
00068 
00069     // Hang onto this so we can remove from the adapter and control when things get deleted
00070     Ice::ObjectPtr          ptr_;
00071 
00072     const std::string interfaceName_;
00073     const std::string topicName_;
00074     orcaice::Context context_;
00075 };
00076 typedef IceUtil::Handle<OgMapImpl> OgMapImplPtr;
00077 
00078 }
00079 
00080 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5