Class: MachineHead::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/machine_head/status.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status_text) ⇒ Status

Returns a new instance of Status.



6
7
8
9
10
# File 'lib/machine_head/status.rb', line 6

def initialize(status_text)
  @channel, @lock, @signal_strength, @signal_quality,
      @symbol_quality, @raw_bitrate,
      @net_packetrate = status_text.split.map{|i| i.split('=').last}
end

Instance Attribute Details

#channelObject (readonly)

Returns the value of attribute channel.



3
4
5
# File 'lib/machine_head/status.rb', line 3

def channel
  @channel
end

#lockObject (readonly)

Returns the value of attribute lock.



3
4
5
# File 'lib/machine_head/status.rb', line 3

def lock
  @lock
end

#net_packetrateObject (readonly)

Returns the value of attribute net_packetrate.



3
4
5
# File 'lib/machine_head/status.rb', line 3

def net_packetrate
  @net_packetrate
end

#raw_bitrateObject (readonly)

Returns the value of attribute raw_bitrate.



3
4
5
# File 'lib/machine_head/status.rb', line 3

def raw_bitrate
  @raw_bitrate
end

#signal_qualityObject (readonly)

Returns the value of attribute signal_quality.



3
4
5
# File 'lib/machine_head/status.rb', line 3

def signal_quality
  @signal_quality
end

#signal_strengthObject (readonly)

Returns the value of attribute signal_strength.



3
4
5
# File 'lib/machine_head/status.rb', line 3

def signal_strength
  @signal_strength
end

#symbol_qualityObject (readonly)

Returns the value of attribute symbol_quality.



3
4
5
# File 'lib/machine_head/status.rb', line 3

def symbol_quality
  @symbol_quality
end