00001
00019
00020
00021
00022
00023 #ifndef ExecutionContext_h
00024 #define ExecutionContext_h
00025
00026 #include <rtm/idl/RTCSkel.h>
00027
00028 namespace RTC
00029 {
00133 class ExecutionContextBase
00134 : public virtual POA_RTC::ExecutionContextService,
00135 public virtual PortableServer::RefCountServantBase
00136 {
00137 public:
00145 ExecutionContextBase() {};
00146 ExecutionContextBase(RTObject_ptr owner);
00147
00148
00156 virtual ~ExecutionContextBase() {};
00157
00158
00159
00160
00189 virtual CORBA::Boolean is_running();
00190
00191
00227 virtual ReturnCode_t start();
00228
00229
00264 virtual ReturnCode_t stop();
00265
00266
00309 virtual CORBA::Double get_rate();
00310
00311
00364 virtual ReturnCode_t set_rate(CORBA::Double rate);
00365
00366
00412 virtual ReturnCode_t activate_component(LightweightRTObject_ptr comp);
00413
00414
00452 virtual ReturnCode_t deactivate_component(LightweightRTObject_ptr comp);
00453
00491 virtual ReturnCode_t reset_component(LightweightRTObject_ptr comp);
00492
00493
00528 virtual LifeCycleState get_component_state(LightweightRTObject_ptr comp);
00529
00530
00589 virtual ExecutionKind get_kind();
00590
00591
00637 virtual ReturnCode_t add(LightweightRTObject_ptr comp);
00638
00675 virtual ReturnCode_t remove(LightweightRTObject_ptr comp);
00676
00677
00678
00679
00680
00698 virtual ExecutionContextProfile* get_profile();
00699
00700
00701 protected:
00702 ExecutionContextProfile m_profile;
00703 CORBA::Boolean m_running;
00704
00705 template <class ObjRef>
00706 struct find_objref
00707 {
00708 find_objref(ObjRef ref) : m_ref(ref) {};
00709 bool operator()(ObjRef ref)
00710 {
00711 return ref->_is_equivalent(m_ref);
00712 }
00713 ObjRef m_ref;
00714 };
00715
00716
00717
00718
00719
00720
00721
00722
00723
00724
00725
00726 };
00727
00728 };
00729
00730 #endif // ExecutionContext_h