19 #ifndef RTC_EXECUTIONCONTEXTWORKER_H 20 #define RTC_EXECUTIONCONTEXTWORKER_H 22 #include <condition_variable> 24 #include <rtm/idl/RTCSkel.h> 28 #define NUM_OF_LIFECYCLESTATE 4 36 class RTObjectStateMachine;
155 void setECRef(RTC::ExecutionContextService_ptr ref);
156 RTC::ExecutionContextService_ptr getECRef();
185 CORBA::Boolean isRunning();
214 RTC::ReturnCode_t start();
242 RTC::ReturnCode_t stop();
244 RTC::ReturnCode_t startThread();
246 RTC::ReturnCode_t stopThread();
276 RTC::ReturnCode_t rateChanged();
314 std::chrono::nanoseconds timeout
315 = std::chrono::seconds(1),
316 long int cycle = 1000);
352 std::chrono::nanoseconds timeout
353 = std::chrono::seconds(1),
354 long int cycle = 1000);
390 std::chrono::nanoseconds timeout
391 = std::chrono::seconds(1),
392 long int cycle = 1000);
423 static const char*
const st[] = {
429 return state >= RTC::CREATED_STATE && state <= RTC::ERROR_STATE ?
538 bool isAllCurrentState(RTC::LifeCycleState state);
539 bool isAllNextState(RTC::LifeCycleState state);
540 bool isOneOfCurrentState(RTC::LifeCycleState state);
541 bool isOneOfNextState(RTC::LifeCycleState state);
544 void invokeWorkerPreDo();
545 void invokeWorkerDo();
546 void invokeWorkerPostDo();
555 void updateComponentList();
569 RTC::ExecutionContextService_var
m_ref;
580 bool m_running{
false};
589 std::vector<RTC_impl::RTObjectStateMachine*>
m_comps;
595 using CompItr = std::vector<RTC_impl::RTObjectStateMachine*>::iterator;
600 #endif // RTC_PERIODICEXECUTIONCONTEXT_H static const char * getStateString(RTC::LifeCycleState state)
Definition: ExecutionContextWorker.h:421
std::vector< RTC_impl::RTObjectStateMachine * >::iterator CompItr
Definition: ExecutionContextWorker.h:595
RTC::LightweightRTObject_var LightweightRTObject_var
Definition: ExecutionContextWorker.h:38
RT component logger class.
Definition: ExecutionContextProfile.h:28
std::vector< RTC_impl::RTObjectStateMachine * > m_comps
List of the participating component.
Definition: ExecutionContextWorker.h:589
RT-Component class.
Definition: RTObject.h:90
std::vector< RTC_impl::RTObjectStateMachine * > m_addedComps
Definition: ExecutionContextWorker.h:591
RTC::LightweightRTObject_ptr LightweightRTObject_ptr
Definition: ExecutionContextWorker.h:37
std::mutex m_removedMutex
Definition: ExecutionContextWorker.h:594
Logger class.
Definition: SystemLogger.h:99
RTC::ExecutionContextService_var m_ref
Definition: ExecutionContextWorker.h:569
Definition: RTObjectStateMachine.h:42
std::vector< RTC_impl::RTObjectStateMachine * > m_removedComps
Definition: ExecutionContextWorker.h:593
ExecutionContextWorker class.
Definition: ExecutionContextWorker.h:111
std::mutex m_mutex
Definition: ExecutionContextWorker.h:590
std::mutex m_addedMutex
Definition: ExecutionContextWorker.h:592