Class: Shutter3Sps

Inherits:
Shutter3
  • Object
show all
Defined in:
lib/shutter3_sps.rb

Instance Method Summary collapse

Constructor Details

#initialize(bdid, topic: 'shutter3', sps_address: nil, sps_port: 59000) ⇒ Shutter3Sps

Returns a new instance of Shutter3Sps.



11
12
13
14
15
16
17
# File 'lib/shutter3_sps.rb', line 11

def initialize(bdid, topic: 'shutter3', sps_address: nil, sps_port: 59000)

  raise 'Shutter3Sps: Please provide a SPS addres' unless sps_address
  super(bdid)
  @sps = SPSPub.new host: sps_address
  @topic = topic
end

Instance Method Details

#on_android_keydownObject



23
24
25
# File 'lib/shutter3_sps.rb', line 23

def on_android_keydown()

end

#on_android_keypressObject



19
20
21
# File 'lib/shutter3_sps.rb', line 19

def on_android_keypress()
  @sps.notice @topic + ': button2 pressed'
end

#on_android_keyupObject



27
28
29
# File 'lib/shutter3_sps.rb', line 27

def on_android_keyup()

end

#on_connectObject



31
32
33
# File 'lib/shutter3_sps.rb', line 31

def on_connect()
  @sps.notice @topic + ': connected'
end

#on_disconnectObject



35
36
37
38
# File 'lib/shutter3_sps.rb', line 35

def on_disconnect()

  @sps.notice @topic + ': dicconnected'
end

#on_ios_keydownObject



44
45
46
# File 'lib/shutter3_sps.rb', line 44

def on_ios_keydown()

end

#on_ios_keypressObject



40
41
42
# File 'lib/shutter3_sps.rb', line 40

def on_ios_keypress()
  @sps.notice @topic + ': button1 pressed'
end

#on_ios_keyupObject



48
49
50
# File 'lib/shutter3_sps.rb', line 48

def on_ios_keyup()

end