Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
RTT::base::InputPortInterface Class Referenceabstract

#include <InputPortInterface.hpp>

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

Public Member Functions

virtual bool addConnection (internal::ConnID *port_id, ChannelElementBase::shared_ptr channel, ConnPolicy const &policy)
 
virtual base::ChannelElementBase::shared_ptr buildRemoteChannelOutput (base::OutputPortInterface &output_port, types::TypeInfo const *type_info, base::InputPortInterface &input, const ConnPolicy &policy)
 
virtual void clear ()=0
 
virtual bool connected () const
 
virtual bool connectTo (PortInterface *other, ConnPolicy const &policy)
 
virtual bool connectTo (PortInterface *other)
 
virtual bool createConnection (internal::SharedConnectionBase::shared_ptr shared_connection, ConnPolicy const &policy=ConnPolicy())
 
virtual void disconnect ()
 
virtual bool disconnect (PortInterface *port)
 
virtual DataSourceBasegetDataSource ()=0
 
ConnPolicy getDefaultPolicy () const
 
 InputPortInterface (std::string const &name, ConnPolicy const &default_policy=ConnPolicy())
 
virtual FlowStatus read (DataSourceBase::shared_ptr source, bool copy_old_data=true)
 
void signalInterface (bool true_false)
 
virtual ~InputPortInterface ()
 
- Public Member Functions inherited from RTT::base::PortInterface
virtual PortInterfaceantiClone () const =0
 
virtual PortInterfaceclone () const =0
 
virtual bool connectedTo (PortInterface *port)
 
virtual ServicecreatePortObject ()
 
virtual bool createStream (ConnPolicy const &policy)=0
 
PortInterfacedoc (const std::string &desc)
 
const std::string & getDescription () const
 
virtual ChannelElementBasegetEndpoint () const =0
 
const std::string & getFullName () const
 
DataFlowInterfacegetInterface () const
 
virtual internal::ConnectionManagergetManager ()
 
const std::string & getName () const
 
virtual internal::ConnIDgetPortID () const
 
virtual internal::SharedConnectionBase::shared_ptr getSharedConnection () const
 
virtual const types::TypeInfogetTypeInfo () const =0
 
virtual bool isLocal () const
 
virtual bool removeConnection (internal::ConnID *cid)
 
virtual int serverProtocol () const
 
void setInterface (DataFlowInterface *iface)
 
bool setName (const std::string &name)
 
virtual ~PortInterface ()
 

Protected Member Functions

 InputPortInterface (const InputPortInterface &orig)
 
void signal ()
 
void traceRead (RTT::FlowStatus status)
 
- Protected Member Functions inherited from RTT::base::PortInterface
 PortInterface (const std::string &name)
 

Protected Attributes

ConnPolicy default_policy
 
bool msignal_interface
 
- Protected Attributes inherited from RTT::base::PortInterface
internal::ConnectionManager cmanager
 
os::MutexRecursive connection_lock
 
DataFlowInterfaceiface
 

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 60 of file InputPortInterface.hpp.

Constructor & Destructor Documentation

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 64 of file InputPortInterface.cpp.

Member Function Documentation

bool InputPortInterface::addConnection ( internal::ConnID cid,
ChannelElementBase::shared_ptr  channel,
ConnPolicy const &  policy 
)
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 101 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 149 of file InputPortInterface.cpp.

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

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

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

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 124 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.

Returns
true on success, false on failure

Implements RTT::base::PortInterface.

Definition at line 86 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.

Returns
true on success, false on failure

Implements RTT::base::PortInterface.

Definition at line 96 of file InputPortInterface.cpp.

bool InputPortInterface::createConnection ( internal::SharedConnectionBase::shared_ptr  shared_connection,
ConnPolicy const &  policy = ConnPolicy() 
)
virtual

Connects the port to an existing shared connection instance.

Implements RTT::base::PortInterface.

Reimplemented in RTT::corba::RemoteInputPort.

Definition at line 144 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 134 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::RemoteInputPort.

Definition at line 139 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.

ConnPolicy InputPortInterface::getDefaultPolicy ( ) const

Definition at line 74 of file InputPortInterface.cpp.

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 120 of file InputPortInterface.cpp.

void InputPortInterface::signal ( )
protected

The ConnOutputEndpoint signals that new data is available

Definition at line 108 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 114 of file InputPortInterface.cpp.

void InputPortInterface::traceRead ( RTT::FlowStatus  status)
protected

Definition at line 129 of file InputPortInterface.cpp.

Member Data Documentation

ConnPolicy RTT::base::InputPortInterface::default_policy
protected

Definition at line 69 of file InputPortInterface.hpp.

bool RTT::base::InputPortInterface::msignal_interface
protected

Definition at line 73 of file InputPortInterface.hpp.


The documentation for this class was generated from the following files:


rtt
Author(s): RTT Developers
autogenerated on Tue Jun 25 2019 19:33:42