OpenRTM-aist 2.0.2
Loading...
Searching...
No Matches
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
26namespace 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
262 activate_component(RTC::LightweightRTObject_ptr comp) override;
263
296 RTC::ReturnCode_t
297 deactivate_component(RTC::LightweightRTObject_ptr comp) override;
298
330 RTC::ReturnCode_t
331 reset_component(RTC::LightweightRTObject_ptr comp) override;
332
359 RTC::LifeCycleState
360 get_component_state(RTC::LightweightRTObject_ptr comp) override;
361
381 RTC::ExecutionKind get_kind() override;
382
414 RTC::ReturnCode_t add_component(RTC::LightweightRTObject_ptr comp) override;
415
446 RTC::ReturnCode_t
447 remove_component(RTC::LightweightRTObject_ptr comp) override;
448
468 RTC::ExecutionContextProfile* get_profile() override;
469 protected:
470 // template virtual functions adding/removing component
474 RTC::ReturnCode_t
475 onAddedComponent(RTC::LightweightRTObject_ptr rtobj) override;
479 RTC::ReturnCode_t
480 onRemovedComponent(RTC::LightweightRTObject_ptr rtobj) override;
484 std::mutex m_tickmutex;
485 private:
493 RTC::Logger rtclog{"exttrig_sync_ec"};
494 }; // class OpenHRPExecutionContext
495} // namespace RTC
496
497
498extern "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::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.
RTC::ExecutionContextProfile * get_profile() override
Get the ExecutionContextProfile.
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.
RT-Component.