Safe DDS
eprosima::safedds::execution::ISpinnable Interface Referenceabstract

Any entity that implements this interface is able to spin, meaning that this entity needs to do a periodic synchronization action. More...

#include <ISpinnable.hpp>

Public Member Functions

virtual void spin (const TimePoint &timepoint) noexcept=0
 Secuential synchronization interface. More...
 
virtual bool has_pending_work () const noexcept=0
 Check if the entity has pending work. More...
 
virtual TimePoint get_next_work_timepoint () const noexcept=0
 Get next work timepoint. More...
 

Protected Member Functions

 ~ISpinnable () noexcept=default
 Protected destructor ownership defined on creation. More...
 
 ISpinnable () noexcept=default
 Default creation. More...
 
 ISpinnable (const ISpinnable &) noexcept=default
 Copy allowed. More...
 
 ISpinnable (ISpinnable &&) noexcept=default
 Movement allowed. More...
 
ISpinnableoperator= (const ISpinnable &) noexcept=default
 Copy operator allowed. More...
 
ISpinnableoperator= (ISpinnable &&) noexcept=default
 Movement operator allowed. More...
 

Detailed Description

Any entity that implements this interface is able to spin, meaning that this entity needs to do a periodic synchronization action.

Constructor & Destructor Documentation

◆ ~ISpinnable()

eprosima::safedds::execution::ISpinnable::~ISpinnable ( )
protecteddefaultnoexcept

Protected destructor ownership defined on creation.

◆ ISpinnable() [1/3]

eprosima::safedds::execution::ISpinnable::ISpinnable ( )
protecteddefaultnoexcept

Default creation.

◆ ISpinnable() [2/3]

eprosima::safedds::execution::ISpinnable::ISpinnable ( const ISpinnable )
protecteddefaultnoexcept

Copy allowed.

◆ ISpinnable() [3/3]

eprosima::safedds::execution::ISpinnable::ISpinnable ( ISpinnable &&  )
protecteddefaultnoexcept

Movement allowed.

Member Function Documentation

◆ get_next_work_timepoint()

virtual TimePoint eprosima::safedds::execution::ISpinnable::get_next_work_timepoint ( ) const
pure virtualnoexcept

◆ has_pending_work()

virtual bool eprosima::safedds::execution::ISpinnable::has_pending_work ( ) const
pure virtualnoexcept

Check if the entity has pending work.

Returns
bool.

Implemented in eprosima::safedds::transport::posix::UDPv4, and eprosima::safedds::execution::BasicExecutor.

◆ operator=() [1/2]

ISpinnable& eprosima::safedds::execution::ISpinnable::operator= ( const ISpinnable )
protecteddefaultnoexcept

Copy operator allowed.

Returns
ISpinnable&

◆ operator=() [2/2]

ISpinnable& eprosima::safedds::execution::ISpinnable::operator= ( ISpinnable &&  )
protecteddefaultnoexcept

Movement operator allowed.

Returns
ISpinnable&

◆ spin()

virtual void eprosima::safedds::execution::ISpinnable::spin ( const TimePoint timepoint)
pure virtualnoexcept

Secuential synchronization interface.

Note
This method is called by the execution context to perform actions on the entity. The entity is expected to perform some of the work that is pending up to the given timepoint. And can return before the given timepoint even with pending work.
Parameters
timepointexpiration execution deadline.

Implemented in eprosima::safedds::transport::posix::UDPv4, and eprosima::safedds::execution::BasicExecutor.


The documentation for this interface was generated from the following file: