Channel Plan

class whad.lorawan.channel.ChannelPlan(channels: [<class 'whad.lorawan.channel.Channel'>], datarates: [<class 'whad.lorawan.channel.DataRate'>], rx2: ~whad.lorawan.channel.Channel = None)[source]

LoRa Frequency Plan

__init__(channels: [<class 'whad.lorawan.channel.Channel'>], datarates: [<class 'whad.lorawan.channel.DataRate'>], rx2: ~whad.lorawan.channel.Channel = None)[source]

Loop on channel provided in args

channels()[source]

Channels iterator (uplink and downlink)

Retrieve a downlink channel given its index

get_rx1(chan_number: int) ChannelModParams[source]

Retrieve RX1 channel based on TX channel.

Parameters:

chan_number (int) – tx channel number

Returns:

RX1 channel modulation parameters

get_rx2() ChannelModParams[source]

Retrieve the channel defined for RX2

Returns:

RX2 channel

Retrieve an uplink channel given its index

Determine if a channel number is in the downlink channel plan

Determine if a channel number is in the uplink channel plan

pick_channel() ChannelModParams[source]

Select a channel from our frequency plan, based on our criterias.