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

 

         

imageImpl.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2008 Tom Burdick, 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_IMAGE_IMPL_H
00012 #define ORCA_IMAGE_IMPL_H
00013 
00014 #include <IceStorm/IceStorm.h>
00015 
00016 // include provided interfaces
00017 #include <orca/image.h>
00018 
00019 // utilities
00020 #include <orcaice/ptrstore.h>
00021 #include <orcaice/context.h>
00022 
00023 namespace gbxiceutilacfr { class Thread; }
00024 
00025 namespace orcaifaceimpl {
00026 
00030 class ImageImpl : public IceUtil::Shared
00031 {
00032 friend class ImageI;
00033 
00034 public:
00036     ImageImpl( const orca::ImageDescriptionPtr &descr,
00037                const std::string            &interfaceTag, 
00038                const orcaice::Context       &context );
00040     ImageImpl( const orca::ImageDescriptionPtr &descr,
00041                const orcaice::Context       &context,
00042                const std::string            &interfaceName );
00043     ~ImageImpl();
00044 
00045     // local interface:
00047     void initInterface();
00048 
00051     void initInterface( gbxiceutilacfr::Thread* thread, const std::string& subsysName="", int retryInterval=2 );
00052 
00054     void localSet( const orca::ImageDataPtr& data );
00055 
00058     void localSetAndSend( const orca::ImageDataPtr& data );
00059 
00060 private:
00061     // remote call implementations, mimic (but do not inherit) the orca interface
00062     ::orca::ImageDataPtr internalGetData() const;
00063     ::orca::ImageDescriptionPtr internalGetDescription() const;
00064     void internalSubscribe(const ::orca::ImageConsumerPrx&);
00065     void internalUnsubscribe(const ::orca::ImageConsumerPrx&);
00066 
00067     // Holds the latest data
00068     orca::ImageDescriptionPtr     descr_;
00069     
00070     orcaice::PtrStore<orca::ImageDataPtr> dataStore_;
00071 
00072     // The topic to which we'll publish
00073     IceStorm::TopicPrx        topicPrx_;
00074     // The interface to which we'll publish
00075     orca::ImageConsumerPrx    publisherPrx_;
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 
00085 typedef IceUtil::Handle<ImageImpl> ImageImplPtr;
00086 
00087 }
00088 
00089 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5