OpenRTM-aist  2.1.0
OpenHRPExecutionContext.h
Go to the documentation of this file.
1 // -*- C++ -*-
19 #ifndef RTC_OPENHRPEXECUTIONCONTEXT_H
20 #define RTC_OPENHRPEXECUTIONCONTEXT_H
21 
22 #include <mutex>
23 #include <rtm/RTC.h>
25 
26 namespace RTC
27 {
47  : public virtual POA_OpenRTM::ExtTrigExecutionContextService,
48  public virtual PortableServer::RefCountServantBase,
50  {
51  public:
60 
69 
70 
71  //============================================================
72  // ExtTrigExecutionContextService
73  //============================================================
87  void tick() override;
88 
89  //============================================================
90  // ExecutionContextService
91  //============================================================
116  CORBA::Boolean is_running() override;
117 
145  RTC::ReturnCode_t start() override;
146 
173  RTC::ReturnCode_t stop() override;
174 
195  CORBA::Double get_rate() override;
196 
226  RTC::ReturnCode_t set_rate(CORBA::Double rate) override;
227 
261  RTC::ReturnCode_t
263 
296  RTC::ReturnCode_t
298 
330  RTC::ReturnCode_t
332 
359  RTC::LifeCycleState
361 
381  RTC::ExecutionKind get_kind() override;
382 
414  RTC::ReturnCode_t add_component(RTC::LightweightRTObject_ptr comp) override;
415 
446  RTC::ReturnCode_t
448 
468  RTC::ExecutionContextProfile* get_profile() override;
469  protected:
470  // template virtual functions adding/removing component
474  RTC::ReturnCode_t
479  RTC::ReturnCode_t
484  std::mutex m_tickmutex;
485  private:
493  RTC::Logger rtclog{"exttrig_sync_ec"};
494  }; // class OpenHRPExecutionContext
495 } // namespace RTC
496 
497 
498 extern "C"
499 {
508 }
509 
510 #endif // RTC_OPENHRPEXECUTIONCONTEXT_H
511 
ExecutionContext base class.
void OpenHRPExecutionContextInit(RTC::Manager *manager)
Initialization function to register to ECFactory.
RTComponent header.
A base class for ExecutionContext.
Definition: ExecutionContextBase.h:366
Logger class.
Definition: SystemLogger.h:101
Manager class.
Definition: Manager.h:91
OpenHRPExecutionContext class.
Definition: OpenHRPExecutionContext.h:50
RTC::ReturnCode_t onRemovedComponent(RTC::LightweightRTObject_ptr rtobj) override
onRemovedComponent() template function
CORBA::Double get_rate() override
Get execution rate(Hz) of ExecutionContext.
RTC::ReturnCode_t start() override
Start the ExecutionContext.
RTC::ReturnCode_t reset_component(RTC::LightweightRTObject_ptr comp) override
Reset the RT-component.
RTC::ReturnCode_t onAddedComponent(RTC::LightweightRTObject_ptr rtobj) override
onAddedComponent() template function
RTC::ReturnCode_t stop() override
Stop the ExecutionContext.
CORBA::Boolean is_running() override
Check for ExecutionContext running state.
RTC::ReturnCode_t set_rate(CORBA::Double rate) override
Set execution rate(Hz) of ExecutionContext.
RTC::ReturnCode_t add_component(RTC::LightweightRTObject_ptr comp) override
Add an RT-component.
RTC::ReturnCode_t deactivate_component(RTC::LightweightRTObject_ptr comp) override
Deactivate an RT-component.
RTC::ExecutionContextProfile * get_profile() override
Get the ExecutionContextProfile.
RTC::ReturnCode_t activate_component(RTC::LightweightRTObject_ptr comp) override
Activate an RT-component.
~OpenHRPExecutionContext() override
Destructor.
std::mutex m_tickmutex
Mutex to guard tick() reenter.
Definition: OpenHRPExecutionContext.h:484
void tick() override
Move forward one step of ExecutionContext.
RTC::LifeCycleState get_component_state(RTC::LightweightRTObject_ptr comp) override
Get RT-component's state.
OpenHRPExecutionContext()
Constructor.
RTC::ExecutionKind get_kind() override
Get the ExecutionKind.
RTC::ReturnCode_t remove_component(RTC::LightweightRTObject_ptr comp) override
Remove the RT-Component from participant list.
RTC::LightweightRTObject_ptr LightweightRTObject_ptr
Definition: ExecutionContextWorker.h:37
RT-Component.