ExtTrigExecutionContext.cpp
Go to the documentation of this file.
1 // -*- C++ -*-
20 #include <coil/TimeValue.h>
22 #include <rtm/ECFactory.h>
23 
24 namespace RTC
25 {
35  {
36  rtclog.setName("exttrig_ec");
37  }
38 
47  {
48  }
49 
58  throw (CORBA::SystemException)
59  {
60  RTC_TRACE(("tick()"));
62  m_worker._called = true;
65  return;
66  }
67 
76  {
77  RTC_TRACE(("svc()"));
78  do
79  {
81  while (!m_worker._called && m_running)
82  {
84  }
85  if (m_worker._called)
86  {
87  m_worker._called = false;
88  std::for_each(m_comps.begin(), m_comps.end(), invoke_worker());
89  }
91  } while (m_running);
92 
93  return 0;
94  }
95 };
96 
97 
98 extern "C"
99 {
108  {
109  manager->registerECFactory("ExtTrigExecutionContext",
110  RTC::ECCreate<RTC::ExtTrigExecutionContext>,
111  RTC::ECDelete<RTC::ExtTrigExecutionContext>);
112  }
113 };
RT-Component.
std::vector< Comp > m_comps
List of the participating component.
Manager class.
Definition: Manager.h:80
void setName(const char *name)
Set suffix of date/time string of header.
virtual ~ExtTrigExecutionContext(void)
Destructor.
virtual int svc(void)
Invoke each component&#39;s operation.
#define RTC_TRACE(fmt)
void ExtTrigExecutionContextInit(RTC::Manager *manager)
Register Factory class for this ExecutionContext.
ExtTrigExecutionContext class.
bool registerECFactory(const char *name, ECNewFunc new_func, ECDeleteFunc delete_func)
Register ExecutionContext Factory.
Definition: Manager.cpp:474
ExecutionContext Factory class.
bool m_running
The running state of ExecutionContext true: running, false: stopped.
virtual void tick()
Move forward one step of ExecutionContext.
Functor for_each(CorbaSequence &seq, Functor f)
Apply the functor to all CORBA sequence elements.
Definition: CORBA_SeqUtil.h:98


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Thu Jun 6 2019 19:25:58