Orocos Real-Time Toolkit  2.9.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
RTT::corba::RemoteOutputPort Class Reference

Proxy for a remote output port. More...

#include <rtt/transports/corba/RemotePorts.hpp>

Inheritance diagram for RTT::corba::RemoteOutputPort:
RTT::corba::RemotePort< base::OutputPortInterface > RTT::base::OutputPortInterface RTT::base::PortInterface

Public Member Functions

 RemoteOutputPort (types::TypeInfo const *type_info, CDataFlowInterface_ptr dataflow, std::string const &name, PortableServer::POA_ptr poa)
 
bool keepsLastWrittenValue () const
 Returns true if this port records the last written value. More...
 
void keepLastWrittenValue (bool new_flag)
 Change the setting for keeping the last written value. More...
 
virtual bool disconnect (PortInterface *port)
 Removes the channel that connects this port to port. More...
 
bool createConnection (base::InputPortInterface &sink, ConnPolicy const &policy)
 Connects this write port to the given read port, using the given connection policy. More...
 
virtual base::DataSourceBase::shared_ptr getDataSource () const
 Returns a Data source that stores the last written value, or a null pointer if this port does not keep its last written value. More...
 
base::PortInterfaceclone () const
 Create a local clone of this port with the same name. More...
 
base::PortInterfaceantiClone () const
 Create a local clone of this port with the same name. More...
 
PortableServer::POA_ptr _default_POA ()
 
CDataFlowInterface_ptr getDataFlowInterface () const
 
internal::ConnIDgetPortID () const
 
types::TypeInfo const * getTypeInfo () const
 
int serverProtocol () const
 
bool connected () const
 
bool createStream (const ConnPolicy &policy)
 
virtual bool addConnection (internal::ConnID *port_id, base::ChannelElementBase::shared_ptr channel_input, ConnPolicy const &policy)
 
virtual void disconnect ()
 
base::ChannelElementBasegetEndpoint () const
 
virtual WriteStatus write (DataSourceBase::shared_ptr source)
 Write this port using the value stored in source. More...
 
bool createDataConnection (InputPortInterface &sink, int lock_policy=ConnPolicy::LOCK_FREE)
 Connects this write port to the given read port, using a single-data policy with the given locking mechanism. More...
 
bool createBufferConnection (InputPortInterface &sink, int size, int lock_policy=ConnPolicy::LOCK_FREE)
 Connects this write port to the given read port, using a buffered policy, with the buffer of the given size and the given locking mechanism. More...
 
bool createConnection (InputPortInterface &sink)
 Connects this write port to the given read port, using as policy the default policy of the sink port. More...
 
virtual bool createConnection (internal::SharedConnectionBase::shared_ptr shared_connection, ConnPolicy const &policy=ConnPolicy())
 Connects the port to an existing shared connection instance. More...
 
virtual bool connectTo (PortInterface *other, ConnPolicy const &policy)
 Connects this port with other, using the given policy. More...
 
virtual bool connectTo (PortInterface *other)
 Connects this port with other, using the default policy of the input. More...
 
const std::string & getName () const
 Get the name of this Port. More...
 
bool setName (const std::string &name)
 Change the name of this unconnected Port. More...
 
const std::string & getDescription () const
 Get the documentation of this port. More...
 
PortInterfacedoc (const std::string &desc)
 Set the documentation of this port. More...
 
virtual bool connectedTo (PortInterface *port)
 Returns true if this port is connected to the given port. More...
 
virtual bool isLocal () const
 Returns true if this port is located on this process, and false otherwise. More...
 
virtual ServicecreatePortObject ()
 Create accessor Object for this Port, for addition to a TaskContext Object interface. More...
 
virtual bool removeConnection (internal::ConnID *cid)
 Removes a user created connection from this port. More...
 
void setInterface (DataFlowInterface *iface)
 Once a port is added to a DataFlowInterface, it gets a pointer to that interface. More...
 
DataFlowInterfacegetInterface () const
 Returns the DataFlowInterface this port belongs to or null if it was not added to such an interface. More...
 
virtual internal::ConnectionManagergetManager ()
 Returns the connection manager of this port (if any). More...
 
virtual internal::SharedConnectionBase::shared_ptr getSharedConnection () const
 Returns a pointer to the shared connection element this port may be connected to. More...
 

Protected Member Functions

bool connectionAdded (base::ChannelElementBase::shared_ptr channel, ConnPolicy const &policy)
 

Protected Attributes

types::TypeInfo const * type_info
 
CDataFlowInterface_var dataflow
 
PortableServer::POA_var mpoa
 
DataFlowInterfaceiface
 
internal::ConnectionManager cmanager
 

Detailed Description

Proxy for a remote output port.

Allows for creation of a connection from the remote port to a local input port.

Definition at line 97 of file RemotePorts.hpp.

Constructor & Destructor Documentation

RemoteOutputPort::RemoteOutputPort ( types::TypeInfo const *  type_info,
CDataFlowInterface_ptr  dataflow,
std::string const &  name,
PortableServer::POA_ptr  poa 
)

Definition at line 238 of file RemotePorts.cpp.

Member Function Documentation

PortableServer::POA_ptr RTT::corba::RemotePort< base::OutputPortInterface >::_default_POA ( )
inherited
virtual bool RTT::corba::RemotePort< base::OutputPortInterface >::addConnection ( internal::ConnID port_id,
base::ChannelElementBase::shared_ptr  channel_input,
ConnPolicy const &  policy 
)
virtualinherited

Reimplemented from RTT::base::OutputPortInterface.

RTT::base::PortInterface * RemoteOutputPort::antiClone ( ) const
virtual

Create a local clone of this port with the same name.

If this port is a local port, this is an object of the inverse direction (read for write and write for read), and same name. If this object is a remote port, then it is a local port of the inverse direction and with the same name.

Implements RTT::base::PortInterface.

Definition at line 315 of file RemotePorts.cpp.

References RTT::base::PortInterface::getName(), RTT::types::TypeInfo::inputPort(), and RTT::corba::RemotePort< base::OutputPortInterface >::type_info.

RTT::base::PortInterface * RemoteOutputPort::clone ( ) const
virtual

Create a local clone of this port with the same name.

If this port is a local port, this is an object of the same type and same name. If this object is a remote port, then it is a local port of the same type and same name.

Implements RTT::base::PortInterface.

Definition at line 312 of file RemotePorts.cpp.

References RTT::base::PortInterface::getName(), RTT::types::TypeInfo::outputPort(), and RTT::corba::RemotePort< base::OutputPortInterface >::type_info.

bool RTT::corba::RemotePort< base::OutputPortInterface >::connected ( ) const
virtualinherited

Reimplemented from RTT::base::OutputPortInterface.

bool PortInterface::connectedTo ( PortInterface port)
virtualinherited

Returns true if this port is connected to the given port.

Definition at line 67 of file PortInterface.cpp.

References RTT::base::PortInterface::cmanager, and RTT::internal::ConnectionManager::connectedTo().

Referenced by RTT::internal::ConnFactory::createConnection().

bool RTT::corba::RemotePort< base::OutputPortInterface >::connectionAdded ( base::ChannelElementBase::shared_ptr  channel_input,
ConnPolicy const &  policy 
)
inlineprotectedvirtualinherited
bool OutputPortInterface::connectTo ( PortInterface other,
ConnPolicy const &  policy 
)
virtualinherited

Connects this port with other, using the given policy.

Unlike OutputPortInterface::createConnection, other can be the write port and this the read port.

Returns
true on success, false on failure

Implements RTT::base::PortInterface.

Definition at line 98 of file OutputPortInterface.cpp.

References RTT::base::OutputPortInterface::createConnection().

bool OutputPortInterface::connectTo ( PortInterface other)
virtualinherited

Connects this port with other, using the default policy of the input.

Unlike OutputPortInterface::createConnection, other can be the write port and this the read port.

Returns
true on success, false on failure

Implements RTT::base::PortInterface.

Definition at line 106 of file OutputPortInterface.cpp.

References RTT::base::OutputPortInterface::createConnection().

bool OutputPortInterface::createBufferConnection ( InputPortInterface sink,
int  size,
int  lock_policy = ConnPolicy::LOCK_FREE 
)
inherited

Connects this write port to the given read port, using a buffered policy, with the buffer of the given size and the given locking mechanism.

Definition at line 87 of file OutputPortInterface.cpp.

References RTT::ConnPolicy::buffer(), RTT::internal::ConnFactory::createAndCheckSharedConnection(), RTT::base::OutputPortInterface::createConnection(), and RTT::base::InputPortInterface::getDefaultPolicy().

bool RemoteOutputPort::createConnection ( base::InputPortInterface sink,
ConnPolicy const &  policy 
)
virtual
bool RTT::base::OutputPortInterface::createConnection ( InputPortInterface sink)
inherited
virtual bool RTT::base::OutputPortInterface::createConnection ( internal::SharedConnectionBase::shared_ptr  shared_connection,
ConnPolicy const &  policy = ConnPolicy() 
)
virtualinherited

Connects the port to an existing shared connection instance.

Implements RTT::base::PortInterface.

bool OutputPortInterface::createDataConnection ( InputPortInterface sink,
int  lock_policy = ConnPolicy::LOCK_FREE 
)
inherited

Connects this write port to the given read port, using a single-data policy with the given locking mechanism.

Definition at line 84 of file OutputPortInterface.cpp.

References RTT::base::OutputPortInterface::createConnection(), and RTT::ConnPolicy::data().

Service * PortInterface::createPortObject ( )
virtualinherited
bool RTT::corba::RemotePort< base::OutputPortInterface >::createStream ( const ConnPolicy policy)
virtualinherited
virtual void RTT::corba::RemotePort< base::OutputPortInterface >::disconnect ( )
virtualinherited

Reimplemented from RTT::base::OutputPortInterface.

bool RemoteOutputPort::disconnect ( PortInterface port)
virtual
PortInterface & PortInterface::doc ( const std::string &  desc)
inherited

Set the documentation of this port.

Parameters
descThe description of the port
Returns
a reference to this object.

Definition at line 60 of file PortInterface.cpp.

References RTT::base::PortInterface::iface, and RTT::DataFlowInterface::setPortDescription().

Referenced by RTT::InputPort< T >::createPortObject(), and RTT::corba::TaskContextProxy::synchronizePorts().

CDataFlowInterface_ptr RTT::corba::RemotePort< base::OutputPortInterface >::getDataFlowInterface ( ) const
inherited
DataSourceBase::shared_ptr RemoteOutputPort::getDataSource ( ) const
virtual

Returns a Data source that stores the last written value, or a null pointer if this port does not keep its last written value.

Implements RTT::base::OutputPortInterface.

Definition at line 250 of file RemotePorts.cpp.

const std::string& RTT::base::PortInterface::getDescription ( ) const
inlineinherited

Get the documentation of this port.

Returns
A description.

Definition at line 93 of file PortInterface.hpp.

Referenced by RTT::corba::CDataFlowInterface_i::_default_POA().

base::ChannelElementBase* RTT::corba::RemotePort< base::OutputPortInterface >::getEndpoint ( ) const
virtualinherited
DataFlowInterface * PortInterface::getInterface ( ) const
inherited

Returns the DataFlowInterface this port belongs to or null if it was not added to such an interface.

Definition at line 104 of file PortInterface.cpp.

References RTT::base::PortInterface::iface.

Referenced by RTT::corba::RemoteInputPort::buildRemoteChannelOutput(), createConnection(), and RTT::mqueue::MQSendRecv::setupStream().

virtual internal::ConnectionManager* RTT::base::PortInterface::getManager ( )
inlinevirtualinherited

Returns the connection manager of this port (if any).

This method provides access to the internals of this port in order to allow connection introspection.

Returns
null if no such manager is available, or the manager otherwise.
See also
ConnectionManager::getChannels() for a list of all connections of this port.

Definition at line 222 of file PortInterface.hpp.

Referenced by RTT::internal::ConnInputEndpoint< T >::disconnect(), and RTT::internal::ConnOutputEndpoint< T >::disconnect().

const std::string& RTT::base::PortInterface::getName ( ) const
inlineinherited

Get the name of this Port.

Definition at line 79 of file PortInterface.hpp.

Referenced by RTT::DataFlowInterface::addEventPort(), RTT::DataFlowInterface::addLocalEventPort(), RTT::DataFlowInterface::addLocalPort(), RTT::DataFlowInterface::addPort(), antiClone(), RTT::corba::RemoteInputPort::antiClone(), RTT::InputPort< T >::antiClone(), RTT::OutputPort< T >::antiClone(), RTT::corba::CorbaFallBackProtocol::buildChannelInput(), RTT::internal::ConnFactory::buildChannelInput(), RTT::corba::CorbaFallBackProtocol::buildChannelOutput(), RTT::internal::ConnFactory::buildChannelOutput(), RTT::corba::RemoteInputPort::buildRemoteChannelOutput(), RTT::internal::ConnFactory::buildRemoteChannelOutput(), RTT::internal::ConnFactory::buildSharedConnection(), clone(), RTT::corba::RemoteInputPort::clone(), RTT::InputPort< T >::clone(), RTT::OutputPort< T >::clone(), RTT::TaskContext::connectPorts(), RTT::base::InputPortInterface::connectTo(), RTT::internal::ConnFactory::createAndCheckConnection(), RTT::internal::ConnFactory::createAndCheckSharedConnection(), RTT::internal::ConnFactory::createAndCheckStream(), createConnection(), RTT::corba::RemoteInputPort::createConnection(), RTT::internal::ConnFactory::createConnection(), RTT::base::PortInterface::createPortObject(), RTT::corba::CorbaFallBackProtocol::createStream(), RTT::corba::CDataFlowInterface_i::deregisterChannel(), disconnect(), RTT::internal::ConnectionManager::eraseConnection(), RTT::internal::ConnFactory::findSharedConnection(), RTT::OutputPort< T >::setDataSample(), RTT::mqueue::MQSendRecv::setupStream(), and RTT::OutputPort< T >::write().

internal::ConnID* RTT::corba::RemotePort< base::OutputPortInterface >::getPortID ( ) const
virtualinherited

Reimplemented from RTT::base::PortInterface.

internal::SharedConnectionBase::shared_ptr PortInterface::getSharedConnection ( ) const
virtualinherited

Returns a pointer to the shared connection element this port may be connected to.

Definition at line 109 of file PortInterface.cpp.

References RTT::base::PortInterface::cmanager, and RTT::internal::ConnectionManager::getSharedConnection().

Referenced by RTT::internal::ConnFactory::createAndCheckSharedConnection(), and RTT::internal::ConnFactory::findSharedConnection().

types::TypeInfo const* RTT::corba::RemotePort< base::OutputPortInterface >::getTypeInfo ( ) const
virtualinherited
bool PortInterface::isLocal ( ) const
virtualinherited
void RemoteOutputPort::keepLastWrittenValue ( bool  new_flag)
virtual

Change the setting for keeping the last written value.

Setting this to false will clear up any unneeded storage. If set, this port can initialize new connections with a data sample and allows real-time data transport of dynamically sized objects over its newly created connections.

See also
OutputPort::OutputPort.

Implements RTT::base::OutputPortInterface.

Definition at line 247 of file RemotePorts.cpp.

bool RemoteOutputPort::keepsLastWrittenValue ( ) const
virtual

Returns true if this port records the last written value.

Implements RTT::base::OutputPortInterface.

Definition at line 244 of file RemotePorts.cpp.

bool PortInterface::removeConnection ( internal::ConnID cid)
virtualinherited

Removes a user created connection from this port.

This is an advanced method, prefer to use disconnect() or a method from a subclass of PortInterface.

Definition at line 95 of file PortInterface.cpp.

References RTT::base::PortInterface::cmanager, and RTT::internal::ConnectionManager::removeConnection().

Referenced by RTT::corba::CDataFlowInterface_i::deregisterChannel().

int RTT::corba::RemotePort< base::OutputPortInterface >::serverProtocol ( ) const
virtualinherited

Reimplemented from RTT::base::PortInterface.

void PortInterface::setInterface ( DataFlowInterface iface)
inherited

Once a port is added to a DataFlowInterface, it gets a pointer to that interface.

This allows advanced ports to track back to which component they belong.

Definition at line 100 of file PortInterface.cpp.

References RTT::base::PortInterface::iface.

Referenced by RTT::DataFlowInterface::addLocalPort(), and RTT::corba::CDataFlowInterface_i::deregisterChannel().

bool PortInterface::setName ( const std::string &  name)
inherited

Change the name of this unconnected Port.

One can only change the name when it is not yet connected.

Return values
trueif !this->connected(), the name has changed.
falseif this->connected(), the name has not been changed.

Definition at line 51 of file PortInterface.cpp.

References RTT::base::PortInterface::connected().

Referenced by RTT::DataFlowInterface::addEventPort(), RTT::TaskContext::addEventPort(), RTT::DataFlowInterface::addPort(), and RTT::TaskContext::addPort().

WriteStatus OutputPortInterface::write ( DataSourceBase::shared_ptr  source)
virtualinherited

Write this port using the value stored in source.

Reimplemented in RTT::OutputPort< T >.

Definition at line 81 of file OutputPortInterface.cpp.

Member Data Documentation

internal::ConnectionManager RTT::base::PortInterface::cmanager
protectedinherited
CDataFlowInterface_var RTT::corba::RemotePort< base::OutputPortInterface >::dataflow
protectedinherited

Definition at line 66 of file RemotePorts.hpp.

Referenced by createConnection(), and disconnect().

DataFlowInterface* RTT::base::PortInterface::iface
protectedinherited
PortableServer::POA_var RTT::corba::RemotePort< base::OutputPortInterface >::mpoa
protectedinherited

Definition at line 67 of file RemotePorts.hpp.

Referenced by createConnection().

types::TypeInfo const* RTT::corba::RemotePort< base::OutputPortInterface >::type_info
protectedinherited

Definition at line 65 of file RemotePorts.hpp.

Referenced by antiClone(), and clone().


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