Public Member Functions | Private Attributes | List of all members
RTT::corba::RemoteChannelElement< T > Class Template Reference

#include <RemoteChannelElement.hpp>

Inheritance diagram for RTT::corba::RemoteChannelElement< T >:
Inheritance graph
[legend]

Public Member Functions

void _add_ref ()
 
void _remove_ref ()
 
virtual bool channelReady (base::ChannelElementBase::shared_ptr const &caller, ConnPolicy const &policy, internal::ConnID *conn_id)
 
virtual bool channelReady (const CConnPolicy &cp) ACE_THROW_SPEC((CORBA
 
virtual WriteStatus data_sample (typename base::ChannelElement< T >::param_t sample)
 
void disconnect ()
 
bool disconnect (const base::ChannelElementBase::shared_ptr &channel, bool forward)
 
virtual std::string getElementName () const
 
virtual std::string getLocalURI () const
 
virtual std::string getRemoteURI () const
 
virtual bool inputReady (base::ChannelElementBase::shared_ptr const &caller)
 
virtual bool inputReady ()
 
virtual bool isRemoteElement () const
 
FlowStatus read (typename base::ChannelElement< T >::reference_t sample, bool copy_old_data)
 
CFlowStatus read (::CORBA::Any_out sample, bool copy_old_data) ACE_THROW_SPEC((CORBA
 
 RemoteChannelElement (CorbaTypeTransporter const &transport, DataFlowInterface *sender, PortableServer::POA_ptr poa, const ConnPolicy &policy)
 
void remoteDisconnect (bool forward) ACE_THROW_SPEC((CORBA
 
void remoteSignal () ACE_THROW_SPEC((CORBA
 
bool signal ()
 
virtual void transferSamples ()
 
WriteStatus write (typename base::ChannelElement< T >::param_t sample)
 
CWriteStatus write (const ::CORBA::Any &sample) ACE_THROW_SPEC((CORBA
 
void writeOneway (const ::CORBA::Any &sample) ACE_THROW_SPEC((CORBA
 
 ~RemoteChannelElement ()
 
- Public Member Functions inherited from RTT::corba::CRemoteChannelElement_i
PortableServer::POA_ptr _default_POA ()
 
virtual RTT::corba::CRemoteChannelElement_ptr activate_this ()
 
 CRemoteChannelElement_i (corba::CorbaTypeTransporter const &transport, PortableServer::POA_ptr poa)
 
void setCDataFlowInterface (CDataFlowInterface_i *dataflow)
 
virtual ~CRemoteChannelElement_i ()
 
- Public Member Functions inherited from RTT::base::ChannelElement< T >
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 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 const ConnPolicygetConnPolicy () const
 
shared_ptr getInput ()
 
virtual shared_ptr getInputEndPoint ()
 
shared_ptr getOutput ()
 
virtual shared_ptr getOutputEndPoint ()
 
virtual PortInterfacegetPort () 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 signalFrom (ChannelElementBase *)
 
virtual ~ChannelElementBase ()
 

Private Attributes

std::string localUri
 
DataFlowInterfacemsender
 
PortableServer::ObjectId_var oid
 
ConnPolicy policy
 
bool valid
 

Additional Inherited Members

- 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
 
- 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::corba::CRemoteChannelElement_i
CDataFlowInterface_imdataflow
 
PortableServer::POA_var mpoa
 
CRemoteChannelElement_var remote_side
 
RTT::corba::CorbaTypeTransporter const & transport
 
- 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::corba::RemoteChannelElement< T >

Implements the CRemoteChannelElement of the CORBA IDL interface. It converts the C++ calls into CORBA calls and vice versa. A read will cause a call to the remote channel (which is of the same type of this RemoteChannelElement) which returns an Any with the data. A similar mechanism is in place for a write.

Definition at line 60 of file RemoteChannelElement.hpp.

Constructor & Destructor Documentation

template<typename T>
RTT::corba::RemoteChannelElement< T >::RemoteChannelElement ( CorbaTypeTransporter const &  transport,
DataFlowInterface sender,
PortableServer::POA_ptr  poa,
const ConnPolicy policy 
)
inline

Create a channel element for remote data exchange.

Parameters
transportThe type specific object that will be used to marshal the data.
poaThe POA that manages the underlying CRemoteChannelElement_i.

Definition at line 84 of file RemoteChannelElement.hpp.

template<typename T>
RTT::corba::RemoteChannelElement< T >::~RemoteChannelElement ( )
inline

Definition at line 103 of file RemoteChannelElement.hpp.

Member Function Documentation

template<typename T>
void RTT::corba::RemoteChannelElement< T >::_add_ref ( )
inline

Increase the reference count, called from the CORBA side

Definition at line 108 of file RemoteChannelElement.hpp.

template<typename T>
void RTT::corba::RemoteChannelElement< T >::_remove_ref ( )
inline

Decrease the reference count, called from the CORBA side

Definition at line 111 of file RemoteChannelElement.hpp.

template<typename T>
virtual bool RTT::corba::RemoteChannelElement< T >::channelReady ( base::ChannelElementBase::shared_ptr const &  caller,
ConnPolicy const &  policy,
internal::ConnID conn_id 
)
inlinevirtual

This is called on the output half of a new connection by the connection factory in order to notify the output side of the new connection and check if it is ready to receive data. Each channel element has the responsibility to pass this notification on to the next, in the direction of the input. The ConnOutputEndPoint then calls back the inputReady() method in reverse direction to notify the output that the connection was successfully established.

Returns
false if a fatal connection failure was encountered and the channel needs to be destroyed.

Reimplemented from RTT::base::ChannelElementBase.

Definition at line 443 of file RemoteChannelElement.hpp.

template<typename T>
virtual bool RTT::corba::RemoteChannelElement< T >::channelReady ( const CConnPolicy &  cp)
inlinevirtual

CORBA IDL function.

Definition at line 476 of file RemoteChannelElement.hpp.

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

Definition at line 394 of file RemoteChannelElement.hpp.

template<typename T>
void RTT::corba::RemoteChannelElement< T >::disconnect ( )
inline

Definition at line 178 of file RemoteChannelElement.hpp.

template<typename T>
bool RTT::corba::RemoteChannelElement< T >::disconnect ( const base::ChannelElementBase::shared_ptr channel,
bool  forward 
)
inlinevirtual

Performs a disconnection of a single input or output endpoint. If forward is true, then the disconnection is initiated by the input endpoint and channel must be a connected input. Otherwise, it has been initiated by the output endpoint and channel must be a connected output. The disconnect call is only forwarded to the opposite side of the channel element after the last input/output element on either side has been removed.

The ChannelElementBase implementation ignores the given channel and disconnects unconditinally.

Reimplemented from RTT::base::ChannelElementBase.

Definition at line 213 of file RemoteChannelElement.hpp.

template<typename T>
virtual std::string RTT::corba::RemoteChannelElement< 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 510 of file RemoteChannelElement.hpp.

template<typename T>
virtual std::string RTT::corba::RemoteChannelElement< T >::getLocalURI ( ) const
inlinevirtual

This function return the URI of this element. The URI must be unique.

Returns
URI of this element.

Reimplemented from RTT::base::ChannelElementBase.

Definition at line 500 of file RemoteChannelElement.hpp.

template<typename T>
virtual std::string RTT::corba::RemoteChannelElement< T >::getRemoteURI ( ) const
inlinevirtual

This function returns the URI of the next channel element in the logical chain. The URI must be unique. E.g: In the local case output->getLocalURI() In the remote case the URI of the remote channel element.

Returns
URI of the next element.

Reimplemented from RTT::base::ChannelElementBase.

Definition at line 489 of file RemoteChannelElement.hpp.

template<typename T>
virtual bool RTT::corba::RemoteChannelElement< T >::inputReady ( base::ChannelElementBase::shared_ptr const &  caller)
inlinevirtual

This is called by an input port when it is ready to receive data. Each channel element has the responsibility to pass this notification on to the next, in the direction of the output.

Returns
false if a fatal connection failure was encountered and the channel needs to be destroyed.

Reimplemented from RTT::base::ChannelElementBase.

Definition at line 401 of file RemoteChannelElement.hpp.

template<typename T>
virtual bool RTT::corba::RemoteChannelElement< T >::inputReady ( )
inlinevirtual

CORBA IDL function.

Reimplemented from RTT::base::ChannelElementBase.

Definition at line 433 of file RemoteChannelElement.hpp.

template<typename T>
virtual bool RTT::corba::RemoteChannelElement< T >::isRemoteElement ( ) const
inlinevirtual

This function may be used to identify, if the current element uses a network transport, to send the data to the next Element in the logical chain.

Returns
true if a network transport is used.

Reimplemented from RTT::base::ChannelElementBase.

Definition at line 484 of file RemoteChannelElement.hpp.

template<typename T>
FlowStatus RTT::corba::RemoteChannelElement< T >::read ( typename base::ChannelElement< T >::reference_t  sample,
bool  copy_old_data 
)
inline

Definition at line 242 of file RemoteChannelElement.hpp.

template<typename T>
CFlowStatus RTT::corba::RemoteChannelElement< T >::read ( ::CORBA::Any_out  sample,
bool  copy_old_data 
)
inline

CORBA IDL function.

Definition at line 293 of file RemoteChannelElement.hpp.

template<typename T>
void RTT::corba::RemoteChannelElement< T >::remoteDisconnect ( bool  forward)
inline

CORBA IDL function.

Definition at line 194 of file RemoteChannelElement.hpp.

template<typename T>
void RTT::corba::RemoteChannelElement< T >::remoteSignal ( )
inline

CORBA IDL function.

Definition at line 118 of file RemoteChannelElement.hpp.

template<typename T>
bool RTT::corba::RemoteChannelElement< T >::signal ( )
inlinevirtual

Signals that there is new data available on this channel By default, the channel element forwards the call to its output

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 from RTT::base::ChannelElementBase.

Definition at line 123 of file RemoteChannelElement.hpp.

template<typename T>
virtual void RTT::corba::RemoteChannelElement< T >::transferSamples ( )
inlinevirtual

This is used on to read the channel

Implements RTT::corba::CRemoteChannelElement_i.

Definition at line 138 of file RemoteChannelElement.hpp.

template<typename T>
WriteStatus RTT::corba::RemoteChannelElement< T >::write ( typename base::ChannelElement< T >::param_t  sample)
inline

Definition at line 315 of file RemoteChannelElement.hpp.

template<typename T>
CWriteStatus RTT::corba::RemoteChannelElement< T >::write ( const ::CORBA::Any &  sample)
inline

CORBA IDL function.

Definition at line 371 of file RemoteChannelElement.hpp.

template<typename T>
void RTT::corba::RemoteChannelElement< T >::writeOneway ( const ::CORBA::Any &  sample)
inline

CORBA IDL function.

Definition at line 387 of file RemoteChannelElement.hpp.

Member Data Documentation

template<typename T>
std::string RTT::corba::RemoteChannelElement< T >::localUri
private

Definition at line 74 of file RemoteChannelElement.hpp.

template<typename T>
DataFlowInterface* RTT::corba::RemoteChannelElement< T >::msender
private

Definition at line 70 of file RemoteChannelElement.hpp.

template<typename T>
PortableServer::ObjectId_var RTT::corba::RemoteChannelElement< T >::oid
private

Definition at line 72 of file RemoteChannelElement.hpp.

template<typename T>
ConnPolicy RTT::corba::RemoteChannelElement< T >::policy
private

Definition at line 76 of file RemoteChannelElement.hpp.

template<typename T>
bool RTT::corba::RemoteChannelElement< T >::valid
private

Becomes false if we couldn't transfer data to remote

Definition at line 68 of file RemoteChannelElement.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