/[freeride]/freeride/test/databus.rb
ViewVC logotype

Diff of /freeride/test/databus.rb

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by ljulliar, Fri Feb 1 09:19:46 2002 UTC revision 1.4 by richkilmer, Wed Feb 6 03:34:24 2002 UTC
# Line 1  Line 1 
1  # Purpose: FreeRIDE databus test  # Purpose: FreeBASE databus test
2  #      #    
3  # $Id$  # $Id$
4  #  #
# Line 14  Line 14 
14  # Copyright (c) 2001 Rich Kilmer. All rights reserved.  # Copyright (c) 2001 Rich Kilmer. All rights reserved.
15  #  #
16    
17  require 'freeride/databus'  require 'freebase/databus'
18    
19  class SubscriptionTest  class SubscriptionTest
20   def databus_notify(event, slot)   def databus_notify(event, slot)
# Line 23  class SubscriptionTest Line 23  class SubscriptionTest
23  end  end
24    
25  # test data  # test data
26  databus = FreeRIDE::DataBus.new  databus = FreeBASE::DataBus.new
27  databus["/"].subscribe {|event, slot| puts "data to #{slot.path}"}  databus["/"].subscribe {|event, slot| puts "data to #{slot.path}"}
28  st = SubscriptionTest.new  st = SubscriptionTest.new
29  databus["/foo/bar"].subscribe(st)  databus["/foo/bar"].subscribe(st)
# Line 91  puts slot["/foo/bar/queue"].path Line 91  puts slot["/foo/bar/queue"].path
91  puts slot["././."].path  puts slot["././."].path
92  puts slot["/foo/bar///queue"].path  puts slot["/foo/bar///queue"].path
93  puts slot["///foo///bar///queue"].path  puts slot["///foo///bar///queue"].path
94    
95    slot["test"].attr_foo = "foo"
96    puts slot["test"].attr_foo

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26