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

#include <ChannelDataElement.hpp>

Inheritance diagram for RTT::internal::ChannelDataElement< 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

 ChannelDataElement (typename base::DataObjectInterface< T >::shared_ptr sample, const ConnPolicy &policy=ConnPolicy())
 
virtual void clear ()
 
virtual WriteStatus data_sample (param_t sample, bool reset=true)
 
virtual value_t data_sample ()
 
virtual const ConnPolicygetConnPolicy () const
 
virtual std::string getElementName () const
 
virtual FlowStatus read (reference_t sample, bool copy_old_data)
 
virtual WriteStatus write (param_t sample)
 
- 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 ()
 

Private Attributes

base::DataObjectInterface< T >::shared_ptr data
 
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::ChannelDataElement< T >

A connection element that stores a single data sample

Definition at line 51 of file ChannelDataElement.hpp.

Member Typedef Documentation

Definition at line 58 of file ChannelDataElement.hpp.

Definition at line 59 of file ChannelDataElement.hpp.

Definition at line 57 of file ChannelDataElement.hpp.

Constructor & Destructor Documentation

template<typename T>
RTT::internal::ChannelDataElement< T >::ChannelDataElement ( typename base::DataObjectInterface< T >::shared_ptr  sample,
const ConnPolicy policy = ConnPolicy() 
)
inline

Definition at line 61 of file ChannelDataElement.hpp.

Member Function Documentation

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

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

Reimplemented from RTT::base::ChannelElementBase.

Definition at line 84 of file ChannelDataElement.hpp.

template<typename T>
virtual WriteStatus RTT::internal::ChannelDataElement< 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 90 of file ChannelDataElement.hpp.

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

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

Definition at line 96 of file ChannelDataElement.hpp.

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

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

Reimplemented from RTT::base::ChannelElementBase.

Definition at line 103 of file ChannelDataElement.hpp.

template<typename T>
virtual std::string RTT::internal::ChannelDataElement< 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 108 of file ChannelDataElement.hpp.

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

Reads the last sample given to write()

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

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

Definition at line 76 of file ChannelDataElement.hpp.

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

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

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

Definition at line 66 of file ChannelDataElement.hpp.

Member Data Documentation

template<typename T>
base::DataObjectInterface<T>::shared_ptr RTT::internal::ChannelDataElement< T >::data
private

Definition at line 53 of file ChannelDataElement.hpp.

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

Definition at line 54 of file ChannelDataElement.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