CCA
|
#include <InputPort.h>
Classes | |
class | InputHandler |
Public Member Functions | |
InputPortBase (bool optional=false, const std::string &datatype="unknown") | |
Protected constructor. | |
virtual void | configureSpecifics () |
virtual void | setHandler (::rsb::HandlerPtr handler) |
virtual void | purge ()=0 |
Purge all items from input port buffer. | |
virtual bool | empty () const =0 |
Returns, if buffer is empty. | |
virtual bool | newItem () const =0 |
Returns, if buffer is empty. | |
virtual unsigned int | size () const =0 |
Returns number of buffered items. | |
virtual | ~InputPortBase () |
Protected Member Functions | |
InputPortBase (InputPortBase &port) | |
Copy constructor Copy constructor private for now to disallow copying. | |
void | operator= (const InputPortBase &port) |
Copy operator Copy operator private for now to disallow copying. | |
Protected Attributes | |
boost::shared_ptr< InputHandler > | handler |
::rsb::ListenerPtr | listener |
RSB Listener. | |
rsc::logging::LoggerPtr | logger |
Detailed Description
InputPort base class.
Definition at line 48 of file InputPort.h.
Constructor & Destructor Documentation
cca::InputPortBase::InputPortBase | ( | bool | optional = false , |
const std::string & | datatype = "unknown" |
||
) |
Protected constructor.
- Parameters:
-
datatype (Optional) Port type for debugging information
- Todo:
- Better handling of exception, when rsb transport for the selected InputPort type is not avaiable.
Definition at line 46 of file InputPort.cpp.
cca::InputPortBase::~InputPortBase | ( | ) | [virtual] |
Definition at line 51 of file InputPort.cpp.
cca::InputPortBase::InputPortBase | ( | InputPortBase & | port | ) | [protected] |
Copy constructor Copy constructor private for now to disallow copying.
Member Function Documentation
void cca::InputPortBase::configureSpecifics | ( | ) | [virtual] |
- Returns:
Implements cca::Port.
Reimplemented in cca::InputPort< DATATYPE >, cca::InputPort< ComponentState >, cca::InputPort< cca::timing::Tick >, and cca::InputPort< DTOTYPE >.
Definition at line 57 of file InputPort.cpp.
References cca::Port::config, handler, listener, and logger.
virtual bool cca::InputPortBase::empty | ( | ) | const [pure virtual] |
Returns, if buffer is empty.
If buffer is configured to always keep the latest item, this is only the case until first item arrived. This method should be implemented fast, because its heavily frequented by CCA.
Implemented in cca::InputPort< DATATYPE >, cca::InputPort< ComponentState >, cca::InputPort< cca::timing::Tick >, and cca::InputPort< DTOTYPE >.
virtual bool cca::InputPortBase::newItem | ( | ) | const [pure virtual] |
Returns, if buffer is empty.
If buffer is configured to always keep the latest item, this is only the case until first item arrived. This method should be implemented fast, because its heavily frequented by CCA.
Implemented in cca::InputPort< DATATYPE >, cca::InputPort< ComponentState >, cca::InputPort< cca::timing::Tick >, and cca::InputPort< DTOTYPE >.
void cca::InputPortBase::operator= | ( | const InputPortBase & | port | ) | [protected] |
Copy operator Copy operator private for now to disallow copying.
virtual void cca::InputPortBase::purge | ( | ) | [pure virtual] |
Purge all items from input port buffer.
Implemented in cca::InputPort< DATATYPE >, cca::InputPort< ComponentState >, cca::InputPort< cca::timing::Tick >, and cca::InputPort< DTOTYPE >.
void cca::InputPortBase::setHandler | ( | ::rsb::HandlerPtr | handler | ) | [virtual] |
- Returns:
Definition at line 70 of file InputPort.cpp.
References handler.
Referenced by cca::Component::createBeatInputPort(), and cca::Component::createStateInputPort().
virtual unsigned int cca::InputPortBase::size | ( | ) | const [pure virtual] |
Returns number of buffered items.
(NOT including the kept item if keepLatest active. This method should be implemented fast, because its heavily frequented by CCA.
Implemented in cca::InputPort< DATATYPE >, cca::InputPort< ComponentState >, cca::InputPort< cca::timing::Tick >, and cca::InputPort< DTOTYPE >.
Member Data Documentation
boost::shared_ptr<InputHandler> cca::InputPortBase::handler [protected] |
Definition at line 146 of file InputPort.h.
Referenced by configureSpecifics(), cca::InputPort< DTOTYPE >::configureSpecifics(), setHandler(), and ~InputPortBase().
::rsb::ListenerPtr cca::InputPortBase::listener [protected] |
RSB Listener.
Definition at line 161 of file InputPort.h.
Referenced by configureSpecifics(), and ~InputPortBase().
rsc::logging::LoggerPtr cca::InputPortBase::logger [protected] |
Reimplemented in cca::InputPort< DATATYPE >, cca::InputPort< ComponentState >, cca::InputPort< cca::timing::Tick >, and cca::InputPort< DTOTYPE >.
Definition at line 162 of file InputPort.h.
Referenced by configureSpecifics().
The documentation for this class was generated from the following files:
- cca/port/InputPort.h
- cca/port/InputPort.cpp