#include <channel_data_element.hpp>
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 |
A connection element that stores a single data sample
Definition at line 12 of file channel_data_element.hpp.
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.
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.
hpcl_rtt::ChannelDataElement< T >::ChannelDataElement | ( | typename DataObjectLockFree< T >::shared_ptr | sample | ) | [inline] |
Definition at line 21 of file channel_data_element.hpp.
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.
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.
Reimplemented from hpcl_rtt::ChannelElement< T >.
Definition at line 66 of file channel_data_element.hpp.
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.
virtual FlowStatus hpcl_rtt::ChannelDataElement< T >::read | ( | reference_t | sample, |
bool | copy_old_data | ||
) | [inline, virtual] |
Reads the last sample given to write()
Reimplemented from hpcl_rtt::ChannelElement< T >.
Definition at line 38 of file channel_data_element.hpp.
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.
DataObjectLockFree<T>::shared_ptr hpcl_rtt::ChannelDataElement< T >::data [private] |
Definition at line 15 of file channel_data_element.hpp.
bool hpcl_rtt::ChannelDataElement< T >::mread [private] |
Definition at line 14 of file channel_data_element.hpp.
bool hpcl_rtt::ChannelDataElement< T >::written [private] |
Definition at line 14 of file channel_data_element.hpp.