Class: OGNClient::ReceiverStatus
- Defined in:
- lib/ogn_client/messages/receiver_status.rb
Constant Summary collapse
- RECEIVER_STATUS_PATTERN =
%r( (?: v(?<version>\d+\.\d+\.\d+) (?:\.(?<platform>.+?))? \s)? CPU:(?<cpu_load>[\d.]+)\s RAM:(?<ram_free>[\d.]+)/(?<ram_total>[\d.]+)MB\s NTP:(?<ntp_offset>[\d.]+)ms/(?<ntp_correction>[+-][\d.]+)ppm\s (?:(?<voltage>[\d.]+)V\s)? (?:(?<amperage>[\d.]+)A\s)? (?:(?<cpu_temperature>[+-][\d.]+)C\s*)? (?:(?<visible_senders>\d+)/(?<senders>\d+)Acfts\[1h\]\s*)? (?:RF: (?: (?<rf_correction_manual>[+-][\d]+) (?<rf_correction_automatic>[+-][\d.]+)ppm/ )? (?<signal_quality>[+-][\d.]+)dB (?:/(?<senders_signal_quality>[+-][\d.]+)dB@10km\[(?<senders_messages>\d+)\])? (?:/(?<good_senders_signal_quality>[+-][\d.]+)dB@10km\[(?<good_senders>\d+)/(?<good_and_bad_senders>\d+)\])? )? $)x
- NO_WARN_RECEIVER_VERSIONS =
Gem::Dependency.new('', '>= 0.2.6', '< 0.2.8')
- NO_FAIL_RECEIVER_VERSIONS =
Gem::Dependency.new('', '< 0.3')
Constants inherited from Message
Instance Attribute Summary collapse
-
#amperage ⇒ Object
readonly
board amperage in A.
-
#cpu_load ⇒ Object
readonly
as reported by “uptime”.
-
#cpu_temperature ⇒ Object
readonly
degrees celsius.
-
#good_and_bad_senders ⇒ Object
readonly
number of good and bad senders within the last 24 hours.
-
#good_senders ⇒ Object
readonly
number of good senders (transmitting properly) within the last 24 hours.
-
#good_senders_signal_quality ⇒ Object
readonly
average signal-to-noise ratio in decibel of good senders (transmitting properly) within the last 24 hours.
-
#ntp_correction ⇒ Object
readonly
parts-per-million.
-
#ntp_offset ⇒ Object
readonly
milliseconds.
-
#platform ⇒ Object
readonly
e.g.
-
#ram_free ⇒ Object
readonly
megabytes.
-
#ram_total ⇒ Object
readonly
megabytes.
-
#rf_correction_automatic ⇒ Object
readonly
based on GSM.
-
#rf_correction_manual ⇒ Object
readonly
as per configuration.
-
#senders ⇒ Object
readonly
number of senders within the last hour.
-
#senders_messages ⇒ Object
readonly
number of messages analyzed to calculate the above.
-
#senders_signal_quality ⇒ Object
readonly
average signal-to-noise ratio in decibel across all senders.
-
#signal_quality ⇒ Object
readonly
signal-to-noise ratio in decibel.
-
#version ⇒ Object
readonly
software version as “major.minor.patch”.
-
#visible_senders ⇒ Object
readonly
number of visible senders within the last hour.
-
#voltage ⇒ Object
readonly
board voltage in V.
Attributes inherited from Message
#altitude, #callsign, #ground_speed, #heading, #latitude, #longitude, #raw, #receiver, #time
Instance Method Summary collapse
Methods inherited from Message
Instance Attribute Details
#amperage ⇒ Object
board amperage in A
40 41 42 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 40 def amperage @amperage end |
#cpu_load ⇒ Object
as reported by “uptime”
33 34 35 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 33 def cpu_load @cpu_load end |
#cpu_temperature ⇒ Object
degrees celsius
34 35 36 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 34 def cpu_temperature @cpu_temperature end |
#good_and_bad_senders ⇒ Object
number of good and bad senders within the last 24 hours
49 50 51 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 49 def good_and_bad_senders @good_and_bad_senders end |
#good_senders ⇒ Object
number of good senders (transmitting properly) within the last 24 hours
50 51 52 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 50 def good_senders @good_senders end |
#good_senders_signal_quality ⇒ Object
average signal-to-noise ratio in decibel of good senders (transmitting properly) within the last 24 hours
48 49 50 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 48 def good_senders_signal_quality @good_senders_signal_quality end |
#ntp_correction ⇒ Object
parts-per-million
38 39 40 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 38 def ntp_correction @ntp_correction end |
#ntp_offset ⇒ Object
milliseconds
37 38 39 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 37 def ntp_offset @ntp_offset end |
#platform ⇒ Object
e.g. “ARM”
32 33 34 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 32 def platform @platform end |
#ram_free ⇒ Object
megabytes
35 36 37 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 35 def ram_free @ram_free end |
#ram_total ⇒ Object
megabytes
36 37 38 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 36 def ram_total @ram_total end |
#rf_correction_automatic ⇒ Object
based on GSM
42 43 44 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 42 def rf_correction_automatic @rf_correction_automatic end |
#rf_correction_manual ⇒ Object
as per configuration
41 42 43 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 41 def rf_correction_manual @rf_correction_manual end |
#senders ⇒ Object
number of senders within the last hour
43 44 45 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 43 def senders @senders end |
#senders_messages ⇒ Object
number of messages analyzed to calculate the above
47 48 49 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 47 def @senders_messages end |
#senders_signal_quality ⇒ Object
average signal-to-noise ratio in decibel across all senders
46 47 48 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 46 def senders_signal_quality @senders_signal_quality end |
#signal_quality ⇒ Object
signal-to-noise ratio in decibel
45 46 47 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 45 def signal_quality @signal_quality end |
#version ⇒ Object
software version as “major.minor.patch”
31 32 33 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 31 def version @version end |
#visible_senders ⇒ Object
number of visible senders within the last hour
44 45 46 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 44 def visible_senders @visible_senders end |
#voltage ⇒ Object
board voltage in V
39 40 41 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 39 def voltage @voltage end |
Instance Method Details
#bad_senders ⇒ Object
58 59 60 61 62 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 58 def bad_senders good_and_bad_senders - good_senders rescue nil end |
#invisible_senders ⇒ Object
52 53 54 55 56 |
# File 'lib/ogn_client/messages/receiver_status.rb', line 52 def invisible_senders senders - visible_senders rescue nil end |