18#ifndef RTC_EXECUTIONCONTEXTBASE_H
19#define RTC_EXECUTIONCONTEXTBASE_H
21#include <coil/Factory.h>
23#include <rtm/idl/RTCSkel.h>
24#include <rtm/idl/OpenRTMSkel.h>
29#define DEFAULT_EXECUTION_RATE 1000
411 virtual void init(coil::Properties& props);
511 virtual RTC::ReturnCode_t
stop();
842 void setObjRef(RTC::ExecutionContextService_ptr ec_ptr);
906 RTC::ReturnCode_t
setKind(RTC::ExecutionKind kind);
925 RTC::ReturnCode_t
setOwner(RTC::LightweightRTObject_ptr comp);
1063 virtual RTC::ReturnCode_t
onStarted() {
return RTC::RTC_OK; }
1065 virtual RTC::ReturnCode_t
onStopped() {
return RTC::RTC_OK; }
1068 virtual double onGetRate(
double rate)
const {
return rate; }
1070 virtual RTC::ReturnCode_t
onSetRate(
double ) {
return RTC::RTC_OK; }
1073 virtual RTC::ReturnCode_t
1078 virtual RTC::ReturnCode_t
1083 virtual RTC::ReturnCode_t
1088 virtual RTC::ReturnCode_t
1095 virtual RTC::ReturnCode_t
1100 virtual RTC::ReturnCode_t
1105 virtual RTC::ReturnCode_t
1111 virtual RTC::ReturnCode_t
1116 virtual RTC::ReturnCode_t
1121 virtual RTC::ReturnCode_t
1130 virtual RTC::ReturnCode_t
1135 virtual RTC::ReturnCode_t
1141 virtual RTC::LifeCycleState
1146 virtual RTC::ExecutionKind
1151 virtual RTC::ExecutionContextProfile*
1165 bool setExecutionRate(coil::Properties& props);
1173 bool setTransitionMode(coil::Properties& props,
1174 const char* key,
bool& flag);
1182 bool setTimeout(coil::Properties& props,
const char* key,
1183 std::chrono::nanoseconds& timevalue);
1208EXTERN
template class DLL_PLUGIN coil::GlobalFactory<RTC::ExecutionContextBase>;
1209#elif defined(__GNUC__)
1210EXTERN
template class coil::GlobalFactory<RTC::ExecutionContextBase>;
ExecutionContextProfile class
ExecutionContext's state machine worker class
RT-Component factory class
ExecutionContext用基底クラス
Definition ExecutionContextBase.h:366
RTC::RTObject_ptr getOwner() const
Ownerコンポーネントの参照を取得する
RTC_impl::ExecutionContextProfile m_profile
Definition ExecutionContextBase.h:1193
virtual RTC::ReturnCode_t onActivated(RTC_impl::RTObjectStateMachine *, long int)
Definition ExecutionContextBase.h:1106
RTC::ExecutionKind getKind() const
ExecutionKind を取得する
RTC::Logger rtclog
Definition ExecutionContextBase.h:1190
static const char * getKindString(RTC::ExecutionKind kind)
ExecutionKind を文字列化する
const RTC::RTCList & getComponentList() const
RTコンポーネントの参加者リストを取得する
RTC::ReturnCode_t setRate(double rate)
ExecutionContext の実行周期(Hz)を設定する
std::chrono::nanoseconds getPeriod() const
RTC::ReturnCode_t activateComponent(RTC::LightweightRTObject_ptr comp)
RTコンポーネントをアクティブ化する
RTC::ReturnCode_t removeComponent(RTC::LightweightRTObject_ptr comp)
RTコンポーネントを参加者リストから削除する
coil::Properties getProperties() const
Propertiesを取得する
bool isAllCurrentState(RTC::LifeCycleState state)
Definition ExecutionContextBase.h:1036
bool isOneOfCurrentState(RTC::LifeCycleState state)
Definition ExecutionContextBase.h:1044
void invokeWorkerPreDo()
Definition ExecutionContextBase.h:1054
CORBA::Boolean isRunning()
ExecutionContext 実行状態確認関数
void setProperties(coil::Properties &props)
Propertiesをセットする
virtual ~ExecutionContextBase()
仮想デストラクタ
virtual RTC::ReturnCode_t onStarting()
Definition ExecutionContextBase.h:1062
virtual RTC::ReturnCode_t onStarted()
Definition ExecutionContextBase.h:1063
RTC::ReturnCode_t addComponent(RTC::LightweightRTObject_ptr comp)
RTコンポーネントを追加する
virtual RTC::ReturnCode_t stop()
ExecutionContext の実行を停止
virtual RTC::ExecutionContextProfile * onGetProfile(RTC::ExecutionContextProfile *&profile)
Definition ExecutionContextBase.h:1152
virtual RTC::LifeCycleState onGetComponentState(RTC::LifeCycleState state)
Definition ExecutionContextBase.h:1142
std::chrono::nanoseconds m_deactivationTimeout
Definition ExecutionContextBase.h:1196
virtual RTC::ReturnCode_t onStopped()
Definition ExecutionContextBase.h:1065
RTC::ExecutionContextProfile * getProfile()
Profileを取得する
bool isAllNextState(RTC::LifeCycleState state)
Definition ExecutionContextBase.h:1040
virtual RTC::ReturnCode_t onResetting(RTC::LightweightRTObject_ptr)
Definition ExecutionContextBase.h:1126
virtual double onGetRate(double rate) const
Definition ExecutionContextBase.h:1068
double getRate() const
ExecutionContext の実行周期(Hz)を取得する
const RTC::ExecutionContextProfile & getProfile() const
Profileを取得する
virtual RTC::ReturnCode_t onAddedComponent(RTC::LightweightRTObject_ptr)
Definition ExecutionContextBase.h:1079
RTC::ReturnCode_t start()
ExecutionContext の実行を開始
static const char * getStateString(RTC::LifeCycleState state)
virtual RTC::ReturnCode_t onWaitingDeactivated(RTC_impl::RTObjectStateMachine *, long int)
Definition ExecutionContextBase.h:1117
RTC::LifeCycleState getComponentState(RTC::LightweightRTObject_ptr comp)
RTコンポーネントの状態を取得する
virtual RTC::ReturnCode_t bindComponent(RTC::RTObject_impl *rtc)
コンポーネントをバインドする。
void invokeWorker()
Definition ExecutionContextBase.h:1053
virtual RTC::ReturnCode_t onAddingComponent(RTC::LightweightRTObject_ptr)
Definition ExecutionContextBase.h:1074
RTC_impl::ExecutionContextWorker m_worker
Definition ExecutionContextBase.h:1192
bool m_syncActivation
Definition ExecutionContextBase.h:1199
virtual RTC::ReturnCode_t onSetRate(double)
Definition ExecutionContextBase.h:1070
virtual RTC::ReturnCode_t onReset(RTC_impl::RTObjectStateMachine *, long int)
Definition ExecutionContextBase.h:1136
std::chrono::nanoseconds m_activationTimeout
Definition ExecutionContextBase.h:1195
RTC::ReturnCode_t deactivateComponent(RTC::LightweightRTObject_ptr comp)
RTコンポーネントを非アクティブ化する
void invokeWorkerPostDo()
Definition ExecutionContextBase.h:1056
virtual double onSettingRate(double rate)
Definition ExecutionContextBase.h:1069
virtual RTC::ExecutionKind onGetKind(RTC::ExecutionKind kind) const
Definition ExecutionContextBase.h:1147
virtual RTC::ReturnCode_t onRemovingComponent(RTC::LightweightRTObject_ptr)
Definition ExecutionContextBase.h:1084
bool m_syncDeactivation
Definition ExecutionContextBase.h:1200
bool isOneOfNextState(RTC::LifeCycleState state)
Definition ExecutionContextBase.h:1048
RTC::ReturnCode_t setOwner(RTC::LightweightRTObject_ptr comp)
Ownerコンポーネントをセットする。
RTC::ReturnCode_t resetComponent(RTC::LightweightRTObject_ptr comp)
RTコンポーネントをリセットする
virtual bool onIsRunning(bool running)
Definition ExecutionContextBase.h:1061
virtual void init(coil::Properties &props)
ExecutionContextの初期化を行う
std::chrono::nanoseconds m_resetTimeout
Definition ExecutionContextBase.h:1197
virtual RTC::ReturnCode_t onWaitingActivated(RTC_impl::RTObjectStateMachine *, long int)
Definition ExecutionContextBase.h:1101
virtual RTC::ReturnCode_t onDeactivated(RTC_impl::RTObjectStateMachine *, long int)
Definition ExecutionContextBase.h:1122
virtual RTC::ReturnCode_t onDeactivating(RTC::LightweightRTObject_ptr)
Definition ExecutionContextBase.h:1112
void setObjRef(RTC::ExecutionContextService_ptr ec_ptr)
CORBA オブジェクト参照の取得
virtual RTC::ReturnCode_t onRemovedComponent(RTC::LightweightRTObject_ptr)
Definition ExecutionContextBase.h:1089
RTC::ReturnCode_t setKind(RTC::ExecutionKind kind)
ExecutionKind を設定する
virtual RTC::ReturnCode_t onStopping()
Definition ExecutionContextBase.h:1064
RTC::ExecutionContextService_ptr getObjRef() const
CORBA オブジェクト参照の取得
virtual RTC::ReturnCode_t onActivating(RTC::LightweightRTObject_ptr)
Definition ExecutionContextBase.h:1096
void invokeWorkerDo()
Definition ExecutionContextBase.h:1055
ExecutionContextBase(const char *name)
コンストラクタ
virtual RTC::ReturnCode_t onWaitingReset(RTC_impl::RTObjectStateMachine *, long int)
Definition ExecutionContextBase.h:1131
bool m_syncReset
Definition ExecutionContextBase.h:1201
Logger クラス
Definition SystemLogger.h:101
RTコンポーネントクラス
Definition RTObject.h:93
ExecutionContextProfile クラス
Definition ExecutionContextProfile.h:51
ExecutionContextWorker クラス
Definition ExecutionContextWorker.h:112
bool isAllNextState(RTC::LifeCycleState state)
bool isAllCurrentState(RTC::LifeCycleState state)
void invokeWorkerPostDo()
bool isOneOfNextState(RTC::LifeCycleState state)
bool isOneOfCurrentState(RTC::LifeCycleState state)
Definition RTObjectStateMachine.h:43
coil::GlobalFactory< ExecutionContextBase > ExecutionContextFactory
Definition ExecutionContextBase.h:1204
Definition DefaultPeriodicTask.h:24