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

 

         

estopImpl.h

00001 #ifndef ORCA_ESTOP_IMPL_H
00002 #define ORCA_ESTOP_IMPL_H
00003 
00004 #include <memory>
00005 #include <orca/estop.h>
00006 #include <gbxsickacfr/gbxiceutilacfr/store.h>
00007 #include <gbxsickacfr/gbxiceutilacfr/notify.h>
00008 #include <orcaice/context.h>
00009 #include <orcaice/topichandler.h>
00010 
00011 namespace gbxiceutilacfr { class Thread; }
00012 
00013 namespace orcaifaceimpl
00014 {
00015 
00019 class AbstractEStopCallback {
00020 public:
00021     virtual ~AbstractEStopCallback() {}
00022 
00023     virtual void activateEStop()=0;
00024     virtual void keepAlive()=0;
00025     virtual double getRequiredKeepAlivePeriodSec()=0;
00026     virtual void setToOperatingMode()=0;
00027 };
00028     
00032 class EStopImpl : public IceUtil::Shared
00033 {
00034 friend class EStopI;
00035 
00036 public:
00038     EStopImpl( AbstractEStopCallback  &callback,
00039                const std::string      &interfaceTag, 
00040                const orcaice::Context &context );
00042     EStopImpl( AbstractEStopCallback  &callback,
00043                const orcaice::Context &context,
00044                const std::string      &interfaceName );
00045     ~EStopImpl();
00046     
00047     // local functions
00049     void initInterface();
00050 
00053     void initInterface( gbxiceutilacfr::Thread* thread, const std::string& subsysName="", int retryInterval=2 );
00054 
00057     void localSetAndSend( const orca::EStopData &data );
00058 
00059 private:
00060     void init();
00061 
00062     // remote call implementations, mimic (but do not inherit) the orca interface
00063     ::orca::EStopData internalGetData() const;
00064     IceStorm::TopicPrx internalSubscribe(const orca::EStopConsumerPrx& subscriber);
00065 
00066     gbxiceutilacfr::Store<orca::EStopData> dataStore_;
00067 
00068     AbstractEStopCallback& callback_;
00069 
00070     typedef orcaice::TopicHandler<orca::EStopConsumerPrx,orca::EStopData> EStopTopicHandler;
00071     std::auto_ptr<EStopTopicHandler> topicHandler_;
00072     
00073     Ice::ObjectPtr ptr_;
00074     const std::string interfaceName_;
00075     orcaice::Context context_;
00076 };
00077 typedef IceUtil::Handle<EStopImpl> EStopImplPtr;
00078 
00079 }
00080 
00081 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5