00001
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef ExecutionContext_h
00027 #define ExecutionContext_h
00028
00029 #include <rtm/idl/RTCSkel.h>
00030
00031 namespace RTC
00032 {
00136 class ExecutionContextBase
00137 : public virtual POA_RTC::ExecutionContextService,
00138 public virtual PortableServer::RefCountServantBase
00139 {
00140 public:
00148 ExecutionContextBase() {};
00149 ExecutionContextBase(RTObject_ptr owner);
00150
00151
00159 virtual ~ExecutionContextBase() {};
00160
00161
00162
00163
00192 virtual CORBA::Boolean is_running();
00193
00194
00230 virtual ReturnCode_t start();
00231
00232
00267 virtual ReturnCode_t stop();
00268
00269
00312 virtual CORBA::Double get_rate();
00313
00314
00367 virtual ReturnCode_t set_rate(CORBA::Double rate);
00368
00369
00415 virtual ReturnCode_t activate_component(LightweightRTObject_ptr comp);
00416
00417
00455 virtual ReturnCode_t deactivate_component(LightweightRTObject_ptr comp);
00456
00494 virtual ReturnCode_t reset_component(LightweightRTObject_ptr comp);
00495
00496
00531 virtual LifeCycleState get_component_state(LightweightRTObject_ptr comp);
00532
00533
00592 virtual ExecutionKind get_kind();
00593
00594
00640 virtual ReturnCode_t add(LightweightRTObject_ptr comp);
00641
00678 virtual ReturnCode_t remove(LightweightRTObject_ptr comp);
00679
00680
00681
00682
00683
00701 virtual ExecutionContextProfile* get_profile();
00702
00703
00704 protected:
00705 ExecutionContextProfile m_profile;
00706 CORBA::Boolean m_running;
00707
00708 template <class ObjRef>
00709 struct find_objref
00710 {
00711 find_objref(ObjRef ref) : m_ref(ref) {};
00712 bool operator()(ObjRef ref)
00713 {
00714 return ref->_is_equivalent(m_ref);
00715 }
00716 ObjRef m_ref;
00717 };
00718
00719
00720
00721
00722
00723
00724
00725
00726
00727
00728
00729 };
00730
00731 };
00732
00733 #endif // ExecutionContext_h