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 Project Download Mailing lists
|
estopImpl.h00001 #ifndef ORCA_ESTOP_IMPL_H 00002 #define ORCA_ESTOP_IMPL_H 00003 00004 // include defnition of Ice runtime 00005 #include <Ice/Ice.h> 00006 #include <IceStorm/IceStorm.h> 00007 00008 // include provided interfaces 00009 #include <orca/estop.h> 00010 00011 // utilities 00012 #include <gbxsickacfr/gbxiceutilacfr/store.h> 00013 #include <orcaice/context.h> 00014 00015 namespace gbxsickacfr { namespace gbxiceutilacfr { class Thread; } } 00016 00017 namespace orcaifaceimpl 00018 { 00019 00023 class EStopNonStandardImpl { 00024 public: 00025 virtual ~EStopNonStandardImpl() {} 00026 00027 virtual void activateEStop()=0; 00028 virtual void keepAlive()=0; 00029 virtual double getRequiredKeepAlivePeriodSec()=0; 00030 virtual void setToOperatingMode()=0; 00031 }; 00032 00036 class EStopImpl : public IceUtil::Shared 00037 { 00038 friend class EStopI; 00039 00040 public: 00042 EStopImpl( EStopNonStandardImpl &eStopNonStandardImpl, 00043 const std::string &interfaceTag, 00044 const orcaice::Context &context ); 00046 EStopImpl( EStopNonStandardImpl &eStopNonStandardImpl, 00047 const orcaice::Context &context, 00048 const std::string &interfaceName ); 00049 ~EStopImpl(); 00050 00051 // local functions 00053 void initInterface(); 00054 00057 void initInterface( gbxsickacfr::gbxiceutilacfr::Thread* thread, const std::string& subsysName="", int retryInterval=2 ); 00058 00061 void localSetAndSend( const orca::EStopData &data ); 00062 00063 private: 00064 // remote call implementations, mimic (but do not inherit) the orca interface 00065 ::orca::EStopData internalGetData() const; 00066 void internalSubscribe(const ::orca::EStopConsumerPrx&); 00067 void internalUnsubscribe(const ::orca::EStopConsumerPrx& ); 00068 00069 gbxsickacfr::gbxiceutilacfr::Store<orca::EStopData> dataStore_; 00070 00071 orca::EStopConsumerPrx consumerPrx_; 00072 IceStorm::TopicPrx topicPrx_; 00073 00074 // Hang onto this so we can remove from the adapter and control when things get deleted 00075 Ice::ObjectPtr ptr_; 00076 00077 const std::string interfaceName_; 00078 const std::string topicName_; 00079 00080 EStopNonStandardImpl &eStopNonStandardImpl_; 00081 00082 orcaice::Context context_; 00083 }; 00084 typedef IceUtil::Handle<EStopImpl> EStopImplPtr; 00085 00086 } 00087 00088 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)