19#ifndef RTC_PERIODICEXECUTIONCONTEXT2_H
20#define RTC_PERIODICEXECUTIONCONTEXT2_H
23#include <condition_variable>
24#include <coil/Affinity.h>
31#define NUM_OF_LIFECYCLESTATE 4
56 :
public virtual POA_RTC::ExecutionContextService,
57 public virtual PortableServer::RefCountServantBase,
111 void init(coil::Properties& props)
override;
187 int close(
unsigned long flags)
override;
273 RTC::ReturnCode_t
stop()
override;
326 RTC::ReturnCode_t
set_rate(CORBA::Double rate)
override;
514 RTC::ReturnCode_t
add_component(RTC::LightweightRTObject_ptr comp)
override;
572 void getProperty(coil::Properties& prop,
const char* key, T& value)
574 if (prop.findNode(key) !=
nullptr)
577 if (coil::stringTo(tmp, prop[key].c_str()))
641 std::lock_guard<std::mutex> guard(
m_svcmutex);
ExecutionContext base class
void PeriodicExecutionContextInit(RTC::Manager *manager)
ECFactoryへの登録のための初期化関数
ExecutionContext用基底クラス
Definition ExecutionContextBase.h:366
Logger クラス
Definition SystemLogger.h:101
Manager クラス
Definition Manager.h:91
PeriodicExecutionContext クラス
Definition PeriodicExecutionContext.h:60
bool m_svc
ExecutionContext のスレッド実行フラグ
Definition PeriodicExecutionContext.h:661
std::mutex m_svcmutex
Definition PeriodicExecutionContext.h:662
coil::CpuMask m_cpu
CPU affinity mask list
Definition PeriodicExecutionContext.h:701
RTC::ReturnCode_t activate_component(RTC::LightweightRTObject_ptr comp) override
RTコンポーネントをアクティブ化する
RTC::ReturnCode_t start() override
ExecutionContext の実行を開始
RTC::ReturnCode_t onReset(RTC_impl::RTObjectStateMachine *comp, long int count) override
onReset() template function
PeriodicExecutionContext()
デフォルトコンストラクタ
RTC::ReturnCode_t onRemovedComponent(RTC::LightweightRTObject_ptr rtobj) override
onRemovedComponent() template function
bool threadRunning()
Definition PeriodicExecutionContext.h:639
RTC::ReturnCode_t add_component(RTC::LightweightRTObject_ptr comp) override
RTコンポーネントを追加する
~PeriodicExecutionContext() override
デストラクタ
void init(coil::Properties &props) override
ExecutionContextの初期化を行う
void getProperty(coil::Properties &prop, const char *key, T &value)
Definition PeriodicExecutionContext.h:572
RTC::ExecutionContextProfile * get_profile() override
ExecutionContextProfile を取得する
WorkerThreadCtrl m_workerthread
svn用の状態変数
Definition PeriodicExecutionContext.h:686
CORBA::Boolean is_running() override
ExecutionContext 実行状態確認関数
RTC::ReturnCode_t set_rate(CORBA::Double rate) override
ExecutionContext の実行周期(Hz)を設定する
CORBA::Double get_rate() override
ExecutionContext の実行周期(Hz)を取得する
RTC::LifeCycleState get_component_state(RTC::LightweightRTObject_ptr comp) override
RTコンポーネントの状態を取得する
RTC::ReturnCode_t stop() override
ExecutionContext の実行を停止
RTC::ReturnCode_t onAddedComponent(RTC::LightweightRTObject_ptr rtobj) override
onAddedComponent() template function
RTC::ReturnCode_t deactivate_component(RTC::LightweightRTObject_ptr comp) override
RTコンポーネントを非アクティブ化する
RTC::ReturnCode_t onActivated(RTC_impl::RTObjectStateMachine *comp, long int count) override
onActivated() template function
RTC::ReturnCode_t remove_component(RTC::LightweightRTObject_ptr comp) override
RTコンポーネントを参加者リストから削除する
RTC::ReturnCode_t reset_component(RTC::LightweightRTObject_ptr comp) override
RTコンポーネントをリセットする
int close(unsigned long flags) override
ExecutionContext 用のスレッド実行関数
RTC::ExecutionKind get_kind() override
ExecutionKind を取得する
RTC::Logger rtclog
ロガーストリーム
Definition PeriodicExecutionContext.h:652
bool m_nowait
ExecutionContext 即時実行(wait無し実行)フラグ
Definition PeriodicExecutionContext.h:696
RTC::ReturnCode_t onWaitingDeactivated(RTC_impl::RTObjectStateMachine *comp, long int count) override
onWaitingDeactivated() template function
RTC::ReturnCode_t onStopping() override
onStopping() template function
RTC::ReturnCode_t onWaitingReset(RTC_impl::RTObjectStateMachine *comp, long int count) override
onWaitingReset() template function
RTC::ReturnCode_t onStarted() override
onStarted() template function
virtual void setCpuAffinity(coil::Properties &props)
setting CPU affinity from given properties
RTC::ReturnCode_t onWaitingActivated(RTC_impl::RTObjectStateMachine *comp, long int count) override
onWaitingActivated() template function
int svc() override
ExecutionContext 用のスレッド実行関数
int open(void *args) override
ExecutionContext用アクティビティスレッドを生成する
RTC::ReturnCode_t onDeactivated(RTC_impl::RTObjectStateMachine *comp, long int count) override
onDeactivated() template function
Definition RTObjectStateMachine.h:43
Definition MultilayerCompositeEC.h:28
worker 用状態変数クラス
Definition PeriodicExecutionContext.h:672
std::mutex mutex_
Definition PeriodicExecutionContext.h:674
WorkerThreadCtrl()
Definition PeriodicExecutionContext.h:673
std::condition_variable cond_
Definition PeriodicExecutionContext.h:675
bool running_
Definition PeriodicExecutionContext.h:676