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 56 of file rtt_rosclock_sim_clock_activity_manager.h.
SimClockActivityManager::~SimClockActivityManager | ( | ) |
Definition at line 69 of file rtt_rosclock_sim_clock_activity_manager.cpp.
|
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.
|
protected |
The SimClockActivityManager is a singleton and is constructed by calling Instance()
|
private |
Add an activity to the manager.
Definition at line 100 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 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.
|
static |
Get an instance of the singleton.
Definition at line 52 of file rtt_rosclock_sim_clock_activity_manager.cpp.
|
protected |
|
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.
|
friend |
Only SimClockActivities can add or remove themselves.
Definition at line 82 of file rtt_rosclock_sim_clock_activity_manager.h.
|
private |
All existing SimClockActivities.
Definition at line 98 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 95 of file rtt_rosclock_sim_clock_activity_manager.h.
|
private |
The desired/expected simulation period.
Definition at line 101 of file rtt_rosclock_sim_clock_activity_manager.h.
|
staticprivate |
SimClockActivityManager singleton.
Definition at line 92 of file rtt_rosclock_sim_clock_activity_manager.h.