Public Types | Public Member Functions | List of all members
RTT::base::ChannelElement< T > Class Template Reference

#include <ChannelElement.hpp>

Inheritance diagram for RTT::base::ChannelElement< T >:
Inheritance graph
[legend]

Public Types

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

virtual WriteStatus data_sample (param_t sample, bool reset=true)
 
virtual value_t data_sample ()
 
shared_ptr getInput ()
 
shared_ptr getOutput ()
 
virtual FlowStatus read (reference_t sample, bool copy_old_data=true)
 
virtual WriteStatus write (param_t sample)
 
- 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 void clear ()
 
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)
 
virtual const ConnPolicygetConnPolicy () const
 
virtual std::string getElementName () const
 
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 ()
 

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::base::ChannelElement< T >

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

Definition at line 58 of file ChannelElement.hpp.

Member Typedef Documentation

template<typename T>
typedef boost::call_traits<T>::param_type RTT::base::ChannelElement< T >::param_t

Definition at line 63 of file ChannelElement.hpp.

template<typename T>
typedef boost::call_traits<T>::reference RTT::base::ChannelElement< T >::reference_t

Definition at line 64 of file ChannelElement.hpp.

template<typename T>
typedef boost::intrusive_ptr< ChannelElement<T> > RTT::base::ChannelElement< T >::shared_ptr

Definition at line 61 of file ChannelElement.hpp.

template<typename T>
typedef T RTT::base::ChannelElement< T >::value_t

Definition at line 62 of file ChannelElement.hpp.

Member Function Documentation

template<typename T>
virtual WriteStatus RTT::base::ChannelElement< 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 in RTT::base::MultipleOutputsChannelElement< T >, RTT::internal::SharedConnection< T >, RTT::internal::ChannelBufferElement< T >, and RTT::internal::ChannelDataElement< T >.

Definition at line 84 of file ChannelElement.hpp.

template<typename T>
virtual value_t RTT::base::ChannelElement< T >::data_sample ( )
inlinevirtual
template<typename T>
shared_ptr RTT::base::ChannelElement< T >::getInput ( )
inline

Definition at line 71 of file ChannelElement.hpp.

template<typename T>
shared_ptr RTT::base::ChannelElement< T >::getOutput ( )
inline

Definition at line 66 of file ChannelElement.hpp.

template<typename T>
virtual FlowStatus RTT::base::ChannelElement< T >::read ( reference_t  sample,
bool  copy_old_data = true 
)
inlinevirtual

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

Reimplemented in RTT::internal::SharedConnection< T >, RTT::base::MultipleInputsChannelElement< T >, RTT::internal::ChannelBufferElement< T >, and RTT::internal::ChannelDataElement< T >.

Definition at line 118 of file ChannelElement.hpp.

template<typename T>
virtual WriteStatus RTT::base::ChannelElement< T >::write ( param_t  sample)
inlinevirtual

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.

Reimplemented in RTT::base::MultipleOutputsChannelElement< T >, RTT::internal::SharedConnection< T >, RTT::internal::ConnOutputEndpoint< T >, RTT::internal::ConnOutputEndpoint< double >, RTT::internal::ConnOutputEndpoint< int >, RTT::internal::ConnOutputEndpoint< bool >, RTT::internal::ChannelBufferElement< T >, and RTT::internal::ChannelDataElement< T >.

Definition at line 105 of file ChannelElement.hpp.


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


rtt
Author(s): RTT Developers
autogenerated on Tue Jun 25 2019 19:33:42