The PortSource collects data from a source port and caches the most recent Bottle of data.
More...
|
| PortSource (std::string name, std::string pp) |
| Default constructor.
|
|
| ~PortSource () |
| Default destructor.
|
|
virtual void | initPort (std::string prefix) |
| Opens the first free incoming port with the given prefix.
|
|
virtual void | connect (std::string dst) |
| Connects the incoming port to the specified port.
|
|
virtual void | update () |
| Reads new data from the port and caches it locally.
|
|
virtual Bottle & | getData () |
| Returns the locally cached data.
|
|
virtual void | interrupt () |
| Interrupts the port.
|
|
virtual void | close () |
| Closes the port.
|
|
|
std::string | getInputName (std::string prefix) |
| Returns the first free port given a prefix appended by an integer.
|
|
| PortSource (const PortSource &other) |
| Copy constructor (private and unimplemented on purpose).
|
|
PortSource & | operator= (const PortSource &other) |
| Assignment operator (private and unimplemented on purpose).
|
|
|
Bottle | data |
| Cached data.
|
|
Port | port |
| The port for incoming data.
|
|
The PortSource collects data from a source port and caches the most recent Bottle of data.
Definition at line 81 of file merge.cpp.
◆ PortSource() [1/2]
iCub::learningmachine::merge::PortSource::PortSource |
( |
const PortSource & |
other | ) |
|
|
protected |
Copy constructor (private and unimplemented on purpose).
◆ PortSource() [2/2]
iCub::learningmachine::merge::PortSource::PortSource |
( |
std::string |
name, |
|
|
std::string |
pp |
|
) |
| |
|
inline |
Default constructor.
Definition at line 124 of file merge.cpp.
◆ ~PortSource()
iCub::learningmachine::merge::PortSource::~PortSource |
( |
| ) |
|
|
inline |
Default destructor.
Definition at line 131 of file merge.cpp.
◆ close()
virtual void iCub::learningmachine::merge::PortSource::close |
( |
| ) |
|
|
inlinevirtual |
◆ connect()
virtual void iCub::learningmachine::merge::PortSource::connect |
( |
std::string |
dst | ) |
|
|
inlinevirtual |
Connects the incoming port to the specified port.
- Parameters
-
Definition at line 148 of file merge.cpp.
◆ getData()
virtual Bottle & iCub::learningmachine::merge::PortSource::getData |
( |
| ) |
|
|
inlinevirtual |
Returns the locally cached data.
- Returns
- a reference to the locally stored bottle
Definition at line 167 of file merge.cpp.
◆ getInputName()
std::string iCub::learningmachine::merge::PortSource::getInputName |
( |
std::string |
prefix | ) |
|
|
inlineprotected |
Returns the first free port given a prefix appended by an integer.
- Parameters
-
prefix | the prefix for the port. |
- Returns
- the string for the first available portname given the prefix
Definition at line 99 of file merge.cpp.
◆ initPort()
virtual void iCub::learningmachine::merge::PortSource::initPort |
( |
std::string |
prefix | ) |
|
|
inlinevirtual |
Opens the first free incoming port with the given prefix.
- Parameters
-
prefix | the prefix for the name |
Definition at line 140 of file merge.cpp.
◆ interrupt()
virtual void iCub::learningmachine::merge::PortSource::interrupt |
( |
| ) |
|
|
inlinevirtual |
Interrupts the port.
Definition at line 174 of file merge.cpp.
◆ operator=()
Assignment operator (private and unimplemented on purpose).
◆ update()
virtual void iCub::learningmachine::merge::PortSource::update |
( |
| ) |
|
|
inlinevirtual |
Reads new data from the port and caches it locally.
Definition at line 159 of file merge.cpp.
◆ data
Bottle iCub::learningmachine::merge::PortSource::data |
|
protected |
◆ port
Port iCub::learningmachine::merge::PortSource::port |
|
protected |
The port for incoming data.
Definition at line 91 of file merge.cpp.
The documentation for this class was generated from the following file:
- icub-main/src/modules/learningMachine/src/bin/merge.cpp