[Rock-dev] orocos.rb: connect_to, disconnet_from extension

Sylvain Joyeux sylvain.joyeux at dfki.de
Tue Feb 14 10:15:35 CET 2012


On 02/13/2012 02:57 PM, Alexander Duda wrote:
> At the moment I am trying to integrate the port_proxy into the vizkit.rb
> and orocos.rb. It would be a lot easier and clearer if we could add to
> the connect_to and disconnect_from method the following line.
>
> port.rb + 400
> input_port = input_port.to_orocos_port if
> input_port.respond_to?(:to_orocos_port)

Would be fine, but don't make it optional, i.e. always do

   port = port.to_orocos_port

and make sure that Orocos::Port has a #to_orocos_port method that 
returns self. This is the normal protocol in "duck-typed" languages like 
Ruby.
-- 
Sylvain Joyeux (Dr.Ing.)
Space & Security Robotics

!!! Achtung, neue Telefonnummer!!!

Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany

Phone: +49 (0)421 178-454136
Fax:   +49 (0)421 218-454150
E-Mail: robotik at dfki.de

Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.:    DE 148646973
Steuernummer:  19/673/0060/3
-----------------------------------------------------------------------


More information about the Rock-dev mailing list