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.
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.
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_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.