iCub-main
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
iCub::learningmachine::merge::MergeModule Class Reference

The MergeModule merges data from several input ports into a single output port. More...

+ Inheritance diagram for iCub::learningmachine::merge::MergeModule:

Public Member Functions

 MergeModule (std::string pp="/lm/merge")
 Constructor. More...
 
 ~MergeModule ()
 Destructor. More...
 
virtual double getPeriod ()
 
virtual bool interruptModule ()
 
virtual bool close ()
 
virtual bool configure (ResourceFinder &opt)
 
virtual bool updateModule ()
 
bool respond (const Bottle &cmd, Bottle &reply)
 
virtual void setDesiredPeriod (double p)
 Mutator for the desired period. More...
 
virtual void setFrequency (double f)
 Mutator for the desired period by means of setting the frequency. More...
 
virtual double getDesiredPeriod ()
 Accessor for the desired period. More...
 

Protected Member Functions

void printOptions (std::string error="")
 
void registerPort (Contactable &port, std::string name)
 Register a port at a specified name. More...
 
void registerAllPorts ()
 Register all ports for this module. More...
 
void unregisterAllPorts ()
 Attempts to unregister all ports used by this module. More...
 

Protected Attributes

std::string portPrefix
 Prefix for the ports. More...
 
double desiredPeriod
 Desired period of the module updates. More...
 
SourceList sourceList
 The collecting resource for all data from all sources. More...
 
DataSelectordataSelector
 A pointer to the root DataSelector. More...
 
Port output
 Output port. More...
 

Detailed Description

The MergeModule merges data from several input ports into a single output port.

Author
Arjan Gijsberts

Definition at line 688 of file merge.cpp.

Constructor & Destructor Documentation

◆ MergeModule()

iCub::learningmachine::merge::MergeModule::MergeModule ( std::string  pp = "/lm/merge")
inline

Constructor.

Definition at line 762 of file merge.cpp.

◆ ~MergeModule()

iCub::learningmachine::merge::MergeModule::~MergeModule ( )
inline

Destructor.

Definition at line 768 of file merge.cpp.

Member Function Documentation

◆ close()

virtual bool iCub::learningmachine::merge::MergeModule::close ( void  )
inlinevirtual

Definition at line 791 of file merge.cpp.

◆ configure()

virtual bool iCub::learningmachine::merge::MergeModule::configure ( ResourceFinder &  opt)
inlinevirtual

Definition at line 799 of file merge.cpp.

◆ getDesiredPeriod()

virtual double iCub::learningmachine::merge::MergeModule::getDesiredPeriod ( )
inlinevirtual

Accessor for the desired period.

Returns
the desired period in seconds

Definition at line 946 of file merge.cpp.

◆ getPeriod()

virtual double iCub::learningmachine::merge::MergeModule::getPeriod ( )
inlinevirtual

Definition at line 775 of file merge.cpp.

◆ interruptModule()

virtual bool iCub::learningmachine::merge::MergeModule::interruptModule ( )
inlinevirtual

Definition at line 782 of file merge.cpp.

◆ printOptions()

void iCub::learningmachine::merge::MergeModule::printOptions ( std::string  error = "")
inlineprotected

Definition at line 715 of file merge.cpp.

◆ registerAllPorts()

void iCub::learningmachine::merge::MergeModule::registerAllPorts ( )
inlineprotected

Register all ports for this module.

Definition at line 743 of file merge.cpp.

◆ registerPort()

void iCub::learningmachine::merge::MergeModule::registerPort ( Contactable &  port,
std::string  name 
)
inlineprotected

Register a port at a specified name.

Parameters
portthe port
namethe name
Exceptions
aruntime error if the port could not be registered

Definition at line 732 of file merge.cpp.

◆ respond()

bool iCub::learningmachine::merge::MergeModule::respond ( const Bottle &  cmd,
Bottle &  reply 
)
inline

Definition at line 870 of file merge.cpp.

◆ setDesiredPeriod()

virtual void iCub::learningmachine::merge::MergeModule::setDesiredPeriod ( double  p)
inlinevirtual

Mutator for the desired period.

Parameters
pthe desired period in seconds
Returns

Definition at line 926 of file merge.cpp.

◆ setFrequency()

virtual void iCub::learningmachine::merge::MergeModule::setFrequency ( double  f)
inlinevirtual

Mutator for the desired period by means of setting the frequency.

Parameters
fthe desired frequency
Returns

Definition at line 935 of file merge.cpp.

◆ unregisterAllPorts()

void iCub::learningmachine::merge::MergeModule::unregisterAllPorts ( )
inlineprotected

Attempts to unregister all ports used by this module.

Exceptions
aruntime error if unregistering the port fails

Definition at line 752 of file merge.cpp.

◆ updateModule()

virtual bool iCub::learningmachine::merge::MergeModule::updateModule ( )
inlinevirtual

Definition at line 850 of file merge.cpp.

Member Data Documentation

◆ dataSelector

DataSelector* iCub::learningmachine::merge::MergeModule::dataSelector
protected

A pointer to the root DataSelector.

Definition at line 708 of file merge.cpp.

◆ desiredPeriod

double iCub::learningmachine::merge::MergeModule::desiredPeriod
protected

Desired period of the module updates.

Definition at line 698 of file merge.cpp.

◆ output

Port iCub::learningmachine::merge::MergeModule::output
protected

Output port.

Definition at line 713 of file merge.cpp.

◆ portPrefix

std::string iCub::learningmachine::merge::MergeModule::portPrefix
protected

Prefix for the ports.

Definition at line 693 of file merge.cpp.

◆ sourceList

SourceList iCub::learningmachine::merge::MergeModule::sourceList
protected

The collecting resource for all data from all sources.

Definition at line 703 of file merge.cpp.


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