[Rock-dev] feature request orocos.rb: writing and reading ports periodically

Alexander Duda Alexander.Duda at dfki.de
Thu May 12 14:37:01 CEST 2011


Hi,

I think it would be good if we had the following features for reading
writing ports periodically. 

#write every second something on to the port
task.port.writer(1,policy=nil) do |data|
	data.bla = 123
end

#read every two seconds from the port
task.port2.reader(2,policy=nil) do |data|
	puts data.bla
end

the reading is already implemented in vizkit.rb
task.port2.connect_to do |data,_|
	puts data.bla
end

Personally I would like to have both things in orocos.rb 
but in this case we need a mainloop which can be called from the
vizkit.rb

Any suggestion to this topic?

thx
Alex


-- 
Dipl.-Ing. Alexander Duda 
Unterwasserrobotik

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

Phone: +49 (0)421 178-456620
Fax:   +49 (0)421 178-454150
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