Public Types | Public Member Functions
micros_rtt::ChannelElement< M > Class Template Reference

#include <channel_element.hpp>

Inheritance diagram for micros_rtt::ChannelElement< M >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef boost::call_traits< M >
::param_type 
param_t
typedef boost::call_traits< M >
::reference 
reference_t
typedef boost::intrusive_ptr
< ChannelElement< M > > 
shared_ptr
typedef M value_t

Public Member Functions

virtual bool data_sample (param_t sample)
virtual value_t data_sample ()
shared_ptr getInput ()
shared_ptr getOutput ()
virtual FlowStatus read (reference_t sample, bool copy_old_data)
virtual bool write (param_t sample)

Detailed Description

template<typename M>
class micros_rtt::ChannelElement< M >

A typed version of ChannelElementBase. It defines generic methods that are type-specific (like write and read)

Definition at line 34 of file channel_element.hpp.


Member Typedef Documentation

template<typename M>
typedef boost::call_traits<M>::param_type micros_rtt::ChannelElement< M >::param_t

Reimplemented in micros_rtt::ChannelDataElement< T >.

Definition at line 39 of file channel_element.hpp.

template<typename M>
typedef boost::call_traits<M>::reference micros_rtt::ChannelElement< M >::reference_t

Reimplemented in micros_rtt::ChannelDataElement< T >.

Definition at line 40 of file channel_element.hpp.

template<typename M>
typedef boost::intrusive_ptr< ChannelElement<M> > micros_rtt::ChannelElement< M >::shared_ptr

Reimplemented from micros_rtt::ChannelElementBase.

Definition at line 38 of file channel_element.hpp.

template<typename M>
typedef M micros_rtt::ChannelElement< M >::value_t

Definition at line 37 of file channel_element.hpp.


Member Function Documentation

template<typename M>
virtual bool micros_rtt::ChannelElement< M >::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.

Definition at line 60 of file channel_element.hpp.

template<typename M>
virtual value_t micros_rtt::ChannelElement< M >::data_sample ( ) [inline, virtual]

Reimplemented in micros_rtt::ChannelDataElement< T >.

Definition at line 70 of file channel_element.hpp.

template<typename M>
shared_ptr micros_rtt::ChannelElement< M >::getInput ( ) [inline]

Returns the current input channel element. This will only return a valid channel element if another element has received this object as an argument to setOutput().

Returns:

Reimplemented from micros_rtt::ChannelElementBase.

Definition at line 47 of file channel_element.hpp.

template<typename M>
shared_ptr micros_rtt::ChannelElement< M >::getOutput ( ) [inline]

Returns the next channel element in the channel's propagation direction

Reimplemented from micros_rtt::ChannelElementBase.

Definition at line 42 of file channel_element.hpp.

template<typename M>
virtual FlowStatus micros_rtt::ChannelElement< M >::read ( reference_t  sample,
bool  copy_old_data 
) [inline, virtual]

Reads a sample from the connection. sample is a reference which will get updated if a sample is available. The method returns true if a sample was available, and false otherwise. If false is returned, then sample is not modified by the method

Definition at line 100 of file channel_element.hpp.

template<typename M>
virtual bool micros_rtt::ChannelElement< M >::write ( param_t  sample) [inline, virtual]

Writes a new sample on this connection. sample is the sample to write.

Returns:
false if an error occured that requires the channel to be invalidated. In no ways it indicates that the sample has been received by the other side of the channel.

Definition at line 85 of file channel_element.hpp.


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


micros_rtt
Author(s): Zaile Jiang , Xiaodong Yi , Minglong Li
autogenerated on Sat Jun 8 2019 19:02:21