OpenRTM-aist 2.0.2
Loading...
Searching...
No Matches
RTC_exp::MultilayerCompositeEC Class Reference

MultilayerCompositeEC class. More...

#include <MultilayerCompositeEC.h>

Inheritance diagram for RTC_exp::MultilayerCompositeEC:
Collaboration diagram for RTC_exp::MultilayerCompositeEC:

Classes

class  ChildTask
 

Public Member Functions

 MultilayerCompositeEC ()
 Default Constructor.
 
 ~MultilayerCompositeEC () override
 Destructor.
 
void init (coil::Properties &props) override
 Initialize the ExecutionContext.
 
int svc () override
 Thread execution function for ExecutionContext.
 
RTC::ReturnCode_t bindComponent (RTC::RTObject_impl *rtc) override
 Bind the component.
 
virtual RTC_impl::RTObjectStateMachinefindComponent (RTC::LightweightRTObject_ptr comp)
 
virtual void addTask (std::vector< RTC::LightweightRTObject_ptr > rtcs)
 
- Public Member Functions inherited from RTC_exp::PeriodicExecutionContext
 PeriodicExecutionContext ()
 Default Constructor.
 
 ~PeriodicExecutionContext () override
 Destructor.
 
void init (coil::Properties &props) override
 Initialize the ExecutionContext.
 
int open (void *args) override
 Generate internal activity thread for ExecutionContext.
 
int svc () override
 Thread execution function for ExecutionContext.
 
int close (unsigned long flags) override
 Thread execution function for ExecutionContext.
 
CORBA::Boolean is_running () override
 Check for ExecutionContext running state.
 
RTC::ReturnCode_t start () override
 Start the ExecutionContext.
 
RTC::ReturnCode_t stop () override
 Stop the ExecutionContext.
 
CORBA::Double get_rate () override
 Get execution rate(Hz) of ExecutionContext.
 
RTC::ReturnCode_t set_rate (CORBA::Double rate) override
 Set execution rate(Hz) of ExecutionContext.
 
RTC::ReturnCode_t activate_component (RTC::LightweightRTObject_ptr comp) override
 Activate an RT-component.
 
RTC::ReturnCode_t deactivate_component (RTC::LightweightRTObject_ptr comp) override
 Deactivate an RT-component.
 
RTC::ReturnCode_t reset_component (RTC::LightweightRTObject_ptr comp) override
 Reset the RT-component.
 
RTC::LifeCycleState get_component_state (RTC::LightweightRTObject_ptr comp) override
 Get RT-component's state.
 
RTC::ExecutionKind get_kind () override
 Get the ExecutionKind.
 
RTC::ReturnCode_t add_component (RTC::LightweightRTObject_ptr comp) override
 Add an RT-component.
 
RTC::ReturnCode_t remove_component (RTC::LightweightRTObject_ptr comp) override
 Remove the RT-Component from participant list.
 
RTC::ExecutionContextProfile * get_profile () override
 Get the ExecutionContextProfile.
 
- Public Member Functions inherited from RTC::ExecutionContextBase
 ExecutionContextBase (const char *name)
 Constructor.
 
virtual ~ExecutionContextBase ()
 Virtual Destructor.
 
CORBA::Boolean isRunning ()
 Check for ExecutionContext running state.
 
RTC::ReturnCode_t start ()
 Start the ExecutionContext.
 
double getRate () const
 Get execution rate(Hz) of ExecutionContext.
 
std::chrono::nanoseconds getPeriod () const
 
RTC::ReturnCode_t setRate (double rate)
 Set execution rate(Hz) of ExecutionContext.
 
RTC::ReturnCode_t addComponent (RTC::LightweightRTObject_ptr comp)
 Add an RT-component.
 
RTC::ReturnCode_t removeComponent (RTC::LightweightRTObject_ptr comp)
 Remove the RT-Component from participant list.
 
RTC::ReturnCode_t activateComponent (RTC::LightweightRTObject_ptr comp)
 Activate an RT-component.
 
RTC::ReturnCode_t deactivateComponent (RTC::LightweightRTObject_ptr comp)
 Deactivate an RT-component.
 
RTC::ReturnCode_t resetComponent (RTC::LightweightRTObject_ptr comp)
 Reset the RT-component.
 
RTC::LifeCycleState getComponentState (RTC::LightweightRTObject_ptr comp)
 Get RT-component's state.
 
RTC::ExecutionKind getKind () const
 Get the ExecutionKind.
 
RTC::ExecutionContextProfile * getProfile ()
 Getting Profile.
 
void setObjRef (RTC::ExecutionContextService_ptr ec_ptr)
 Get the reference to the CORBA object.
 
RTC::ExecutionContextService_ptr getObjRef () const
 
RTC::ReturnCode_t setKind (RTC::ExecutionKind kind)
 Set the ExecutionKind.
 
RTC::ReturnCode_t setOwner (RTC::LightweightRTObject_ptr comp)
 Setting owner component of the execution context.
 
RTC::RTObject_ptr getOwner () const
 Getting a reference of the owner component.
 
const RTC::RTCList & getComponentList () const
 Getting participant RTC list.
 
void setProperties (coil::Properties &props)
 Setting Properties.
 
coil::Properties getProperties () const
 Setting Properties.
 
const RTC::ExecutionContextProfile & getProfile () const
 Getting Profile.
 
bool isAllCurrentState (RTC::LifeCycleState state)
 
bool isAllNextState (RTC::LifeCycleState state)
 
bool isOneOfCurrentState (RTC::LifeCycleState state)
 
bool isOneOfNextState (RTC::LifeCycleState state)
 
void invokeWorker ()
 
void invokeWorkerPreDo ()
 
void invokeWorkerDo ()
 
void invokeWorkerPostDo ()
 

Protected Member Functions

virtual void addRTCToTask (ChildTask *task, RTC::LightweightRTObject_ptr rtobj)
 
- Protected Member Functions inherited from RTC_exp::PeriodicExecutionContext
template<class T >
void getProperty (coil::Properties &prop, const char *key, T &value)
 
RTC::ReturnCode_t onStarted () override
 onStarted() template function
 
RTC::ReturnCode_t onStopping () override
 onStopping() template function
 
RTC::ReturnCode_t onAddedComponent (RTC::LightweightRTObject_ptr rtobj) override
 onAddedComponent() template function
 
RTC::ReturnCode_t onRemovedComponent (RTC::LightweightRTObject_ptr rtobj) override
 onRemovedComponent() template function
 
RTC::ReturnCode_t onWaitingActivated (RTC_impl::RTObjectStateMachine *comp, long int count) override
 onWaitingActivated() template function
 
RTC::ReturnCode_t onActivated (RTC_impl::RTObjectStateMachine *comp, long int count) override
 onActivated() template function
 
RTC::ReturnCode_t onWaitingDeactivated (RTC_impl::RTObjectStateMachine *comp, long int count) override
 onWaitingDeactivated() template function
 
RTC::ReturnCode_t onDeactivated (RTC_impl::RTObjectStateMachine *comp, long int count) override
 onDeactivated() template function
 
RTC::ReturnCode_t onWaitingReset (RTC_impl::RTObjectStateMachine *comp, long int count) override
 onWaitingReset() template function
 
RTC::ReturnCode_t onReset (RTC_impl::RTObjectStateMachine *comp, long int count) override
 onReset() template function
 
virtual void setCpuAffinity (coil::Properties &props)
 setting CPU affinity from given properties
 
bool threadRunning ()
 
- Protected Member Functions inherited from RTC::ExecutionContextBase
virtual bool onIsRunning (bool running)
 
virtual RTC::ReturnCode_t onStarting ()
 
virtual RTC::ReturnCode_t onStopped ()
 
virtual double onGetRate (double rate) const
 
virtual double onSettingRate (double rate)
 
virtual RTC::ReturnCode_t onSetRate (double)
 
virtual RTC::ReturnCode_t onAddingComponent (RTC::LightweightRTObject_ptr)
 
virtual RTC::ReturnCode_t onRemovingComponent (RTC::LightweightRTObject_ptr)
 
virtual RTC::ReturnCode_t onActivating (RTC::LightweightRTObject_ptr)
 
virtual RTC::ReturnCode_t onDeactivating (RTC::LightweightRTObject_ptr)
 
virtual RTC::ReturnCode_t onResetting (RTC::LightweightRTObject_ptr)
 
virtual RTC::LifeCycleState onGetComponentState (RTC::LifeCycleState state)
 
virtual RTC::ExecutionKind onGetKind (RTC::ExecutionKind kind) const
 
virtual RTC::ExecutionContextProfile * onGetProfile (RTC::ExecutionContextProfile *&profile)
 

Protected Attributes

std::vector< ChildTask * > m_tasklist
 
RTC_impl::RTObjectStateMachinem_ownersm {nullptr}
 
- Protected Attributes inherited from RTC_exp::PeriodicExecutionContext
RTC::Logger rtclog {"periodic_ec"}
 Logger stream .
 
bool m_svc {false}
 The thread running flag of ExecutionContext .
 
std::mutex m_svcmutex
 
WorkerThreadCtrl m_workerthread
 A condition variable for external triggered worker .
 
bool m_nowait {false}
 Flag of ExecutionContext to run immediately (to run without waiting) .
 
coil::CpuMask m_cpu
 CPU affinity mask list.
 
- Protected Attributes inherited from RTC::ExecutionContextBase
RTC::Logger rtclog
 
RTC_impl::ExecutionContextWorker m_worker
 
RTC_impl::ExecutionContextProfile m_profile
 
std::chrono::nanoseconds m_activationTimeout
 
std::chrono::nanoseconds m_deactivationTimeout
 
std::chrono::nanoseconds m_resetTimeout
 
bool m_syncActivation
 
bool m_syncDeactivation
 
bool m_syncReset
 

Additional Inherited Members

- Static Public Member Functions inherited from RTC::ExecutionContextBase
static const char * getStateString (RTC::LifeCycleState state)
 
static const char * getKindString (RTC::ExecutionKind kind)
 Converting ExecutionKind enum to string.
 

Detailed Description

MultilayerCompositeEC class.

Periodic Sampled Data Processing (for the execution cycles) ExecutionContext class

Since
0.4.0

Constructor & Destructor Documentation

◆ MultilayerCompositeEC()

RTC_exp::MultilayerCompositeEC::MultilayerCompositeEC ( )

Default Constructor.

Default Constructor Set the following items to profile.

  • kind : PERIODIC
  • rate : 0.0

◆ ~MultilayerCompositeEC()

RTC_exp::MultilayerCompositeEC::~MultilayerCompositeEC ( )
override

Destructor.

Destructor

Member Function Documentation

◆ addRTCToTask()

virtual void RTC_exp::MultilayerCompositeEC::addRTCToTask ( ChildTask * task,
RTC::LightweightRTObject_ptr rtobj )
protectedvirtual

◆ addTask()

virtual void RTC_exp::MultilayerCompositeEC::addTask ( std::vector< RTC::LightweightRTObject_ptr > rtcs)
virtual

◆ bindComponent()

RTC::ReturnCode_t RTC_exp::MultilayerCompositeEC::bindComponent ( RTC::RTObject_impl * rtc)
overridevirtual

Bind the component.

Bind the component.

Reimplemented from RTC::ExecutionContextBase.

◆ findComponent()

virtual RTC_impl::RTObjectStateMachine * RTC_exp::MultilayerCompositeEC::findComponent ( RTC::LightweightRTObject_ptr comp)
virtual

◆ init()

void RTC_exp::MultilayerCompositeEC::init ( coil::Properties & props)
overridevirtual

Initialize the ExecutionContext.

This operation initialize the ExecutionContext

Reimplemented from RTC::ExecutionContextBase.

◆ svc()

int RTC_exp::MultilayerCompositeEC::svc ( )
override

Thread execution function for ExecutionContext.

Thread execution function for ExecutionContext. Invoke the registered components operation.

Returns
The execution result

Member Data Documentation

◆ m_ownersm

RTC_impl::RTObjectStateMachine* RTC_exp::MultilayerCompositeEC::m_ownersm {nullptr}
protected

◆ m_tasklist

std::vector<ChildTask*> RTC_exp::MultilayerCompositeEC::m_tasklist
protected

The documentation for this class was generated from the following file: