Orocos Real-Time Toolkit
2.9.0
|
Proxy for a remote input port. More...
#include <rtt/transports/corba/RemotePorts.hpp>
Public Member Functions | |
RemoteInputPort (types::TypeInfo const *type_info, CDataFlowInterface_ptr dataflow, std::string const &name, PortableServer::POA_ptr poa) | |
void | clear () |
Clears the connection. More... | |
base::ChannelElementBase::shared_ptr | buildRemoteChannelOutput (base::OutputPortInterface &output_port, types::TypeInfo const *type, base::InputPortInterface &reader_, ConnPolicy const &policy) |
This method will do more than just building the output half, it will create the two crucial ChannelElements on both sides of the CORBA connection to marshal/demarshal the channel data. More... | |
bool | createConnection (internal::SharedConnectionBase::shared_ptr shared_connection, ConnPolicy const &policy=ConnPolicy()) |
Overridden version of InputPortInterface::createConnection(internal::SharedConnectionBase::shared_ptr, ConnPolicy const&), which forwards the call to the remote data flow interface. More... | |
base::PortInterface * | clone () const |
Create a local clone of this port with the same name. More... | |
base::PortInterface * | antiClone () const |
Create a local clone of this port with the same name. More... | |
virtual bool | disconnect (PortInterface *port) |
Removes the channel that connects this port to port . More... | |
base::DataSourceBase * | getDataSource () |
Returns a DataSourceBase interface to read this port. More... | |
PortableServer::POA_ptr | _default_POA () |
CDataFlowInterface_ptr | getDataFlowInterface () const |
internal::ConnID * | getPortID () const |
types::TypeInfo const * | getTypeInfo () const |
int | serverProtocol () const |
bool | connected () const |
bool | createStream (const ConnPolicy &policy) |
virtual void | disconnect () |
base::ChannelElementBase * | getEndpoint () const |
ConnPolicy | getDefaultPolicy () const |
virtual FlowStatus | read (DataSourceBase::shared_ptr source, bool copy_old_data=true) |
Reads the port and updates the value hold by the given data source. More... | |
void | signalInterface (bool true_false) |
When called with true, will signal the DataFlowInterface when new data is available. More... | |
virtual bool | connectTo (PortInterface *other, ConnPolicy const &policy) |
Connects this port with other, using the given policy. More... | |
virtual bool | connectTo (PortInterface *other) |
Connects this port with other, using the default policy of the input. More... | |
const std::string & | getName () const |
Get the name of this Port. More... | |
bool | setName (const std::string &name) |
Change the name of this unconnected Port. More... | |
const std::string & | getDescription () const |
Get the documentation of this port. More... | |
PortInterface & | doc (const std::string &desc) |
Set the documentation of this port. More... | |
virtual bool | connectedTo (PortInterface *port) |
Returns true if this port is connected to the given port. More... | |
virtual bool | isLocal () const |
Returns true if this port is located on this process, and false otherwise. More... | |
virtual Service * | createPortObject () |
Create accessor Object for this Port, for addition to a TaskContext Object interface. More... | |
virtual bool | removeConnection (internal::ConnID *cid) |
Removes a user created connection from this port. More... | |
void | setInterface (DataFlowInterface *iface) |
Once a port is added to a DataFlowInterface, it gets a pointer to that interface. More... | |
DataFlowInterface * | getInterface () const |
Returns the DataFlowInterface this port belongs to or null if it was not added to such an interface. More... | |
virtual internal::ConnectionManager * | getManager () |
Returns the connection manager of this port (if any). More... | |
virtual internal::SharedConnectionBase::shared_ptr | getSharedConnection () const |
Returns a pointer to the shared connection element this port may be connected to. More... | |
Protected Member Functions | |
virtual bool | addConnection (internal::ConnID *, base::ChannelElementBase::shared_ptr, ConnPolicy const &) |
The ConnectionFactory calls this. More... | |
bool | connectionAdded (base::ChannelElementBase::shared_ptr channel, ConnPolicy const &policy) |
void | signal () |
The ConnOutputEndpoint signals that new data is available. More... | |
Protected Attributes | |
types::TypeInfo const * | type_info |
CDataFlowInterface_var | dataflow |
PortableServer::POA_var | mpoa |
ConnPolicy | default_policy |
bool | msignal_interface |
DataFlowInterface * | iface |
internal::ConnectionManager | cmanager |
Proxy for a remote input port.
Since it inherits from ConnFactory, it also allows for building an output endpoint. You can not access its datasource.
Definition at line 127 of file RemotePorts.hpp.
RemoteInputPort::RemoteInputPort | ( | types::TypeInfo const * | type_info, |
CDataFlowInterface_ptr | dataflow, | ||
std::string const & | name, | ||
PortableServer::POA_ptr | poa | ||
) |
Definition at line 110 of file RemotePorts.cpp.
|
inherited |
|
inlineprotectedvirtual |
The ConnectionFactory calls this.
Overload to do nothing when dealing with remote ports.
port_id | |
channel_input | |
policy |
Reimplemented from RTT::corba::RemotePort< base::InputPortInterface >.
Definition at line 138 of file RemotePorts.hpp.
References RTT::base::InputPortInterface::createConnection(), RTT::corba::RemotePort< PortClass >::dataflow, RTT::corba::RemotePort< PortClass >::disconnect(), and RTT::corba::RemotePort< PortClass >::type_info.
|
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 234 of file RemotePorts.cpp.
References RTT::base::PortInterface::getName(), RTT::types::TypeInfo::outputPort(), and RTT::corba::RemotePort< base::InputPortInterface >::type_info.
|
virtual |
This method will do more than just building the output half, it will create the two crucial ChannelElements on both sides of the CORBA connection to marshal/demarshal the channel data.
The policy is used to determine if storage must be allocated remotely or (has been allocated) locally. reader_ is ignored and must be this.
output_port | The local port that will be sending data to the remote channel. |
type | The type of data to transport |
reader_ | Ignored. Must be this. |
policy | The policy for the ConnFactory. |
Reimplemented from RTT::base::InputPortInterface.
Definition at line 122 of file RemotePorts.cpp.
References RTT::types::TypeInfo::buildDataStorage(), CORBA_EXCEPTION_INFO, RTT::types::TypeTransporter::createStream(), RTT::corba::CConnPolicy::data_size, RTT::ConnPolicy::data_size, RTT::corba::RemotePort< base::InputPortInterface >::dataflow, RTT::Error, RTT::base::PortInterface::getInterface(), RTT::base::PortInterface::getName(), RTT::types::TypeInfo::getProtocol(), RTT::types::TypeInfo::getTypeName(), RTT::Info, RTT::ConnPolicy::mandatory, RTT::corba::RemotePort< base::InputPortInterface >::mpoa, RTT::corba::CConnPolicy::name_id, RTT::ConnPolicy::name_id, ORO_CORBA_PROTOCOL_ID, RTT::ConnPolicy::pull, RTT::ConnPolicy::PUSH, toCORBA(), and RTT::ConnPolicy::transport.
|
virtual |
Clears the connection.
After call to read() will return false after clear() has been called
Implements RTT::base::InputPortInterface.
Definition at line 116 of file RemotePorts.cpp.
|
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 231 of file RemotePorts.cpp.
References RTT::base::PortInterface::getName(), RTT::types::TypeInfo::inputPort(), and RTT::corba::RemotePort< base::InputPortInterface >::type_info.
|
virtualinherited |
Reimplemented from RTT::base::InputPortInterface.
|
virtualinherited |
Returns true if this port is connected to the given port.
Definition at line 67 of file PortInterface.cpp.
References RTT::base::PortInterface::cmanager, and RTT::internal::ConnectionManager::connectedTo().
Referenced by RTT::internal::ConnFactory::createConnection().
|
inlineprotectedinherited |
Definition at line 69 of file RemotePorts.hpp.
|
virtualinherited |
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 85 of file InputPortInterface.cpp.
References RTT::base::OutputPortInterface::createConnection(), RTT::Error, and RTT::base::PortInterface::getName().
|
virtualinherited |
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 95 of file InputPortInterface.cpp.
|
virtual |
Overridden version of InputPortInterface::createConnection(internal::SharedConnectionBase::shared_ptr, ConnPolicy const&), which forwards the call to the remote data flow interface.
Reimplemented from RTT::base::InputPortInterface.
Definition at line 200 of file RemotePorts.cpp.
References CORBA_EXCEPTION_INFO, RTT::corba::CConnPolicy::data_size, RTT::ConnPolicy::data_size, RTT::corba::RemotePort< base::InputPortInterface >::dataflow, RTT::Error, RTT::base::PortInterface::getName(), RTT::corba::CConnPolicy::name_id, RTT::ConnPolicy::name_id, and toCORBA().
|
virtualinherited |
Create accessor Object for this Port, for addition to a TaskContext Object interface.
Reimplemented in RTT::OutputPort< T >, and RTT::InputPort< T >.
Definition at line 79 of file PortInterface.cpp.
References RTT::Service::addSynchronousOperation(), RTT::base::PortInterface::connected(), RTT::base::PortInterface::disconnect(), RTT::base::PortInterface::getName(), RTT::DataFlowInterface::getOwner(), and RTT::base::PortInterface::iface.
Referenced by RTT::InputPort< T >::createPortObject(), RTT::DataFlowInterface::createPortObject(), and RTT::OutputPort< T >::createPortObject().
|
virtualinherited |
Implements RTT::base::PortInterface.
|
virtualinherited |
Reimplemented from RTT::base::InputPortInterface.
|
virtual |
Removes the channel that connects this port to port
.
All other ports or callbacks remain unaffected.
Reimplemented from RTT::base::InputPortInterface.
Definition at line 225 of file RemotePorts.cpp.
References RTT::base::PortInterface::disconnect().
|
inherited |
Set the documentation of this port.
desc | The description of the port |
Definition at line 60 of file PortInterface.cpp.
References RTT::base::PortInterface::iface, and RTT::DataFlowInterface::setPortDescription().
Referenced by RTT::InputPort< T >::createPortObject(), and RTT::corba::TaskContextProxy::synchronizePorts().
|
inherited |
|
virtual |
Returns a DataSourceBase interface to read this port.
The returned data source is always a new object.
Implements RTT::base::InputPortInterface.
Definition at line 119 of file RemotePorts.cpp.
|
inherited |
Definition at line 74 of file InputPortInterface.cpp.
Referenced by RTT::base::OutputPortInterface::createBufferConnection().
|
inlineinherited |
Get the documentation of this port.
Definition at line 93 of file PortInterface.hpp.
Referenced by RTT::corba::CDataFlowInterface_i::_default_POA().
|
virtualinherited |
Implements RTT::base::PortInterface.
|
inherited |
Returns the DataFlowInterface this port belongs to or null if it was not added to such an interface.
Definition at line 104 of file PortInterface.cpp.
References RTT::base::PortInterface::iface.
Referenced by buildRemoteChannelOutput(), RTT::corba::RemoteOutputPort::createConnection(), and RTT::mqueue::MQSendRecv::setupStream().
|
inlinevirtualinherited |
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.
Definition at line 222 of file PortInterface.hpp.
Referenced by RTT::internal::ConnInputEndpoint< T >::disconnect(), and RTT::internal::ConnOutputEndpoint< T >::disconnect().
|
inlineinherited |
Get the name of this Port.
Definition at line 79 of file PortInterface.hpp.
Referenced by RTT::DataFlowInterface::addEventPort(), RTT::DataFlowInterface::addLocalEventPort(), RTT::DataFlowInterface::addLocalPort(), RTT::DataFlowInterface::addPort(), RTT::corba::RemoteOutputPort::antiClone(), antiClone(), RTT::InputPort< T >::antiClone(), RTT::OutputPort< T >::antiClone(), RTT::corba::CorbaFallBackProtocol::buildChannelInput(), RTT::internal::ConnFactory::buildChannelInput(), RTT::corba::CorbaFallBackProtocol::buildChannelOutput(), RTT::internal::ConnFactory::buildChannelOutput(), buildRemoteChannelOutput(), RTT::internal::ConnFactory::buildRemoteChannelOutput(), RTT::internal::ConnFactory::buildSharedConnection(), RTT::corba::RemoteOutputPort::clone(), clone(), RTT::InputPort< T >::clone(), RTT::OutputPort< T >::clone(), RTT::TaskContext::connectPorts(), RTT::base::InputPortInterface::connectTo(), RTT::internal::ConnFactory::createAndCheckConnection(), RTT::internal::ConnFactory::createAndCheckSharedConnection(), RTT::internal::ConnFactory::createAndCheckStream(), RTT::corba::RemoteOutputPort::createConnection(), createConnection(), RTT::internal::ConnFactory::createConnection(), RTT::base::PortInterface::createPortObject(), RTT::corba::CorbaFallBackProtocol::createStream(), RTT::corba::CDataFlowInterface_i::deregisterChannel(), RTT::corba::RemoteOutputPort::disconnect(), RTT::internal::ConnectionManager::eraseConnection(), RTT::internal::ConnFactory::findSharedConnection(), RTT::OutputPort< T >::setDataSample(), RTT::mqueue::MQSendRecv::setupStream(), and RTT::OutputPort< T >::write().
|
virtualinherited |
Reimplemented from RTT::base::PortInterface.
|
virtualinherited |
Returns a pointer to the shared connection element this port may be connected to.
Definition at line 109 of file PortInterface.cpp.
References RTT::base::PortInterface::cmanager, and RTT::internal::ConnectionManager::getSharedConnection().
Referenced by RTT::internal::ConnFactory::createAndCheckSharedConnection(), and RTT::internal::ConnFactory::findSharedConnection().
|
virtualinherited |
Implements RTT::base::PortInterface.
|
virtualinherited |
Returns true if this port is located on this process, and false otherwise.
Definition at line 71 of file PortInterface.cpp.
References RTT::base::PortInterface::serverProtocol().
Referenced by RTT::internal::ConnFactory::buildSharedConnection(), RTT::internal::ConnFactory::createAndCheckSharedConnection(), and RTT::internal::ConnFactory::createConnection().
|
virtualinherited |
Reads the port and updates the value hold by the given data source.
This is only valid for local ports.
source has to be an assignable data source
Reimplemented in RTT::InputPort< T >.
Definition at line 117 of file InputPortInterface.cpp.
|
virtualinherited |
Removes a user created connection from this port.
This is an advanced method, prefer to use disconnect() or a method from a subclass of PortInterface.
Definition at line 95 of file PortInterface.cpp.
References RTT::base::PortInterface::cmanager, and RTT::internal::ConnectionManager::removeConnection().
Referenced by RTT::corba::CDataFlowInterface_i::deregisterChannel().
|
virtualinherited |
Reimplemented from RTT::base::PortInterface.
|
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 100 of file PortInterface.cpp.
References RTT::base::PortInterface::iface.
Referenced by RTT::DataFlowInterface::addLocalPort(), and RTT::corba::CDataFlowInterface_i::deregisterChannel().
|
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 51 of file PortInterface.cpp.
References RTT::base::PortInterface::connected().
Referenced by RTT::DataFlowInterface::addEventPort(), RTT::TaskContext::addEventPort(), RTT::DataFlowInterface::addPort(), and RTT::TaskContext::addPort().
|
protectedinherited |
The ConnOutputEndpoint signals that new data is available.
Definition at line 107 of file InputPortInterface.cpp.
Referenced by RTT::internal::ConnOutputEndpoint< T >::signal().
|
inherited |
When called with true, will signal the DataFlowInterface when new data is available.
Definition at line 112 of file InputPortInterface.cpp.
Referenced by RTT::DataFlowInterface::addLocalEventPort().
|
protectedinherited |
Definition at line 64 of file PortInterface.hpp.
Referenced by RTT::base::OutputPortInterface::addConnection(), RTT::OutputPort< T >::clear(), RTT::base::OutputPortInterface::connected(), RTT::base::PortInterface::connectedTo(), RTT::base::OutputPortInterface::disconnect(), RTT::base::PortInterface::getSharedConnection(), RTT::base::PortInterface::removeConnection(), and RTT::base::OutputPortInterface::~OutputPortInterface().
|
protectedinherited |
Definition at line 66 of file RemotePorts.hpp.
Referenced by buildRemoteChannelOutput(), and createConnection().
|
protectedinherited |
Definition at line 69 of file InputPortInterface.hpp.
|
protectedinherited |
Definition at line 63 of file PortInterface.hpp.
Referenced by RTT::base::PortInterface::createPortObject(), RTT::base::PortInterface::doc(), RTT::base::PortInterface::getInterface(), and RTT::base::PortInterface::setInterface().
|
protectedinherited |
Definition at line 67 of file RemotePorts.hpp.
Referenced by buildRemoteChannelOutput().
|
protectedinherited |
Definition at line 73 of file InputPortInterface.hpp.
|
protectedinherited |
Definition at line 65 of file RemotePorts.hpp.
Referenced by antiClone(), and clone().