Class: MistApi::ApRadioStat
- Defined in:
- lib/mist_api/models/ap_radio_stat.rb
Overview
Radio stat
Instance Attribute Summary collapse
-
#bandwidth ⇒ Dot11BandwidthEnum
channel width for the band.enum: ‘0`(disabled, response only), `20`, `40`, `80` (only applicable for band_5 and band_6), `160` (only for band_6).
-
#channel ⇒ Integer
Current channel the radio is running on.
-
#dynamic_chaining_enabled ⇒ TrueClass | FalseClass
Use dynamic chaining for downlink.
-
#mac ⇒ String
Radio (base) mac, it can have 16 bssids (e.g. 5c5b350001a0-5c5b350001af).
-
#noise_floor ⇒ Integer
Radio (base) mac, it can have 16 bssids (e.g. 5c5b350001a0-5c5b350001af).
-
#num_clients ⇒ Integer
Radio (base) mac, it can have 16 bssids (e.g. 5c5b350001a0-5c5b350001af).
-
#num_wlans ⇒ Integer
How many WLANs are applied to the radio.
-
#power ⇒ Integer
Transmit power (in dBm).
-
#rx_bytes ⇒ Integer
Amount of traffic received since connection.
-
#rx_pkts ⇒ Integer
Amount of packets received since connection.
-
#tx_bytes ⇒ Integer
Amount of traffic sent since connection.
-
#tx_pkts ⇒ Integer
Amount of packets sent since connection.
-
#usage ⇒ String
Amount of packets sent since connection.
-
#util_all ⇒ Integer
All utilization in percentage.
-
#util_non_wifi ⇒ Integer
Reception of “No Packets” utilization in percentage, received frames with invalid PLCPs and CRS glitches as noise.
-
#util_rx_in_bss ⇒ Integer
Reception of “In BSS” utilization in percentage, only frames that are received from AP/STAs within the BSS.
-
#util_rx_other_bss ⇒ Integer
Reception of “Other BSS” utilization in percentage, all frames received from AP/STAs that are outside the BSS.
-
#util_tx ⇒ Integer
Transmission utilization in percentage.
-
#util_undecodable_wifi ⇒ Integer
Reception of “UnDecodable Wifi” utilization in percentage, only Preamble, PLCP header is decoded, Rest is undecodable in this radio.
-
#util_unknown_wifi ⇒ Integer
Reception of “No Category” utilization in percentage, all 802.11 frames that are corrupted at the receiver.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(bandwidth = SKIP, channel = SKIP, dynamic_chaining_enabled = SKIP, mac = SKIP, noise_floor = SKIP, num_clients = SKIP, num_wlans = SKIP, power = SKIP, rx_bytes = SKIP, rx_pkts = SKIP, tx_bytes = SKIP, tx_pkts = SKIP, usage = SKIP, util_all = SKIP, util_non_wifi = SKIP, util_rx_in_bss = SKIP, util_rx_other_bss = SKIP, util_tx = SKIP, util_undecodable_wifi = SKIP, util_unknown_wifi = SKIP) ⇒ ApRadioStat
constructor
A new instance of ApRadioStat.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(bandwidth = SKIP, channel = SKIP, dynamic_chaining_enabled = SKIP, mac = SKIP, noise_floor = SKIP, num_clients = SKIP, num_wlans = SKIP, power = SKIP, rx_bytes = SKIP, rx_pkts = SKIP, tx_bytes = SKIP, tx_pkts = SKIP, usage = SKIP, util_all = SKIP, util_non_wifi = SKIP, util_rx_in_bss = SKIP, util_rx_other_bss = SKIP, util_tx = SKIP, util_undecodable_wifi = SKIP, util_unknown_wifi = SKIP) ⇒ ApRadioStat
Returns a new instance of ApRadioStat.
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 174 def initialize(bandwidth = SKIP, channel = SKIP, dynamic_chaining_enabled = SKIP, mac = SKIP, noise_floor = SKIP, num_clients = SKIP, num_wlans = SKIP, power = SKIP, rx_bytes = SKIP, rx_pkts = SKIP, tx_bytes = SKIP, tx_pkts = SKIP, usage = SKIP, util_all = SKIP, util_non_wifi = SKIP, util_rx_in_bss = SKIP, util_rx_other_bss = SKIP, util_tx = SKIP, util_undecodable_wifi = SKIP, util_unknown_wifi = SKIP) @bandwidth = bandwidth unless bandwidth == SKIP @channel = channel unless channel == SKIP @dynamic_chaining_enabled = dynamic_chaining_enabled unless dynamic_chaining_enabled == SKIP @mac = mac unless mac == SKIP @noise_floor = noise_floor unless noise_floor == SKIP @num_clients = num_clients unless num_clients == SKIP @num_wlans = num_wlans unless num_wlans == SKIP @power = power unless power == SKIP @rx_bytes = rx_bytes unless rx_bytes == SKIP @rx_pkts = rx_pkts unless rx_pkts == SKIP @tx_bytes = tx_bytes unless tx_bytes == SKIP @tx_pkts = tx_pkts unless tx_pkts == SKIP @usage = usage unless usage == SKIP @util_all = util_all unless util_all == SKIP @util_non_wifi = util_non_wifi unless util_non_wifi == SKIP @util_rx_in_bss = util_rx_in_bss unless util_rx_in_bss == SKIP @util_rx_other_bss = util_rx_other_bss unless util_rx_other_bss == SKIP @util_tx = util_tx unless util_tx == SKIP @util_undecodable_wifi = util_undecodable_wifi unless util_undecodable_wifi == SKIP @util_unknown_wifi = util_unknown_wifi unless util_unknown_wifi == SKIP end |
Instance Attribute Details
#bandwidth ⇒ Dot11BandwidthEnum
channel width for the band.enum: ‘0`(disabled, response only), `20`, `40`, `80` (only applicable for band_5 and band_6), `160` (only for band_6)
15 16 17 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 15 def bandwidth @bandwidth end |
#channel ⇒ Integer
Current channel the radio is running on
19 20 21 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 19 def channel @channel end |
#dynamic_chaining_enabled ⇒ TrueClass | FalseClass
Use dynamic chaining for downlink
23 24 25 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 23 def dynamic_chaining_enabled @dynamic_chaining_enabled end |
#mac ⇒ String
Radio (base) mac, it can have 16 bssids (e.g. 5c5b350001a0-5c5b350001af)
27 28 29 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 27 def mac @mac end |
#noise_floor ⇒ Integer
Radio (base) mac, it can have 16 bssids (e.g. 5c5b350001a0-5c5b350001af)
31 32 33 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 31 def noise_floor @noise_floor end |
#num_clients ⇒ Integer
Radio (base) mac, it can have 16 bssids (e.g. 5c5b350001a0-5c5b350001af)
35 36 37 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 35 def num_clients @num_clients end |
#num_wlans ⇒ Integer
How many WLANs are applied to the radio
39 40 41 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 39 def num_wlans @num_wlans end |
#power ⇒ Integer
Transmit power (in dBm)
43 44 45 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 43 def power @power end |
#rx_bytes ⇒ Integer
Amount of traffic received since connection
47 48 49 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 47 def rx_bytes @rx_bytes end |
#rx_pkts ⇒ Integer
Amount of packets received since connection
51 52 53 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 51 def rx_pkts @rx_pkts end |
#tx_bytes ⇒ Integer
Amount of traffic sent since connection
55 56 57 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 55 def tx_bytes @tx_bytes end |
#tx_pkts ⇒ Integer
Amount of packets sent since connection
59 60 61 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 59 def tx_pkts @tx_pkts end |
#usage ⇒ String
Amount of packets sent since connection
63 64 65 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 63 def usage @usage end |
#util_all ⇒ Integer
All utilization in percentage
67 68 69 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 67 def util_all @util_all end |
#util_non_wifi ⇒ Integer
Reception of “No Packets” utilization in percentage, received frames with invalid PLCPs and CRS glitches as noise
72 73 74 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 72 def util_non_wifi @util_non_wifi end |
#util_rx_in_bss ⇒ Integer
Reception of “In BSS” utilization in percentage, only frames that are received from AP/STAs within the BSS
77 78 79 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 77 def util_rx_in_bss @util_rx_in_bss end |
#util_rx_other_bss ⇒ Integer
Reception of “Other BSS” utilization in percentage, all frames received from AP/STAs that are outside the BSS
82 83 84 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 82 def util_rx_other_bss @util_rx_other_bss end |
#util_tx ⇒ Integer
Transmission utilization in percentage
86 87 88 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 86 def util_tx @util_tx end |
#util_undecodable_wifi ⇒ Integer
Reception of “UnDecodable Wifi” utilization in percentage, only Preamble, PLCP header is decoded, Rest is undecodable in this radio
91 92 93 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 91 def util_undecodable_wifi @util_undecodable_wifi end |
#util_unknown_wifi ⇒ Integer
Reception of “No Category” utilization in percentage, all 802.11 frames that are corrupted at the receiver
96 97 98 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 96 def util_unknown_wifi @util_unknown_wifi end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 205 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. bandwidth = hash.key?('bandwidth') ? hash['bandwidth'] : SKIP channel = hash.key?('channel') ? hash['channel'] : SKIP dynamic_chaining_enabled = hash.key?('dynamic_chaining_enabled') ? hash['dynamic_chaining_enabled'] : SKIP mac = hash.key?('mac') ? hash['mac'] : SKIP noise_floor = hash.key?('noise_floor') ? hash['noise_floor'] : SKIP num_clients = hash.key?('num_clients') ? hash['num_clients'] : SKIP num_wlans = hash.key?('num_wlans') ? hash['num_wlans'] : SKIP power = hash.key?('power') ? hash['power'] : SKIP rx_bytes = hash.key?('rx_bytes') ? hash['rx_bytes'] : SKIP rx_pkts = hash.key?('rx_pkts') ? hash['rx_pkts'] : SKIP tx_bytes = hash.key?('tx_bytes') ? hash['tx_bytes'] : SKIP tx_pkts = hash.key?('tx_pkts') ? hash['tx_pkts'] : SKIP usage = hash.key?('usage') ? hash['usage'] : SKIP util_all = hash.key?('util_all') ? hash['util_all'] : SKIP util_non_wifi = hash.key?('util_non_wifi') ? hash['util_non_wifi'] : SKIP util_rx_in_bss = hash.key?('util_rx_in_bss') ? hash['util_rx_in_bss'] : SKIP util_rx_other_bss = hash.key?('util_rx_other_bss') ? hash['util_rx_other_bss'] : SKIP util_tx = hash.key?('util_tx') ? hash['util_tx'] : SKIP util_undecodable_wifi = hash.key?('util_undecodable_wifi') ? hash['util_undecodable_wifi'] : SKIP util_unknown_wifi = hash.key?('util_unknown_wifi') ? hash['util_unknown_wifi'] : SKIP # Create object from extracted values. ApRadioStat.new(bandwidth, channel, dynamic_chaining_enabled, mac, noise_floor, num_clients, num_wlans, power, rx_bytes, rx_pkts, tx_bytes, tx_pkts, usage, util_all, util_non_wifi, util_rx_in_bss, util_rx_other_bss, util_tx, util_undecodable_wifi, util_unknown_wifi) end |
.names ⇒ Object
A mapping from model property names to API property names.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 99 def self.names @_hash = {} if @_hash.nil? @_hash['bandwidth'] = 'bandwidth' @_hash['channel'] = 'channel' @_hash['dynamic_chaining_enabled'] = 'dynamic_chaining_enabled' @_hash['mac'] = 'mac' @_hash['noise_floor'] = 'noise_floor' @_hash['num_clients'] = 'num_clients' @_hash['num_wlans'] = 'num_wlans' @_hash['power'] = 'power' @_hash['rx_bytes'] = 'rx_bytes' @_hash['rx_pkts'] = 'rx_pkts' @_hash['tx_bytes'] = 'tx_bytes' @_hash['tx_pkts'] = 'tx_pkts' @_hash['usage'] = 'usage' @_hash['util_all'] = 'util_all' @_hash['util_non_wifi'] = 'util_non_wifi' @_hash['util_rx_in_bss'] = 'util_rx_in_bss' @_hash['util_rx_other_bss'] = 'util_rx_other_bss' @_hash['util_tx'] = 'util_tx' @_hash['util_undecodable_wifi'] = 'util_undecodable_wifi' @_hash['util_unknown_wifi'] = 'util_unknown_wifi' @_hash end |
.nullables ⇒ Object
An array for nullable fields
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 151 def self.nullables %w[ channel dynamic_chaining_enabled mac noise_floor num_clients power rx_bytes rx_pkts tx_bytes tx_pkts usage util_all util_non_wifi util_rx_in_bss util_rx_other_bss util_tx util_undecodable_wifi util_unknown_wifi ] end |
.optionals ⇒ Object
An array for optional fields
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 125 def self.optionals %w[ bandwidth channel dynamic_chaining_enabled mac noise_floor num_clients num_wlans power rx_bytes rx_pkts tx_bytes tx_pkts usage util_all util_non_wifi util_rx_in_bss util_rx_other_bss util_tx util_undecodable_wifi util_unknown_wifi ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
272 273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 272 def inspect class_name = self.class.name.split('::').last "<#{class_name} bandwidth: #{@bandwidth.inspect}, channel: #{@channel.inspect},"\ " dynamic_chaining_enabled: #{@dynamic_chaining_enabled.inspect}, mac: #{@mac.inspect},"\ " noise_floor: #{@noise_floor.inspect}, num_clients: #{@num_clients.inspect}, num_wlans:"\ " #{@num_wlans.inspect}, power: #{@power.inspect}, rx_bytes: #{@rx_bytes.inspect}, rx_pkts:"\ " #{@rx_pkts.inspect}, tx_bytes: #{@tx_bytes.inspect}, tx_pkts: #{@tx_pkts.inspect}, usage:"\ " #{@usage.inspect}, util_all: #{@util_all.inspect}, util_non_wifi:"\ " #{@util_non_wifi.inspect}, util_rx_in_bss: #{@util_rx_in_bss.inspect}, util_rx_other_bss:"\ " #{@util_rx_other_bss.inspect}, util_tx: #{@util_tx.inspect}, util_undecodable_wifi:"\ " #{@util_undecodable_wifi.inspect}, util_unknown_wifi: #{@util_unknown_wifi.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/mist_api/models/ap_radio_stat.rb', line 259 def to_s class_name = self.class.name.split('::').last "<#{class_name} bandwidth: #{@bandwidth}, channel: #{@channel}, dynamic_chaining_enabled:"\ " #{@dynamic_chaining_enabled}, mac: #{@mac}, noise_floor: #{@noise_floor}, num_clients:"\ " #{@num_clients}, num_wlans: #{@num_wlans}, power: #{@power}, rx_bytes: #{@rx_bytes},"\ " rx_pkts: #{@rx_pkts}, tx_bytes: #{@tx_bytes}, tx_pkts: #{@tx_pkts}, usage: #{@usage},"\ " util_all: #{@util_all}, util_non_wifi: #{@util_non_wifi}, util_rx_in_bss:"\ " #{@util_rx_in_bss}, util_rx_other_bss: #{@util_rx_other_bss}, util_tx: #{@util_tx},"\ " util_undecodable_wifi: #{@util_undecodable_wifi}, util_unknown_wifi:"\ " #{@util_unknown_wifi}>" end |