#include <PortInterface.hpp>
Public Member Functions | |
virtual bool | addConnection (internal::ConnID *cid, ChannelElementBase::shared_ptr channel, ConnPolicy const &policy=ConnPolicy())=0 |
virtual PortInterface * | antiClone () const =0 |
virtual PortInterface * | clone () const =0 |
virtual bool | connected () const =0 |
virtual bool | connectedTo (PortInterface *port) |
virtual bool | connectTo (PortInterface *other, ConnPolicy const &policy)=0 |
virtual bool | connectTo (PortInterface *other)=0 |
virtual bool | createConnection (internal::SharedConnectionBase::shared_ptr shared_connection, ConnPolicy const &policy=ConnPolicy())=0 |
virtual Service * | createPortObject () |
virtual bool | createStream (ConnPolicy const &policy)=0 |
virtual void | disconnect ()=0 |
virtual bool | disconnect (PortInterface *port)=0 |
PortInterface & | doc (const std::string &desc) |
const std::string & | getDescription () const |
virtual ChannelElementBase * | getEndpoint () const =0 |
const std::string & | getFullName () const |
DataFlowInterface * | getInterface () const |
virtual internal::ConnectionManager * | getManager () |
const std::string & | getName () const |
virtual internal::ConnID * | getPortID () const |
virtual internal::SharedConnectionBase::shared_ptr | getSharedConnection () const |
virtual const types::TypeInfo * | getTypeInfo () const =0 |
virtual bool | isLocal () const |
virtual bool | removeConnection (internal::ConnID *cid) |
virtual int | serverProtocol () const |
void | setInterface (DataFlowInterface *iface) |
bool | setName (const std::string &name) |
virtual | ~PortInterface () |
Protected Member Functions | |
PortInterface (const std::string &name) | |
Protected Attributes | |
internal::ConnectionManager | cmanager |
os::MutexRecursive | connection_lock |
DataFlowInterface * | iface |
Private Member Functions | |
void | updateFullName () |
Private Attributes | |
std::string | fullName |
std::string | mdesc |
std::string | name |
Friends | |
class | internal::PortConnectionLock |
The base class of every data flow port.
Definition at line 59 of file PortInterface.hpp.
|
protected |
Definition at line 50 of file PortInterface.cpp.
|
virtual |
Definition at line 53 of file PortInterface.cpp.
|
pure virtual |
Adds a user created connection to this port. This is an advanced method, prefer to use connectTo and createStream.
Implemented in RTT::corba::RemoteInputPort, RTT::base::InputPortInterface, RTT::corba::RemotePort< base::InputPortInterface >, RTT::corba::RemotePort< base::OutputPortInterface >, and RTT::base::OutputPortInterface.
|
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::OutputPort< T >, RTT::OutputPort< double >, RTT::OutputPort< int >, RTT::OutputPort< bool >, RTT::InputPort< T >, RTT::InputPort< double >, RTT::InputPort< int >, RTT::InputPort< bool >, RTT::corba::RemoteInputPort, and RTT::corba::RemoteOutputPort.
|
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 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.
Implemented in RTT::OutputPort< T >, RTT::OutputPort< double >, RTT::OutputPort< int >, RTT::OutputPort< bool >, RTT::InputPort< T >, RTT::InputPort< double >, RTT::InputPort< int >, RTT::InputPort< bool >, RTT::corba::RemoteInputPort, and RTT::corba::RemoteOutputPort.
|
pure virtual |
Returns true if this port is connected
Implemented in RTT::base::InputPortInterface, RTT::base::OutputPortInterface, RTT::corba::RemotePort< base::InputPortInterface >, and RTT::corba::RemotePort< base::OutputPortInterface >.
|
virtual |
Returns true if this port is connected to the given port
Definition at line 79 of file PortInterface.cpp.
|
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.
Implemented in RTT::base::OutputPortInterface, and RTT::base::InputPortInterface.
|
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.
Implemented in RTT::base::OutputPortInterface, and RTT::base::InputPortInterface.
|
pure virtual |
Connects this port to an existing shared connection instance.
Implemented in RTT::corba::RemoteInputPort, RTT::base::InputPortInterface, and RTT::base::OutputPortInterface.
|
virtual |
Create accessor Object for this Port, for addition to a TaskContext Object interface.
Reimplemented in RTT::OutputPort< T >, RTT::OutputPort< double >, RTT::OutputPort< int >, RTT::OutputPort< bool >, RTT::InputPort< T >, RTT::InputPort< double >, RTT::InputPort< int >, and RTT::InputPort< bool >.
Definition at line 91 of file PortInterface.cpp.
|
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.
policy | The connection policy describing how the stream must be set up. |
Implemented in RTT::OutputPort< T >, RTT::OutputPort< double >, RTT::OutputPort< int >, RTT::OutputPort< bool >, RTT::InputPort< T >, RTT::InputPort< double >, RTT::InputPort< int >, RTT::InputPort< bool >, RTT::corba::RemotePort< base::InputPortInterface >, and RTT::corba::RemotePort< base::OutputPortInterface >.
|
pure virtual |
Removes any connection that either go to or come from this port
Implemented in RTT::base::InputPortInterface, RTT::base::OutputPortInterface, RTT::corba::RemotePort< base::InputPortInterface >, and RTT::corba::RemotePort< base::OutputPortInterface >.
|
pure virtual |
Removes the connection that links this port and the given port
Returns true if there was such a connection, false otherwise
Implemented in RTT::corba::RemoteInputPort, RTT::base::OutputPortInterface, RTT::base::InputPortInterface, and RTT::corba::RemoteOutputPort.
PortInterface & PortInterface::doc | ( | const std::string & | desc | ) |
Set the documentation of this port.
desc | The description of the port |
Definition at line 72 of file PortInterface.cpp.
|
inline |
Get the documentation of this port.
Definition at line 106 of file PortInterface.hpp.
|
pure virtual |
Returns the input or output endpoint of this port (if any). This method provides access to the internals of this port in order to access connected channel objects directly.
Implemented in RTT::OutputPort< T >, RTT::OutputPort< double >, RTT::OutputPort< int >, RTT::OutputPort< bool >, RTT::InputPort< T >, RTT::InputPort< double >, RTT::InputPort< int >, RTT::InputPort< bool >, RTT::corba::RemotePort< base::InputPortInterface >, and RTT::corba::RemotePort< base::OutputPortInterface >.
|
inline |
Get a combination of the name of this port and of its owner, if it has an owner.
Definition at line 92 of file PortInterface.hpp.
DataFlowInterface * PortInterface::getInterface | ( | ) | const |
Returns the DataFlowInterface this port belongs to or null if it was not added to such an interface.
Definition at line 117 of file PortInterface.cpp.
|
inlinevirtual |
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.
Definition at line 235 of file PortInterface.hpp.
|
inline |
Get the name of this Port.
Definition at line 86 of file PortInterface.hpp.
|
virtual |
Returns the identity of this port in a ConnID object.
Reimplemented in RTT::corba::RemotePort< base::InputPortInterface >, and RTT::corba::RemotePort< base::OutputPortInterface >.
Definition at line 88 of file PortInterface.cpp.
|
virtual |
Returns a pointer to the shared connection element this port may be connected to.
Definition at line 122 of file PortInterface.cpp.
|
pure virtual |
Returns the types::TypeInfo object for the port's type
Implemented in RTT::OutputPort< T >, RTT::OutputPort< double >, RTT::OutputPort< int >, RTT::OutputPort< bool >, RTT::InputPort< T >, RTT::InputPort< double >, RTT::InputPort< int >, RTT::InputPort< bool >, RTT::corba::RemotePort< base::InputPortInterface >, and RTT::corba::RemotePort< base::OutputPortInterface >.
|
virtual |
Returns true if this port is located on this process, and false otherwise
Definition at line 83 of file PortInterface.cpp.
|
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.
Definition at line 107 of file PortInterface.cpp.
|
virtual |
Returns the protocol over which this port can be accessed.
Reimplemented in RTT::corba::RemotePort< base::InputPortInterface >, and RTT::corba::RemotePort< base::OutputPortInterface >.
Definition at line 85 of file PortInterface.cpp.
void 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.
Definition at line 112 of file PortInterface.cpp.
bool 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.
true | if !this->connected(), the name has changed. |
false | if this->connected(), the name has not been changed. |
Definition at line 55 of file PortInterface.cpp.
|
private |
Definition at line 64 of file PortInterface.cpp.
|
friend |
Definition at line 71 of file PortInterface.hpp.
|
protected |
Definition at line 69 of file PortInterface.hpp.
|
protected |
Definition at line 70 of file PortInterface.hpp.
|
private |
Definition at line 62 of file PortInterface.hpp.
|
protected |
Definition at line 68 of file PortInterface.hpp.
|
private |
Definition at line 63 of file PortInterface.hpp.
|
private |
Definition at line 61 of file PortInterface.hpp.