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

#include <ClientModule.h>

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

Public Member Functions

virtual ~ClientModule ()
 
virtual
odcore::data::dmcp::ModuleExitCodeMessage::ModuleExitCode 
runModule ()
 
const string getName () const
 
virtual float getFrequency () const
 
uint32_t getIdentifier () const
 
const string getMultiCastGroup () const
 
uint32_t getCID () const
 
bool isProfiling () const
 
bool isRealtime () const
 
uint32_t getRealtimePriority () const
 
virtual void waitForNextFullSecond (const uint32_t &secondsIncrement)
 
void setBreakpoint (Breakpoint *bp)
 
void setModuleState (const odcore::data::dmcp::ModuleStateMessage::ModuleState &s)
 
odcore::data::dmcp::ModuleStateMessage::ModuleState getModuleState ()
 
odcore::data::dmcp::ModuleStateMessage::ModuleState getModuleStateAndWaitForRemainingTimeInTimeslice ()
 

Static Public Member Functions

static bool isVerbose ()
 
static int32_t getVerbosity ()
 
static vector< AbstractModule * > & getListOfModules ()
 

Protected Member Functions

virtual void setUp ()=0
 
virtual void tearDown ()=0
 
virtual
odcore::data::dmcp::ModuleExitCodeMessage::ModuleExitCode 
body ()=0
 
const
odcore::base::KeyValueConfiguration 
getKeyValueConfiguration () const
 
std::shared_ptr
< odcore::dmcp::connection::Client > & 
getDMCPClient ()
 
virtual void handleConnectionLost ()
 
virtual void DMCPconnectionLost ()=0
 
virtual
odcore::data::dmcp::ModuleExitCodeMessage::ModuleExitCode 
runModuleImplementation ()=0
 
const
odcore::data::dmcp::ServerInformation 
getServerInformation () const
 
virtual void wait ()
 

Friends

class ManagedClientModule
 

Detailed Description

This class is the abstract superclass for every client module. For using this class, simply derive your class from ConferenceClientModule.

ConferenceClientModule

Constructor & Destructor Documentation

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

Member Function Documentation

virtual odcore::data::dmcp::ModuleExitCodeMessage::ModuleExitCode odcore::base::module::ClientModule::body ( )
protectedpure virtual
virtual void odcore::base::module::ClientModule::DMCPconnectionLost ( )
protectedpure virtual

This method is called after the connection to supercomponent is lost.

uint32_t odcore::base::module::AbstractCIDModule::getCID ( ) const
inherited

This method returns the CID.

Returns
CID.
std::shared_ptr< odcore::dmcp::connection::Client > & odcore::base::module::ClientModule::getDMCPClient ( )
protected

This method returns the std::shared_ptr for the DMCP connection.

Returns
std::shared_ptr for DMCP connection.
float odcore::base::module::AbstractCIDModule::getFrequency ( ) const
virtualinherited

This method returns the runtime frequency.

Returns
Runtime frequency.

Implements odcore::base::module::Periodic.

uint32_t odcore::base::module::AbstractCIDModule::getIdentifier ( ) const
inherited

This method returns this module's identifier as specified in the command line.

Returns
This module's identifier.
const KeyValueConfiguration odcore::base::module::ClientModule::getKeyValueConfiguration ( ) const
protected

This method returns the key/value-configuration for this client module.

Returns
Key/value-configuration.
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().

const string odcore::base::module::AbstractCIDModule::getMultiCastGroup ( ) const
inherited

This method returns the module's multicast group as specified in the command line

const string odcore::base::module::ClientModule::getName ( ) const

This method returns the module's name.

Returns
name of the module.

Referenced by odcontext::base::TimeTriggeredConferenceClientModuleRunner::step().

uint32_t odcore::base::module::AbstractCIDModule::getRealtimePriority ( ) const
inherited

This method returns the priority, if –realtime is enabled.

Returns
Scheduling priority.
const odcore::data::dmcp::ServerInformation odcore::base::module::ClientModule::getServerInformation ( ) const
protected

This method returns the ServerInformation object describing the supercomponent.

Returns
ServerInformation
int32_t odcore::base::module::AbstractCIDModule::getVerbosity ( )
staticinherited

This method returns the level of verbosity.

Returns
Level of verbosity.
void odcore::base::module::ClientModule::handleConnectionLost ( )
protectedvirtual
bool odcore::base::module::AbstractCIDModule::isProfiling ( ) const
inlineinherited

This method returns true, if –profiling is enabled.

Returns
true if profiling is enabled.
bool odcore::base::module::AbstractCIDModule::isRealtime ( ) const
inlineinherited

This method returns true, if –realtime is enabled.

Returns
true if realtime is enabled.
bool odcore::base::module::AbstractCIDModule::isVerbose ( )
staticinherited

This method returns true, if –verbose is enabled.

Returns
true if verbose.
odcore::data::dmcp::ModuleExitCodeMessage::ModuleExitCode odcore::base::module::ClientModule::runModule ( )
virtual

This method executes the application body.

Implements odcore::base::module::InterruptibleModule.

References CLOG1.

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

virtual odcore::data::dmcp::ModuleExitCodeMessage::ModuleExitCode odcore::base::module::ClientModule::runModuleImplementation ( )
protectedpure virtual

This method calls the implementation logic setUp - body - tearDown.

Returns
return status.

Implemented in odcore::base::module::ManagedClientModule.

void odcore::base::module::InterruptibleModule::setBreakpoint ( Breakpoint bp)
inherited
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().

virtual void odcore::base::module::ClientModule::setUp ( )
protectedpure virtual
virtual void odcore::base::module::ClientModule::tearDown ( )
protectedpure virtual
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().

void odcore::base::module::AbstractCIDModule::waitForNextFullSecond ( const uint32_t &  secondsIncrement)
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?

Implements odcore::base::module::AbstractModule.

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

Friends And Related Function Documentation

friend class ManagedClientModule
friend