#include <rtt/PortInterface.hpp>
Inheritance diagram for PortInterface:

The Connector can be a Buffer or a DataObject.
Public Types | |
| enum | PortType { ReadPort, WritePort, ReadWritePort } |
| This enum classifies if a port is inbound outbound or both. | |
Public Member Functions | |
| const std::string & | getName () const |
| Get the name of this Port. | |
| bool | setName (const std::string &name) |
| Change the name of this unconnected Port. | |
| bool | ready () const |
| Returns true if this Port is ready to be used. | |
| virtual PortType | getPortType () const=0 |
| Get the PortType of this port. | |
| virtual bool | connected () const=0 |
| Inspect if this Port is currently connected with another Port. | |
| virtual ConnectionInterface::shared_ptr | connection () const=0 |
| Returns the connection in which this Port currently participates. | |
| virtual bool | connectTo (ConnectionInterface::shared_ptr conn)=0 |
| Connect this port to a Connection. | |
| virtual bool | connectTo (PortInterface *other) |
| Connect to another Port and create a new connection if necessary. | |
| virtual void | disconnect ()=0 |
| No longer participate in a connection. | |
| virtual PortInterface * | clone () const=0 |
| Create a clone of this port with the same name. | |
| virtual PortInterface * | antiClone () const=0 |
| Create the anti-clone (inverse port) of this port with the same name A port for reading will return a new port for writing and vice versa. | |
| virtual ConnectionInterface::shared_ptr | createConnection (PortInterface *other, ConnectionTypes::ConnectionType con_type=ConnectionTypes::lockfree) |
| Create a connection object from this port to another port. | |
| virtual ConnectionInterface::shared_ptr | createConnection (ConnectionTypes::ConnectionType con_type=ConnectionTypes::lockfree) |
| Create a new connection object to which this port is subscribed. | |
| virtual TaskObject * | createPortObject () |
| Create accessor Object for this Port, for addition to a TaskContext Object interface. | |
Protected Member Functions | |
| PortInterface (const std::string &name) | |
Protected Attributes | |
| std::string | portname |
| bool setName | ( | const std::string & | name | ) |
Change the name of this unconnected Port.
One can only change the name when it is not yet connected.
| true | if !this->connected(), the name has changed. | |
| false | if this->connected(), the name has not been changed. |
| bool ready | ( | ) | const |
Returns true if this Port is ready to be used.
Identical to connected().
| virtual ConnectionInterface::shared_ptr connection | ( | ) | const [pure virtual] |
Returns the connection in which this Port currently participates.
It is possible that this port is part of a dormant connection, ( the connection object is not in the connected() state), in that case this method will return null, until the dormant connection becomes connected().
| null | if not connected to another Port. |
Implemented in ReadBufferPort, WriteBufferPort, BufferPort, CorbaPort, ReadDataPort, WriteDataPort, and DataPort.
| virtual bool connectTo | ( | ConnectionInterface::shared_ptr | conn | ) | [pure virtual] |
Connect this port to a Connection.
If the connection is in the connected() state, this port will participate in that connection, otherwise, the port will become connected once conn becomes connected().
Implemented in ReadBufferPort, WriteBufferPort, BufferPort, CorbaPort, ReadDataPort, WriteDataPort, and DataPort.
| virtual bool connectTo | ( | PortInterface * | other | ) | [virtual] |
Connect to another Port and create a new connection if necessary.
1.5.1