Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
rtt_rosclock::SimClockActivityManager Class Reference

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

#include <rtt_rosclock_sim_clock_activity_manager.h>

Public Member Functions

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

Static Public Member Functions

static boost::shared_ptr< SimClockActivityManagerGetInstance ()
 Get an instance of the singleton if it exists, null pointer otherwise. More...
 
static boost::shared_ptr< SimClockActivityManagerInstance ()
 Get an instance of the singleton. More...
 

Protected Member Functions

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

Private Member Functions

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

Private Attributes

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

Static Private Attributes

static boost::weak_ptr< SimClockActivityManagersingleton
 SimClockActivityManager singleton. More...
 

Friends

class SimClockActivity
 Only SimClockActivities can add or remove themselves. More...
 

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 56 of file rtt_rosclock_sim_clock_activity_manager.h.

Constructor & Destructor Documentation

SimClockActivityManager::~SimClockActivityManager ( )

Definition at line 69 of file rtt_rosclock_sim_clock_activity_manager.cpp.

SimClockActivityManager::SimClockActivityManager ( )
protected

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

Definition at line 64 of file rtt_rosclock_sim_clock_activity_manager.cpp.

rtt_rosclock::SimClockActivityManager::SimClockActivityManager ( SimClockActivityManager const &  )
protected

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 100 of file rtt_rosclock_sim_clock_activity_manager.cpp.

boost::shared_ptr< SimClockActivityManager > SimClockActivityManager::GetInstance ( )
static

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

Definition at line 47 of file rtt_rosclock_sim_clock_activity_manager.cpp.

RTT::Seconds SimClockActivityManager::getSimulationPeriod ( ) const

Definition at line 73 of file rtt_rosclock_sim_clock_activity_manager.cpp.

boost::shared_ptr< SimClockActivityManager > SimClockActivityManager::Instance ( )
static

Get an instance of the singleton.

Definition at line 52 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 109 of file rtt_rosclock_sim_clock_activity_manager.cpp.

void SimClockActivityManager::setSimulationPeriod ( RTT::Seconds  s)

Definition at line 78 of file rtt_rosclock_sim_clock_activity_manager.cpp.

void SimClockActivityManager::update ( )

Execute all activities modulo their desired periods.

Definition at line 83 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 82 of file rtt_rosclock_sim_clock_activity_manager.h.

Member Data Documentation

std::list<SimClockActivity *> rtt_rosclock::SimClockActivityManager::activities_
private

All existing SimClockActivities.

Definition at line 98 of file rtt_rosclock_sim_clock_activity_manager.h.

RTT::os::Mutex rtt_rosclock::SimClockActivityManager::modify_activities_mutex_
private

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

Definition at line 95 of file rtt_rosclock_sim_clock_activity_manager.h.

RTT::Seconds rtt_rosclock::SimClockActivityManager::simulation_period_
private

The desired/expected simulation period.

Definition at line 101 of file rtt_rosclock_sim_clock_activity_manager.h.

boost::weak_ptr< SimClockActivityManager > SimClockActivityManager::singleton
staticprivate

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


rtt_rosclock
Author(s):
autogenerated on Mon May 10 2021 02:45:33