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

#include <ChannelBufferElement.hpp>

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

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 Types inherited from RTT::base::ChannelElement< T >
typedef boost::call_traits< T >::param_type param_t
 
typedef boost::call_traits< T >::reference reference_t
 
typedef boost::intrusive_ptr< ChannelElement< T > > shared_ptr
 
typedef T value_t
 
- Public Types inherited from RTT::base::ChannelElementBase
typedef boost::intrusive_ptr< ChannelElementBaseshared_ptr
 

Public Member Functions

 ChannelBufferElement (typename base::BufferInterface< T >::shared_ptr buffer, const ConnPolicy &policy=ConnPolicy())
 
virtual void clear ()
 
virtual WriteStatus data_sample (param_t sample, bool reset=true)
 
virtual value_t data_sample ()
 
virtual size_t getBufferFillSize () const
 
virtual size_t getBufferSize () const
 
virtual const ConnPolicygetConnPolicy () const
 
virtual std::string getElementName () const
 
virtual size_t getNumDroppedSamples () const
 
virtual FlowStatus read (reference_t sample, bool copy_old_data)
 
virtual WriteStatus write (param_t sample)
 
virtual ~ChannelBufferElement ()
 
- Public Member Functions inherited from RTT::base::ChannelElement< T >
shared_ptr getInput ()
 
shared_ptr getOutput ()
 
- Public Member Functions inherited from RTT::base::ChannelElementBase
 ChannelElementBase ()
 
virtual bool channelReady (ChannelElementBase::shared_ptr const &caller, ConnPolicy const &policy, internal::ConnID *conn_id=0)
 
virtual bool connected ()
 
virtual bool connectFrom (ChannelElementBase::shared_ptr const &input)
 
virtual bool connectTo (ChannelElementBase::shared_ptr const &output, bool mandatory=true)
 
virtual void disconnect (bool forward)
 
virtual bool disconnect (ChannelElementBase::shared_ptr const &channel, bool forward)
 
shared_ptr getInput ()
 
virtual shared_ptr getInputEndPoint ()
 
virtual std::string getLocalURI () const
 
shared_ptr getOutput ()
 
virtual shared_ptr getOutputEndPoint ()
 
virtual PortInterfacegetPort () const
 
virtual std::string getRemoteURI () const
 
virtual bool inputReady (ChannelElementBase::shared_ptr const &caller)
 
virtual bool isRemoteElement () const
 
template<typename T >
ChannelElement< T > * narrow ()
 
RTT_DEPRECATED void setInput (const ChannelElementBase::shared_ptr &input)
 
RTT_DEPRECATED void setOutput (const ChannelElementBase::shared_ptr &output)
 
virtual bool signal ()
 
virtual bool signalFrom (ChannelElementBase *)
 
virtual ~ChannelElementBase ()
 
- Public Member Functions inherited from RTT::internal::ChannelBufferElementBase
virtual ~ChannelBufferElementBase ()
 

Private Attributes

base::BufferInterface< T >::shared_ptr buffer
 
base::ChannelElement< T >::value_tlast_sample_p
 
const ConnPolicy policy
 

Additional Inherited Members

- Static Public Member Functions inherited from RTT::base::ChannelElementBase
template<typename T >
static ChannelElement< T > * narrow (ChannelElementBase *e)
 
- Protected Member Functions inherited from RTT::base::ChannelElementBase
virtual bool addInput (shared_ptr const &input)
 
virtual bool addOutput (shared_ptr const &output, bool mandatory=true)
 
void deref ()
 
void ref ()
 
virtual void removeInput (shared_ptr const &input)
 
virtual void removeOutput (shared_ptr const &output)
 
- Protected Attributes inherited from RTT::base::ChannelElementBase
shared_ptr input
 
RTT::os::SharedMutex input_lock
 
shared_ptr output
 
RTT::os::SharedMutex output_lock
 

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 60 of file ChannelBufferElement.hpp.

Member Typedef Documentation

Definition at line 68 of file ChannelBufferElement.hpp.

Definition at line 69 of file ChannelBufferElement.hpp.

Definition at line 67 of file ChannelBufferElement.hpp.

Constructor & Destructor Documentation

template<typename T>
RTT::internal::ChannelBufferElement< T >::ChannelBufferElement ( typename base::BufferInterface< T >::shared_ptr  buffer,
const ConnPolicy policy = ConnPolicy() 
)
inline

Definition at line 71 of file ChannelBufferElement.hpp.

template<typename T>
virtual RTT::internal::ChannelBufferElement< T >::~ChannelBufferElement ( )
inlinevirtual

Definition at line 74 of file ChannelBufferElement.hpp.

Member Function Documentation

template<typename T>
virtual void RTT::internal::ChannelBufferElement< T >::clear ( )
inlinevirtual

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 140 of file ChannelBufferElement.hpp.

template<typename T>
virtual WriteStatus RTT::internal::ChannelBufferElement< T >::data_sample ( param_t  sample,
bool  reset = true 
)
inlinevirtual

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 149 of file ChannelBufferElement.hpp.

template<typename T>
virtual value_t RTT::internal::ChannelBufferElement< T >::data_sample ( )
inlinevirtual

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

Definition at line 155 of file ChannelBufferElement.hpp.

template<typename T>
virtual size_t RTT::internal::ChannelBufferElement< T >::getBufferFillSize ( ) const
inlinevirtual

Implements RTT::internal::ChannelBufferElementBase.

Definition at line 85 of file ChannelBufferElement.hpp.

template<typename T>
virtual size_t RTT::internal::ChannelBufferElement< T >::getBufferSize ( ) const
inlinevirtual

Implements RTT::internal::ChannelBufferElementBase.

Definition at line 80 of file ChannelBufferElement.hpp.

template<typename T>
virtual const ConnPolicy* RTT::internal::ChannelBufferElement< T >::getConnPolicy ( ) const
inlinevirtual

Returns a pointer to the ConnPolicy that has been used to construct the underlying buffer.

Reimplemented from RTT::base::ChannelElementBase.

Definition at line 162 of file ChannelBufferElement.hpp.

template<typename T>
virtual std::string RTT::internal::ChannelBufferElement< T >::getElementName ( ) const
inlinevirtual

Returns the class name of this element. This is primary useful for special case handling in the connection tracking.

Returns
The name of the class of the ChannelElement

Reimplemented from RTT::base::ChannelElementBase.

Definition at line 167 of file ChannelBufferElement.hpp.

template<typename T>
virtual size_t RTT::internal::ChannelBufferElement< T >::getNumDroppedSamples ( ) const
inlinevirtual

Implements RTT::internal::ChannelBufferElementBase.

Definition at line 90 of file ChannelBufferElement.hpp.

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

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 109 of file ChannelBufferElement.hpp.

template<typename T>
virtual WriteStatus RTT::internal::ChannelBufferElement< T >::write ( param_t  sample)
inlinevirtual

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 99 of file ChannelBufferElement.hpp.

Member Data Documentation

template<typename T>
base::BufferInterface<T>::shared_ptr RTT::internal::ChannelBufferElement< T >::buffer
private

Definition at line 62 of file ChannelBufferElement.hpp.

template<typename T>
base::ChannelElement<T>::value_t* RTT::internal::ChannelBufferElement< T >::last_sample_p
private

Definition at line 63 of file ChannelBufferElement.hpp.

template<typename T>
const ConnPolicy RTT::internal::ChannelBufferElement< T >::policy
private

Definition at line 64 of file ChannelBufferElement.hpp.


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


rtt
Author(s): RTT Developers
autogenerated on Fri Oct 25 2019 03:59:46