Class: Shutter3Sps
- Inherits:
-
Shutter3
- Object
- Shutter3
- Shutter3Sps
- Defined in:
- lib/shutter3_sps.rb
Instance Method Summary collapse
-
#initialize(bdid, topic: 'shutter3', sps_address: nil, sps_port: 59000) ⇒ Shutter3Sps
constructor
A new instance of Shutter3Sps.
- #on_android_keydown ⇒ Object
- #on_android_keypress ⇒ Object
- #on_android_keyup ⇒ Object
- #on_connect ⇒ Object
- #on_disconnect ⇒ Object
- #on_ios_keydown ⇒ Object
- #on_ios_keypress ⇒ Object
- #on_ios_keyup ⇒ Object
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 an SPS address' unless sps_address super(bdid) @pub= SPSPub.new host: sps_address @topic = topic end |
Instance Method Details
#on_android_keydown ⇒ Object
23 24 25 |
# File 'lib/shutter3_sps.rb', line 23 def on_android_keydown() end |
#on_android_keypress ⇒ Object
19 20 21 |
# File 'lib/shutter3_sps.rb', line 19 def on_android_keypress() notify 'button2 pressed' end |
#on_android_keyup ⇒ Object
27 28 29 |
# File 'lib/shutter3_sps.rb', line 27 def on_android_keyup() end |
#on_connect ⇒ Object
31 32 33 |
# File 'lib/shutter3_sps.rb', line 31 def on_connect() notify 'connected' end |
#on_disconnect ⇒ Object
35 36 37 |
# File 'lib/shutter3_sps.rb', line 35 def on_disconnect() notify 'disconnected' end |
#on_ios_keydown ⇒ Object
43 44 45 |
# File 'lib/shutter3_sps.rb', line 43 def on_ios_keydown() end |
#on_ios_keypress ⇒ Object
39 40 41 |
# File 'lib/shutter3_sps.rb', line 39 def on_ios_keypress() notify 'button1 pressed' end |
#on_ios_keyup ⇒ Object
47 48 49 |
# File 'lib/shutter3_sps.rb', line 47 def on_ios_keyup() end |