89 {
throw std::runtime_error(
"calling default OutputPortInterface::write(datasource) implementation"); }
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...
void addConnection(ConnID *port_id, base::ChannelElementBase::shared_ptr channel_input, ConnPolicy policy)
Helper method for port-to-port connection establishment.
void disconnect()
Disconnect all connections.
bool removeConnection(ConnID *port_id)
virtual void write(DataSourceBase::shared_ptr source)
Write this port using the value stored in source.
internal::ConnectionManager cmanager
A connection policy object describes how a given connection should behave.
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
virtual bool removeConnection(internal::ConnID *cid)
Removes the connection associated with this channel, and the channel as well.
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.
virtual void disconnect()
Removes any connection that either go to or come from this port.
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)
bool connected() const
Returns true if there is at least one channel registered in this port's list of outputs.