Class: X10::Cm17aRemote::Controller

Inherits:
Object
  • Object
show all
Defined in:
lib/x10/cm17a_remote.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri = "druby:localhost:7777") ⇒ Controller

Returns a new instance of Controller.



10
11
12
13
# File 'lib/x10/cm17a_remote.rb', line 10

def initialize(uri="druby:localhost:7777")
	@uri = uri
	@remote = DRbObject.new(nil, @uri)
end

Class Method Details

.x10_controller?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/x10/cm17a_remote.rb', line 20

def self.x10_controller?
	true
end

Instance Method Details

#command(house, unit, command, steps) ⇒ Object



14
15
16
# File 'lib/x10/cm17a_remote.rb', line 14

def command(house, unit, command, steps)
	@remote.command(house, unit, command, steps)
end

#device(house, unit) ⇒ Object



17
18
19
# File 'lib/x10/cm17a_remote.rb', line 17

def device(house, unit)
	X10::Cm17a::Device.new(house, unit, self)
end