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

Alexander Duda Alexander.Duda at dfki.de
Tue Mar 11 15:47:16 CET 2014


On 03/11/2014 03:16 PM, Matthias Goldhoorn wrote:
> 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!.
If syskit is using dead writers this needs to be fixed anyway. But I 
have my doubt that syskit really runs into problems here because 
writer.write already raises if the remote end is dead.

I pushed the change to orocos.rb branch port_policy and will keep it 
there until Friday. By then I have to push it to master to fix a problem 
(swallowed messages) which was reported by extern partners unless there 
is a real show-stopper.

Greets Alex

>
> 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.-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