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

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

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


Generated for Orca Robotics by  doxygen 1.4.5