Public Types | Public Member Functions | Private Attributes
RTT::internal::ChannelBufferElement< T > Class Template Reference

#include <ChannelBufferElement.hpp>

Inheritance diagram for RTT::internal::ChannelBufferElement< T >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef base::ChannelElement
< T >::param_t 
param_t
typedef base::ChannelElement
< T >::reference_t 
reference_t
typedef base::ChannelElement
< T >::value_t 
value_t

Public Member Functions

 ChannelBufferElement (typename base::BufferInterface< T >::shared_ptr buffer)
virtual void clear ()
virtual bool data_sample (param_t sample)
virtual T data_sample ()
virtual FlowStatus read (reference_t sample, bool copy_old_data)
virtual bool write (param_t sample)
virtual ~ChannelBufferElement ()

Private Attributes

base::BufferInterface< T >
::shared_ptr 
buffer
base::ChannelElement< T >
::value_t
last_sample_p

Detailed Description

template<typename T>
class RTT::internal::ChannelBufferElement< T >

A connection element that can store a fixed number of data samples.

Definition at line 50 of file ChannelBufferElement.hpp.


Member Typedef Documentation

Reimplemented from RTT::base::ChannelElement< T >.

Definition at line 55 of file ChannelBufferElement.hpp.

Reimplemented from RTT::base::ChannelElement< T >.

Definition at line 56 of file ChannelBufferElement.hpp.

Reimplemented from RTT::base::ChannelElement< T >.

Definition at line 57 of file ChannelBufferElement.hpp.


Constructor & Destructor Documentation

template<typename T >
RTT::internal::ChannelBufferElement< T >::ChannelBufferElement ( typename base::BufferInterface< T >::shared_ptr  buffer) [inline]

Definition at line 59 of file ChannelBufferElement.hpp.

template<typename T >
virtual RTT::internal::ChannelBufferElement< T >::~ChannelBufferElement ( ) [inline, virtual]

Definition at line 62 of file ChannelBufferElement.hpp.


Member Function Documentation

template<typename T >
virtual void RTT::internal::ChannelBufferElement< T >::clear ( ) [inline, virtual]

Removes all elements in the FIFO. After a call to clear(), read() will always return false (provided write() has not been called in the meantime).

Reimplemented from RTT::base::ChannelElementBase.

Definition at line 106 of file ChannelBufferElement.hpp.

template<typename T >
virtual bool RTT::internal::ChannelBufferElement< T >::data_sample ( param_t  sample) [inline, virtual]

Provides a data sample to initialize this connection. This is used before the first write() in order to inform this connection of the size of the data. As such enough storage space can be allocated before the actual writing begins.

Returns:
false if an error occured that requires the channel to be invalidated.

Reimplemented from RTT::base::ChannelElement< T >.

Definition at line 115 of file ChannelBufferElement.hpp.

template<typename T >
virtual T RTT::internal::ChannelBufferElement< T >::data_sample ( ) [inline, virtual]

Reimplemented from RTT::base::ChannelElement< T >.

Definition at line 121 of file ChannelBufferElement.hpp.

template<typename T >
virtual FlowStatus RTT::internal::ChannelBufferElement< T >::read ( reference_t  sample,
bool  copy_old_data 
) [inline, virtual]

Pops and returns the first element of the FIFO

Returns:
false if the FIFO was empty, and true otherwise

Reimplemented from RTT::base::ChannelElement< T >.

Definition at line 83 of file ChannelBufferElement.hpp.

template<typename T >
virtual bool RTT::internal::ChannelBufferElement< T >::write ( param_t  sample) [inline, virtual]

Appends a sample at the end of the FIFO

Returns:
true if there was room in the FIFO for the new sample, and false otherwise.

Reimplemented from RTT::base::ChannelElement< T >.

Definition at line 72 of file ChannelBufferElement.hpp.


Member Data Documentation

Definition at line 52 of file ChannelBufferElement.hpp.

Definition at line 53 of file ChannelBufferElement.hpp.


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


rtt
Author(s): RTT Developers
autogenerated on Wed Aug 26 2015 16:16:24