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

 

         

drivebicycleImpl.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, Ben Upcroft
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_ORCAIFACEIMPL_DRIVEBICYCLE_IMPL_H
00012 #define ORCA_ORCAIFACEIMPL_DRIVEBICYCLE_IMPL_H
00013 
00014 #include <memory>
00015 #include <orca/drivebicycle.h>
00016 #include <gbxsickacfr/gbxiceutilacfr/store.h>
00017 #include <gbxsickacfr/gbxiceutilacfr/notify.h>
00018 #include <orcaice/context.h>
00019 #include <orcaice/topichandler.h>
00020 
00021 namespace gbxutilacfr { class Stoppable; }
00022 
00023 namespace orcaifaceimpl {
00024 
00028 class DriveBicycleImpl : public IceUtil::Shared,
00029                          public gbxiceutilacfr::Notify<orca::DriveBicycleCommand>
00030 {
00031 friend class DriveBicycleI;
00032 
00033 public:
00034 
00036     DriveBicycleImpl( const orca::VehicleDescription& descr,
00037                       const std::string &interfaceTag,
00038                       const orcaice::Context &context );
00040     DriveBicycleImpl( const orca::VehicleDescription& descr,
00041                       const orcaice::Context &context,
00042                       const std::string &interfaceName );
00043     ~DriveBicycleImpl();
00044 
00045     // Local calls:
00047     void initInterface();
00048 
00051     void initInterface( gbxutilacfr::Stoppable* activity, const std::string& subsysName="", int retryInterval=2 );
00052 
00054     void localSet( const orca::DriveBicycleData &data );
00055 
00057     void localSend( const orca::DriveBicycleData &data );
00058 
00061     void localSetAndSend( const orca::DriveBicycleData &data );
00062 
00063 private:
00064     void init();
00065 
00066     // remote call implementations, mimic (but do not inherit) the orca interface
00067     ::orca::DriveBicycleData internalGetData();
00068     IceStorm::TopicPrx internalSubscribe(const orca::DriveBicycleConsumerPrx& subscriber);
00069     orca::VehicleDescription internalGetDescription() const
00070         { return description_; }
00071     void internalSetCommand( const ::orca::DriveBicycleCommand& );
00072 
00073     const orca::VehicleDescription    description_;
00074     gbxiceutilacfr::Store<orca::DriveBicycleData> dataStore_;
00075 
00076     typedef orcaice::TopicHandler<orca::DriveBicycleConsumerPrx,orca::DriveBicycleData> DriveBicycleTopicHandler;
00077     std::auto_ptr<DriveBicycleTopicHandler> topicHandler_;
00078 
00079     Ice::ObjectPtr ptr_;
00080     const std::string interfaceName_;
00081     orcaice::Context context_;
00082 };
00083 typedef IceUtil::Handle<DriveBicycleImpl> DriveBicycleImplPtr;
00084 
00085 } // namespace
00086 
00087 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5