00001
00019 #ifndef ExecutionContext_h
00020 #define ExecutionContext_h
00021
00022 #include <rtm/idl/RTCSkel.h>
00023 #include <rtm/SystemLogger.h>
00024
00025 namespace RTC
00026 {
00130 class ExecutionContextBase
00131 : public virtual POA_RTC::ExecutionContextService,
00132 public virtual PortableServer::RefCountServantBase
00133 {
00134 public:
00142 ExecutionContextBase(RTObject_ptr owner);
00143
00144
00152 virtual ~ExecutionContextBase(void) {};
00153
00154
00155
00156
00185 virtual CORBA::Boolean is_running();
00186
00187
00223 virtual ReturnCode_t start();
00224
00225
00260 virtual ReturnCode_t stop();
00261
00262
00305 virtual CORBA::Double get_rate();
00306
00307
00360 virtual ReturnCode_t set_rate(CORBA::Double rate);
00361
00362
00408 virtual ReturnCode_t activate_component(LightweightRTObject_ptr comp);
00409
00410
00448 virtual ReturnCode_t deactivate_component(LightweightRTObject_ptr comp);
00449
00487 virtual ReturnCode_t reset_component(LightweightRTObject_ptr comp);
00488
00489
00524 virtual LifeCycleState get_component_state(LightweightRTObject_ptr comp);
00525
00526
00585 virtual ExecutionKind get_kind();
00586
00587
00633 virtual ReturnCode_t add_component(LightweightRTObject_ptr comp);
00634
00671 virtual ReturnCode_t remove_component(LightweightRTObject_ptr comp);
00672
00673
00674
00675
00676
00694 virtual ExecutionContextProfile* get_profile();
00695
00696
00697 protected:
00698 Logger rtclog;
00699 ExecutionContextProfile m_profile;
00700 CORBA::Boolean m_running;
00701
00702 template <class ObjRef>
00703 struct find_objref
00704 {
00705 find_objref(ObjRef ref) : m_ref(ref) {};
00706 bool operator()(ObjRef ref)
00707 {
00708 return ref->_is_equivalent(m_ref);
00709 }
00710 ObjRef m_ref;
00711 };
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722
00723 };
00724
00725 };
00726
00727 #endif // ExecutionContext_h