8 #ifndef OPENDDS_DCPS_SPORADIC_TASK_H 9 #define OPENDDS_DCPS_SPORADIC_TASK_H 55 "(%P|%t) ERROR: SporadicTask::schedule: " 56 "failed to receive ReactorInterceptor handle\n"));
76 "(%P|%t) ERROR: SporadicTask::cancel: " 77 "failed to receive ReactorInterceptor handle\n"));
117 if ((!desired_scheduled_ && timer_id_ != -1) ||
118 (desired_scheduled_ && timer_id_ != -1 && desired_next_time_ != actual_next_time_)) {
123 if (desired_scheduled_ && timer_id_ == -1) {
125 if (timer_id_ == -1) {
128 "(%P|%t) ERROR: SporadicTask::execute_i: " 129 "failed to schedule timer %p\n",
""));
144 desired_scheduled_ =
false;
152 template <
typename Delegate>
162 , delegate_(delegate)
163 , function_(function)
174 ((*handle).*function_)(now);
RcHandle< T > rchandle_from(T *pointer)
int handle_timeout(const ACE_Time_Value &tv, const void *)
WeakRcHandle< SporadicTask > sporadic_task_
MonotonicTimePoint actual_next_time_
RcHandle< SporadicCommand > sporadic_command_
CommandPtr execute_or_enqueue(CommandPtr command)
void execute(const MonotonicTimePoint &now)
const ACE_Time_Value & value() const
MonotonicTimePoint desired_next_time_
WeakRcHandle< ReactorInterceptor > interceptor_
void schedule(const TimeDuration &delay)
virtual void reactor(ACE_Reactor *reactor)
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)
virtual MonotonicTimePoint monotonic_time_point_now() const
virtual void execute(const MonotonicTimePoint &now)=0
virtual ACE_Reactor * reactor(void) const
SporadicTask(const TimeSource &time_source, RcHandle< ReactorInterceptor > interceptor)
const ACE_Reactor * reactor() const
SporadicCommand(WeakRcHandle< SporadicTask > sporadic_task)
TimeDuration desired_delay_
OpenDDS_Dcps_Export LogLevel log_level
WeakRcHandle< Delegate > delegate_
virtual int cancel_timer(long timer_id, const void **arg=0, int dont_call_handle_close=1)
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
const TimeSource & time_source_
RcHandle< T > lock() const
#define TheServiceParticipant
The Internal API and Implementation of OpenDDS.
PmfSporadicTask(const TimeSource &time_source, RcHandle< ReactorInterceptor > interceptor, RcHandle< Delegate > delegate, PMF function)