Sha256: d97ecf9524da11f4e9758bd507812f4d8476d1e2c856a58774854b5a37d8d259

Contents?: true

Size: 533 Bytes

Versions: 24

Compression:

Stored size: 533 Bytes

Contents

require 'artoo/robot'

class HelloRobot < Artoo::Robot
	connection :loopback1
	connection :loopback2
	connection :loopback3
	device :pinger, :driver => :pinger
	device :counter, :driver => :counter
	device :random, :driver => :random
	device :passthru1
	device :passthru2

	api :host => '127.0.0.1', :port => '8080'

	work do
		puts "Hello from '#{name}' attached to API running at #{api_host}:#{api_port}..."
	end
end

robots = []
5.times do |i|
	robots << HelloRobot.new(:name => "Number #{i}")
end

HelloRobot.work!(robots)
sleep

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
artoo-1.6.7 examples/hello_api_multiple.rb
artoo-1.6.6 examples/hello_api_multiple.rb
artoo-1.6.5 examples/hello_api_multiple.rb
artoo-1.6.4 examples/hello_api_multiple.rb
artoo-1.6.3 examples/hello_api_multiple.rb
artoo-1.6.2 examples/hello_api_multiple.rb
artoo-1.6.1 examples/hello_api_multiple.rb
artoo-1.6.0 examples/hello_api_multiple.rb
artoo-1.5.0 examples/hello_api_multiple.rb
artoo-1.4.1 examples/hello_api_multiple.rb
artoo-1.4.0 examples/hello_api_multiple.rb
artoo-1.3.0 examples/hello_api_multiple.rb
artoo-1.2.2 examples/hello_api_multiple.rb
artoo-1.2.1 examples/hello_api_multiple.rb
artoo-1.2.0 examples/hello_api_multiple.rb
artoo-1.1.1 examples/hello_api_multiple.rb
artoo-1.1.0 examples/hello_api_multiple.rb
artoo-1.1.0.pre examples/hello_api_multiple.rb
artoo-1.0.0 examples/hello_api_multiple.rb
artoo-1.0.0.rc4 examples/hello_api_multiple.rb