Expand description
The C ABI for LoRaWAN regional channel plans.
A channel plan is the set of facts a regulator and the LoRa Alliance publish about one band: which data rates exist, how much they carry, what a device may radiate, where it listens for a downlink. This module hands those facts across the boundary and costs nothing out of them. It never refuses a transmission, because a deployment may hold licensed spectrum or be operating under emergency provisions, and only the operator knows which.
A plan crosses as an opaque handle rather than by value, because it is a set of
tables rather than a few scalars. A handle comes either from a published region
or from pamoja_lora_plan_builder_build, and the query functions cannot tell
the difference: a private plan on licensed spectrum answers every question a
published one does.
Region codes are assigned here and are stable. They are deliberately not the discriminants of the Rust enum, whose variants are individually feature-gated, so a build carrying one region would otherwise number it differently from a build carrying all of them.
Structs§
- Pamoja
Lora Beacon - The Class B beacon settings of a plan.
- Pamoja
Lora Channel Block - A run of evenly spaced channels.
- Pamoja
Lora Data Rate - One data rate: how a number on the wire maps onto radio settings.
- Pamoja
Lora Join Plan - A run of join channels that puts a device on a plan.
- Pamoja
Lora Mask Control - What one
ChMaskCntlvalue of aLinkADRReqdoes. - Pamoja
Lora MaxPayload - What one data rate may carry in a single frame.
- Pamoja
Lora Plan - A regional channel plan, published or private.
- Pamoja
Lora Plan Builder - A channel plan under construction.
- Pamoja
Lora Plan Info - The scalar facts of a plan, gathered so a caller reads them in one call.
- Pamoja
Lora Plan Rules - How a plan’s channels are defined and used, read in one call.
- Pamoja
Lora Relay Channel - A default channel of a LoRaWAN relay, TS011-1.0.1.
- Pamoja
Lora SubBand - A slice of a band with its own transmit limits.
Constants§
- PAMOJA_
LORA_ CHANNELS_ DEFAULT - The channels a device starts with before a network adds any.
- PAMOJA_
LORA_ CHANNELS_ DOWNLINK - The numbered downlink channels a fixed plan answers the first receive window on.
- PAMOJA_
LORA_ CHANNELS_ JOIN - The channels a device must use to send a join request.
- PAMOJA_
LORA_ CHANNEL_ LIST_ MHZ800 - The 800 MHz numbering of RP002-1.0.5 section 3.3.1.1.
- PAMOJA_
LORA_ CHANNEL_ LIST_ MHZ900 - The 900 MHz numbering of RP002-1.0.5 section 3.3.1.2.
- PAMOJA_
LORA_ CHANNEL_ LIST_ NONE - A plan that reads a type 1 channel list against no numbering.
- PAMOJA_
LORA_ CN470_ ANTENNA_ 20MHZ_ A - The CN470-510 plan for a 20 MHz antenna, type A.
- PAMOJA_
LORA_ CN470_ ANTENNA_ 20MHZ_ B - The CN470-510 plan for a 20 MHz antenna, type B.
- PAMOJA_
LORA_ CN470_ ANTENNA_ 26MHZ_ A - The CN470-510 plan for a 26 MHz antenna, type A.
- PAMOJA_
LORA_ CN470_ ANTENNA_ 26MHZ_ B - The CN470-510 plan for a 26 MHz antenna, type B.
- PAMOJA_
LORA_ CN470_ CHANNELS_ 96 - The 96-channel CN470-510 plan of the LoRaWAN 1.0.3 Regional Parameters revision A.
- PAMOJA_
LORA_ CN470_ NONE - No CN470-510 plan, for a join plan that points at a plan built elsewhere.
- PAMOJA_
LORA_ DIRECTION_ DOWNLINK - The downlink direction, for a table that differs between the two.
- PAMOJA_
LORA_ DIRECTION_ UPLINK - The uplink direction, for a table that differs between the two.
- PAMOJA_
LORA_ JOIN_ OCTET_ PASSES - The octet passes of RP002-1.0.5 section 3.5.2, eight 125 kHz channels from successive groups and then a 500 kHz one.
- PAMOJA_
LORA_ JOIN_ RANDOM - A join channel at random, stepping the data rate down across attempts.
- PAMOJA_
LORA_ MASK_ ALL - A channel mask control that turns every channel on or off, then sets a group.
- PAMOJA_
LORA_ MASK_ BANKS - A channel mask control whose ten low bits switch banks of eight.
- PAMOJA_
LORA_ MASK_ GROUP - A channel mask control that sets one group of sixteen channels.
- PAMOJA_
LORA_ MASK_ PAIRED_ BANKS - A channel mask control whose eight low bits switch banks of eight with their 500 kHz channel.
- PAMOJA_
LORA_ MASK_ RESERVED - A channel mask control the region reserves.
- PAMOJA_
LORA_ MODULATION_ FSK - A data rate carried by FSK modulation.
- PAMOJA_
LORA_ MODULATION_ LORA - A data rate carried by LoRa modulation.
- PAMOJA_
LORA_ MODULATION_ LR_ FHSS - A data rate carried by long-range frequency-hopping spread spectrum.
- PAMOJA_
LORA_ MODULATION_ RESERVED - A data-rate number the region reserves, which carries nothing.
- PAMOJA_
LORA_ PAYLOAD_ TABLE_ DOWNLINK_ DIRECT - The downlink payload limits for a device that will not sit behind a repeater.
- PAMOJA_
LORA_ PAYLOAD_ TABLE_ DOWNLINK_ REPEATER - The downlink payload limits for a device that may sit behind a repeater.
- PAMOJA_
LORA_ PAYLOAD_ TABLE_ DWELL_ LIMITED - The payload limits that apply under a dwell-time limit.
- PAMOJA_
LORA_ PAYLOAD_ TABLE_ UPLINK_ DIRECT - The uplink payload limits for a device that will not sit behind a repeater.
- PAMOJA_
LORA_ PAYLOAD_ TABLE_ UPLINK_ REPEATER - The uplink payload limits for a device that may sit behind a repeater.
- PAMOJA_
LORA_ PLAN_ KIND_ DYNAMIC - A plan whose network creates channels and moves them.
- PAMOJA_
LORA_ PLAN_ KIND_ FIXED - A plan whose channels are numbered in advance and only enabled or disabled.
- PAMOJA_
LORA_ POWER_ CONDUCTED - Power indexes that count down from a conducted ceiling.
- PAMOJA_
LORA_ POWER_ EIRP - Power indexes that count down from a radiated ceiling.
- PAMOJA_
LORA_ REGION_ AS923 - The AS923 band.
- PAMOJA_
LORA_ REGION_ AU915 - The AU915-928 band.
- PAMOJA_
LORA_ REGION_ CN470 - The CN470-510 band.
- PAMOJA_
LORA_ REGION_ EU433 - The EU433 band.
- PAMOJA_
LORA_ REGION_ EU868 - The EU863-870 band.
- PAMOJA_
LORA_ REGION_ IN865 - The IN865-867 band.
- PAMOJA_
LORA_ REGION_ KR920 - The KR920-923 band.
- PAMOJA_
LORA_ REGION_ RU864 - The RU864-870 band.
- PAMOJA_
LORA_ REGION_ US915 - The US902-928 band.
Functions§
- pamoja_
lora_ ⚠plan_ builder_ add_ relay_ channel - Appends the next default relay channel.
- pamoja_
lora_ ⚠plan_ builder_ build - Finishes a plan and hands back a handle the query functions accept.
- pamoja_
lora_ ⚠plan_ builder_ free - Releases a plan builder that will not be built.
- pamoja_
lora_ ⚠plan_ builder_ new - Creates an empty plan builder.
- pamoja_
lora_ ⚠plan_ builder_ push_ backoff - Appends the next entry in the adaptive back-off chain.
- pamoja_
lora_ ⚠plan_ builder_ push_ channel_ block - Appends a run of evenly spaced channels to the plan.
- pamoja_
lora_ ⚠plan_ builder_ push_ data_ rate - Appends a data rate to the end of a direction’s table.
- pamoja_
lora_ ⚠plan_ builder_ push_ max_ payload - Appends a payload limit to the end of one of the plan’s tables.
- pamoja_
lora_ ⚠plan_ builder_ push_ rx1_ row - Appends one uplink data rate’s row of RX1 downlink data rates.
- pamoja_
lora_ ⚠plan_ builder_ push_ sub_ band - Appends a sub-band and its transmit limits to the plan.
- pamoja_
lora_ ⚠plan_ builder_ set_ beacon - Sets the plan’s Class B beacon and whether it limits dwell time.
- pamoja_
lora_ ⚠plan_ builder_ set_ join_ sequence - Sets the order a device tries the join channels in.
- pamoja_
lora_ ⚠plan_ builder_ set_ kind - Sets whether the plan’s network creates channels, and the numbering a dynamic plan reads a type 1 channel list against.
- pamoja_
lora_ ⚠plan_ builder_ set_ mask_ controls - Sets what each
ChMaskCntlvalue does. - pamoja_
lora_ ⚠plan_ builder_ set_ power - Sets the plan’s transmit-power ladder.
- pamoja_
lora_ ⚠plan_ builder_ set_ power_ reference - Sets what the plan’s transmit power indexes count down from.
- pamoja_
lora_ ⚠plan_ builder_ set_ rx - Sets the plan’s receive windows.
- pamoja_
lora_ ⚠plan_ builder_ set_ tx_ param_ setup - Sets whether devices on the plan answer
TXParamSetupReq. - pamoja_
lora_ ⚠plan_ channel_ block - Returns one of the plan’s channel blocks.
- pamoja_
lora_ ⚠plan_ channel_ frequency_ hz - Returns the center frequency of one of the plan’s default channels.
- pamoja_
lora_ ⚠plan_ data_ rate - Returns the data rate a number selects.
- pamoja_
lora_ ⚠plan_ downlink_ channel_ frequency_ hz - Returns the frequency of one of the plan’s numbered downlink channels.
- pamoja_
lora_ ⚠plan_ duty_ cycle_ permille - Returns the share of time a transmitter may hold a frequency.
- pamoja_
lora_ ⚠plan_ for_ cn470 - Returns one of the five CN470-510 channel plans.
- pamoja_
lora_ ⚠plan_ for_ region - Returns the published channel plan for a region.
- pamoja_
lora_ ⚠plan_ free - Releases a channel plan.
- pamoja_
lora_ ⚠plan_ info - Reads the scalar facts of a plan in one call.
- pamoja_
lora_ ⚠plan_ join_ plan - Returns one run of join channels that selects a plan.
- pamoja_
lora_ ⚠plan_ join_ plan_ for_ channel - Finds the run of join channels a join channel belongs to.
- pamoja_
lora_ ⚠plan_ link_ settings - Returns the radio settings an uplink data rate selects.
- pamoja_
lora_ ⚠plan_ mask_ control - Reads what one
ChMaskCntlvalue does on a plan. - pamoja_
lora_ ⚠plan_ max_ eirp_ dbm - Returns the power ceiling that applies at a frequency, in dBm EIRP.
- pamoja_
lora_ ⚠plan_ max_ payload - Returns what a data rate may carry in one frame.
- pamoja_
lora_ ⚠plan_ name - Returns the plan’s name, such as
EU863-870. - pamoja_
lora_ ⚠plan_ next_ backoff_ data_ rate - Returns the next lower data rate to fall back to during adaptive back-off.
- pamoja_
lora_ ⚠plan_ relay_ channel - Returns one of the plan’s default relay channels, RP002-1.0.5 sections 3.4.9 to 3.13.9.
- pamoja_
lora_ ⚠plan_ relay_ channel_ count - Counts the plan’s default relay channels.
- pamoja_
lora_ ⚠plan_ rules - Reads how a plan defines and uses its channels.
- pamoja_
lora_ ⚠plan_ rx1_ data_ rate - Returns the downlink data rate the first receive window listens at.
- pamoja_
lora_ ⚠plan_ rx1_ frequency_ hz - Returns where the first receive window listens after an uplink.
- pamoja_
lora_ ⚠plan_ sub_ band - Returns one of the plan’s sub-bands.
- pamoja_
lora_ ⚠plan_ tx_ power_ dbm - Returns the radiated power a transmit-power index selects, in dBm.
- pamoja_
lora_ region_ is_ available - Reports whether a region is compiled into this build.