[Rock-dev] oroocs.rb: policy for disconnected port writers
Alexander Duda
Alexander.Duda at dfki.de
Tue Mar 11 12:09:03 CET 2014
Hi,
at the moment disconnected orocos.rb port writers do not raise if
someone uses them for writing. Instead, the method writer.write returns
false meaning that there is no one listening (undocumented behavior).
The question is, should we document it or should we change the behavior?
In my opinion a writer should raise under all circumstances if someone
uses it for writing after it got disconnected from its remote port.
Any opinions on that? Otherwise, I am going to change the default behavior.
EXAMPLE:
writer = Orocos.get("test_task").port("string_port").writer
puts writer.write("123") #returns true
Orocos.get("test_task").port("string_port").disconnect_all
puts writer.write("123") #returns false but should
raise Orocos::ComError
Cheers
Alex
--
Dipl.-Ing. Alexander Duda
Unterwasserrobotik
Robotics Innovation Center
Hauptgeschäftsstelle Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 1
28359 Bremen, Germany
Tel.: +49 421 178 45-6620
Zentrale: +49 421 178 45-0
Fax: +49 421 178 45-4150 (Faxe bitte namentlich kennzeichnen)
E-Mail: Alexander.Duda 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