43 #include "../internal/ConnInputEndPoint.hpp" 44 #include "../internal/ConnFactory.hpp" 45 #include "../Logger.hpp" 48 #include <../os/traces.h> 56 , default_policy( default_policy )
57 #ifdef ORO_SIGNALLING_PORTS
58 , new_data_on_port_event(0)
60 , msignal_interface(false)
64 InputPortInterface::~InputPortInterface()
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;
90 log(
Error) <<
"InputPort "<< getName() <<
" could not connect to "<< other->
getName() <<
": not an Output port." <<
endlog();
98 return connectTo(other, default_policy);
104 return cmanager.addConnection( cid, channel, policy);
107 #ifndef ORO_SIGNALLING_PORTS 108 void InputPortInterface::signal()
110 if (iface && msignal_interface)
111 iface->dataOnPort(
this);
114 void InputPortInterface::signalInterface(
bool true_false)
116 msignal_interface = true_false;
121 {
throw std::runtime_error(
"calling default InputPortInterface::read(datasource) implementation"); }
124 bool InputPortInterface::connected()
const 126 return getEndpoint()->connected();
134 void InputPortInterface::disconnect()
136 cmanager.disconnect();
141 return cmanager.disconnect(port);
146 return internal::ConnFactory::createSharedConnection(0,
this, shared_connection, policy);
boost::intrusive_ptr< SharedConnectionBase > shared_ptr
const std::string & getName() const
#define tracepoint(provider, tracepoint,...)
bool createConnection(InputPortInterface &sink)
boost::intrusive_ptr< ChannelElementBase > shared_ptr
boost::intrusive_ptr< DataSourceBase > shared_ptr
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
static Logger::LogFunction endlog()