From 2c830bf159fad608243dba8f0c885d50144640fc Mon Sep 17 00:00:00 2001 From: Peter Soetens Date: Mon, 17 Dec 2012 00:42:01 +0100 Subject: [PATCH] Revert "Add propagateNeedsSignal function." This reverts commit c512431845022a4cf9de099a5eafa5e1347b6129. Accidental push of non-tested patch (contained a type in RemoteChannelElement). --- rtt/base/ChannelElementBase.hpp | 8 ---- rtt/base/ChannelInterface.cpp | 8 ---- rtt/base/InputPortInterface.cpp | 6 --- rtt/transports/corba/DataFlow.idl | 8 ---- rtt/transports/corba/RemoteChannelElement.hpp | 37 ++----------------- 5 files changed, 3 insertions(+), 64 deletions(-) diff --git a/rtt/base/ChannelElementBase.hpp b/rtt/base/ChannelElementBase.hpp index 9de8d605c..a85776ffe 100644 --- a/rtt/base/ChannelElementBase.hpp +++ b/rtt/base/ChannelElementBase.hpp @@ -132,14 +132,6 @@ namespace RTT { namespace base { */ void setOutput(shared_ptr output); - /** Tell if the output needs to be signaled when new data are - * available. - * By default, the channel element forwards the call to its input - * - * @param true_false true if need signaling. - */ - virtual void propagateNeedsSignaling(bool); - /** Signals that there is new data available on this channel * By default, the channel element forwards the call to its output * diff --git a/rtt/base/ChannelInterface.cpp b/rtt/base/ChannelInterface.cpp index 863bab609..253dd8ec3 100644 --- a/rtt/base/ChannelInterface.cpp +++ b/rtt/base/ChannelInterface.cpp @@ -120,14 +120,6 @@ void ChannelElementBase::clear() input->clear(); } -void ChannelElementBase::propagateNeedsSignaling(bool true_false) -{ - // we go against the data stream - shared_ptr input = getInput(); - if (input) - input->propagateNeedsSignaling(true_false); -} - bool ChannelElementBase::signal() { shared_ptr output = getOutput(); diff --git a/rtt/base/InputPortInterface.cpp b/rtt/base/InputPortInterface.cpp index 22c846a71..f5cc2bb60 100644 --- a/rtt/base/InputPortInterface.cpp +++ b/rtt/base/InputPortInterface.cpp @@ -134,12 +134,6 @@ void InputPortInterface::signal() void InputPortInterface::signalInterface(bool true_false) { msignal_interface = true_false; - // propagate the information to the output end - std::list channels = cmanager.getChannels(); - std::list::iterator it; - for(it = channels.begin(); it != channels.end(); ++it) { - it->get<1>()->propagateNeedsSignaling(true_false); - } } #endif FlowStatus InputPortInterface::read(DataSourceBase::shared_ptr source, bool copy_old_data) diff --git a/rtt/transports/corba/DataFlow.idl b/rtt/transports/corba/DataFlow.idl index 3413d97d8..548e2ce40 100644 --- a/rtt/transports/corba/DataFlow.idl +++ b/rtt/transports/corba/DataFlow.idl @@ -74,14 +74,6 @@ module RTT * side is such that they can relay a signal or disconnect. */ void setRemoteSide(in CRemoteChannelElement other); - - /** - * Used by the 'remote' side to tell that it needs signaling - * when new data is available for reading. - * @param true_false true if the remote side is an "eventPort". - */ - void remotePropagateNeedsSignaling(in boolean true_false); - /** * Used by the 'remote' side to inform this channel element that new data * is available for reading. diff --git a/rtt/transports/corba/RemoteChannelElement.hpp b/rtt/transports/corba/RemoteChannelElement.hpp index d4071c4a5..9b830f278 100644 --- a/rtt/transports/corba/RemoteChannelElement.hpp +++ b/rtt/transports/corba/RemoteChannelElement.hpp @@ -71,10 +71,6 @@ namespace RTT { * In pull mode, we don't send data, just signal it and remote must read it back. */ bool pull; - /** - * In pull mode, we don't send data neither signal if not needed. - */ - bool need_signal; /** This is used on to read the channel */ typename base::ChannelElement::value_t sample; @@ -99,7 +95,7 @@ namespace RTT { value_data_source(new internal::ValueDataSource), ref_data_source(new internal::LateReferenceDataSource), const_ref_data_source(new internal::LateConstReferenceDataSource), - valid(true), pull(is_pull), need_signal(false, + valid(true), pull(is_pull), msender(sender), write_any(new CORBA::Any) { @@ -127,30 +123,6 @@ namespace RTT { { this->deref(); } - /** - * CORBA IDL function. - * CRemoteChannelElement_i propagateNeedsSignaling implementation. - */ - void remotePropagateNeedsSignaling(CORBA::Boolean true_false) ACE_THROW_SPEC (( - CORBA::SystemException - )) - { - // forward too. - base::ChannelElementBase::propagateNeedsSignaling(true_false); - // update the cache - need_signal = true_false; - } - - /** - * base::ChannelElement propagateNeedsSignaling implementation. - */ - void propagateNeedsSignaling(bool true_false) - { - if ( !CORBA::is_nil(remote_side.in()) ) - // FIXME should we care about the RT here, as in signal ? - remote_side->remotePropagateNeedsSignaling(true_false); - } - /** * CORBA IDL function. */ @@ -166,9 +138,6 @@ namespace RTT { // intercept signal if no remote side set. if ( CORBA::is_nil(remote_side.in()) ) return true; - // intercept signal if no signal needed. - if ( !need_signal ) - return true; // Remember that signal() is called in the context of the one // that wrote the data, so we must decouple here to keep hard-RT happy. // the dispatch thread must read the data and send it over by calling transferSample(). @@ -182,7 +151,7 @@ namespace RTT { return; //log(Debug) <<"transfering..." <remoteSignal(); } #ifdef CORBA_IS_OMNIORB @@ -197,7 +166,7 @@ namespace RTT { log(Error) << "caught CORBA exception while signalling our remote endpoint: " << e._name() << endlog(); valid = false; } - } else if (!pull) { + } else { //log(Debug) <<"...read..."<read(sample, false) == NewData && valid) { //log(Debug) <<"...write..."<