#include <OutputPort.hpp>
Private Member Functions | |
virtual bool | connectionAdded (base::ChannelElementBase::shared_ptr channel_input, ConnPolicy const &policy) |
OutputPort & | operator= (OutputPort const &orig) |
OutputPort (OutputPort const &orig) | |
Private Attributes | |
internal::ConnInputEndpoint< T >::shared_ptr | endpoint |
bool | has_initial_sample |
True if sample has been written at least once, either by calling. More... | |
bool | has_last_written_value |
True if sample has been set at least once by a call to write() More... | |
bool | keeps_last_written_value |
If true, all calls to write() will save the sample in sample . More... | |
bool | keeps_next_written_value |
If true, the next call to write() will save the sample in sample . More... | |
base::DataObjectInterface< T >::shared_ptr | sample |
Friends | |
class | internal::ConnInputEndpoint< T > |
Additional Inherited Members | |
Protected Member Functions inherited from RTT::base::OutputPortInterface | |
OutputPortInterface (OutputPortInterface const &orig) | |
Protected Member Functions inherited from RTT::base::PortInterface | |
PortInterface (const std::string &name) | |
Protected Attributes inherited from RTT::base::PortInterface | |
internal::ConnectionManager | cmanager |
os::MutexRecursive | connection_lock |
DataFlowInterface * | iface |
A component's data output port. An Orocos OutputPort is a send-and-forget mechanism. The publisher writes data samples into the OutputPort and the underlying middleware will communicate it to all subscribers. An output port without subscribers is not an error on the component level (it may be at the system level, which can inspect the status with calling connected() ).
The data written into an OutputPort should be copyable and should provide a copy constructor in case it's not plain old data. If you want the RTT to transport your data over the network, or use it in scripting, you need to register your data class with the RTT type system.
Definition at line 70 of file OutputPort.hpp.
|
private |
You are not allowed to copy ports. In case you want to create a container of ports, use pointers to ports instead of the port object itself.
|
inline |
Creates a named Output port.
name | The name of this port, unique among the ports of a TaskContext. |
keep_last_written_value | Defaults to true. You need keep_last_written_value == true in two cases:
|
Definition at line 141 of file OutputPort.hpp.
|
inlinevirtual |
Definition at line 154 of file OutputPort.hpp.
|
inlinevirtual |
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.
Implements RTT::base::PortInterface.
Definition at line 302 of file OutputPort.hpp.
|
inline |
Clears the last written value and all data stored in shared connection buffers. The clear() call on an OutputPort has no effect on private connections.
Definition at line 227 of file OutputPort.hpp.
|
inlinevirtual |
Create a clone of this port with the same name
Implements RTT::base::PortInterface.
Definition at line 294 of file OutputPort.hpp.
|
inlineprivatevirtual |
Upcall to OutputPort.
Implements RTT::base::OutputPortInterface.
Definition at line 76 of file OutputPort.hpp.
|
inlinevirtual |
Connects this write port to the given read port, using the given policy
Implements RTT::base::OutputPortInterface.
Definition at line 309 of file OutputPort.hpp.
|
inlinevirtual |
Create accessor Object for this Port, for addition to a TaskContext Object interface.
Reimplemented from RTT::base::PortInterface.
Definition at line 324 of file OutputPort.hpp.
|
inlinevirtual |
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. |
Implements RTT::base::PortInterface.
Definition at line 314 of file OutputPort.hpp.
|
inlinevirtual |
Returns a Data source that stores the last written value, or a null pointer if this port does not keep its last written value.
Implements RTT::base::OutputPortInterface.
Definition at line 194 of file OutputPort.hpp.
|
inlinevirtual |
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.
Implements RTT::base::PortInterface.
Definition at line 338 of file OutputPort.hpp.
|
inline |
Returns the last written value written to this port, in case it is kept by this port, otherwise, returns a default T().
Definition at line 173 of file OutputPort.hpp.
|
inline |
Reads the last written value written to this port, in case it is kept by this port, otherwise, returns false.
sample | The data sample to store the value into. |
Definition at line 184 of file OutputPort.hpp.
|
inlinevirtual |
Definition at line 344 of file OutputPort.hpp.
|
inlinevirtual |
Returns the types::TypeInfo object for the port's type
Implements RTT::base::PortInterface.
Definition at line 288 of file OutputPort.hpp.
|
inlinevirtual |
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.
Implements RTT::base::OutputPortInterface.
Definition at line 161 of file OutputPort.hpp.
|
inline |
Definition at line 156 of file OutputPort.hpp.
|
inlinevirtual |
Returns true if this port records the last written value.
Implements RTT::base::OutputPortInterface.
Definition at line 166 of file OutputPort.hpp.
|
private |
|
inline |
Provides this port a data sample that is representative for the samples being used in write(). The sample will not be delivered to receivers, and only passed on to the underlying communication channel to allow it to allocate enough memory to hold the sample. You only need to call this in case you want to transfer dynamically sized objects in real-time over this OutputPort.
sample |
Definition at line 209 of file OutputPort.hpp.
|
inline |
Writes a new sample to all receivers (if any).
sample | The new sample to send out. |
Definition at line 243 of file OutputPort.hpp.
|
inlinevirtual |
Write this port using the value stored in source.
Reimplemented from RTT::base::OutputPortInterface.
Definition at line 265 of file OutputPort.hpp.
|
friend |
Definition at line 73 of file OutputPort.hpp.
|
private |
Definition at line 74 of file OutputPort.hpp.
|
private |
True if sample
has been written at least once, either by calling.
Definition at line 106 of file OutputPort.hpp.
|
private |
True if sample
has been set at least once by a call to write()
Definition at line 102 of file OutputPort.hpp.
|
private |
If true, all calls to write() will save the sample in sample
.
Definition at line 112 of file OutputPort.hpp.
|
private |
If true, the next call to write() will save the sample in sample
.
Definition at line 109 of file OutputPort.hpp.
|
private |
Definition at line 113 of file OutputPort.hpp.