CCA
|
#include <InputPort.h>
Public Types | |
typedef ::boost::shared_ptr < DATATYPE > | DataPtr |
Defines a shared pointer for the data-type of this port. | |
typedef ::boost::shared_ptr < InputPort< DATATYPE > > | Ptr |
Defines a shared pointer for this typed port. | |
typedef Buffer< DATATYPE >::Ptr | BufferPtr |
Public Member Functions | |
virtual void | configureSpecifics () |
Configure. | |
InputPort (bool optional=false) | |
Protected constructor. | |
virtual DataPtr | get () throw () |
Returns the latest item of the buffer. | |
virtual void | addEvent (rsb::EventPtr item) |
Add a new item to the buffer. | |
virtual void | add (DataPtr item) |
Add a new item to the buffer. | |
virtual bool | empty () const |
Returns, if buffer is empty. | |
virtual bool | newItem () const |
Returns, if buffer is empty. | |
virtual unsigned int | size () const |
Returns number of buffered items. | |
virtual void | purge () |
Purging buffer, emptying all items letting the configuration untouched. | |
virtual std::string | print () const |
Printing information about this Port. | |
virtual std::string | bla () const |
virtual | ~InputPort () |
Static Public Member Functions | |
static Ptr | create () |
Creates a shared pointer to a new typed port. | |
Protected Member Functions | |
InputPort (InputPort &port) | |
Copy constructor Copy constructor private for now to disallow copying. | |
void | operator= (const InputPort &port) |
Copy operator Copy operator private for now to disallow copying. | |
Protected Attributes | |
BufferPtr | buffer |
Buffer for incoming data of type DATATYPE. | |
rsc::logging::LoggerPtr | logger |
Detailed Description
template<typename DATATYPE>
class cca::InputPort< DATATYPE >
InputPort base class.
Definition at line 169 of file InputPort.h.
Member Typedef Documentation
typedef Buffer<DATATYPE>::Ptr cca::InputPort< DATATYPE >::BufferPtr |
Definition at line 179 of file InputPort.h.
typedef ::boost::shared_ptr<DATATYPE> cca::InputPort< DATATYPE >::DataPtr |
Defines a shared pointer for the data-type of this port.
Reimplemented from cca::Buffering< DATATYPE >.
Definition at line 174 of file InputPort.h.
typedef ::boost::shared_ptr<InputPort<DATATYPE> > cca::InputPort< DATATYPE >::Ptr |
Defines a shared pointer for this typed port.
Definition at line 177 of file InputPort.h.
Constructor & Destructor Documentation
cca::InputPort< DATATYPE >::InputPort | ( | bool | optional = false | ) | [inline] |
Protected constructor.
- Todo:
- Better handling of exception, when rsb transport for the selected InputPort type is not available.
Definition at line 217 of file InputPort.h.
virtual cca::InputPort< DATATYPE >::~InputPort | ( | ) | [inline, virtual] |
Definition at line 302 of file InputPort.h.
cca::InputPort< DATATYPE >::InputPort | ( | InputPort< DATATYPE > & | port | ) | [protected] |
Copy constructor Copy constructor private for now to disallow copying.
Member Function Documentation
virtual void cca::InputPort< DATATYPE >::add | ( | DataPtr | item | ) | [inline, virtual] |
Add a new item to the buffer.
Implements cca::Buffering< DATATYPE >.
Definition at line 247 of file InputPort.h.
virtual void cca::InputPort< DATATYPE >::addEvent | ( | rsb::EventPtr | item | ) | [inline, virtual] |
Add a new item to the buffer.
Definition at line 238 of file InputPort.h.
virtual std::string cca::InputPort< DATATYPE >::bla | ( | ) | const [inline, virtual] |
Definition at line 296 of file InputPort.h.
virtual void cca::InputPort< DATATYPE >::configureSpecifics | ( | ) | [inline, virtual] |
Configure.
Reimplemented from cca::InputPortBase.
Definition at line 193 of file InputPort.h.
Referenced by cca::InputPort< DTOTYPE >::configureSpecifics().
static Ptr cca::InputPort< DATATYPE >::create | ( | ) | [inline, static] |
Creates a shared pointer to a new typed port.
- Returns:
- Shared pointer to a new typed port.
Definition at line 186 of file InputPort.h.
virtual bool cca::InputPort< DATATYPE >::empty | ( | ) | const [inline, 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.
Implements cca::Buffering< DATATYPE >.
Definition at line 254 of file InputPort.h.
Referenced by cca::Splitter< DTOTYPE >::onProcess().
virtual DataPtr cca::InputPort< DATATYPE >::get | ( | ) | throw () [inline, virtual] |
Returns the latest item of the buffer.
- Returns:
- Latest item of the buffer.
Implements cca::Buffering< DATATYPE >.
Definition at line 228 of file InputPort.h.
Referenced by cca::Component::beatCallback(), and cca::Splitter< DTOTYPE >::onProcess().
virtual bool cca::InputPort< DATATYPE >::newItem | ( | ) | const [inline, 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.
Implements cca::Buffering< DATATYPE >.
Definition at line 261 of file InputPort.h.
void cca::InputPort< DATATYPE >::operator= | ( | const InputPort< DATATYPE > & | port | ) | [protected] |
Copy operator Copy operator private for now to disallow copying.
virtual std::string cca::InputPort< DATATYPE >::print | ( | ) | const [inline, virtual] |
Printing information about this Port.
Implements cca::Port.
Definition at line 281 of file InputPort.h.
Referenced by cca::ComponentInfo::displayBeatPort(), and cca::ComponentInfo::displayStatePorts().
virtual void cca::InputPort< DATATYPE >::purge | ( | ) | [inline, virtual] |
Purging buffer, emptying all items letting the configuration untouched.
Implements cca::Buffering< DATATYPE >.
Definition at line 275 of file InputPort.h.
virtual unsigned int cca::InputPort< DATATYPE >::size | ( | ) | const [inline, 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.
Implements cca::Buffering< DATATYPE >.
Definition at line 268 of file InputPort.h.
Member Data Documentation
BufferPtr cca::InputPort< DATATYPE >::buffer [protected] |
Buffer for incoming data of type DATATYPE.
Definition at line 320 of file InputPort.h.
Referenced by cca::InputPort< DTOTYPE >::add(), cca::InputPort< DTOTYPE >::addEvent(), cca::InputPort< DTOTYPE >::configureSpecifics(), cca::InputPort< DTOTYPE >::empty(), cca::InputPort< DTOTYPE >::get(), cca::InputPort< DTOTYPE >::newItem(), cca::InputPort< DTOTYPE >::purge(), and cca::InputPort< DTOTYPE >::size().
rsc::logging::LoggerPtr cca::InputPort< DATATYPE >::logger [protected] |
Reimplemented from cca::InputPortBase.
Definition at line 321 of file InputPort.h.
Referenced by cca::InputPort< DTOTYPE >::add(), and cca::InputPort< DTOTYPE >::configureSpecifics().
The documentation for this class was generated from the following file:
- cca/port/InputPort.h