Public Member Functions | Protected Member Functions | Protected Attributes
RTT::base::OutputPortInterface Class Reference

#include <OutputPortInterface.hpp>

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

List of all members.

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
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 const
internal::ConnectionManager
getManager () const
virtual void keepLastWrittenValue (bool new_flag)=0
virtual bool keepsLastWrittenValue () const =0
 OutputPortInterface (std::string const &name)
virtual bool removeConnection (internal::ConnID *cid)
virtual void write (DataSourceBase::shared_ptr source)
virtual ~OutputPortInterface ()

Protected Member Functions

virtual bool connectionAdded (ChannelElementBase::shared_ptr channel_input, ConnPolicy const &policy)=0
 OutputPortInterface (OutputPortInterface const &orig)

Protected Attributes

internal::ConnectionManager cmanager

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 53 of file OutputPortInterface.hpp.


Constructor & Destructor Documentation

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

Definition at line 50 of file OutputPortInterface.cpp.

Definition at line 53 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 72 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 59 of file OutputPortInterface.cpp.

virtual bool RTT::base::OutputPortInterface::connectionAdded ( ChannelElementBase::shared_ptr  channel_input,
ConnPolicy const &  policy 
) [protected, pure 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 100 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 108 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 94 of file OutputPortInterface.cpp.

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.

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

Definition at line 91 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 67 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::RemotePort< base::OutputPortInterface >.

Definition at line 62 of file OutputPortInterface.cpp.

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 const internal::ConnectionManager* RTT::base::OutputPortInterface::getManager ( ) const [inline, 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.

Implements RTT::base::PortInterface.

Definition at line 142 of file OutputPortInterface.hpp.

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.

Removes the connection associated with this channel, and the channel as well

Implements RTT::base::PortInterface.

Definition at line 82 of file OutputPortInterface.cpp.

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 88 of file OutputPortInterface.cpp.


Member Data Documentation

Definition at line 56 of file OutputPortInterface.hpp.


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


rtt
Author(s): RTT Developers
autogenerated on Fri Sep 9 2016 04:02:18