class

RNS::RNodeMultiInterface

Inherits RNS::Interface < Reference < Object

RNode Multi-interface for dual-radio LoRa setups. Ports RNS/Interfaces/RNodeMultiInterface.py. Manages multiple RNodeSubInterfaces through a single serial connection.

Constants

CALLSIGN_MAX_LEN = 32
DEFAULT_IFAC_SIZE = 8
FB_BITS_PER_PIXEL = 1
FB_BYTES_PER_LINE = FB_PIXEL_WIDTH // FB_PIXELS_PER_BYTE
FB_PIXEL_WIDTH = 64
FB_PIXELS_PER_BYTE = 8 // FB_BITS_PER_PIXEL
MAX_CHUNK = 32768
MAX_SUBINTERFACES = 11
RECONNECT_WAIT = 5
REQUIRED_FW_VER_MAJ = 1
REQUIRED_FW_VER_MIN = 74

Constructors

new(name : String, port : String)

Simplified constructor for testing without config hash

Source
new(configuration : Hash(String, String | Hash(String, String)))
Source

Instance methods

clients
Source
clients=(clients : Int32)
Source
configure_device
Source
databits
Source
databits=(databits : Int32)
Source
detach

Called when the interface is being detached/removed

Source
detect
Source
detected
Source
detected=(detected : Bool)
Source
disable_external_framebuffer
Source
display
Source
display=(display : Bool | Nil)
Source
display_image(imagedata : Bytes)
Source
enable_external_framebuffer
Source
firmware_ok
Source
firmware_ok=(firmware_ok : Bool)
Source
first_tx
Source
first_tx=(first_tx : Float64 | Nil)
Source
hard_reset
Source
id_callsign
Source
id_callsign=(id_callsign : Bytes | Nil)
Source
id_interval
Source
id_interval=(id_interval : Int32 | Nil)
Source
interface_ready
Source
interface_ready=(interface_ready : Bool)
Source
last_id
Source
last_id=(last_id : Float64)
Source
leave
Source
maj_version
Source
maj_version=(maj_version : Int32)
Source
mcu=(mcu : UInt8 | Nil)
Source
min_version
Source
min_version=(min_version : Int32)
Source
open_port
Source
packet_queue
Source
packet_queue=(packet_queue : Array(Bytes))
Source
platform
Source
platform=(platform : UInt8 | Nil)
Source
port
Source
port=(port : String)
Source
process_outgoing(data : Bytes, interface : RNodeSubInterface)
Source
process_outgoing(data : Bytes)

Send data out through the interface. Subclasses must implement this.

Source
process_queue
Source
r_airtime_long
Source
r_airtime_long=(r_airtime_long : Float64)
Source
r_airtime_short
Source
r_airtime_short=(r_airtime_short : Float64)
Source
r_channel_load_long
Source
r_channel_load_long=(r_channel_load_long : Float64)
Source
r_channel_load_short
Source
r_channel_load_short=(r_channel_load_short : Float64)
Source
r_lt_alock
Source
r_lt_alock=(r_lt_alock : Float64 | Nil)
Source
r_random
Source
r_random=(r_random : UInt8 | Nil)
Source
r_st_alock
Source
r_st_alock=(r_st_alock : Float64 | Nil)
Source
r_stat_rssi
Source
r_stat_rssi=(r_stat_rssi : Int32 | Nil)
Source
r_stat_rx
Source
r_stat_rx=(r_stat_rx : UInt32 | Nil)
Source
r_stat_snr
Source
r_stat_snr=(r_stat_snr : Float64 | Nil)
Source
r_stat_tx
Source
r_stat_tx=(r_stat_tx : UInt32 | Nil)
Source
read_loop
Source
received_announce(from_spawned : Bool = false)
Source
reconnect_port
Source
reconnecting
Source
reconnecting=(reconnecting : Bool)
Source
selected_index
Source
selected_index=(selected_index : Int32)
Source
sent_announce(from_spawned : Bool = false)
Source
set_bandwidth(bandwidth : Int64, interface : RNodeSubInterface)
Source
set_coding_rate(cr : Int32, interface : RNodeSubInterface)
Source
set_frequency(frequency : Int64, interface : RNodeSubInterface)
Source
set_lt_alock(lt_alock : Float64 | Nil, interface : RNodeSubInterface)
Source
set_radio_state(state : UInt8, interface : RNodeSubInterface)
Source
set_spreading_factor(sf : Int32, interface : RNodeSubInterface)
Source
set_st_alock(st_alock : Float64 | Nil, interface : RNodeSubInterface)
Source
set_tx_power(txpower : Int32, interface : RNodeSubInterface)
Source
should_id
Source
should_id=(should_id : Bool)
Source
should_ingress_limit?

Determine when an interface should activate ingress limiting. Subclasses may override for different behavior.

Source
speed
Source
speed=(speed : Int32)
Source
start
Source
stopbits
Source
stopbits=(stopbits : Int32)
Source
subint_config
Source
subint_config=(subint_config : Array(SubIntConfig))
Source
subinterface_types
Source
subinterface_types=(subinterface_types : Array(String))
Source
subinterfaces
Source
subinterfaces=(subinterfaces : Array(RNodeSubInterface | Nil))
Source
teardown_subinterfaces
Source
timeout
Source
timeout=(timeout : Int32)
Source
to_s(io : IO)

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Source
validate_firmware
Source
write_framebuffer(line : Int32, line_data : Bytes)
Source