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< SimClockActivityManager > | GetInstance () |
Get an instance of the singleton if it exists, null pointer otherwise. More... | |
static boost::shared_ptr< SimClockActivityManager > | Instance () |
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< SimClockActivityManager > | singleton |
SimClockActivityManager singleton. More... | |
Friends | |
class | SimClockActivity |
Only SimClockActivities can add or remove themselves. More... | |
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.
SimClockActivityManager::~SimClockActivityManager | ( | ) |
Definition at line 76 of file rtt_rosclock_sim_clock_activity_manager.cpp.
|
protected |
The SimClockActivityManager is a singleton and is constructed by calling Instance()
Definition at line 71 of file rtt_rosclock_sim_clock_activity_manager.cpp.
|
protected |
The SimClockActivityManager is a singleton and is constructed by calling Instance()
|
private |
Add an activity to the manager.
Definition at line 107 of file rtt_rosclock_sim_clock_activity_manager.cpp.
|
static |
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.
RTT::Seconds SimClockActivityManager::getSimulationPeriod | ( | ) | const |
Definition at line 80 of file rtt_rosclock_sim_clock_activity_manager.cpp.
|
static |
Get an instance of the singleton.
Definition at line 59 of file rtt_rosclock_sim_clock_activity_manager.cpp.
|
protected |
|
private |
Remove an activity from the manager.
Definition at line 116 of file rtt_rosclock_sim_clock_activity_manager.cpp.
void SimClockActivityManager::setSimulationPeriod | ( | RTT::Seconds | s | ) |
Definition at line 85 of file rtt_rosclock_sim_clock_activity_manager.cpp.
void SimClockActivityManager::update | ( | ) |
Execute all activities modulo their desired periods.
Definition at line 90 of file rtt_rosclock_sim_clock_activity_manager.cpp.
|
friend |
Only SimClockActivities can add or remove themselves.
Definition at line 89 of file rtt_rosclock_sim_clock_activity_manager.h.
|
private |
All existing SimClockActivities.
Definition at line 105 of file rtt_rosclock_sim_clock_activity_manager.h.
|
private |
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.
|
private |
The desired/expected simulation period.
Definition at line 108 of file rtt_rosclock_sim_clock_activity_manager.h.
|
staticprivate |
SimClockActivityManager singleton.
Definition at line 99 of file rtt_rosclock_sim_clock_activity_manager.h.