[Rock-dev] oroocs.rb: policy for disconnected port writers

Matthias Goldhoorn matthias.goldhoorn at dfki.de
Tue Mar 11 15:16:40 CET 2014


Hi,
I assume this would have several side-effects....
Please to this on your own on a private branch/repro and letting us know 
this.
I assume we get sever followup problems within syskit from this. and i'm 
now sure if i will fight with this now!.

But in general +1 for changing this.

Matthias


On 11.03.2014 12:09, Alexander Duda wrote:
> 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.-Inf. Matthias Goldhoorn
  Space and Underwater Robotic

  Universität Bremen
  FB 3 - Mathematik und Informatik
  AG Robotik
  Robert-Hooke-Straße 1
  28359 Bremen, Germany
  
  Zentrale: +49 421 178 45-6611
  
  Besuchsadresse der Nebengeschäftstelle:
  Robert-Hooke-Straße 5
  28359 Bremen, Germany
  
  Tel.:    +49 421 178 45-4193
  Empfang: +49 421 178 45-6600
  Fax:     +49 421 178 45-4150
  E-Mail:  matthias.goldhoorn at informatik.uni-bremen.de

  Weitere Informationen: http://www.informatik.uni-bremen.de/robotik



More information about the Rock-dev mailing list