Public Member Functions | Protected Member Functions | List of all members
RTT::base::OutputPortInterface Class Referenceabstract

#include <OutputPortInterface.hpp>

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

Public Member Functions

virtual bool addConnection (internal::ConnID *port_id, ChannelElementBase::shared_ptr channel_input, ConnPolicy const &policy)
 
virtual bool connected () const
 
virtual bool connectTo (PortInterface *other, ConnPolicy const &policy)
 
virtual bool connectTo (PortInterface *other)
 
bool createBufferConnection (InputPortInterface &sink, int size, int lock_policy=ConnPolicy::LOCK_FREE)
 
bool createConnection (InputPortInterface &sink)
 
virtual bool createConnection (InputPortInterface &sink, ConnPolicy const &policy)=0
 
virtual bool createConnection (internal::SharedConnectionBase::shared_ptr shared_connection, ConnPolicy const &policy=ConnPolicy())
 
bool createDataConnection (InputPortInterface &sink, int lock_policy=ConnPolicy::LOCK_FREE)
 
virtual void disconnect ()
 
virtual bool disconnect (PortInterface *port)
 
virtual DataSourceBase::shared_ptr getDataSource () const =0
 
virtual void keepLastWrittenValue (bool new_flag)=0
 
virtual bool keepsLastWrittenValue () const =0
 
 OutputPortInterface (std::string const &name)
 
void traceWrite ()
 
virtual WriteStatus write (DataSourceBase::shared_ptr source)
 
virtual ~OutputPortInterface ()
 
- Public Member Functions inherited from RTT::base::PortInterface
virtual PortInterfaceantiClone () const =0
 
virtual PortInterfaceclone () const =0
 
virtual bool connectedTo (PortInterface *port)
 
virtual ServicecreatePortObject ()
 
virtual bool createStream (ConnPolicy const &policy)=0
 
PortInterfacedoc (const std::string &desc)
 
const std::string & getDescription () const
 
virtual ChannelElementBasegetEndpoint () const =0
 
const std::string & getFullName () const
 
DataFlowInterfacegetInterface () const
 
virtual internal::ConnectionManagergetManager ()
 
const std::string & getName () const
 
virtual internal::ConnIDgetPortID () const
 
virtual internal::SharedConnectionBase::shared_ptr getSharedConnection () const
 
virtual const types::TypeInfogetTypeInfo () 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

virtual bool connectionAdded (ChannelElementBase::shared_ptr channel_input, ConnPolicy const &policy)=0
 
 OutputPortInterface (OutputPortInterface const &orig)
 
- Protected Member Functions inherited from RTT::base::PortInterface
 PortInterface (const std::string &name)
 

Additional Inherited Members

- Protected Attributes inherited from RTT::base::PortInterface
internal::ConnectionManager cmanager
 
os::MutexRecursive connection_lock
 
DataFlowInterfaceiface
 

Detailed Description

The base class of each OutputPort. It contains the connection management code, which is independent of the actual data being transmitted.

Definition at line 52 of file OutputPortInterface.hpp.

Constructor & Destructor Documentation

RTT::base::OutputPortInterface::OutputPortInterface ( OutputPortInterface const &  orig)
protected
OutputPortInterface::OutputPortInterface ( std::string const &  name)

Definition at line 52 of file OutputPortInterface.cpp.

OutputPortInterface::~OutputPortInterface ( )
virtual

Definition at line 55 of file OutputPortInterface.cpp.

Member Function Documentation

bool OutputPortInterface::addConnection ( internal::ConnID port_id,
ChannelElementBase::shared_ptr  channel_input,
ConnPolicy const &  policy 
)
virtual

Adds a new connection to this output port and initializes the connection if required by policy. Use with care. Allows you to add any arbitrary connection to this output port. It is your responsibility to do any further bookkeeping, such as informing the input that a new output has been added.

Implements RTT::base::PortInterface.

Reimplemented in RTT::corba::RemotePort< base::OutputPortInterface >.

Definition at line 76 of file OutputPortInterface.cpp.

bool OutputPortInterface::connected ( ) const
virtual

Returns true if there is at least one channel registered in this port's list of outputs

Returns true if this port is connected

Implements RTT::base::PortInterface.

Reimplemented in RTT::corba::RemotePort< base::OutputPortInterface >.

Definition at line 61 of file OutputPortInterface.cpp.

virtual bool RTT::base::OutputPortInterface::connectionAdded ( ChannelElementBase::shared_ptr  channel_input,
ConnPolicy const &  policy 
)
protectedpure virtual
bool OutputPortInterface::connectTo ( PortInterface other,
ConnPolicy const &  policy 
)
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

Implements RTT::base::PortInterface.

Definition at line 101 of file OutputPortInterface.cpp.

bool OutputPortInterface::connectTo ( PortInterface other)
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

Implements RTT::base::PortInterface.

Definition at line 109 of file OutputPortInterface.cpp.

bool OutputPortInterface::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

Definition at line 90 of file OutputPortInterface.cpp.

bool RTT::base::OutputPortInterface::createConnection ( InputPortInterface sink)

Connects this write port to the given read port, using as policy the default policy of the sink port

virtual bool RTT::base::OutputPortInterface::createConnection ( InputPortInterface sink,
ConnPolicy const &  policy 
)
pure virtual

Connects this write port to the given read port, using the given connection policy.

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

virtual bool RTT::base::OutputPortInterface::createConnection ( internal::SharedConnectionBase::shared_ptr  shared_connection,
ConnPolicy const &  policy = ConnPolicy() 
)
virtual

Connects the port to an existing shared connection instance.

Implements RTT::base::PortInterface.

bool OutputPortInterface::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

Definition at line 87 of file OutputPortInterface.cpp.

void OutputPortInterface::disconnect ( )
virtual

Removes any connection that either go to or come from this port

Implements RTT::base::PortInterface.

Reimplemented in RTT::corba::RemotePort< base::OutputPortInterface >.

Definition at line 71 of file OutputPortInterface.cpp.

bool OutputPortInterface::disconnect ( PortInterface port)
virtual

Removes the channel that connects this port to port

Implements RTT::base::PortInterface.

Reimplemented in RTT::corba::RemoteOutputPort.

Definition at line 66 of file OutputPortInterface.cpp.

virtual DataSourceBase::shared_ptr RTT::base::OutputPortInterface::getDataSource ( ) const
pure 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.

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

virtual void RTT::base::OutputPortInterface::keepLastWrittenValue ( bool  new_flag)
pure 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.

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

virtual bool RTT::base::OutputPortInterface::keepsLastWrittenValue ( ) const
pure virtual

Returns true if this port records the last written value.

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

void OutputPortInterface::traceWrite ( )

Sends a write tracepoint

Definition at line 117 of file OutputPortInterface.cpp.

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

Write this port using the value stored in source.

Reimplemented in RTT::OutputPort< T >, RTT::OutputPort< double >, RTT::OutputPort< int >, and RTT::OutputPort< bool >.

Definition at line 84 of file OutputPortInterface.cpp.


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


rtt
Author(s): RTT Developers
autogenerated on Fri Oct 25 2019 03:59:46