The hash @on_data_listeners in Vizkit::ConnectionManager uses port as key. However, if the port is e.g. of type SubPortProxy, and if the user connects again to the same port (determined from type, task, and name), the port is added multiple times (and we get multiple listeners for the same data). Is this the intended behavior? When should we consider port to be equal?
I found that Orocos::PortBase has a definition
# True if +self+ and +other+ represent the same port
def ==(other)
return false if !other.kind_of?(PortBase)
other.task == self.task && other.name == self.name
end
Would adding a similar function as e.g. SubPortProxy.eql? (hash uses key.eql?) be reasonable?