43 #include "../internal/ConnInputEndPoint.hpp" 44 #include "../Logger.hpp" 56 , default_policy( default_policy )
57 #ifdef ORO_SIGNALLING_PORTS
58 , new_data_on_port_event(0)
60 , msignal_interface(false)
66 cmanager.disconnect();
67 #ifdef ORO_SIGNALLING_PORTS 68 if ( new_data_on_port_event) {
69 delete new_data_on_port_event;
75 {
return default_policy; }
77 #ifdef ORO_SIGNALLING_PORTS 78 InputPortInterface::NewDataOnPortEvent* InputPortInterface::getNewDataOnPortEvent()
80 if (!new_data_on_port_event)
81 new_data_on_port_event =
new NewDataOnPortEvent();
82 return new_data_on_port_event;
89 log(
Error) <<
"InputPort "<< getName() <<
" could not connect to "<< other->
getName() <<
": not an Output port." <<endlog();
97 return connectTo(other, default_policy);
103 cmanager.addConnection( port_id, channel_output, policy);
113 this->addConnection(cid, channel, policy);
114 if ( channel->inputReady() )
117 log(
Error) <<
"Can't add ChannelElement which is not a ConnInputEndPoint to Port "<< this->getName() <<endlog();
126 channel->disconnect(
false);
127 channel->disconnect(
true);
135 return cmanager.removeConnection(conn);
138 #ifndef ORO_SIGNALLING_PORTS 141 if (iface && msignal_interface)
142 iface->dataOnPort(
this);
146 msignal_interface = true_false;
150 {
throw std::runtime_error(
"calling default InputPortInterface::read(datasource) implementation"); }
153 {
return cmanager.connected(); }
162 cmanager.disconnect();
167 return cmanager.disconnect(port);
FlowStatus
Returns the status of a data flow read.
const std::string & getName() const
Get the name of this Port.
A connection policy object describes how a given connection should behave.
The base class of each OutputPort.
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...
A class for representing a user type, and which can build instances of that type. ...
boost::intrusive_ptr< ChannelElementBase > shared_ptr
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.
The base class of every data flow port.