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

 

         

propertiesImpl.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_PROPERTIES_IMPL_H
00012 #define ORCA_PROPERTIES_IMPL_H
00013 
00014 #include <memory>
00015 #include <memory>
00016 #include <orca/properties.h>
00017 #include <gbxsickacfr/gbxiceutilacfr/store.h>
00018 #include <orcaice/context.h>
00019 #include <orcaice/topichandler.h>
00020 
00021 namespace gbxiceutilacfr { class Thread; }
00022 
00023 namespace orcaifaceimpl {
00024 
00028 class PropertiesImpl : public IceUtil::Shared
00029 {
00030 friend class PropertiesI;
00031 
00032 public:
00034     PropertiesImpl( const std::string& interfaceTag, 
00035                const orcaice::Context& context );
00037     PropertiesImpl( const orcaice::Context& context,
00038                const std::string& interfaceName );
00039     ~PropertiesImpl();
00040 
00041     // local interface:
00043     void initInterface();
00044 
00047     void initInterface( gbxiceutilacfr::Thread* thread, const std::string& subsysName="", int retryInterval=2 );
00048 
00050     void localSet( const orca::PropertiesData& data );
00051 
00054     void localSetAndSend( const orca::PropertiesData& data );
00055 
00057     gbxiceutilacfr::Store<orca::PropertiesData> &localGetRemotelySetDataStore()
00058         { return remotelySetDataStore_; }
00059 
00060 private:
00061     void init();
00062 
00063     // remote call implementations, mimic (but do not inherit) the orca interface
00064     ::orca::PropertiesData internalGetData() const;
00065     void internalSetData( const ::orca::PropertiesData &data );
00066     IceStorm::TopicPrx internalSubscribe(const orca::PropertiesConsumerPrx& subscriber);
00067 
00068     gbxiceutilacfr::Store<orca::PropertiesData> dataStore_;
00069     gbxiceutilacfr::Store<orca::PropertiesData> remotelySetDataStore_;
00070 
00071     typedef orcaice::TopicHandler<orca::PropertiesConsumerPrx,orca::PropertiesData> PropertiesTopicHandler;
00072     std::auto_ptr<PropertiesTopicHandler> topicHandler_;
00073 
00074     Ice::ObjectPtr ptr_;
00075     const std::string interfaceName_;
00076     orcaice::Context context_;
00077 };
00078 
00079 typedef IceUtil::Handle<PropertiesImpl> PropertiesImplPtr;
00080 
00081 }
00082 
00083 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5