43 #include "../internal/ConnInputEndPoint.hpp" 44 #include "../internal/ConnFactory.hpp" 45 #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 return cmanager.addConnection( cid, channel, policy);
106 #ifndef ORO_SIGNALLING_PORTS 109 if (iface && msignal_interface)
110 iface->dataOnPort(
this);
114 msignal_interface = true_false;
118 {
throw std::runtime_error(
"calling default InputPortInterface::read(datasource) implementation"); }
121 {
return cmanager.connected(); }
125 cmanager.disconnect();
130 return cmanager.disconnect(port);
static bool createAndCheckSharedConnection(base::OutputPortInterface *output_port, base::InputPortInterface *input_port, SharedConnectionBase::shared_ptr shared_connection, ConnPolicy const &policy)
boost::intrusive_ptr< SharedConnectionBase > shared_ptr
FlowStatus
Returns the status of a data flow read operation.
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.