Module: Meshtastic::Xmodem
- Defined in:
- lib/meshtastic/xmodem.rb
Class Method Summary collapse
Class Method Details
.authors ⇒ Object
15 16 17 |
# File 'lib/meshtastic/xmodem.rb', line 15 public_class_method def self. "AUTHOR(S):\n 0day Inc. <[email protected]>\n " end |
.encode(opts = {}) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/meshtastic/xmodem.rb', line 7 public_class_method def self.encode(opts = {}) packet = Meshtastic::XModem.new packet.control = opts.fetch(:control, :SOH) packet.seq = opts[:seq].to_i if opts[:seq] packet.buffer = opts[:buffer] if opts[:buffer] packet end |
.help ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/meshtastic/xmodem.rb', line 19 public_class_method def self.help puts " USAGE: # Run the encode class method for this module. #{self}.encode( seq: 'optional - value for seq passed into encode', buffer: 'optional - value for buffer passed into encode' ) # Run the authors class method for this module. #{self}.authors " end |