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 >::param_t 
param_t
typedef base::ChannelElement
< T >::reference_t 
reference_t
typedef base::ChannelElement
< T >::reference_t 
reference_t
typedef base::ChannelElement
< T >::value_t 
value_t
typedef base::ChannelElement
< T >::value_t 
value_t

Public Member Functions

 ChannelBufferElement (typename base::BufferInterface< T >::shared_ptr buffer)
 ChannelBufferElement (typename base::BufferInterface< T >::shared_ptr buffer)
virtual void clear ()
virtual void clear ()
virtual bool data_sample (param_t sample)
virtual bool data_sample (param_t sample)
virtual FlowStatus read (reference_t sample, bool copy_old_data)
virtual FlowStatus read (reference_t sample, bool copy_old_data)
virtual bool write (param_t sample)
virtual bool write (param_t sample)
virtual ~ChannelBufferElement ()
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 install/include/rtt/internal/ChannelBufferElement.hpp.


Member Typedef Documentation

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

Definition at line 55 of file rtt/internal/ChannelBufferElement.hpp.

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

Definition at line 56 of file rtt/internal/ChannelBufferElement.hpp.

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

Definition at line 57 of file rtt/internal/ChannelBufferElement.hpp.


Constructor & Destructor Documentation

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

Definition at line 59 of file rtt/internal/ChannelBufferElement.hpp.

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

Definition at line 62 of file rtt/internal/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 rtt/internal/ChannelBufferElement.hpp.

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 install/include/rtt/internal/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 rtt/internal/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 install/include/rtt/internal/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 rtt/internal/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 install/include/rtt/internal/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 rtt/internal/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 install/include/rtt/internal/ChannelBufferElement.hpp.


Member Data Documentation

template<typename T >
base::BufferInterface< T >::shared_ptr RTT::internal::ChannelBufferElement< T >::buffer [private]
template<typename T >
base::ChannelElement< T >::value_t * RTT::internal::ChannelBufferElement< T >::last_sample_p [private]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Jan 11 09:49:58 2013