Skip to main content

Module lora_region

Module lora_region 

Source
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§

PamojaLoraBeacon
The Class B beacon settings of a plan.
PamojaLoraChannelBlock
A run of evenly spaced channels.
PamojaLoraDataRate
One data rate: how a number on the wire maps onto radio settings.
PamojaLoraJoinPlan
A run of join channels that puts a device on a plan.
PamojaLoraMaskControl
What one ChMaskCntl value of a LinkADRReq does.
PamojaLoraMaxPayload
What one data rate may carry in a single frame.
PamojaLoraPlan
A regional channel plan, published or private.
PamojaLoraPlanBuilder
A channel plan under construction.
PamojaLoraPlanInfo
The scalar facts of a plan, gathered so a caller reads them in one call.
PamojaLoraPlanRules
How a plan’s channels are defined and used, read in one call.
PamojaLoraRelayChannel
A default channel of a LoRaWAN relay, TS011-1.0.1.
PamojaLoraSubBand
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 ChMaskCntl value 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 ChMaskCntl value 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.