#include <InputPortInterface.hpp>
The base class of the InputPort. It contains the connection management code, which is independent of the actual data being transmitted.
Definition at line 60 of file InputPortInterface.hpp.
RTT::base::InputPortInterface::InputPortInterface | ( | const InputPortInterface & | orig | ) | [protected] |
RTT::base::InputPortInterface::InputPortInterface | ( | std::string const & | name, |
ConnPolicy const & | default_policy = ConnPolicy() |
||
) |
InputPortInterface::~InputPortInterface | ( | ) | [virtual] |
Definition at line 63 of file InputPortInterface.cpp.
bool InputPortInterface::addConnection | ( | internal::ConnID * | cid, |
ChannelElementBase::shared_ptr | channel_input, | ||
ConnPolicy const & | policy = ConnPolicy() |
||
) | [virtual] |
Adds a user created connection to this port. This is an advanced method, prefer to use connectTo and createStream.
Implements RTT::base::PortInterface.
Reimplemented in RTT::corba::RemoteInputPort, and RTT::corba::RemotePort< base::InputPortInterface >.
Definition at line 99 of file InputPortInterface.cpp.
base::ChannelElementBase::shared_ptr InputPortInterface::buildRemoteChannelOutput | ( | base::OutputPortInterface & | output_port, |
types::TypeInfo const * | type_info, | ||
base::InputPortInterface & | input, | ||
const ConnPolicy & | policy | ||
) | [virtual] |
This method is analoguous to the static ConnFactory::buildChannelOutput. It is provided for remote connection building: for these connections, no template can be used and therefore the connection setup should be done based on the types::TypeInfo object
Reimplemented in RTT::corba::RemoteInputPort.
Definition at line 160 of file InputPortInterface.cpp.
bool InputPortInterface::channelReady | ( | base::ChannelElementBase::shared_ptr | channel | ) | [virtual] |
Call this to indicate that the connection leading to this port is ready to use. The input port will check its channel elements by sending an inputReady() message. If this succeeds, this function returns true and the input port is ready to use (this->connected() == true). If sending inputReady() returns failure, this method returns false and the connection is aborted (this->connected() == false).
Reimplemented in RTT::corba::RemoteInputPort.
Definition at line 106 of file InputPortInterface.cpp.
void InputPortInterface::clear | ( | ) |
Clears the connection. After call to read() will return false after clear() has been called
Definition at line 145 of file InputPortInterface.cpp.
bool InputPortInterface::connected | ( | ) | const [virtual] |
Returns true if this port is connected
Implements RTT::base::PortInterface.
Reimplemented in RTT::corba::RemotePort< base::InputPortInterface >.
Definition at line 142 of file InputPortInterface.cpp.
bool InputPortInterface::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 84 of file InputPortInterface.cpp.
bool InputPortInterface::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 94 of file InputPortInterface.cpp.
void InputPortInterface::disconnect | ( | ) | [virtual] |
Removes any connection that either go to or come from this port *and* removes all callbacks and cleans up the NewDataOnPortEvent.
Implements RTT::base::PortInterface.
Reimplemented in RTT::corba::RemotePort< base::InputPortInterface >.
Definition at line 150 of file InputPortInterface.cpp.
bool InputPortInterface::disconnect | ( | PortInterface * | port | ) | [virtual] |
Removes the channel that connects this port to port
. All other ports or callbacks remain unaffected.
Implements RTT::base::PortInterface.
Reimplemented in RTT::corba::RemotePort< base::InputPortInterface >.
Definition at line 155 of file InputPortInterface.cpp.
virtual DataSourceBase* RTT::base::InputPortInterface::getDataSource | ( | ) | [pure virtual] |
Returns a DataSourceBase interface to read this port. The returned data source is always a new object.
Implemented in RTT::InputPort< T >, RTT::InputPort< double >, RTT::InputPort< int >, RTT::InputPort< bool >, and RTT::corba::RemoteInputPort.
Definition at line 73 of file InputPortInterface.cpp.
virtual const internal::ConnectionManager* RTT::base::InputPortInterface::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 159 of file InputPortInterface.hpp.
FlowStatus InputPortInterface::read | ( | DataSourceBase::shared_ptr | source, |
bool | copy_old_data = true |
||
) | [virtual] |
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 >, RTT::InputPort< double >, RTT::InputPort< int >, and RTT::InputPort< bool >.
Definition at line 139 of file InputPortInterface.cpp.
bool InputPortInterface::removeConnection | ( | internal::ConnID * | cid | ) | [virtual] |
Removes the input channel
Returns true if the provided channel was actually a channel of this port, and false otherwise.
You should usually not use this directly. Use disconnect() instead.
Implements RTT::base::PortInterface.
Definition at line 123 of file InputPortInterface.cpp.
void InputPortInterface::signal | ( | ) | [protected] |
The ConnOutputEndpoint signals that new data is available
Definition at line 129 of file InputPortInterface.cpp.
void InputPortInterface::signalInterface | ( | bool | true_false | ) |
When called with true, will signal the DataFlowInterface when new data is available.
Definition at line 134 of file InputPortInterface.cpp.
Definition at line 69 of file InputPortInterface.hpp.
Definition at line 70 of file InputPortInterface.hpp.
bool RTT::base::InputPortInterface::msignal_interface [protected] |
Definition at line 74 of file InputPortInterface.hpp.