34 #ifndef __RTT_ROSCLOCK_RTT_ROSCLOCK_SIM_CLOCK_ACTIVITY_MANAGER_H 35 #define __RTT_ROSCLOCK_RTT_ROSCLOCK_SIM_CLOCK_ACTIVITY_MANAGER_H 46 class SimClockActivity;
92 static boost::weak_ptr<SimClockActivityManager>
singleton;
106 #endif // ifndef __RTT_ROSCLOCK_RTT_ROSCLOCK_SIM_CLOCK_ACTIVITY_MANAGER_H
void operator=(SimClockActivityManager const &)
static boost::shared_ptr< SimClockActivityManager > Instance()
Get an instance of the singleton.
static boost::weak_ptr< SimClockActivityManager > singleton
SimClockActivityManager singleton.
SimClockActivityManager()
The SimClockActivityManager is a singleton and is constructed by calling Instance() ...
~SimClockActivityManager()
void setSimulationPeriod(RTT::Seconds s)
RTT::os::Mutex modify_activities_mutex_
Mutex used to exclude adding and removing activities from the update to all activities.
void add(SimClockActivity *activity)
Add an activity to the manager.
static boost::shared_ptr< SimClockActivityManager > GetInstance()
Get an instance of the singleton if it exists, null pointer otherwise.
A centralized list of all TaskContexts using SimClockActivity.
RTT::Seconds getSimulationPeriod() const
std::list< SimClockActivity * > activities_
All existing SimClockActivities.
void update()
Execute all activities modulo their desired periods.
RTT::Seconds simulation_period_
The desired/expected simulation period.