Module: PWN::SDR
- Defined in:
- lib/pwn/sdr.rb,
lib/pwn/sdr/gqrx.rb,
lib/pwn/sdr/decoder.rb,
lib/pwn/sdr/rfidler.rb,
lib/pwn/sdr/decoder/gsm.rb,
lib/pwn/sdr/decoder/rds.rb,
lib/pwn/sdr/decoder/flex.rb,
lib/pwn/sdr/flipper_zero.rb,
lib/pwn/sdr/decoder/pocsag.rb,
lib/pwn/sdr/son_micro_rfid.rb,
lib/pwn/sdr/frequency_allocation.rb
Overview
This file, using the autoload directive loads SDR modules into memory only when they’re needed. For more information, see: www.rubyinside.com/ruby-techniques-revealed-autoload-1652.html
Defined Under Namespace
Modules: Decoder, FlipperZero, FrequencyAllocation, GQRX, RFIDler, SonMicroRFID
Class Method Summary collapse
-
.help ⇒ Object
Display a List of Every PWN::AI Module.
- .hz_to_i(freq) ⇒ Object
- .hz_to_s(freq) ⇒ Object
Class Method Details
.help ⇒ Object
Display a List of Every PWN::AI Module
30 31 32 |
# File 'lib/pwn/sdr.rb', line 30 public_class_method def self.help constants.sort end |
.hz_to_i(freq) ⇒ Object
24 25 26 |
# File 'lib/pwn/sdr.rb', line 24 public_class_method def self.hz_to_i(freq) freq.to_s.gsub('.', '').to_i end |
.hz_to_s(freq) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/pwn/sdr.rb', line 15 public_class_method def self.hz_to_s(freq) str_hz = freq.to_s # Nuke leading zeros # E.g., 002450000000 -> 2450000000 str_hz = str_hz.sub(/^0+/, '') unless str_hz == '0' # Insert dots every 3 digits from the right str_hz.reverse.scan(/.{1,3}/).join('.').reverse end |