8 #ifndef OPENDDS_DCPS_PERIODIC_TASK_H 9 #define OPENDDS_DCPS_PERIODIC_TASK_H 96 periodic_task->disable_i();
120 " failed to schedule timer %p\n",
ACE_TEXT(
"")));
124 }
else if (reenable) {
140 template <
typename Delegate>
147 , delegate_(delegate)
148 , function_(function) {}
158 ((*handle).*function_)(now);
RcHandle< T > rchandle_from(T *pointer)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
WeakRcHandle< Delegate > delegate_
CommandPtr execute_or_enqueue(CommandPtr command)
const ACE_Time_Value & value() const
WeakRcHandle< PeriodicTask > const periodic_task_
virtual void execute(const MonotonicTimePoint &now)=0
const TimeDuration period_
PeriodicTask(RcHandle< ReactorInterceptor > interceptor)
PmfPeriodicTask(RcHandle< ReactorInterceptor > interceptor, const Delegate &delegate, PMF function)
WeakRcHandle< PeriodicTask > const periodic_task_
ScheduleEnableCommand(WeakRcHandle< PeriodicTask > hb, bool reenable, const TimeDuration &period)
virtual void reactor(ACE_Reactor *reactor)
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
virtual long schedule_timer(ACE_Event_Handler *event_handler, const void *arg, const ACE_Time_Value &delay, const ACE_Time_Value &interval=ACE_Time_Value::zero)
WeakRcHandle< ReactorInterceptor > interceptor_
virtual ACE_Reactor * reactor(void) const
ScheduleDisableCommand(WeakRcHandle< PeriodicTask > hb)
const ACE_Reactor * reactor() const
int handle_timeout(const ACE_Time_Value &tv, const void *)
void enable(bool reenable, const TimeDuration &period)
virtual int cancel_timer(long timer_id, const void **arg=0, int dont_call_handle_close=1)
static const ACE_Time_Value zero
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
RcHandle< T > lock() const
#define TheServiceParticipant
void enable_i(bool reenable, const TimeDuration &per)
The Internal API and Implementation of OpenDDS.
void execute(const MonotonicTimePoint &now)