Orocos Real-Time Toolkit
2.6.0
|
Proxy for a remote output port. More...
#include <rtt/transports/corba/RemotePorts.hpp>
Public Member Functions | |
RemoteOutputPort (types::TypeInfo const *type_info, CDataFlowInterface_ptr dataflow, std::string const &name, PortableServer::POA_ptr poa) | |
bool | keepsLastWrittenValue () const |
Returns true if this port records the last written value. | |
void | keepLastWrittenValue (bool new_flag) |
Change the setting for keeping the last written value. | |
bool | createConnection (base::InputPortInterface &sink, ConnPolicy const &policy) |
Connects this write port to the given read port, using the given connection policy. | |
virtual base::DataSourceBase::shared_ptr | getDataSource () const |
Returns a Data source that stores the last written value, or a null pointer if this port does not keep its last written value. | |
base::PortInterface * | clone () const |
Create a local clone of this port with the same name. | |
base::PortInterface * | antiClone () const |
Create a local clone of this port with the same name. | |
PortableServer::POA_ptr | _default_POA () |
CDataFlowInterface_ptr | getDataFlowInterface () const |
internal::ConnID * | getPortID () const |
Returns the identity of this port in a ConnID object. | |
types::TypeInfo const * | getTypeInfo () const |
Returns the types::TypeInfo object for the port's type. | |
int | serverProtocol () const |
Returns the protocol over which this port can be accessed. | |
bool | connected () const |
Returns true if there is at least one channel registered in this port's list of outputs. | |
bool | createStream (const ConnPolicy &policy) |
Creates a data stream from or to this port using connection-less transports. | |
virtual bool | addConnection (internal::ConnID *port_id, base::ChannelElementBase::shared_ptr channel_input, ConnPolicy const &policy) |
Adds a new connection to this output port and initializes the connection if required by policy. | |
void | disconnect () |
Removes any connection that either go to or come from this port. | |
bool | disconnect (base::PortInterface *p) |
Removes the channel that connects this port to port . | |
virtual void | write (DataSourceBase::shared_ptr source) |
Write this port using the value stored in source. | |
bool | 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. | |
bool | 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. | |
bool | createConnection (InputPortInterface &sink) |
Connects this write port to the given read port, using as policy the default policy of the sink port. | |
virtual bool | removeConnection (internal::ConnID *cid) |
Removes the connection associated with this channel, and the channel as well. | |
virtual bool | connectTo (PortInterface *other, ConnPolicy const &policy) |
Connects this port with other, using the given policy. | |
virtual bool | connectTo (PortInterface *other) |
Connects this port with other, using the default policy of the input. | |
virtual const internal::ConnectionManager * | getManager () const |
Returns the connection manager of this port (if any). | |
const std::string & | getName () const |
Get the name of this Port. | |
bool | setName (const std::string &name) |
Change the name of this unconnected Port. | |
const std::string & | getDescription () const |
Get the documentation of this port. | |
PortInterface & | doc (const std::string &desc) |
Set the documentation of this port. | |
virtual bool | isLocal () const |
Returns true if this port is located on this process, and false otherwise. | |
virtual Service * | createPortObject () |
Create accessor Object for this Port, for addition to a TaskContext Object interface. | |
void | setInterface (DataFlowInterface *iface) |
Once a port is added to a DataFlowInterface, it gets a pointer to that interface. | |
DataFlowInterface * | getInterface () const |
Returns the DataFlowInterface this port belongs to or null if it was not added to such an interface. | |
Protected Member Functions | |
bool | connectionAdded (base::ChannelElementBase::shared_ptr channel, ConnPolicy const &policy) |
Upcall to OutputPort. | |
Protected Attributes | |
types::TypeInfo const * | type_info |
CDataFlowInterface_var | dataflow |
PortableServer::POA_var | mpoa |
internal::ConnectionManager | cmanager |
DataFlowInterface * | iface |
Proxy for a remote output port.
Allows for creation of a connection from the remote port to a local input port.
Definition at line 96 of file RemotePorts.hpp.
virtual bool RTT::corba::RemotePort< base::OutputPortInterface >::addConnection | ( | internal::ConnID * | port_id, |
base::ChannelElementBase::shared_ptr | channel_input, | ||
ConnPolicy const & | policy | ||
) | [virtual, inherited] |
Reimplemented from RTT::base::OutputPortInterface.
RTT::base::PortInterface * RemoteOutputPort::antiClone | ( | ) | const [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.
Implements RTT::base::PortInterface.
Definition at line 273 of file RemotePorts.cpp.
References RTT::base::PortInterface::getName(), and RTT::types::TypeInfo::inputPort().
RTT::base::PortInterface * RemoteOutputPort::clone | ( | ) | const [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.
Implements RTT::base::PortInterface.
Definition at line 270 of file RemotePorts.cpp.
References RTT::base::PortInterface::getName(), and RTT::types::TypeInfo::outputPort().
bool RTT::corba::RemotePort< base::OutputPortInterface >::connected | ( | ) | const [virtual, inherited] |
Reimplemented from RTT::base::OutputPortInterface.
bool OutputPortInterface::connectTo | ( | PortInterface * | other, |
ConnPolicy const & | policy | ||
) | [virtual, inherited] |
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.
References RTT::base::OutputPortInterface::createConnection().
bool OutputPortInterface::connectTo | ( | PortInterface * | other | ) | [virtual, inherited] |
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.
References RTT::base::OutputPortInterface::createConnection().
bool RTT::corba::RemotePort< base::OutputPortInterface >::createStream | ( | const ConnPolicy & | policy | ) | [virtual, inherited] |
Implements RTT::base::PortInterface.
PortInterface & PortInterface::doc | ( | const std::string & | desc | ) | [inherited] |
Set the documentation of this port.
desc | The description of the port |
Definition at line 59 of file PortInterface.cpp.
References RTT::DataFlowInterface::setPortDescription().
Referenced by RTT::InputPort< T >::createPortObject().
const std::string& RTT::base::PortInterface::getDescription | ( | ) | const [inline, inherited] |
Get the documentation of this port.
Definition at line 91 of file PortInterface.hpp.
virtual const internal::ConnectionManager* RTT::base::OutputPortInterface::getManager | ( | ) | const [inline, virtual, inherited] |
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.
void RemoteOutputPort::keepLastWrittenValue | ( | bool | new_flag | ) | [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.
Implements RTT::base::OutputPortInterface.
Definition at line 231 of file RemotePorts.cpp.
void PortInterface::setInterface | ( | DataFlowInterface * | iface | ) | [inherited] |
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 90 of file PortInterface.cpp.
Referenced by RTT::DataFlowInterface::addLocalPort().
bool PortInterface::setName | ( | const std::string & | name | ) | [inherited] |
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 50 of file PortInterface.cpp.
References RTT::base::PortInterface::connected().
Referenced by RTT::DataFlowInterface::addEventPort(), RTT::TaskContext::addEventPort(), RTT::DataFlowInterface::addPort(), and RTT::TaskContext::addPort().