#include <OutputPortInterface.hpp>
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.
RTT::base::OutputPortInterface::OutputPortInterface | ( | OutputPortInterface const & | orig | ) | [protected] |
OutputPortInterface::OutputPortInterface | ( | std::string const & | name | ) |
Definition at line 50 of file OutputPortInterface.cpp.
OutputPortInterface::~OutputPortInterface | ( | ) | [virtual] |
Definition at line 53 of file OutputPortInterface.cpp.
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] |
Upcall to OutputPort.
Implemented in RTT::OutputPort< T >, RTT::OutputPort< double >, RTT::OutputPort< int >, RTT::OutputPort< bool >, and RTT::corba::RemotePort< base::OutputPortInterface >.
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.
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.
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.
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 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.
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 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.
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.
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.
bool OutputPortInterface::removeConnection | ( | internal::ConnID * | cid | ) | [virtual] |
Removes the connection associated with this channel, and the channel as well
Implements RTT::base::PortInterface.
Definition at line 82 of file OutputPortInterface.cpp.
void 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 88 of file OutputPortInterface.cpp.
Definition at line 56 of file OutputPortInterface.hpp.