42 #include "../internal/ConnFactory.hpp" 82 {
throw std::runtime_error(
"calling default OutputPortInterface::write(datasource) implementation"); }
static bool createAndCheckSharedConnection(base::OutputPortInterface *output_port, base::InputPortInterface *input_port, SharedConnectionBase::shared_ptr shared_connection, ConnPolicy const &policy)
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 me...
boost::intrusive_ptr< SharedConnectionBase > shared_ptr
void disconnect()
Disconnect all connections.
A connection policy object describes how a given connection should behave.
virtual WriteStatus write(DataSourceBase::shared_ptr source)
Write this port using the value stored in source.
static ConnPolicy buffer(int size, int lock_policy=LOCK_FREE, bool init_connection=false, bool pull=false)
Create a policy for a (lock-free) fifo buffer connection of a given size.
Convenient short notation for every sub-namespace of RTT.
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 connectTo(PortInterface *other, ConnPolicy const &policy)
Connects this port with other, using the given policy.
virtual bool addConnection(internal::ConnID *port_id, ChannelElementBase::shared_ptr channel_input, ConnPolicy const &policy)
Adds a new connection to this output port and initializes the connection if required by policy...
virtual bool connected() const
Returns true if there is at least one channel registered in this port's list of outputs.
boost::intrusive_ptr< ChannelElementBase > shared_ptr
static ConnPolicy data(int lock_policy=LOCK_FREE, bool init_connection=true, bool pull=false)
Create a policy for a (lock-free) shared data connection of a given size.
internal::ConnectionManager cmanager
virtual void disconnect()
Removes any connection that either go to or come from this port.
bool addConnection(ConnID *port_id, base::ChannelElementBase::shared_ptr channel, ConnPolicy policy)
Helper method for port-to-port connection establishment.
This class is used in places where a permanent representation of a reference to a connection is neede...
boost::intrusive_ptr< DataSourceBase > shared_ptr
Use this type to store a pointer to a DataSourceBase.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
virtual bool connectionAdded(ChannelElementBase::shared_ptr channel_input, ConnPolicy const &policy)=0
Upcall to OutputPort.
The base class of every data flow port.
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 give...
virtual ~OutputPortInterface()
OutputPortInterface(OutputPortInterface const &orig)
WriteStatus
Returns the status of a data flow write operation.
bool connected() const
Returns true if there is at least one connection registered in this port's list of outputs...