Class: Geppeto::Commands::Wifi

Inherits:
Object
  • Object
show all
Defined in:
lib/commands/wifi.rb

Instance Method Summary collapse

Constructor Details

#initialize(scout) ⇒ Wifi

Returns a new instance of Wifi.



4
5
6
# File 'lib/commands/wifi.rb', line 4

def initialize(scout)
  @scout = scout
end

Instance Method Details

#command(wifi_cmd) ⇒ Object



36
37
38
# File 'lib/commands/wifi.rb', line 36

def command(wifi_cmd)
  @scout.request("wifi.command", wifi_cmd)
end

#config(ssid, psk = nil) ⇒ Object



20
21
22
# File 'lib/commands/wifi.rb', line 20

def config(ssid, psk = nil)
  @scout.request("wifi.config", ssid, psk)
end

#dhcp(hostname) ⇒ Object



24
25
26
# File 'lib/commands/wifi.rb', line 24

def dhcp(hostname)
  @scout.request("wifi.dhcp", hostname)
end

#listObject



16
17
18
# File 'lib/commands/wifi.rb', line 16

def list
  @scout.request("wifi.list", ms: 5)
end

#reassociateObject



32
33
34
# File 'lib/commands/wifi.rb', line 32

def reassociate
  @scout.request("wifi.reassociate")
end

#reportObject



8
9
10
# File 'lib/commands/wifi.rb', line 8

def report
  @scout.request("wifi.report")
end

#static(ip, netmask, gateway, dns) ⇒ Object



28
29
30
# File 'lib/commands/wifi.rb', line 28

def static(ip, netmask, gateway, dns)
  @scout.request("wifi.static", ip, netmask, gateway, dns)
end

#statusObject



12
13
14
# File 'lib/commands/wifi.rb', line 12

def status
  @scout.request("wifi.status")
end