A SimulationActivity is a PeriodicActivity which is used for simulation. More...
#include <SimulationActivity.hpp>
Public Member Functions | |
virtual bool | execute () |
SimulationActivity (Seconds period, base::RunnableInterface *r=0) | |
SimulationActivity (secs s, nsecs ns, base::RunnableInterface *r=0) | |
virtual bool | start () |
virtual os::ThreadInterface * | thread () |
virtual | ~SimulationActivity () |
Public Member Functions inherited from RTT::extras::PeriodicActivity | |
virtual void | finalize () |
virtual unsigned | getCpuAffinity () const |
virtual Seconds | getPeriod () const |
virtual bool | initialize () |
virtual bool | isActive () const |
virtual bool | isPeriodic () const |
virtual bool | isRunning () const |
PeriodicActivity (int priority, Seconds period, base::RunnableInterface *r=0) | |
Create a Periodic Activity with a given priority and period. The default scheduler for PeriodicActivity objects is ORO_SCHED_RT. More... | |
PeriodicActivity (int scheduler, int priority, Seconds period, base::RunnableInterface *r=0) | |
Create a Periodic Activity with a given scheduler type, priority and period. More... | |
PeriodicActivity (int scheduler, int priority, Seconds period, unsigned cpu_affinity, base::RunnableInterface *r=0) | |
Create a Periodic Activity with a given scheduler type, priority and period. More... | |
PeriodicActivity (TimerThreadPtr thread, base::RunnableInterface *r=0) | |
Create a Periodic Activity executing in a given thread. More... | |
PeriodicActivity (Seconds period, TimerThreadPtr thread, base::RunnableInterface *r=0) | |
Create a Periodic Activity with a given period and thread. More... | |
PeriodicActivity (secs sec, nsecs nsec, TimerThreadPtr thread, base::RunnableInterface *r=0) | |
Create a Periodic Activity with a given period and thread. More... | |
virtual bool | setCpuAffinity (unsigned cpu) |
virtual bool | setPeriod (Seconds s) |
virtual void | step () |
virtual bool | stop () |
virtual bool | timeout () |
virtual bool | trigger () |
virtual void | work (base::RunnableInterface::WorkReason reason) |
virtual | ~PeriodicActivity () |
Public Member Functions inherited from RTT::base::ActivityInterface | |
ActivityInterface () | |
ActivityInterface (RunnableInterface *run) | |
virtual RunnableInterface * | getRunner () const |
virtual bool | run (RunnableInterface *r) |
virtual | ~ActivityInterface () |
Additional Inherited Members | |
Public Types inherited from RTT::base::ActivityInterface | |
typedef boost::shared_ptr< ActivityInterface > | shared_ptr |
Protected Member Functions inherited from RTT::extras::PeriodicActivity | |
void | init () |
Protected Member Functions inherited from RTT::base::ActivityInterface | |
void | disableRun (RunnableInterface *caller) |
Protected Attributes inherited from RTT::extras::PeriodicActivity | |
bool | active |
bool | running |
TimerThreadPtr | thread_ |
Protected Attributes inherited from RTT::base::ActivityInterface | |
RunnableInterface * | runner |
A SimulationActivity is a PeriodicActivity which is used for simulation.
They all run in the same thread at the same period, which updates the the system clock such that the SimulationActivity appears to run in realtime, while it runs 'as fast as possible'.
Definition at line 59 of file SimulationActivity.hpp.
RTT::SimulationActivity::SimulationActivity | ( | Seconds | period, |
base::RunnableInterface * | r = 0 |
||
) |
Construct a SimulationActivity with a periodicity period Seconds
Definition at line 46 of file SimulationActivity.cpp.
RTT::SimulationActivity::SimulationActivity | ( | secs | s, |
nsecs | ns, | ||
base::RunnableInterface * | r = 0 |
||
) |
Construct a SimulationActivity with a periodicity of s seconds and ns nanoseconds
Definition at line 51 of file SimulationActivity.cpp.
|
virtual |
Destroys this instance. The Activity is stopped.
Definition at line 56 of file SimulationActivity.cpp.
|
virtual |
When a SimulationActivity is started, it may be executed by the user as well.
Reimplemented from RTT::extras::PeriodicActivity.
Definition at line 65 of file SimulationActivity.cpp.
|
virtual |
A simulated activity can be started also if the SimulationThread is not running yet. This allows all tasks to be set ready in advance before the whole simulation is started.
Reimplemented from RTT::extras::PeriodicActivity.
Definition at line 77 of file SimulationActivity.cpp.
|
virtual |
Returns a pointer to the thread which will run this activity. Will not be null.
Reimplemented from RTT::extras::PeriodicActivity.
Definition at line 61 of file SimulationActivity.cpp.