OpenDDS  Snapshot(2023/04/28-20:55)
Public Member Functions | Public Attributes | List of all members
OpenDDS::DCPS::InstanceState::ScheduleCommand Struct Reference
Inheritance diagram for OpenDDS::DCPS::InstanceState::ScheduleCommand:
Inheritance graph
[legend]
Collaboration diagram for OpenDDS::DCPS::InstanceState::ScheduleCommand:
Collaboration graph
[legend]

Public Member Functions

 ScheduleCommand (InstanceState *instance_state, const TimeDuration &delay)
 
void execute ()
 
- Public Member Functions inherited from OpenDDS::DCPS::InstanceState::CommandBase
 CommandBase (InstanceState *instance_state)
 
- Public Member Functions inherited from OpenDDS::DCPS::ReactorInterceptor::Command
 Command ()
 
virtual ~Command ()
 
- Public Member Functions inherited from OpenDDS::DCPS::RcObject
virtual ~RcObject ()
 
virtual void _add_ref ()
 
virtual void _remove_ref ()
 
long ref_count () const
 
WeakObject_get_weak_object () const
 

Public Attributes

const TimeDuration delay_
 
- Public Attributes inherited from OpenDDS::DCPS::InstanceState::CommandBase
InstanceStateinstance_state_
 

Additional Inherited Members

- Protected Member Functions inherited from OpenDDS::DCPS::ReactorInterceptor::Command
const ACE_Reactorreactor () const
 
ACE_Reactorreactor ()
 
- Protected Member Functions inherited from OpenDDS::DCPS::RcObject
 RcObject ()
 

Detailed Description

Definition at line 246 of file InstanceState.h.

Constructor & Destructor Documentation

◆ ScheduleCommand()

OpenDDS::DCPS::InstanceState::ScheduleCommand::ScheduleCommand ( InstanceState instance_state,
const TimeDuration delay 
)
inline

Definition at line 247 of file InstanceState.h.

249  , delay_(delay)
250  {}
CommandBase(InstanceState *instance_state)
DDS::InstanceStateKind instance_state() const
Access instance state.

Member Function Documentation

◆ execute()

void OpenDDS::DCPS::InstanceState::ScheduleCommand::execute ( void  )
virtual

Implements OpenDDS::DCPS::ReactorInterceptor::Command.

Definition at line 328 of file InstanceState.cpp.

References ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::InstanceState::instance_state_, and LM_ERROR.

329 {
330  if (instance_state_->release_timer_id_ != -1) {
331  instance_state_->reactor()->cancel_timer(instance_state_);
332  }
333 
335  instance_state_->reactor()->schedule_timer(instance_state_, 0, delay_.value());
336 
337  if (instance_state_->release_timer_id_ == -1) {
338  ACE_ERROR((LM_ERROR,
339  ACE_TEXT("(%P|%t) ERROR: InstanceState::ScheduleCommand::execute:")
340  ACE_TEXT(" Unable to schedule timer!\n")));
341  }
342 }
#define ACE_ERROR(X)
const ACE_Time_Value & value() const
virtual void reactor(ACE_Reactor *reactor)
ACE_TEXT("TCP_Factory")

Member Data Documentation

◆ delay_

const TimeDuration OpenDDS::DCPS::InstanceState::ScheduleCommand::delay_

Definition at line 252 of file InstanceState.h.


The documentation for this struct was generated from the following files: