RTT::base::PortInterface Class Reference
[Data Flow Ports]

#include <PortInterface.hpp>

Inheritance diagram for RTT::base::PortInterface:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual bool addConnection (internal::ConnID *cid, ChannelElementBase::shared_ptr channel_input, ConnPolicy const &policy=ConnPolicy())=0
virtual bool addConnection (internal::ConnID *cid, ChannelElementBase::shared_ptr channel_input, ConnPolicy const &policy=ConnPolicy())=0
virtual PortInterfaceantiClone () const =0
virtual PortInterfaceantiClone () const =0
virtual PortInterfaceclone () const =0
virtual PortInterfaceclone () const =0
virtual bool connected () const =0
virtual bool connected () const =0
virtual bool connectTo (PortInterface *other)=0
virtual bool connectTo (PortInterface *other, ConnPolicy const &policy)=0
virtual bool connectTo (PortInterface *other)=0
virtual bool connectTo (PortInterface *other, ConnPolicy const &policy)=0
virtual ServicecreatePortObject ()
virtual ServicecreatePortObject ()
virtual bool createStream (ConnPolicy const &policy)=0
virtual bool createStream (ConnPolicy const &policy)=0
virtual bool disconnect (PortInterface *port)=0
virtual void disconnect ()=0
virtual bool disconnect (PortInterface *port)=0
virtual void disconnect ()=0
PortInterfacedoc (const std::string &desc)
PortInterfacedoc (const std::string &desc)
virtual internal::ConnFactorygetConnFactory ()
virtual internal::ConnFactorygetConnFactory ()
const std::string & getDescription () const
const std::string & getDescription () const
DataFlowInterfacegetInterface () const
DataFlowInterfacegetInterface () const
virtual const
internal::ConnectionManager
getManager () const =0
virtual const
internal::ConnectionManager
getManager () const =0
const std::string & getName () const
const std::string & getName () const
virtual internal::ConnIDgetPortID () const
virtual internal::ConnIDgetPortID () const
virtual const types::TypeInfogetTypeInfo () const =0
virtual const types::TypeInfogetTypeInfo () const =0
virtual bool isLocal () const
virtual bool isLocal () const
virtual bool removeConnection (internal::ConnID *cid)=0
virtual bool removeConnection (internal::ConnID *cid)=0
virtual int serverProtocol () const
virtual int serverProtocol () const
void setInterface (DataFlowInterface *iface)
void setInterface (DataFlowInterface *iface)
bool setName (const std::string &name)
bool setName (const std::string &name)
virtual ~PortInterface ()
virtual ~PortInterface ()

Protected Member Functions

 PortInterface (const std::string &name)
 PortInterface (const std::string &name)

Private Attributes

DataFlowInterfaceiface
std::string mdesc
std::string name

Detailed Description

The base class of every data flow port.

Definition at line 57 of file install/include/rtt/base/PortInterface.hpp.


Constructor & Destructor Documentation

RTT::base::PortInterface::PortInterface ( const std::string &  name  )  [protected]
virtual RTT::base::PortInterface::~PortInterface (  )  [inline, virtual]

Definition at line 66 of file install/include/rtt/base/PortInterface.hpp.

RTT::base::PortInterface::PortInterface ( const std::string &  name  )  [protected]
virtual RTT::base::PortInterface::~PortInterface (  )  [inline, virtual]

Definition at line 66 of file rtt/base/PortInterface.hpp.


Member Function Documentation

virtual bool RTT::base::PortInterface::addConnection ( internal::ConnID cid,
ChannelElementBase::shared_ptr  channel_input,
ConnPolicy const &  policy = ConnPolicy() 
) [pure virtual]
virtual bool RTT::base::PortInterface::addConnection ( internal::ConnID cid,
ChannelElementBase::shared_ptr  channel_input,
ConnPolicy const &  policy = ConnPolicy() 
) [pure virtual]
virtual PortInterface* RTT::base::PortInterface::antiClone (  )  const [pure 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.

Implemented in RTT::InputPort< T >, RTT::OutputPort< T >, RTT::corba::RemoteOutputPort, RTT::corba::RemoteInputPort, RTT::InputPort< T >, RTT::OutputPort< T >, RTT::corba::RemoteOutputPort, RTT::corba::RemoteInputPort, RTT::InputPort< double >, RTT::InputPort< double >, RTT::InputPort< int >, RTT::InputPort< int >, RTT::InputPort< bool >, RTT::InputPort< bool >, RTT::OutputPort< double >, RTT::OutputPort< double >, RTT::OutputPort< int >, RTT::OutputPort< int >, RTT::OutputPort< bool >, and RTT::OutputPort< bool >.

virtual PortInterface* RTT::base::PortInterface::antiClone (  )  const [pure 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.

Implemented in RTT::InputPort< T >, RTT::OutputPort< T >, RTT::corba::RemoteOutputPort, RTT::corba::RemoteInputPort, RTT::InputPort< T >, RTT::OutputPort< T >, RTT::corba::RemoteOutputPort, RTT::corba::RemoteInputPort, RTT::InputPort< double >, RTT::InputPort< double >, RTT::InputPort< int >, RTT::InputPort< int >, RTT::InputPort< bool >, RTT::InputPort< bool >, RTT::OutputPort< double >, RTT::OutputPort< double >, RTT::OutputPort< int >, RTT::OutputPort< int >, RTT::OutputPort< bool >, and RTT::OutputPort< bool >.

virtual PortInterface* RTT::base::PortInterface::clone (  )  const [pure virtual]
virtual PortInterface* RTT::base::PortInterface::clone (  )  const [pure virtual]
virtual bool RTT::base::PortInterface::connected (  )  const [pure virtual]
virtual bool RTT::base::PortInterface::connected (  )  const [pure virtual]
virtual bool RTT::base::PortInterface::connectTo ( PortInterface other  )  [pure virtual]

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

Implemented in RTT::base::InputPortInterface, RTT::base::OutputPortInterface, RTT::base::InputPortInterface, and RTT::base::OutputPortInterface.

virtual bool RTT::base::PortInterface::connectTo ( PortInterface other,
ConnPolicy const &  policy 
) [pure virtual]

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

Implemented in RTT::base::InputPortInterface, RTT::base::OutputPortInterface, RTT::base::InputPortInterface, and RTT::base::OutputPortInterface.

virtual bool RTT::base::PortInterface::connectTo ( PortInterface other  )  [pure virtual]

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

Implemented in RTT::base::InputPortInterface, RTT::base::OutputPortInterface, RTT::base::InputPortInterface, and RTT::base::OutputPortInterface.

virtual bool RTT::base::PortInterface::connectTo ( PortInterface other,
ConnPolicy const &  policy 
) [pure virtual]

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

Implemented in RTT::base::InputPortInterface, RTT::base::OutputPortInterface, RTT::base::InputPortInterface, and RTT::base::OutputPortInterface.

virtual Service* RTT::base::PortInterface::createPortObject (  )  [virtual]
virtual Service* RTT::base::PortInterface::createPortObject (  )  [virtual]
virtual bool RTT::base::PortInterface::createStream ( ConnPolicy const &  policy  )  [pure virtual]

Creates a data stream from or to this port using connection-less transports. Typically, policy.transport and policy.name_id must be properly filled in such that the data stream can be set up and input and output port can find each other. You need to call this method on two ports (input and output) using the same transport and (probably) same name_id.

Parameters:
policy The connection policy describing how the stream must be set up.

Implemented in RTT::InputPort< T >, RTT::OutputPort< T >, RTT::InputPort< T >, RTT::OutputPort< T >, RTT::InputPort< double >, RTT::InputPort< double >, RTT::InputPort< int >, RTT::InputPort< int >, RTT::InputPort< bool >, RTT::InputPort< bool >, RTT::OutputPort< double >, RTT::OutputPort< double >, RTT::OutputPort< int >, RTT::OutputPort< int >, RTT::OutputPort< bool >, RTT::OutputPort< bool >, RTT::corba::RemotePort< base::InputPortInterface >, RTT::corba::RemotePort< base::InputPortInterface >, RTT::corba::RemotePort< base::OutputPortInterface >, and RTT::corba::RemotePort< base::OutputPortInterface >.

virtual bool RTT::base::PortInterface::createStream ( ConnPolicy const &  policy  )  [pure virtual]

Creates a data stream from or to this port using connection-less transports. Typically, policy.transport and policy.name_id must be properly filled in such that the data stream can be set up and input and output port can find each other. You need to call this method on two ports (input and output) using the same transport and (probably) same name_id.

Parameters:
policy The connection policy describing how the stream must be set up.

Implemented in RTT::InputPort< T >, RTT::OutputPort< T >, RTT::InputPort< T >, RTT::OutputPort< T >, RTT::InputPort< double >, RTT::InputPort< double >, RTT::InputPort< int >, RTT::InputPort< int >, RTT::InputPort< bool >, RTT::InputPort< bool >, RTT::OutputPort< double >, RTT::OutputPort< double >, RTT::OutputPort< int >, RTT::OutputPort< int >, RTT::OutputPort< bool >, RTT::OutputPort< bool >, RTT::corba::RemotePort< base::InputPortInterface >, RTT::corba::RemotePort< base::InputPortInterface >, RTT::corba::RemotePort< base::OutputPortInterface >, and RTT::corba::RemotePort< base::OutputPortInterface >.

virtual bool RTT::base::PortInterface::disconnect ( PortInterface port  )  [pure virtual]
virtual void RTT::base::PortInterface::disconnect (  )  [pure virtual]
virtual bool RTT::base::PortInterface::disconnect ( PortInterface port  )  [pure virtual]
virtual void RTT::base::PortInterface::disconnect (  )  [pure virtual]
PortInterface& RTT::base::PortInterface::doc ( const std::string &  desc  ) 

Set the documentation of this port.

Parameters:
desc The description of the port
Returns:
a reference to this object.
PortInterface& RTT::base::PortInterface::doc ( const std::string &  desc  ) 

Set the documentation of this port.

Parameters:
desc The description of the port
Returns:
a reference to this object.
virtual internal::ConnFactory* RTT::base::PortInterface::getConnFactory (  )  [virtual]

The ChannelFactory object that allows to build the ChannelElement chain needed to build connections to or from this port

Reimplemented in RTT::corba::RemoteInputPort, and RTT::corba::RemoteInputPort.

virtual internal::ConnFactory* RTT::base::PortInterface::getConnFactory (  )  [virtual]

The ChannelFactory object that allows to build the ChannelElement chain needed to build connections to or from this port

Reimplemented in RTT::corba::RemoteInputPort, and RTT::corba::RemoteInputPort.

const std::string& RTT::base::PortInterface::getDescription ( void   )  const [inline]

Get the documentation of this port.

Returns:
A description.

Definition at line 90 of file rtt/base/PortInterface.hpp.

const std::string& RTT::base::PortInterface::getDescription (  )  const [inline]

Get the documentation of this port.

Returns:
A description.

Definition at line 90 of file install/include/rtt/base/PortInterface.hpp.

DataFlowInterface* RTT::base::PortInterface::getInterface (  )  const

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

DataFlowInterface* RTT::base::PortInterface::getInterface (  )  const

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

virtual const internal::ConnectionManager* RTT::base::PortInterface::getManager (  )  const [pure virtual]

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.

Implemented in RTT::base::InputPortInterface, RTT::base::OutputPortInterface, RTT::base::InputPortInterface, and RTT::base::OutputPortInterface.

virtual const internal::ConnectionManager* RTT::base::PortInterface::getManager (  )  const [pure virtual]

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.

Implemented in RTT::base::InputPortInterface, RTT::base::OutputPortInterface, RTT::base::InputPortInterface, and RTT::base::OutputPortInterface.

const std::string& RTT::base::PortInterface::getName ( void   )  const [inline]

Get the name of this Port.

Definition at line 76 of file rtt/base/PortInterface.hpp.

const std::string& RTT::base::PortInterface::getName (  )  const [inline]

Get the name of this Port.

Definition at line 76 of file install/include/rtt/base/PortInterface.hpp.

virtual internal::ConnID* RTT::base::PortInterface::getPortID (  )  const [virtual]
virtual internal::ConnID* RTT::base::PortInterface::getPortID (  )  const [virtual]
virtual const types::TypeInfo* RTT::base::PortInterface::getTypeInfo (  )  const [pure virtual]
virtual const types::TypeInfo* RTT::base::PortInterface::getTypeInfo (  )  const [pure virtual]
virtual bool RTT::base::PortInterface::isLocal (  )  const [virtual]

Returns true if this port is located on this process, and false otherwise

virtual bool RTT::base::PortInterface::isLocal (  )  const [virtual]

Returns true if this port is located on this process, and false otherwise

virtual bool RTT::base::PortInterface::removeConnection ( internal::ConnID cid  )  [pure virtual]

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.

Implemented in RTT::base::InputPortInterface, RTT::base::OutputPortInterface, RTT::base::InputPortInterface, and RTT::base::OutputPortInterface.

virtual bool RTT::base::PortInterface::removeConnection ( internal::ConnID cid  )  [pure virtual]

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.

Implemented in RTT::base::InputPortInterface, RTT::base::OutputPortInterface, RTT::base::InputPortInterface, and RTT::base::OutputPortInterface.

virtual int RTT::base::PortInterface::serverProtocol (  )  const [virtual]
virtual int RTT::base::PortInterface::serverProtocol (  )  const [virtual]
void RTT::base::PortInterface::setInterface ( DataFlowInterface iface  ) 

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.

void RTT::base::PortInterface::setInterface ( DataFlowInterface iface  ) 

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.

bool RTT::base::PortInterface::setName ( const std::string &  name  ) 

Change the name of this unconnected Port. One can only change the name when it is not yet connected.

Return values:
true if !this->connected(), the name has changed.
false if this->connected(), the name has not been changed.
bool RTT::base::PortInterface::setName ( const std::string &  name  ) 

Change the name of this unconnected Port. One can only change the name when it is not yet connected.

Return values:
true if !this->connected(), the name has changed.
false if this->connected(), the name has not been changed.

Member Data Documentation

Definition at line 61 of file install/include/rtt/base/PortInterface.hpp.

std::string RTT::base::PortInterface::mdesc [private]

Definition at line 60 of file install/include/rtt/base/PortInterface.hpp.

std::string RTT::base::PortInterface::name [private]

Definition at line 59 of file install/include/rtt/base/PortInterface.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Jan 11 09:49:52 2013