OpenDaVINCI  4.16.0
odcore::base::module::InterruptibleModule Class Referenceabstract

#include <InterruptibleModule.h>

Inheritance diagram for odcore::base::module::InterruptibleModule:
Inheritance graph

Public Member Functions

virtual ~InterruptibleModule ()
 
void setBreakpoint (Breakpoint *bp)
 
virtual
odcore::data::dmcp::ModuleExitCodeMessage::ModuleExitCode 
runModule ()=0
 
void setModuleState (const odcore::data::dmcp::ModuleStateMessage::ModuleState &s)
 
odcore::data::dmcp::ModuleStateMessage::ModuleState getModuleState ()
 
odcore::data::dmcp::ModuleStateMessage::ModuleState getModuleStateAndWaitForRemainingTimeInTimeslice ()
 
virtual void waitForNextFullSecond (const uint32_t &secondsIncrement)=0
 

Static Public Member Functions

static vector< AbstractModule * > & getListOfModules ()
 

Protected Member Functions

 InterruptibleModule ()
 
virtual void wait ()
 

Detailed Description

This class is the first derivate of AbstractModule allowing interuption.

Constructor & Destructor Documentation

odcore::base::module::InterruptibleModule::InterruptibleModule ( )
protected

Constructor for any module.

odcore::base::module::InterruptibleModule::~InterruptibleModule ( )
virtual

Member Function Documentation

vector< AbstractModule * > & odcore::base::module::AbstractModule::getListOfModules ( )
staticinherited

This method returns the list of created modules for this class. This method can be used to broadcast signals to all instances.

Referenced by odcore::base::module::finalize(), odcore::base::module::signalHandler(), and odcore::base::module::AbstractModule::~AbstractModule().

odcore::data::dmcp::ModuleStateMessage::ModuleState odcore::base::module::AbstractModule::getModuleState ( )
inherited

This method returns the module MODULE_STATE.

Returns
Module MODULE_STATE.

Referenced by odcore::base::module::AbstractModule::getModuleStateAndWaitForRemainingTimeInTimeslice().

odcore::data::dmcp::ModuleStateMessage::ModuleState odcore::base::module::AbstractModule::getModuleStateAndWaitForRemainingTimeInTimeslice ( )
inherited

This method returns the module MODULE_STATE and suspends the execution of the calling thread for the rest of the current time slice.

Returns
Module MODULE_STATE.

References odcore::base::module::AbstractModule::calledGetModuleState(), and odcore::base::module::AbstractModule::getModuleState().

Referenced by odcontext::base::RuntimeControl::run().

virtual odcore::data::dmcp::ModuleExitCodeMessage::ModuleExitCode odcore::base::module::InterruptibleModule::runModule ( )
pure virtual

This method executes the application body.

Implemented in odcore::base::module::MasterModule, and odcore::base::module::ClientModule.

void odcore::base::module::InterruptibleModule::setBreakpoint ( Breakpoint bp)
void odcore::base::module::AbstractModule::setModuleState ( const odcore::data::dmcp::ModuleStateMessage::ModuleState &  s)
inherited

This method sets the module MODULE_STATE.

Parameters
sMODULE_STATE of the module.

Referenced by odcontext::base::TimeTriggeredConferenceClientModuleRunner::beforeStop(), odcontext::base::RuntimeControl::run(), and odcore::base::module::signalHandler().

void odcore::base::module::AbstractModule::wait ( )
protectedvirtualinherited

This method is called to enforce a specific frequency.

References odcore::base::Thread::usleepFor().

Referenced by odcore::base::module::AbstractModule::calledGetModuleState().

virtual void odcore::base::module::AbstractModule::waitForNextFullSecond ( const uint32_t &  secondsIncrement)
pure virtualinherited

This method suspends the execution of this thread to the next full second.

Parameters
secondsIncrementFrom the current point in time, for how many full seconds shall we wait?

Implemented in odcore::base::module::AbstractCIDModule.