Class: MistApi::RrmConsideration
- Defined in:
- lib/mist_api/models/rrm_consideration.rb
Overview
RrmConsideration Model.
Instance Attribute Summary collapse
-
#channel ⇒ Integer
TODO: Write general description for this method.
-
#noise ⇒ Float
TODO: Write general description for this method.
-
#other_rssi ⇒ Float
Avg RSSI heard from other APs (that does NOT belongs to the same site).
-
#other_ssid ⇒ String
SSID from other AP that we heard from with the max RSSI.
-
#rssi ⇒ Float
Avg RSSI heard from APs (that belongs to the same site).
-
#util_score ⇒ Float
utilization score, 0-1, lower means less utilization (cleaner RF).
-
#util_score_non_wifi ⇒ Float
non-Wi-Fi utilization score, 0-1, lower means less utilization (cleaner RF).
-
#util_score_other ⇒ Float
other utilization score, 0-1, lower means less utilization (cleaner RF).
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(channel = nil, noise = nil, util_score = nil, util_score_non_wifi = nil, util_score_other = nil, other_rssi = SKIP, other_ssid = SKIP, rssi = SKIP) ⇒ RrmConsideration
constructor
A new instance of RrmConsideration.
-
#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(channel = nil, noise = nil, util_score = nil, util_score_non_wifi = nil, util_score_other = nil, other_rssi = SKIP, other_ssid = SKIP, rssi = SKIP) ⇒ RrmConsideration
Returns a new instance of RrmConsideration.
73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/mist_api/models/rrm_consideration.rb', line 73 def initialize(channel = nil, noise = nil, util_score = nil, util_score_non_wifi = nil, util_score_other = nil, other_rssi = SKIP, other_ssid = SKIP, rssi = SKIP) @channel = channel @noise = noise @other_rssi = other_rssi unless other_rssi == SKIP @other_ssid = other_ssid unless other_ssid == SKIP @rssi = rssi unless rssi == SKIP @util_score = util_score @util_score_non_wifi = util_score_non_wifi @util_score_other = util_score_other end |
Instance Attribute Details
#channel ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/rrm_consideration.rb', line 14 def channel @channel end |
#noise ⇒ Float
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/rrm_consideration.rb', line 18 def noise @noise end |
#other_rssi ⇒ Float
Avg RSSI heard from other APs (that does NOT belongs to the same site)
22 23 24 |
# File 'lib/mist_api/models/rrm_consideration.rb', line 22 def other_rssi @other_rssi end |
#other_ssid ⇒ String
SSID from other AP that we heard from with the max RSSI
26 27 28 |
# File 'lib/mist_api/models/rrm_consideration.rb', line 26 def other_ssid @other_ssid end |
#rssi ⇒ Float
Avg RSSI heard from APs (that belongs to the same site)
30 31 32 |
# File 'lib/mist_api/models/rrm_consideration.rb', line 30 def rssi @rssi end |
#util_score ⇒ Float
utilization score, 0-1, lower means less utilization (cleaner RF)
34 35 36 |
# File 'lib/mist_api/models/rrm_consideration.rb', line 34 def util_score @util_score end |
#util_score_non_wifi ⇒ Float
non-Wi-Fi utilization score, 0-1, lower means less utilization (cleaner RF)
39 40 41 |
# File 'lib/mist_api/models/rrm_consideration.rb', line 39 def util_score_non_wifi @util_score_non_wifi end |
#util_score_other ⇒ Float
other utilization score, 0-1, lower means less utilization (cleaner RF)
43 44 45 |
# File 'lib/mist_api/models/rrm_consideration.rb', line 43 def util_score_other @util_score_other end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/mist_api/models/rrm_consideration.rb', line 87 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. channel = hash.key?('channel') ? hash['channel'] : nil noise = hash.key?('noise') ? hash['noise'] : nil util_score = hash.key?('util_score') ? hash['util_score'] : nil util_score_non_wifi = hash.key?('util_score_non_wifi') ? hash['util_score_non_wifi'] : nil util_score_other = hash.key?('util_score_other') ? hash['util_score_other'] : nil other_rssi = hash.key?('other_rssi') ? hash['other_rssi'] : SKIP other_ssid = hash.key?('other_ssid') ? hash['other_ssid'] : SKIP rssi = hash.key?('rssi') ? hash['rssi'] : SKIP # Create object from extracted values. RrmConsideration.new(channel, noise, util_score, util_score_non_wifi, util_score_other, other_rssi, other_ssid, rssi) end |
.names ⇒ Object
A mapping from model property names to API property names.
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/mist_api/models/rrm_consideration.rb', line 46 def self.names @_hash = {} if @_hash.nil? @_hash['channel'] = 'channel' @_hash['noise'] = 'noise' @_hash['other_rssi'] = 'other_rssi' @_hash['other_ssid'] = 'other_ssid' @_hash['rssi'] = 'rssi' @_hash['util_score'] = 'util_score' @_hash['util_score_non_wifi'] = 'util_score_non_wifi' @_hash['util_score_other'] = 'util_score_other' @_hash end |
.nullables ⇒ Object
An array for nullable fields
69 70 71 |
# File 'lib/mist_api/models/rrm_consideration.rb', line 69 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
60 61 62 63 64 65 66 |
# File 'lib/mist_api/models/rrm_consideration.rb', line 60 def self.optionals %w[ other_rssi other_ssid rssi ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
122 123 124 125 126 127 128 |
# File 'lib/mist_api/models/rrm_consideration.rb', line 122 def inspect class_name = self.class.name.split('::').last "<#{class_name} channel: #{@channel.inspect}, noise: #{@noise.inspect}, other_rssi:"\ " #{@other_rssi.inspect}, other_ssid: #{@other_ssid.inspect}, rssi: #{@rssi.inspect},"\ " util_score: #{@util_score.inspect}, util_score_non_wifi: #{@util_score_non_wifi.inspect},"\ " util_score_other: #{@util_score_other.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
114 115 116 117 118 119 |
# File 'lib/mist_api/models/rrm_consideration.rb', line 114 def to_s class_name = self.class.name.split('::').last "<#{class_name} channel: #{@channel}, noise: #{@noise}, other_rssi: #{@other_rssi},"\ " other_ssid: #{@other_ssid}, rssi: #{@rssi}, util_score: #{@util_score},"\ " util_score_non_wifi: #{@util_score_non_wifi}, util_score_other: #{@util_score_other}>" end |