Class: Geppeto::Commands::Mesh
- Inherits:
-
Object
- Object
- Geppeto::Commands::Mesh
- Defined in:
- lib/commands/mesh.rb
Instance Method Summary collapse
- #config(scout_id, troop_id, channel = 20) ⇒ Object
- #ingroup?(group) ⇒ Boolean
-
#initialize(scout) ⇒ Mesh
constructor
A new instance of Mesh.
- #joingroup(group) ⇒ Object
- #leavegroup(group) ⇒ Object
- #report ⇒ Object
- #resetkey ⇒ Object
- #routing ⇒ Object
- #setdatarate(rate) ⇒ Object
- #setkey(key) ⇒ Object
- #setpowerlevel(level) ⇒ Object
Constructor Details
#initialize(scout) ⇒ Mesh
Returns a new instance of Mesh.
4 5 6 |
# File 'lib/commands/mesh.rb', line 4 def initialize(scout) @scout = scout end |
Instance Method Details
#config(scout_id, troop_id, channel = 20) ⇒ Object
8 9 10 |
# File 'lib/commands/mesh.rb', line 8 def config(scout_id, troop_id, channel=20) @scout.request("mesh.config", scout_id, troop_id, channel) end |
#ingroup?(group) ⇒ Boolean
36 37 38 |
# File 'lib/commands/mesh.rb', line 36 def ingroup?(group) @scout.request("mesh.ingroup").to_i == 1 end |
#joingroup(group) ⇒ Object
28 29 30 |
# File 'lib/commands/mesh.rb', line 28 def joingroup(group) @scout.request("mesh.joingroup", group.to_i) end |
#leavegroup(group) ⇒ Object
32 33 34 |
# File 'lib/commands/mesh.rb', line 32 def leavegroup(group) @scout.request("mesh.leavegroup", group.to_i) end |
#report ⇒ Object
40 41 42 |
# File 'lib/commands/mesh.rb', line 40 def report @scout.request("mesh.report") end |
#resetkey ⇒ Object
24 25 26 |
# File 'lib/commands/mesh.rb', line 24 def resetkey @scout.request("mesh.resetkey") end |
#routing ⇒ Object
44 45 46 |
# File 'lib/commands/mesh.rb', line 44 def routing @scout.request("mesh.routing") end |
#setdatarate(rate) ⇒ Object
16 17 18 |
# File 'lib/commands/mesh.rb', line 16 def setdatarate(rate) @scout.request("mesh.setdatarate", rate.to_i) end |
#setkey(key) ⇒ Object
20 21 22 |
# File 'lib/commands/mesh.rb', line 20 def setkey(key) @scout.request("mesh.setkey", key) end |
#setpowerlevel(level) ⇒ Object
12 13 14 |
# File 'lib/commands/mesh.rb', line 12 def setpowerlevel(level) @scout.request("mesh.setpowerlevel", level.to_i) end |