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 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 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_ JOIN - The channels a device must use to send a join request.
- 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_ 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_ 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_ 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_ power - Sets the plan’s transmit-power ladder.
- pamoja_
lora_ ⚠plan_ builder_ set_ rx - Sets the plan’s receive windows.
- pamoja_
lora_ ⚠plan_ channel_ block - Returns one of the plan’s channel blocks.
- pamoja_
lora_ ⚠plan_ channel_ frequency_ hz - Returns the centre frequency of one of the plan’s default channels.
- pamoja_
lora_ ⚠plan_ data_ rate - Returns the data rate a number selects.
- pamoja_
lora_ ⚠plan_ duty_ cycle_ permille - Returns the share of time a transmitter may hold a frequency.
- 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_ link_ settings - Returns the radio settings an uplink data rate selects.
- 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_ rx1_ data_ rate - Returns the downlink data rate the first receive window listens at.
- 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.