Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends
rtt_rosclock::SimClockActivityManager Class Reference

A centralized list of all TaskContexts using SimClockActivity. More...

#include <rtt_rosclock_sim_clock_activity_manager.h>

List of all members.

Public Member Functions

RTT::Seconds getSimulationPeriod () const
void setSimulationPeriod (RTT::Seconds s)
void update ()
 Execute all activities modulo their desired periods.
 ~SimClockActivityManager ()

Static Public Member Functions

static boost::shared_ptr
< SimClockActivityManager
GetInstance ()
 Get an instance of the singleton if it exists, null pointer otherwise.
static boost::shared_ptr
< SimClockActivityManager
Instance ()
 Get an instance of the singleton.

Protected Member Functions

void operator= (SimClockActivityManager const &)
 SimClockActivityManager ()
 The SimClockActivityManager is a singleton and is constructed by calling Instance()
 SimClockActivityManager (SimClockActivityManager const &)
 The SimClockActivityManager is a singleton and is constructed by calling Instance()

Private Member Functions

void add (SimClockActivity *activity)
 Add an activity to the manager.
void remove (SimClockActivity *activity)
 Remove an activity from the manager.

Private Attributes

std::list< SimClockActivity * > activities_
 All existing SimClockActivities.
RTT::os::Mutex modify_activities_mutex_
 Mutex used to exclude adding and removing activities from the update to all activities.
RTT::Seconds simulation_period_
 The desired/expected simulation period.

Static Private Attributes

static boost::weak_ptr
< SimClockActivityManager
singleton
 SimClockActivityManager singleton.

Friends

class SimClockActivity
 Only SimClockActivities can add or remove themselves.

Detailed Description

A centralized list of all TaskContexts using SimClockActivity.

The SimClockActivityManager is used to synchronously update all TaskContexts using a SimClockActivity. This is the primary interface to executing a set of periodic tasks in simulation.

Definition at line 63 of file rtt_rosclock_sim_clock_activity_manager.h.


Constructor & Destructor Documentation

Definition at line 76 of file rtt_rosclock_sim_clock_activity_manager.cpp.

The SimClockActivityManager is a singleton and is constructed by calling Instance()

Definition at line 71 of file rtt_rosclock_sim_clock_activity_manager.cpp.

The SimClockActivityManager is a singleton and is constructed by calling Instance()


Member Function Documentation

void SimClockActivityManager::add ( SimClockActivity activity) [private]

Add an activity to the manager.

Definition at line 107 of file rtt_rosclock_sim_clock_activity_manager.cpp.

Get an instance of the singleton if it exists, null pointer otherwise.

Definition at line 54 of file rtt_rosclock_sim_clock_activity_manager.cpp.

Definition at line 80 of file rtt_rosclock_sim_clock_activity_manager.cpp.

Get an instance of the singleton.

Definition at line 59 of file rtt_rosclock_sim_clock_activity_manager.cpp.

void rtt_rosclock::SimClockActivityManager::operator= ( SimClockActivityManager const &  ) [protected]
void SimClockActivityManager::remove ( SimClockActivity activity) [private]

Remove an activity from the manager.

Definition at line 116 of file rtt_rosclock_sim_clock_activity_manager.cpp.

Definition at line 85 of file rtt_rosclock_sim_clock_activity_manager.cpp.

Execute all activities modulo their desired periods.

Definition at line 90 of file rtt_rosclock_sim_clock_activity_manager.cpp.


Friends And Related Function Documentation

friend class SimClockActivity [friend]

Only SimClockActivities can add or remove themselves.

Definition at line 89 of file rtt_rosclock_sim_clock_activity_manager.h.


Member Data Documentation

All existing SimClockActivities.

Definition at line 105 of file rtt_rosclock_sim_clock_activity_manager.h.

Mutex used to exclude adding and removing activities from the update to all activities.

Definition at line 102 of file rtt_rosclock_sim_clock_activity_manager.h.

The desired/expected simulation period.

Definition at line 108 of file rtt_rosclock_sim_clock_activity_manager.h.

boost::weak_ptr< SimClockActivityManager > SimClockActivityManager::singleton [static, private]

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


rtt_rosclock
Author(s):
autogenerated on Wed Sep 16 2015 06:59:15