Public Types | Public Member Functions | Private Attributes
hpcl_rtt::ChannelDataElement< T > Class Template Reference

#include <channel_data_element.hpp>

Inheritance diagram for hpcl_rtt::ChannelDataElement< T >:
Inheritance graph
[legend]

List of all members.

Public Types

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

Public Member Functions

 ChannelDataElement (typename DataObjectLockFree< T >::shared_ptr sample)
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)

Private Attributes

DataObjectLockFree< T >::shared_ptr data
bool mread
bool written

Detailed Description

template<typename T>
class hpcl_rtt::ChannelDataElement< T >

A connection element that stores a single data sample

Definition at line 12 of file channel_data_element.hpp.


Member Typedef Documentation

template<typename T>
typedef ChannelElement<T>::param_t hpcl_rtt::ChannelDataElement< T >::param_t

Reimplemented from hpcl_rtt::ChannelElement< T >.

Definition at line 18 of file channel_data_element.hpp.

template<typename T>
typedef ChannelElement<T>::reference_t hpcl_rtt::ChannelDataElement< T >::reference_t

Reimplemented from hpcl_rtt::ChannelElement< T >.

Definition at line 19 of file channel_data_element.hpp.


Constructor & Destructor Documentation

template<typename T>
hpcl_rtt::ChannelDataElement< T >::ChannelDataElement ( typename DataObjectLockFree< T >::shared_ptr  sample) [inline]

Definition at line 21 of file channel_data_element.hpp.


Member Function Documentation

template<typename T>
virtual void hpcl_rtt::ChannelDataElement< T >::clear ( ) [inline, virtual]

Resets the stored sample. After clear() has been called, read() returns false

Reimplemented from hpcl_rtt::ChannelElementBase.

Definition at line 59 of file channel_data_element.hpp.

template<typename T>
virtual bool hpcl_rtt::ChannelDataElement< 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 hpcl_rtt::ChannelElement< T >.

Definition at line 66 of file channel_data_element.hpp.

template<typename T>
virtual T hpcl_rtt::ChannelDataElement< T >::data_sample ( ) [inline, virtual]

Reimplemented from hpcl_rtt::ChannelElement< T >.

Definition at line 72 of file channel_data_element.hpp.

template<typename T>
virtual FlowStatus hpcl_rtt::ChannelDataElement< T >::read ( reference_t  sample,
bool  copy_old_data 
) [inline, virtual]

Reads the last sample given to write()

Returns:
false if no sample has ever been written, true otherwise

Reimplemented from hpcl_rtt::ChannelElement< T >.

Definition at line 38 of file channel_data_element.hpp.

template<typename T>
virtual bool hpcl_rtt::ChannelDataElement< T >::write ( param_t  sample) [inline, virtual]

Update the data sample stored in this element. It always returns true.

Reimplemented from hpcl_rtt::ChannelElement< T >.

Definition at line 26 of file channel_data_element.hpp.


Member Data Documentation

template<typename T>
DataObjectLockFree<T>::shared_ptr hpcl_rtt::ChannelDataElement< T >::data [private]

Definition at line 15 of file channel_data_element.hpp.

template<typename T>
bool hpcl_rtt::ChannelDataElement< T >::mread [private]

Definition at line 14 of file channel_data_element.hpp.

template<typename T>
bool hpcl_rtt::ChannelDataElement< T >::written [private]

Definition at line 14 of file channel_data_element.hpp.


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


hpcl_rtt
Author(s): sukha
autogenerated on Thu Aug 27 2015 16:43:53