[Rock-dev] [rock] #23: orocos.rb: transaction mechanism

rock noreply at opendfki.de
Fri May 20 07:45:04 CEST 2011


#23: orocos.rb: transaction mechanism
---------------------------+------------------------------------------------
Reporter:  sylvain.joyeux  |       Owner:  rock-dev-mailing-list
    Type:  enhancement     |      Status:  new                  
Priority:  major           |   Component:  toolchain            
Keywords:                  |  
---------------------------+------------------------------------------------
 there are currently no way in orocos.rb to make "transaction", i.e. to
 make sure that changes to running components are rolled back when the
 script quits.

 This is a problem if, for instance, one would like to make sure that
 connections created in a script are destroyed when the script quits.

 The proposed syntax would be:

 Orocos.guard do
   # Use #get instead of TaskContext.get
   task = get "task_name"
   task2 = get "task_name2"

   # (1) Manipulate task and task2 like normal tasks

   # The new Orocos.exec call loops and monitors the
   # tasks that have been created with #get
   #
   # It displays information messages for state changes
   Orocos.exec

   # When the block quits, manipulations done
   # in (1) are un-done. What is un-done can be controlled
   # by options to Orocos.guard
   #   Orocos.guard :properties => false
 end

 Orocos.run would call Orocos.guard

-- 
Ticket URL: <http://rock.opendfki.de/ticket/23>
rock <http://rock.opendfki.de>
rock: the robot construction kit


More information about the Rock-dev mailing list