Public Member Functions | List of all members
RTT::extras::SimulationActivity Class Reference

A SimulationActivity is a PeriodicActivity which is used for simulation. More...

#include <SimulationActivity.hpp>

Inheritance diagram for RTT::extras::SimulationActivity:
Inheritance graph
[legend]

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::ThreadInterfacethread ()
 
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 RunnableInterfacegetRunner () const
 
virtual bool run (RunnableInterface *r)
 
virtual ~ActivityInterface ()
 

Additional Inherited Members

- Public Types inherited from RTT::base::ActivityInterface
typedef boost::shared_ptr< ActivityInterfaceshared_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
RunnableInterfacerunner
 

Detailed Description

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'.

Note
The period is fixed by the SimulationThread, which runs all SimulationActivities at the same period.

Definition at line 59 of file SimulationActivity.hpp.

Constructor & Destructor Documentation

RTT::SimulationActivity::SimulationActivity ( Seconds  period,
base::RunnableInterface r = 0 
)

Construct a SimulationActivity with a periodicity period Seconds

Note
period is ignored.

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

Note
s and ns are ignored.

Definition at line 51 of file SimulationActivity.cpp.

RTT::SimulationActivity::~SimulationActivity ( )
virtual

Destroys this instance. The Activity is stopped.

Definition at line 56 of file SimulationActivity.cpp.

Member Function Documentation

bool RTT::SimulationActivity::execute ( )
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.

bool RTT::SimulationActivity::start ( )
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.

os::ThreadInterface * RTT::SimulationActivity::thread ( )
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.


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


rtt
Author(s): RTT Developers
autogenerated on Fri Oct 25 2019 03:59:46