RTT::base::InputPortInterface Class Reference

#include <InputPortInterface.hpp>

Inheritance diagram for RTT::base::InputPortInterface:
Inheritance graph
[legend]

List of all members.

Public Types

typedef internal::Signal< void(PortInterface *) NewDataOnPortEvent )
typedef internal::Signal< void(PortInterface *) NewDataOnPortEvent )
typedef
NewDataOnPortEvent::SlotFunction 
SlotFunction
typedef
NewDataOnPortEvent::SlotFunction 
SlotFunction

Public Member Functions

virtual bool addConnection (internal::ConnID *port_id, ChannelElementBase::shared_ptr channel_input, ConnPolicy const &policy=ConnPolicy())
virtual bool addConnection (internal::ConnID *port_id, ChannelElementBase::shared_ptr channel_input, ConnPolicy const &policy=ConnPolicy())
virtual bool channelReady (base::ChannelElementBase::shared_ptr channel)
virtual bool channelReady (base::ChannelElementBase::shared_ptr channel)
void clear ()
void clear ()
virtual bool connected () const
virtual bool connected () const
virtual bool connectTo (PortInterface *other)
virtual bool connectTo (PortInterface *other, ConnPolicy const &policy)
virtual bool connectTo (PortInterface *other)
virtual bool connectTo (PortInterface *other, ConnPolicy const &policy)
virtual bool disconnect (PortInterface *port)
virtual void disconnect ()
virtual bool disconnect (PortInterface *port)
virtual void disconnect ()
virtual DataSourceBasegetDataSource ()=0
virtual DataSourceBasegetDataSource ()=0
ConnPolicy getDefaultPolicy () const
ConnPolicy getDefaultPolicy () const
virtual const
internal::ConnectionManager
getManager () const
virtual const
internal::ConnectionManager
getManager () const
NewDataOnPortEventgetNewDataOnPortEvent ()
NewDataOnPortEventgetNewDataOnPortEvent ()
 InputPortInterface (std::string const &name, ConnPolicy const &default_policy=ConnPolicy())
 InputPortInterface (std::string const &name, ConnPolicy const &default_policy=ConnPolicy())
virtual FlowStatus read (DataSourceBase::shared_ptr source, bool copy_old_data=true)
virtual FlowStatus read (DataSourceBase::shared_ptr source, bool copy_old_data=true)
virtual bool removeConnection (internal::ConnID *cid)
virtual bool removeConnection (internal::ConnID *cid)
virtual ~InputPortInterface ()
virtual ~InputPortInterface ()

Protected Member Functions

 InputPortInterface (const InputPortInterface &orig)
 InputPortInterface (const InputPortInterface &orig)

Protected Attributes

internal::ConnectionManager cmanager
ConnPolicy default_policy
NewDataOnPortEventnew_data_on_port_event

Detailed Description

The base class of the InputPort. It contains the connection management code, which is independent of the actual data being transmitted.

Definition at line 55 of file install/include/rtt/base/InputPortInterface.hpp.


Member Typedef Documentation

Definition at line 61 of file rtt/base/InputPortInterface.hpp.

typedef NewDataOnPortEvent::SlotFunction RTT::base::InputPortInterface::SlotFunction

Definition at line 62 of file rtt/base/InputPortInterface.hpp.

typedef NewDataOnPortEvent::SlotFunction RTT::base::InputPortInterface::SlotFunction

Constructor & Destructor Documentation

RTT::base::InputPortInterface::InputPortInterface ( const InputPortInterface orig  )  [protected]
RTT::base::InputPortInterface::InputPortInterface ( std::string const &  name,
ConnPolicy const &  default_policy = ConnPolicy() 
)
virtual RTT::base::InputPortInterface::~InputPortInterface (  )  [virtual]
RTT::base::InputPortInterface::InputPortInterface ( const InputPortInterface orig  )  [protected]
RTT::base::InputPortInterface::InputPortInterface ( std::string const &  name,
ConnPolicy const &  default_policy = ConnPolicy() 
)
virtual RTT::base::InputPortInterface::~InputPortInterface (  )  [virtual]

Member Function Documentation

virtual bool RTT::base::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, RTT::corba::RemoteInputPort, RTT::corba::RemotePort< base::InputPortInterface >, and RTT::corba::RemotePort< base::InputPortInterface >.

virtual bool RTT::base::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, RTT::corba::RemoteInputPort, RTT::corba::RemotePort< base::InputPortInterface >, and RTT::corba::RemotePort< base::InputPortInterface >.

virtual bool RTT::base::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, and RTT::corba::RemoteInputPort.

virtual bool RTT::base::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, and RTT::corba::RemoteInputPort.

void RTT::base::InputPortInterface::clear (  ) 

Clears the connection. After call to read() will return false after clear() has been called

void RTT::base::InputPortInterface::clear (  ) 

Clears the connection. After call to read() will return false after clear() has been called

virtual bool RTT::base::InputPortInterface::connected (  )  const [virtual]
virtual bool RTT::base::InputPortInterface::connected (  )  const [virtual]
virtual bool RTT::base::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.

Returns:
true on success, false on failure

Implements RTT::base::PortInterface.

virtual bool RTT::base::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.

Returns:
true on success, false on failure

Implements RTT::base::PortInterface.

virtual bool RTT::base::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.

Returns:
true on success, false on failure

Implements RTT::base::PortInterface.

virtual bool RTT::base::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.

Returns:
true on success, false on failure

Implements RTT::base::PortInterface.

virtual bool RTT::base::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 >, and RTT::corba::RemotePort< base::InputPortInterface >.

virtual void RTT::base::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 >, and RTT::corba::RemotePort< base::InputPortInterface >.

virtual bool RTT::base::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 >, and RTT::corba::RemotePort< base::InputPortInterface >.

virtual void RTT::base::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 >, and RTT::corba::RemotePort< base::InputPortInterface >.

virtual DataSourceBase* RTT::base::InputPortInterface::getDataSource (  )  [pure virtual]

Returns a DataSourceBase interface to read this port. The returned data source is always the same object and will be destroyed when the port is destroyed.

Implemented in RTT::InputPort< T >, RTT::corba::RemoteInputPort, RTT::InputPort< T >, RTT::corba::RemoteInputPort, RTT::InputPort< double >, RTT::InputPort< double >, RTT::InputPort< int >, RTT::InputPort< int >, RTT::InputPort< bool >, and RTT::InputPort< bool >.

virtual DataSourceBase* RTT::base::InputPortInterface::getDataSource (  )  [pure virtual]

Returns a DataSourceBase interface to read this port. The returned data source is always the same object and will be destroyed when the port is destroyed.

Implemented in RTT::InputPort< T >, RTT::corba::RemoteInputPort, RTT::InputPort< T >, RTT::corba::RemoteInputPort, RTT::InputPort< double >, RTT::InputPort< double >, RTT::InputPort< int >, RTT::InputPort< int >, RTT::InputPort< bool >, and RTT::InputPort< bool >.

ConnPolicy RTT::base::InputPortInterface::getDefaultPolicy (  )  const
ConnPolicy RTT::base::InputPortInterface::getDefaultPolicy (  )  const
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.

Returns:
null if no such manager is available, or the manager otherwise.
See also:
ConnectionManager::getChannels() for a list of all connections of this port.

Implements RTT::base::PortInterface.

Definition at line 141 of file rtt/base/InputPortInterface.hpp.

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.

Returns:
null if no such manager is available, or the manager otherwise.
See also:
ConnectionManager::getChannels() for a list of all connections of this port.

Implements RTT::base::PortInterface.

Definition at line 130 of file install/include/rtt/base/InputPortInterface.hpp.

NewDataOnPortEvent* RTT::base::InputPortInterface::getNewDataOnPortEvent (  ) 

Returns the event object that gets emitted when new data is available for this port. It gets deleted when the port is deleted.

NewDataOnPortEvent* RTT::base::InputPortInterface::getNewDataOnPortEvent (  ) 

Returns the event object that gets emitted when new data is available for this port. It gets deleted when the port is deleted.

virtual FlowStatus RTT::base::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< T >, RTT::InputPort< double >, RTT::InputPort< double >, RTT::InputPort< int >, RTT::InputPort< int >, RTT::InputPort< bool >, and RTT::InputPort< bool >.

virtual FlowStatus RTT::base::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< T >, RTT::InputPort< double >, RTT::InputPort< double >, RTT::InputPort< int >, RTT::InputPort< int >, RTT::InputPort< bool >, and RTT::InputPort< bool >.

virtual bool RTT::base::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.

virtual bool RTT::base::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.


Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Jan 11 09:49:51 2013