band

package
v3.33.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// AS_923 is the ID of the Asian 923Mhz Group 1 band
	AS_923 = "AS_923"
	// AS_923_2 is the ID of the Asian 923Mhz Group 2 band
	AS_923_2 = "AS_923_2"
	// AS_923_3 is the ID of the Asian 923Mhz Group 3 band
	AS_923_3 = "AS_923_3"
	// AS_923_4 is the ID of the Asian 923Mhz Group 4 band
	AS_923_4 = "AS_923_4"
)
View Source
const (
	Cr4_5   = "4/5"
	Cr4_6   = "4/6"
	Cr4_7   = "4/7"
	Cr4_8   = "4/8"
	Cr4_8LI = "4/8LI"
)

Default LoRa coding rates.

View Source
const (
	// AU_915_928 is the ID of the Australian band
	AU_915_928 = "AU_915_928"
)
View Source
const (
	// CN_470_510 is the ID of the Chinese 470-510Mhz band
	CN_470_510 = "CN_470_510"
)
View Source
const (
	// CN_470_510_20_A is the ID of the Chinese 470-510Mhz band which uses a 20 MHz antenna, type A
	CN_470_510_20_A = "CN_470_510_20_A"
)
View Source
const (
	// CN_470_510_20_B is the ID of the Chinese 470-510Mhz band which uses a 20 MHz antenna, type B
	CN_470_510_20_B = "CN_470_510_20_B"
)
View Source
const (
	// CN_470_510_26_A is the ID of the Chinese 470-510Mhz band which uses a 26 MHz antenna, type A
	CN_470_510_26_A = "CN_470_510_26_A"
)
View Source
const (
	// CN_470_510_26_B is the ID of the Chinese 470-510Mhz band which uses a 26 MHz antenna, type B
	CN_470_510_26_B = "CN_470_510_26_B"
)
View Source
const (
	// CN_779_787 is the ID of the Chinese 779-787Mhz band
	CN_779_787 = "CN_779_787"
)
View Source
const (
	// EU_433 is the ID of the European 433Mhz band
	EU_433 = "EU_433"
)
View Source
const (
	// EU_863_870 is the ID of the European 863-870Mhz band
	EU_863_870 = "EU_863_870"
)
View Source
const (
	// IN_865_867 is the ID of the Indian frequency plan
	IN_865_867 = "IN_865_867"
)
View Source
const (
	// ISM_2400 is the ID of the LoRa 2.4 GHz band.
	ISM_2400 = "ISM_2400"
)
View Source
const (
	// KR_920_923 is the ID of the Korean frequency plan
	KR_920_923 = "KR_920_923"
)
View Source
const (
	// MA_869_870_DRAFT is the ID of the draft Morocco 869-870Mhz band.
	MA_869_870_DRAFT = "MA_869_870_DRAFT"
)
View Source
const (
	// RU_864_870 is the ID of the Russian frequency plan
	RU_864_870 = "RU_864_870"
)
View Source
const (
	// US_902_928 is the ID of the US frequency plan
	US_902_928 = "US_902_928"
)

Variables

View Source
var (
	// All contains all the bands available.
	All = map[string]map[ttnpb.PHYVersion]Band{
		AS_923: {
			ttnpb.PHYVersion_RP001_V1_0_2:       AS_923_RP1_v1_0_2,
			ttnpb.PHYVersion_RP001_V1_0_2_REV_B: AS_923_RP1_v1_0_2_RevB,
			ttnpb.PHYVersion_RP001_V1_0_3_REV_A: AS_923_RP1_v1_0_3_RevA,
			ttnpb.PHYVersion_RP001_V1_1_REV_A:   AS_923_RP1_v1_1_RevA,
			ttnpb.PHYVersion_RP001_V1_1_REV_B:   AS_923_RP1_v1_1_RevB,
			ttnpb.PHYVersion_RP002_V1_0_0:       AS_923_RP2_v1_0_0,
			ttnpb.PHYVersion_RP002_V1_0_1:       AS_923_RP2_v1_0_1,
			ttnpb.PHYVersion_RP002_V1_0_2:       AS_923_RP2_v1_0_2,
			ttnpb.PHYVersion_RP002_V1_0_3:       AS_923_RP2_v1_0_3,
			ttnpb.PHYVersion_RP002_V1_0_4:       AS_923_RP2_v1_0_4,
		},
		AS_923_2: {
			ttnpb.PHYVersion_RP002_V1_0_1: AS_923_2_RP2_v1_0_1,
			ttnpb.PHYVersion_RP002_V1_0_2: AS_923_2_RP2_v1_0_2,
			ttnpb.PHYVersion_RP002_V1_0_3: AS_923_2_RP2_v1_0_3,
			ttnpb.PHYVersion_RP002_V1_0_4: AS_923_2_RP2_v1_0_4,
		},
		AS_923_3: {
			ttnpb.PHYVersion_RP002_V1_0_1: AS_923_3_RP2_v1_0_1,
			ttnpb.PHYVersion_RP002_V1_0_2: AS_923_3_RP2_v1_0_2,
			ttnpb.PHYVersion_RP002_V1_0_3: AS_923_3_RP2_v1_0_3,
			ttnpb.PHYVersion_RP002_V1_0_4: AS_923_3_RP2_v1_0_4,
		},
		AS_923_4: {
			ttnpb.PHYVersion_RP002_V1_0_3: AS_923_4_RP2_v1_0_3,
			ttnpb.PHYVersion_RP002_V1_0_4: AS_923_4_RP2_v1_0_4,
		},
		AU_915_928: {
			ttnpb.PHYVersion_TS001_V1_0_1:       AU_915_928_TS1_v1_0_1,
			ttnpb.PHYVersion_RP001_V1_0_2:       AU_915_928_RP1_v1_0_2,
			ttnpb.PHYVersion_RP001_V1_0_2_REV_B: AU_915_928_RP1_v1_0_2_RevB,
			ttnpb.PHYVersion_RP001_V1_0_3_REV_A: AU_915_928_RP1_v1_0_3_RevA,
			ttnpb.PHYVersion_RP001_V1_1_REV_A:   AU_915_928_RP1_v1_1_RevA,
			ttnpb.PHYVersion_RP001_V1_1_REV_B:   AU_915_928_RP1_v1_1_RevB,
			ttnpb.PHYVersion_RP002_V1_0_0:       AU_915_928_RP2_v1_0_0,
			ttnpb.PHYVersion_RP002_V1_0_1:       AU_915_928_RP2_v1_0_1,
			ttnpb.PHYVersion_RP002_V1_0_2:       AU_915_928_RP2_v1_0_2,
			ttnpb.PHYVersion_RP002_V1_0_3:       AU_915_928_RP2_v1_0_3,
			ttnpb.PHYVersion_RP002_V1_0_4:       AU_915_928_RP2_v1_0_4,
		},
		CN_470_510: {
			ttnpb.PHYVersion_TS001_V1_0_1:       CN_470_510_TS1_v1_0_1,
			ttnpb.PHYVersion_RP001_V1_0_2:       CN_470_510_RP1_v1_0_2,
			ttnpb.PHYVersion_RP001_V1_0_2_REV_B: CN_470_510_RP1_v1_0_2_RevB,
			ttnpb.PHYVersion_RP001_V1_0_3_REV_A: CN_470_510_RP1_v1_0_3_RevA,
			ttnpb.PHYVersion_RP001_V1_1_REV_A:   CN_470_510_RP1_v1_1_RevA,
			ttnpb.PHYVersion_RP001_V1_1_REV_B:   CN_470_510_RP1_v1_1_RevB,
		},
		CN_470_510_20_A: {
			ttnpb.PHYVersion_RP002_V1_0_0: CN_470_510_20_A_RP2_v1_0_0,
			ttnpb.PHYVersion_RP002_V1_0_1: CN_470_510_20_A_RP2_v1_0_1,
			ttnpb.PHYVersion_RP002_V1_0_2: CN_470_510_20_A_RP2_v1_0_2,
			ttnpb.PHYVersion_RP002_V1_0_3: CN_470_510_20_A_RP2_v1_0_3,
			ttnpb.PHYVersion_RP002_V1_0_4: CN_470_510_20_A_RP2_v1_0_4,
		},
		CN_470_510_20_B: {
			ttnpb.PHYVersion_RP002_V1_0_0: CN_470_510_20_B_RP2_v1_0_0,
			ttnpb.PHYVersion_RP002_V1_0_1: CN_470_510_20_B_RP2_v1_0_1,
			ttnpb.PHYVersion_RP002_V1_0_2: CN_470_510_20_B_RP2_v1_0_2,
			ttnpb.PHYVersion_RP002_V1_0_3: CN_470_510_20_B_RP2_v1_0_3,
			ttnpb.PHYVersion_RP002_V1_0_4: CN_470_510_20_B_RP2_v1_0_4,
		},
		CN_470_510_26_A: {
			ttnpb.PHYVersion_RP002_V1_0_0: CN_470_510_26_A_RP2_v1_0_0,
			ttnpb.PHYVersion_RP002_V1_0_1: CN_470_510_26_A_RP2_v1_0_1,
			ttnpb.PHYVersion_RP002_V1_0_2: CN_470_510_26_A_RP2_v1_0_2,
			ttnpb.PHYVersion_RP002_V1_0_3: CN_470_510_26_A_RP2_v1_0_3,
			ttnpb.PHYVersion_RP002_V1_0_4: CN_470_510_26_A_RP2_v1_0_4,
		},
		CN_470_510_26_B: {
			ttnpb.PHYVersion_RP002_V1_0_0: CN_470_510_26_B_RP2_v1_0_0,
			ttnpb.PHYVersion_RP002_V1_0_1: CN_470_510_26_B_RP2_v1_0_1,
			ttnpb.PHYVersion_RP002_V1_0_2: CN_470_510_26_B_RP2_v1_0_2,
			ttnpb.PHYVersion_RP002_V1_0_3: CN_470_510_26_B_RP2_v1_0_3,
			ttnpb.PHYVersion_RP002_V1_0_4: CN_470_510_26_B_RP2_v1_0_4,
		},
		CN_779_787: {
			ttnpb.PHYVersion_TS001_V1_0:         CN_779_787_RP1_V1_0,
			ttnpb.PHYVersion_TS001_V1_0_1:       CN_779_787_RP1_V1_0_1,
			ttnpb.PHYVersion_RP001_V1_0_2:       CN_779_787_RP1_V1_0_2,
			ttnpb.PHYVersion_RP001_V1_0_2_REV_B: CN_779_787_RP1_V1_0_2_RevB,
			ttnpb.PHYVersion_RP001_V1_0_3_REV_A: CN_779_787_RP1_V1_0_3_RevA,
			ttnpb.PHYVersion_RP001_V1_1_REV_A:   CN_779_787_RP1_V1_1_RevA,
			ttnpb.PHYVersion_RP001_V1_1_REV_B:   CN_779_787_RP1_V1_1_RevB,
			ttnpb.PHYVersion_RP002_V1_0_0:       CN_779_787_RP2_V1_0_0,
			ttnpb.PHYVersion_RP002_V1_0_1:       CN_779_787_RP2_V1_0_1,
			ttnpb.PHYVersion_RP002_V1_0_2:       CN_779_787_RP2_V1_0_2,
			ttnpb.PHYVersion_RP002_V1_0_3:       CN_779_787_RP2_V1_0_3,
		},
		EU_433: {
			ttnpb.PHYVersion_TS001_V1_0:         EU_433_TS1_V1_0,
			ttnpb.PHYVersion_TS001_V1_0_1:       EU_433_TS1_V1_0_1,
			ttnpb.PHYVersion_RP001_V1_0_2:       EU_433_RP1_V1_0_2,
			ttnpb.PHYVersion_RP001_V1_0_2_REV_B: EU_433_RP1_V1_0_2_Rev_B,
			ttnpb.PHYVersion_RP001_V1_0_3_REV_A: EU_433_RP1_V1_0_3_Rev_A,
			ttnpb.PHYVersion_RP001_V1_1_REV_A:   EU_433_RP1_V1_1_Rev_A,
			ttnpb.PHYVersion_RP001_V1_1_REV_B:   EU_433_RP1_V1_1_Rev_B,
			ttnpb.PHYVersion_RP002_V1_0_0:       EU_433_RP2_V1_0_0,
			ttnpb.PHYVersion_RP002_V1_0_1:       EU_433_RP2_V1_0_1,
			ttnpb.PHYVersion_RP002_V1_0_2:       EU_433_RP2_V1_0_2,
			ttnpb.PHYVersion_RP002_V1_0_3:       EU_433_RP2_V1_0_3,
			ttnpb.PHYVersion_RP002_V1_0_4:       EU_433_RP2_V1_0_4,
		},
		EU_863_870: {
			ttnpb.PHYVersion_TS001_V1_0:         EU_863_870_TS1_V1_0,
			ttnpb.PHYVersion_TS001_V1_0_1:       EU_863_870_TS1_V1_0_1,
			ttnpb.PHYVersion_RP001_V1_0_2:       EU_863_870_RP1_V1_0_2,
			ttnpb.PHYVersion_RP001_V1_0_2_REV_B: EU_863_870_RP1_V1_0_2_Rev_B,
			ttnpb.PHYVersion_RP001_V1_0_3_REV_A: EU_863_870_RP1_V1_0_3_Rev_A,
			ttnpb.PHYVersion_RP001_V1_1_REV_A:   EU_863_870_RP1_V1_1_Rev_A,
			ttnpb.PHYVersion_RP001_V1_1_REV_B:   EU_863_870_RP1_V1_1_Rev_B,
			ttnpb.PHYVersion_RP002_V1_0_0:       EU_863_870_RP2_V1_0_0,
			ttnpb.PHYVersion_RP002_V1_0_1:       EU_863_870_RP2_V1_0_1,
			ttnpb.PHYVersion_RP002_V1_0_2:       EU_863_870_RP2_V1_0_2,
			ttnpb.PHYVersion_RP002_V1_0_3:       EU_863_870_RP2_V1_0_3,
			ttnpb.PHYVersion_RP002_V1_0_4:       EU_863_870_RP2_V1_0_4,
		},
		IN_865_867: {
			ttnpb.PHYVersion_RP001_V1_0_2_REV_B: IN_865_867_RP1_V1_0_2_Rev_B,
			ttnpb.PHYVersion_RP001_V1_0_3_REV_A: IN_865_867_RP1_V1_0_3_Rev_A,
			ttnpb.PHYVersion_RP001_V1_1_REV_A:   IN_865_867_RP1_V1_1_Rev_A,
			ttnpb.PHYVersion_RP001_V1_1_REV_B:   IN_865_867_RP1_V1_1_Rev_B,
			ttnpb.PHYVersion_RP002_V1_0_0:       IN_865_867_RP2_V1_0_0,
			ttnpb.PHYVersion_RP002_V1_0_1:       IN_865_867_RP2_V1_0_1,
			ttnpb.PHYVersion_RP002_V1_0_2:       IN_865_867_RP2_V1_0_2,
			ttnpb.PHYVersion_RP002_V1_0_3:       IN_865_867_RP2_V1_0_3,
			ttnpb.PHYVersion_RP002_V1_0_4:       IN_865_867_RP2_V1_0_4,
		},
		ISM_2400: {
			ttnpb.PHYVersion_TS001_V1_0:         ISM_2400_Universal,
			ttnpb.PHYVersion_TS001_V1_0_1:       ISM_2400_Universal,
			ttnpb.PHYVersion_RP001_V1_0_2:       ISM_2400_Universal,
			ttnpb.PHYVersion_RP001_V1_0_2_REV_B: ISM_2400_Universal,
			ttnpb.PHYVersion_RP001_V1_0_3_REV_A: ISM_2400_Universal,
			ttnpb.PHYVersion_RP001_V1_1_REV_A:   ISM_2400_Universal,
			ttnpb.PHYVersion_RP001_V1_1_REV_B:   ISM_2400_Universal,
			ttnpb.PHYVersion_RP002_V1_0_0:       ISM_2400_Universal,
			ttnpb.PHYVersion_RP002_V1_0_1:       ISM_2400_Universal,
			ttnpb.PHYVersion_RP002_V1_0_2:       ISM_2400_Universal,
			ttnpb.PHYVersion_RP002_V1_0_3:       ISM_2400_Universal,
			ttnpb.PHYVersion_RP002_V1_0_4:       ISM_2400_Universal,
		},
		KR_920_923: {
			ttnpb.PHYVersion_RP001_V1_0_2:       KR_920_923_RP1_V1_0_2,
			ttnpb.PHYVersion_RP001_V1_0_2_REV_B: KR_920_923_RP1_V1_0_2_Rev_B,
			ttnpb.PHYVersion_RP001_V1_0_3_REV_A: KR_920_923_RP1_V1_0_3_Rev_A,
			ttnpb.PHYVersion_RP001_V1_1_REV_A:   KR_920_923_RP1_V1_1_Rev_A,
			ttnpb.PHYVersion_RP001_V1_1_REV_B:   KR_920_923_RP1_V1_1_Rev_B,
			ttnpb.PHYVersion_RP002_V1_0_0:       KR_920_923_RP2_V1_0_0,
			ttnpb.PHYVersion_RP002_V1_0_1:       KR_920_923_RP2_V1_0_1,
			ttnpb.PHYVersion_RP002_V1_0_2:       KR_920_923_RP2_V1_0_2,
			ttnpb.PHYVersion_RP002_V1_0_3:       KR_920_923_RP2_V1_0_3,
			ttnpb.PHYVersion_RP002_V1_0_4:       KR_920_923_RP2_V1_0_4,
		},
		MA_869_870_DRAFT: {
			ttnpb.PHYVersion_TS001_V1_0:         MA_869_870_Draft_Universal,
			ttnpb.PHYVersion_TS001_V1_0_1:       MA_869_870_Draft_Universal,
			ttnpb.PHYVersion_RP001_V1_0_2:       MA_869_870_Draft_Universal,
			ttnpb.PHYVersion_RP001_V1_0_2_REV_B: MA_869_870_Draft_Universal,
			ttnpb.PHYVersion_RP001_V1_0_3_REV_A: MA_869_870_Draft_Universal,
			ttnpb.PHYVersion_RP001_V1_1_REV_A:   MA_869_870_Draft_Universal,
			ttnpb.PHYVersion_RP001_V1_1_REV_B:   MA_869_870_Draft_Universal,
			ttnpb.PHYVersion_RP002_V1_0_0:       MA_869_870_Draft_Universal,
			ttnpb.PHYVersion_RP002_V1_0_1:       MA_869_870_Draft_Universal,
			ttnpb.PHYVersion_RP002_V1_0_2:       MA_869_870_Draft_Universal,
			ttnpb.PHYVersion_RP002_V1_0_3:       MA_869_870_Draft_Universal,
			ttnpb.PHYVersion_RP002_V1_0_4:       MA_869_870_Draft_Universal,
		},
		RU_864_870: {
			ttnpb.PHYVersion_RP001_V1_0_3_REV_A: RU_864_870_RP1_V1_0_3_Rev_A,
			ttnpb.PHYVersion_RP001_V1_1_REV_A:   RU_864_870_RP1_V1_1_Rev_A,
			ttnpb.PHYVersion_RP001_V1_1_REV_B:   RU_864_870_RP1_V1_1_Rev_B,
			ttnpb.PHYVersion_RP002_V1_0_0:       RU_864_870_RP2_V1_0_0,
			ttnpb.PHYVersion_RP002_V1_0_1:       RU_864_870_RP2_V1_0_1,
			ttnpb.PHYVersion_RP002_V1_0_2:       RU_864_870_RP2_V1_0_2,
			ttnpb.PHYVersion_RP002_V1_0_3:       RU_864_870_RP2_V1_0_3,
			ttnpb.PHYVersion_RP002_V1_0_4:       RU_864_870_RP2_V1_0_4,
		},
		US_902_928: {
			ttnpb.PHYVersion_TS001_V1_0:         US_902_928_TS1_V1_0,
			ttnpb.PHYVersion_TS001_V1_0_1:       US_902_928_TS1_V1_0_1,
			ttnpb.PHYVersion_RP001_V1_0_2:       US_902_928_RP1_V1_0_2,
			ttnpb.PHYVersion_RP001_V1_0_2_REV_B: US_902_928_RP1_V1_0_2_Rev_B,
			ttnpb.PHYVersion_RP001_V1_0_3_REV_A: US_902_928_RP1_V1_0_3_Rev_A,
			ttnpb.PHYVersion_RP001_V1_1_REV_A:   US_902_928_RP1_V1_1_Rev_A,
			ttnpb.PHYVersion_RP001_V1_1_REV_B:   US_902_928_RP1_V1_1_Rev_B,
			ttnpb.PHYVersion_RP002_V1_0_0:       US_902_928_RP2_V1_0_0,
			ttnpb.PHYVersion_RP002_V1_0_1:       US_902_928_RP2_V1_0_1,
			ttnpb.PHYVersion_RP002_V1_0_2:       US_902_928_RP2_V1_0_2,
			ttnpb.PHYVersion_RP002_V1_0_3:       US_902_928_RP2_V1_0_3,
			ttnpb.PHYVersion_RP002_V1_0_4:       US_902_928_RP2_V1_0_4,
		},
	}

	// LatestVersion contains the latest version of each band.
	LatestVersion = map[string]ttnpb.PHYVersion{
		AS_923:           ttnpb.PHYVersion_RP002_V1_0_4,
		AS_923_2:         ttnpb.PHYVersion_RP002_V1_0_4,
		AS_923_3:         ttnpb.PHYVersion_RP002_V1_0_4,
		AS_923_4:         ttnpb.PHYVersion_RP002_V1_0_4,
		AU_915_928:       ttnpb.PHYVersion_RP002_V1_0_4,
		CN_470_510:       ttnpb.PHYVersion_RP001_V1_1_REV_B,
		CN_470_510_20_A:  ttnpb.PHYVersion_RP002_V1_0_4,
		CN_470_510_20_B:  ttnpb.PHYVersion_RP002_V1_0_4,
		CN_470_510_26_A:  ttnpb.PHYVersion_RP002_V1_0_4,
		CN_470_510_26_B:  ttnpb.PHYVersion_RP002_V1_0_4,
		CN_779_787:       ttnpb.PHYVersion_RP002_V1_0_3,
		EU_433:           ttnpb.PHYVersion_RP002_V1_0_4,
		EU_863_870:       ttnpb.PHYVersion_RP002_V1_0_4,
		IN_865_867:       ttnpb.PHYVersion_RP002_V1_0_4,
		ISM_2400:         ttnpb.PHYVersion_RP002_V1_0_4,
		KR_920_923:       ttnpb.PHYVersion_RP002_V1_0_4,
		MA_869_870_DRAFT: ttnpb.PHYVersion_RP002_V1_0_4,
		RU_864_870:       ttnpb.PHYVersion_RP002_V1_0_4,
		US_902_928:       ttnpb.PHYVersion_RP002_V1_0_4,
	}
)
View Source
var (
	// AS_923_RP2_v1_0_1 is the band definition for AS923 Group 1 in the RP002-1.0.1 specification.
	AS_923_RP2_v1_0_1 = as923RP2101Band(AS_923, as923Group1Offset)
	// AS_923_2_RP2_v1_0_1 is the band definition for AS923 Group 2 in the RP002-1.0.1 specification.
	AS_923_2_RP2_v1_0_1 = as923RP2101Band(AS_923_2, as923Group2Offset)
	// AS_923_3_RP2_v1_0_1 is the band definition for AS923 Group 3 in the RP002-1.0.1 specification.
	AS_923_3_RP2_v1_0_1 = as923RP2101Band(AS_923_3, as923Group3Offset)
)
View Source
var (
	// AS_923_RP2_v1_0_2 is the band definition for AS923 Group 1 in the RP002-1.0.2 specification.
	AS_923_RP2_v1_0_2 = as923RP2102Band(AS_923, as923Group1Offset)
	// AS_923_2_RP2_v1_0_2 is the band definition for AS923 Group 2 in the RP002-1.0.2 specification.
	AS_923_2_RP2_v1_0_2 = as923RP2102Band(AS_923_2, as923Group2Offset)
	// AS_923_3_RP2_v1_0_2 is the band definition for AS923 Group 3 in the RP002-1.0.2 specification.
	AS_923_3_RP2_v1_0_2 = as923RP2102Band(AS_923_3, as923Group3Offset)
)
View Source
var (
	// AS_923_RP2_v1_0_3 is the band definition for AS923 Group 1 in the RP002-1.0.3 specification.
	AS_923_RP2_v1_0_3 = as923RP2103Band(AS_923, as923Group1Offset)
	// AS_923_2_RP2_v1_0_3 is the band definition for AS923 Group 2 in the RP002-1.0.3 specification.
	AS_923_2_RP2_v1_0_3 = as923RP2103Band(AS_923_2, as923Group2Offset)
	// AS_923_3_RP2_v1_0_3 is the band definition for AS923 Group 3 in the RP002-1.0.3 specification.
	AS_923_3_RP2_v1_0_3 = as923RP2103Band(AS_923_3, as923Group3Offset)
	// AS_923_4_RP2_v1_0_3 is the band definition for AS923 Group 4 in the RP002-1.0.3 specification.
	AS_923_4_RP2_v1_0_3 = as923RP2103Band(AS_923_4, as923Group4Offset)
)
View Source
var (
	// AS_923_RP2_v1_0_4 is the band definition for AS923 Group 1 in the RP002-1.0.4 specification.
	AS_923_RP2_v1_0_4 = as923RP2104Band(AS_923, as923Group1Offset)
	// AS_923_2_RP2_v1_0_4 is the band definition for AS923 Group 2 in the RP002-1.0.4 specification.
	AS_923_2_RP2_v1_0_4 = as923RP2104Band(AS_923_2, as923Group2Offset)
	// AS_923_3_RP2_v1_0_4 is the band definition for AS923 Group 3 in the RP002-1.0.4 specification.
	AS_923_3_RP2_v1_0_4 = as923RP2104Band(AS_923_3, as923Group3Offset)
	// AS_923_4_RP2_v1_0_4 is the band definition for AS923 Group 4 in the RP002-1.0.4 specification.
	AS_923_4_RP2_v1_0_4 = as923RP2104Band(AS_923_4, as923Group4Offset)
)
View Source
var AS_923_RP1_v1_0_2 = Band{
	ID: AS_923,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    as923DefaultChannels(as923Group1Offset),

	MaxDownlinkChannels: 16,
	DownlinkChannels:    as923DefaultChannels(as923Group1Offset),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 923000000,
			MaxFrequency: 923500000,
			DutyCycle:    0.01,
			MaxEIRP:      16,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 19)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(123, 61)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 133)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 14,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, dwellTime bool) (ttnpb.DataRateIndex, error) {
		so := int8(offset)
		if so > 5 {
			so = 5 - so
		}
		si := int8(idx) - so

		minDR := ttnpb.DataRateIndex_DATA_RATE_0
		if dwellTime {
			minDR = ttnpb.DataRateIndex_DATA_RATE_2
		}
		switch {
		case si <= int8(minDR):
			return minDR, nil
		case si >= 5:
			return ttnpb.DataRateIndex_DATA_RATE_5, nil
		}
		return ttnpb.DataRateIndex(si), nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	DefaultRx2Parameters: Rx2Parameters{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		Frequency:     923200000,
	},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   as923BeaconFrequencies(as923Group1Offset),
	},
	PingSlotFrequencies: as923BeaconFrequencies(as923Group1Offset),

	TxParamSetupReqSupport: true,

	SharedParameters: universalSharedParameters,
}

AS_923_RP1_v1_0_2 is the band definition for AS923 in the RP1 v1.0.2 specification.

View Source
var AS_923_RP1_v1_0_2_RevB = Band{
	ID: AS_923,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    as923DefaultChannels(as923Group1Offset),

	MaxDownlinkChannels: 16,
	DownlinkChannels:    as923DefaultChannels(as923Group1Offset),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 923000000,
			MaxFrequency: 923500000,
			DutyCycle:    0.01,
			MaxEIRP:      16,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 19)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(123, 61)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 133)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, dwellTime bool) (ttnpb.DataRateIndex, error) {
		so := int8(offset)
		if so > 5 {
			so = 5 - so
		}
		si := int8(idx) - so

		minDR := ttnpb.DataRateIndex_DATA_RATE_0
		if dwellTime {
			minDR = ttnpb.DataRateIndex_DATA_RATE_2
		}
		switch {
		case si <= int8(minDR):
			return minDR, nil
		case si >= 5:
			return ttnpb.DataRateIndex_DATA_RATE_5, nil
		}
		return ttnpb.DataRateIndex(si), nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	DefaultRx2Parameters: Rx2Parameters{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		Frequency:     923200000,
	},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   as923BeaconFrequencies(as923Group1Offset),
	},
	PingSlotFrequencies: as923BeaconFrequencies(as923Group1Offset),

	TxParamSetupReqSupport: true,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(true),
	},

	SharedParameters: universalSharedParameters,
}

AS_923_RP1_v1_0_2_RevB is the band definition for AS923 in the RP1 v1.0.2 rev. B specification.

View Source
var AS_923_RP1_v1_0_3_RevA = Band{
	ID: AS_923,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    as923DefaultChannels(as923Group1Offset),

	MaxDownlinkChannels: 16,
	DownlinkChannels:    as923DefaultChannels(as923Group1Offset),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 923000000,
			MaxFrequency: 923500000,
			DutyCycle:    0.01,
			MaxEIRP:      16,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 19)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(123, 61)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 133)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, dwellTime bool) (ttnpb.DataRateIndex, error) {
		so := int8(offset)
		if so > 5 {
			so = 5 - so
		}
		si := int8(idx) - so

		minDR := ttnpb.DataRateIndex_DATA_RATE_0
		if dwellTime {
			minDR = ttnpb.DataRateIndex_DATA_RATE_2
		}
		switch {
		case si <= int8(minDR):
			return minDR, nil
		case si >= 5:
			return ttnpb.DataRateIndex_DATA_RATE_5, nil
		}
		return ttnpb.DataRateIndex(si), nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	DefaultRx2Parameters: Rx2Parameters{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		Frequency:     923200000,
	},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   as923BeaconFrequencies(as923Group1Offset),
	},
	PingSlotFrequencies: as923BeaconFrequencies(as923Group1Offset),

	TxParamSetupReqSupport: true,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	SharedParameters: universalSharedParameters,
}

AS_923_RP1_v1_0_3_RevA is the band definition for AS923 in the RP1 v1.0.3 rev. A specification.

View Source
var AS_923_RP1_v1_1_RevA = Band{
	ID: AS_923,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    as923DefaultChannels(as923Group1Offset),

	MaxDownlinkChannels: 16,
	DownlinkChannels:    as923DefaultChannels(as923Group1Offset),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 923000000,
			MaxFrequency: 923500000,
			DutyCycle:    0.01,
			MaxEIRP:      16,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 19)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(123, 61)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 133)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, dwellTime bool) (ttnpb.DataRateIndex, error) {
		so := int8(offset)
		if so > 5 {
			so = 5 - so
		}
		si := int8(idx) - so

		minDR := ttnpb.DataRateIndex_DATA_RATE_0
		if dwellTime {
			minDR = ttnpb.DataRateIndex_DATA_RATE_2
		}
		switch {
		case si <= int8(minDR):
			return minDR, nil
		case si >= 5:
			return ttnpb.DataRateIndex_DATA_RATE_5, nil
		}
		return ttnpb.DataRateIndex(si), nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	DefaultRx2Parameters: Rx2Parameters{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		Frequency:     923200000,
	},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   as923BeaconFrequencies(as923Group1Offset),
	},
	PingSlotFrequencies: as923BeaconFrequencies(as923Group1Offset),

	TxParamSetupReqSupport: true,

	SharedParameters: universalSharedParameters,
}

AS_923_RP1_v1_1_RevA is the band definition for AS923 in the RP1 v1.1 rev. A specification.

View Source
var AS_923_RP1_v1_1_RevB = Band{
	ID: AS_923,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    as923DefaultChannels(as923Group1Offset),

	MaxDownlinkChannels: 16,
	DownlinkChannels:    as923DefaultChannels(as923Group1Offset),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 923000000,
			MaxFrequency: 923500000,
			DutyCycle:    0.01,
			MaxEIRP:      16,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 19)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(123, 61)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 133)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, dwellTime bool) (ttnpb.DataRateIndex, error) {
		so := int8(offset)
		if so > 5 {
			so = 5 - so
		}
		si := int8(idx) - so

		minDR := ttnpb.DataRateIndex_DATA_RATE_0
		if dwellTime {
			minDR = ttnpb.DataRateIndex_DATA_RATE_2
		}
		switch {
		case si <= int8(minDR):
			return minDR, nil
		case si >= 5:
			return ttnpb.DataRateIndex_DATA_RATE_5, nil
		}
		return ttnpb.DataRateIndex(si), nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	DefaultRx2Parameters: Rx2Parameters{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		Frequency:     923200000,
	},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   as923BeaconFrequencies(as923Group1Offset),
	},
	PingSlotFrequencies: as923BeaconFrequencies(as923Group1Offset),

	TxParamSetupReqSupport: true,

	SharedParameters: universalSharedParameters,
}

AS_923_RP1_v1_1_RevB is the band definition for AS923 in the RP1 v1.1 rev. B specification.

View Source
var AS_923_RP2_v1_0_0 = Band{
	ID: AS_923,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    as923DefaultChannels(as923Group1Offset),

	MaxDownlinkChannels: 16,
	DownlinkChannels:    as923DefaultChannels(as923Group1Offset),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 923000000,
			MaxFrequency: 923500000,
			DutyCycle:    0.01,
			MaxEIRP:      16,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 19)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(123, 61)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 133)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, dwellTime bool) (ttnpb.DataRateIndex, error) {
		so := int8(offset)
		if so > 5 {
			so = 5 - so
		}
		si := int8(idx) - so

		minDR := ttnpb.DataRateIndex_DATA_RATE_0
		if dwellTime {
			minDR = ttnpb.DataRateIndex_DATA_RATE_2
		}
		switch {
		case si <= int8(minDR):
			return minDR, nil
		case si >= 7:
			return ttnpb.DataRateIndex_DATA_RATE_7, nil
		}
		return ttnpb.DataRateIndex(si), nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	DefaultRx2Parameters: Rx2Parameters{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		Frequency:     923200000,
	},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   as923BeaconFrequencies(as923Group1Offset),
	},
	PingSlotFrequencies: as923BeaconFrequencies(as923Group1Offset),

	TxParamSetupReqSupport: true,

	SharedParameters: universalSharedParameters,
}

AS_923_RP2_v1_0_0 is the band definition for AS923 in the RP002-1.0.0 specification.

View Source
var AU_915_928_RP1_v1_0_2 = Band{
	ID: AU_915_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    au915928UplinkChannels(-2, 0),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    au915928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 915000000,
			MaxFrequency: 928000000,
			DutyCycle:    1,
			MaxEIRP:      30,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
	},

	FreqMultiplier:   100,
	ImplementsCFList: false,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_4 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 4)
		}
		if offset > 3 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 3)
		}
		return au915928DownlinkDRTableLegacy[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(false, true),
	ParseChMask:     parseChMask72,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_10,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	TxParamSetupReqSupport: false,

	SharedParameters: universalSharedParameters,
}

AU_915_928_RP1_v1_0_2 is the band definition for AU915-928 in the RP1 v1.0.2 specification.

View Source
var AU_915_928_RP1_v1_0_2_RevB = Band{
	ID: AU_915_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    au915928UplinkChannels(0, 0),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    au915928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 915000000,
			MaxFrequency: 928000000,
			DutyCycle:    1,
			MaxEIRP:      30,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
	},

	FreqMultiplier:   100,
	ImplementsCFList: false,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_6 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 6)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return au915928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(false, true),
	ParseChMask:     parseChMask72,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_10,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	TxParamSetupReqSupport: false,

	SharedParameters: universalSharedParameters,
}

AU_915_928_RP1_v1_0_2_RevB is the band definition for AU915-928 in the RP1 v1.0.2 rev. B specification.

View Source
var AU_915_928_RP1_v1_0_3_RevA = Band{
	ID: AU_915_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    au915928UplinkChannels(0, 0),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    au915928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 915000000,
			MaxFrequency: 928000000,
			DutyCycle:    1,
			MaxEIRP:      30,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
		-22,
		-24,
		-26,
		-28,
		-30,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_6 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 6)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return au915928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(true, true),
	ParseChMask:     parseChMask72,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_10,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	TxParamSetupReqSupport: true,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	SharedParameters: universalSharedParameters,
}

AU_915_928_RP1_v1_0_3_RevA is the band definition for AU915-928 in the RP1 v1.0.3 rev. A specification.

View Source
var AU_915_928_RP1_v1_1_RevA = Band{
	ID: AU_915_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    au915928UplinkChannels(0, 0),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    au915928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 915000000,
			MaxFrequency: 928000000,
			DutyCycle:    1,
			MaxEIRP:      30,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_6 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 6)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return au915928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(true, true),
	ParseChMask:     parseChMask72,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_10,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	TxParamSetupReqSupport: false,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	SharedParameters: universalSharedParameters,
}

AU_915_928_RP1_v1_1_RevA is the band definition for AU915-928 in the RP1 v1.1 rev. A specification.

View Source
var AU_915_928_RP1_v1_1_RevB = Band{
	ID: AU_915_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    au915928UplinkChannels(0, 0),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    au915928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 915000000,
			MaxFrequency: 928000000,
			DutyCycle:    1,
			MaxEIRP:      30,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
		-22,
		-24,
		-26,
		-28,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_6 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 6)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return au915928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(true, true),
	ParseChMask:     parseChMask72,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_8,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	TxParamSetupReqSupport: true,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	SharedParameters: universalSharedParameters,
}

AU_915_928_RP1_v1_1_RevB is the band definition for AU915-928 in the RP1 v1.1 rev. B specification.

View Source
var AU_915_928_RP2_v1_0_0 = Band{
	ID: AU_915_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    au915928UplinkChannels(0, 0),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    au915928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 915000000,
			MaxFrequency: 928000000,
			DutyCycle:    1,
			MaxEIRP:      30,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 19)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(123, 61)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 133)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(8, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(61, 61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(137, 137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
		-22,
		-24,
		-26,
		-28,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_6 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 6)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return au915928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(true, true),
	ParseChMask:     parseChMask72,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_8,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	TxParamSetupReqSupport: true,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	SharedParameters: universalSharedParameters,
}

AU_915_928_RP2_v1_0_0 is the band definition for AU915-928 in the RP002-1.0.0 specification.

View Source
var AU_915_928_RP2_v1_0_1 = Band{
	ID: AU_915_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    au915928UplinkChannels(0, 0),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    au915928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 915000000,
			MaxFrequency: 928000000,
			DutyCycle:    1,
			MaxEIRP:      30,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 19)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(123, 61)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 133)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(8, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(61, 61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(137, 137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
		-22,
		-24,
		-26,
		-28,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_6 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 6)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return au915928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(true, true),
	ParseChMask:     parseChMask72,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_8,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	TxParamSetupReqSupport: true,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	SharedParameters: universalSharedParameters,
}

AU_915_928_RP2_v1_0_1 is the band definition for AU915-928 in the RP002-1.0.1 specification.

View Source
var AU_915_928_RP2_v1_0_2 = Band{
	ID: AU_915_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    au915928UplinkChannels(0, 1),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    au915928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 915000000,
			MaxFrequency: 928000000,
			DutyCycle:    1,
			MaxEIRP:      30,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0:  makeLoRaDataRate(12, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_1:  makeLoRaDataRate(11, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_2:  makeLoRaDataRate(10, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 19)),
		ttnpb.DataRateIndex_DATA_RATE_3:  makeLoRaDataRate(9, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(123, 61)),
		ttnpb.DataRateIndex_DATA_RATE_4:  makeLoRaDataRate(8, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 133)),
		ttnpb.DataRateIndex_DATA_RATE_5:  makeLoRaDataRate(7, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_6:  makeLoRaDataRate(8, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_7:  makeLRFHSSDataRate(0, 1523000, "1/3", makeDwellTimeMaxMACPayloadSizeFunc(58, 58)),
		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(61, 61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(137, 137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
		-22,
		-24,
		-26,
		-28,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return au915928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(true, true),
	ParseChMask:     parseChMask72,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_8,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	TxParamSetupReqSupport: true,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	SharedParameters: universalSharedParameters,
}

AU_915_928_RP2_v1_0_2 is the band definition for AU915-928 in the RP002-1.0.2 specification.

View Source
var AU_915_928_RP2_v1_0_3 = Band{
	ID: AU_915_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    au915928UplinkChannels(0, 1),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    au915928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 915000000,
			MaxFrequency: 928000000,
			DutyCycle:    1,
			MaxEIRP:      30,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0:  makeLoRaDataRate(12, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_1:  makeLoRaDataRate(11, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_2:  makeLoRaDataRate(10, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 19)),
		ttnpb.DataRateIndex_DATA_RATE_3:  makeLoRaDataRate(9, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(123, 61)),
		ttnpb.DataRateIndex_DATA_RATE_4:  makeLoRaDataRate(8, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 133)),
		ttnpb.DataRateIndex_DATA_RATE_5:  makeLoRaDataRate(7, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_6:  makeLoRaDataRate(8, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_7:  makeLRFHSSDataRate(0, 1523000, "1/3", makeDwellTimeMaxMACPayloadSizeFunc(58, 58)),
		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(61, 61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(137, 137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
		-22,
		-24,
		-26,
		-28,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return au915928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(true, true),
	ParseChMask:     parseChMask72,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_8,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	TxParamSetupReqSupport: true,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	SharedParameters: universalSharedParameters,
}

AU_915_928_RP2_v1_0_3 is the band definition for AU915-928 in the RP002-1.0.3 specification.

View Source
var AU_915_928_RP2_v1_0_4 = Band{
	ID: AU_915_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    au915928UplinkChannels(0, 1),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    au915928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 915000000,
			MaxFrequency: 928000000,
			DutyCycle:    1,
			MaxEIRP:      30,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0:  makeLoRaDataRate(12, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_1:  makeLoRaDataRate(11, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 0)),
		ttnpb.DataRateIndex_DATA_RATE_2:  makeLoRaDataRate(10, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(59, 19)),
		ttnpb.DataRateIndex_DATA_RATE_3:  makeLoRaDataRate(9, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(123, 61)),
		ttnpb.DataRateIndex_DATA_RATE_4:  makeLoRaDataRate(8, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 133)),
		ttnpb.DataRateIndex_DATA_RATE_5:  makeLoRaDataRate(7, 125000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_6:  makeLoRaDataRate(8, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_7:  makeLRFHSSDataRate(0, 1523000, "1/3", makeDwellTimeMaxMACPayloadSizeFunc(58, 58)),
		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(61, 61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(137, 137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeDwellTimeMaxMACPayloadSizeFunc(250, 250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
		-22,
		-24,
		-26,
		-28,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return au915928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(true, true),
	ParseChMask:     parseChMask72,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_8,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	TxParamSetupReqSupport: true,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	Relay: au915928RelayParameters,

	SharedParameters: relayAwareSharedParameters,
}

AU_915_928_RP2_v1_0_4 is the band definition for AU915-928 in the RP002-1.0.4 specification.

View Source
var AU_915_928_TS1_v1_0_1 = Band{
	ID: AU_915_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    au915928UplinkChannels(-2, 0),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    au915928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 915000000,
			MaxFrequency: 928000000,
			DutyCycle:    1,
			MaxEIRP:      30,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
	},

	FreqMultiplier:   100,
	ImplementsCFList: false,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_4 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 4)
		}
		if offset > 3 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 3)
		}
		return au915928DownlinkDRTableLegacy[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(false, false),
	ParseChMask:     parseChMask72,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_10,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	TxParamSetupReqSupport: false,

	SharedParameters: universalSharedParameters,
}

AU_915_928_TS1_v1_0_1 is the band definition for AU915-928 in the TS1 v1.0.1 specification.

View Source
var CN_470_510_20_A_RP2_v1_0_0 = Band{
	ID: CN_470_510_20_A,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 64,
	UplinkChannels:    cn47051020AUplinkChannels(0),

	MaxDownlinkChannels: 64,
	DownlinkChannels:    cn47051020ADownlinkChannels(0),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask64,
	ParseChMask:     parseChMask64,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 486900000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_20_A_RP2_v1_0_0 is the band definition for CN470-510 20MHz antenna, type A in the RP002-1.0.0 specification.

View Source
var CN_470_510_20_A_RP2_v1_0_1 = Band{
	ID: CN_470_510_20_A,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 64,
	UplinkChannels:    cn47051020AUplinkChannels(1),

	MaxDownlinkChannels: 64,
	DownlinkChannels:    cn47051020ADownlinkChannels(1),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(31)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(94)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(172)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask64,
	ParseChMask:     parseChMask64,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 486900000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_20_A_RP2_v1_0_1 is the band definition for CN470-510 20MHz antenna, type A in the RP002-1.0.1 specification.

View Source
var CN_470_510_20_A_RP2_v1_0_2 = Band{
	ID: CN_470_510_20_A,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 64,
	UplinkChannels:    cn47051020AUplinkChannels(1),

	MaxDownlinkChannels: 64,
	DownlinkChannels:    cn47051020ADownlinkChannels(1),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(31)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(94)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(172)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask64,
	ParseChMask:     parseChMask64,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 486900000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_20_A_RP2_v1_0_2 is the band definition for CN470-510 20MHz antenna, type A in the RP002-1.0.2 specification.

View Source
var CN_470_510_20_A_RP2_v1_0_3 = Band{
	ID: CN_470_510_20_A,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 64,
	UplinkChannels:    cn47051020AUplinkChannels(1),

	MaxDownlinkChannels: 64,
	DownlinkChannels:    cn47051020ADownlinkChannels(1),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(31)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(94)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(172)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask64,
	ParseChMask:     parseChMask64,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 486900000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_20_A_RP2_v1_0_3 is the band definition for CN470-510 20MHz antenna, type A in the RP002-1.0.3 specification.

View Source
var CN_470_510_20_A_RP2_v1_0_4 = Band{
	ID: CN_470_510_20_A,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 64,
	UplinkChannels:    cn47051020AUplinkChannels(1),

	MaxDownlinkChannels: 64,
	DownlinkChannels:    cn47051020ADownlinkChannels(1),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(31)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(94)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(172)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask64,
	ParseChMask:     parseChMask64,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 486900000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	Relay: cn470510RelayParameters,

	SharedParameters: relayAwareSharedParameters,
}

CN_470_510_20_A_RP2_v1_0_4 is the band definition for CN470-510 20MHz antenna, type A in the RP002-1.0.4 specification.

View Source
var CN_470_510_20_B_RP2_v1_0_0 = Band{
	ID: CN_470_510_20_B,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 64,
	UplinkChannels:    cn47051020BUplinkChannels(0),

	MaxDownlinkChannels: 64,
	DownlinkChannels:    cn47051020BDownlinkChannels(0),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask64,
	ParseChMask:     parseChMask64,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 498300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_20_B_RP2_v1_0_0 is the band definition for CN470-510 20MHz antenna, type B in the RP002-1.0.0 specification.

View Source
var CN_470_510_20_B_RP2_v1_0_1 = Band{
	ID: CN_470_510_20_B,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 64,
	UplinkChannels:    cn47051020BUplinkChannels(1),

	MaxDownlinkChannels: 64,
	DownlinkChannels:    cn47051020BDownlinkChannels(1),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(31)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(94)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(172)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask64,
	ParseChMask:     parseChMask64,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 498300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_20_B_RP2_v1_0_1 is the band definition for CN470-510 20MHz antenna, type B in the RP002-1.0.1 specification.

View Source
var CN_470_510_20_B_RP2_v1_0_2 = Band{
	ID: CN_470_510_20_B,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 64,
	UplinkChannels:    cn47051020BUplinkChannels(1),

	MaxDownlinkChannels: 64,
	DownlinkChannels:    cn47051020BDownlinkChannels(1),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(31)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(94)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(172)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask64,
	ParseChMask:     parseChMask64,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 498300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_20_B_RP2_v1_0_2 is the band definition for CN470-510 20MHz antenna, type B in the RP002-1.0.2 specification.

View Source
var CN_470_510_20_B_RP2_v1_0_3 = Band{
	ID: CN_470_510_20_B,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 64,
	UplinkChannels:    cn47051020BUplinkChannels(1),

	MaxDownlinkChannels: 64,
	DownlinkChannels:    cn47051020BDownlinkChannels(1),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(31)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(94)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(172)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask64,
	ParseChMask:     parseChMask64,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 498300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_20_B_RP2_v1_0_3 is the band definition for CN470-510 20MHz antenna, type B in the RP002-1.0.3 specification.

View Source
var CN_470_510_20_B_RP2_v1_0_4 = Band{
	ID: CN_470_510_20_B,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 64,
	UplinkChannels:    cn47051020BUplinkChannels(1),

	MaxDownlinkChannels: 64,
	DownlinkChannels:    cn47051020BDownlinkChannels(1),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(31)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(94)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(172)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask64,
	ParseChMask:     parseChMask64,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 498300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
	},

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	Relay: cn470510RelayParameters,

	SharedParameters: relayAwareSharedParameters,
}

CN_470_510_20_B_RP2_v1_0_4 is the band definition for CN470-510 20MHz antenna, type B in the RP002-1.0.4 specification.

View Source
var CN_470_510_26_A_RP2_v1_0_0 = Band{
	ID: CN_470_510_26_A,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 48,
	UplinkChannels:    cn47051026AUplinkChannels(0),

	MaxDownlinkChannels: 24,
	DownlinkChannels:    cn47051026ADownlinkChannels(0),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexModulo(24),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask48,
	ParseChMask:     parseChMask48,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 492500000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
		Frequencies:   cn47051026ABeaconFrequencies,
	},
	PingSlotFrequencies: cn47051026ABeaconFrequencies,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_26_A_RP2_v1_0_0 is the band definition for CN470-510 26MHz antenna, type A in the RP002-1.0.0 specification.

View Source
var CN_470_510_26_A_RP2_v1_0_1 = Band{
	ID: CN_470_510_26_A,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 48,
	UplinkChannels:    cn47051026AUplinkChannels(1),

	MaxDownlinkChannels: 24,
	DownlinkChannels:    cn47051026ADownlinkChannels(1),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(31)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(94)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(172)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexModulo(24),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask48,
	ParseChMask:     parseChMask48,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 492500000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
		Frequencies:   cn47051026ABeaconFrequencies,
	},
	PingSlotFrequencies: cn47051026ABeaconFrequencies,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_26_A_RP2_v1_0_1 is the band definition for CN470-510 26MHz antenna, type A in the RP002-1.0.1 specification.

View Source
var CN_470_510_26_A_RP2_v1_0_2 = Band{
	ID: CN_470_510_26_A,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 48,
	UplinkChannels:    cn47051026AUplinkChannels(1),

	MaxDownlinkChannels: 24,
	DownlinkChannels:    cn47051026ADownlinkChannels(1),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(31)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(94)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(172)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexModulo(24),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask48,
	ParseChMask:     parseChMask48,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 492500000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
		Frequencies:   cn47051026ABeaconFrequencies,
	},
	PingSlotFrequencies: cn47051026ABeaconFrequencies,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_26_A_RP2_v1_0_2 is the band definition for CN470-510 26MHz antenna, type A in the RP002-1.0.2 specification.

View Source
var CN_470_510_26_A_RP2_v1_0_3 = Band{
	ID: CN_470_510_26_A,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 48,
	UplinkChannels:    cn47051026AUplinkChannels(1),

	MaxDownlinkChannels: 24,
	DownlinkChannels:    cn47051026ADownlinkChannels(1),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(31)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(94)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(172)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexModulo(24),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask48,
	ParseChMask:     parseChMask48,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 492500000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
		Frequencies:   cn47051026ABeaconFrequencies,
	},
	PingSlotFrequencies: cn47051026ABeaconFrequencies,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_26_A_RP2_v1_0_3 is the band definition for CN470-510 26MHz antenna, type A in the RP002-1.0.3 specification.

View Source
var CN_470_510_26_A_RP2_v1_0_4 = Band{
	ID: CN_470_510_26_A,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 48,
	UplinkChannels:    cn47051026AUplinkChannels(1),

	MaxDownlinkChannels: 24,
	DownlinkChannels:    cn47051026ADownlinkChannels(1),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(31)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(94)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(172)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexModulo(24),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask48,
	ParseChMask:     parseChMask48,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 492500000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
		Frequencies:   cn47051026ABeaconFrequencies,
	},
	PingSlotFrequencies: cn47051026ABeaconFrequencies,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	Relay: cn470510RelayParameters,

	SharedParameters: relayAwareSharedParameters,
}

CN_470_510_26_A_RP2_v1_0_4 is the band definition for CN470-510 26MHz antenna, type A in the RP002-1.0.4 specification.

View Source
var CN_470_510_26_B_RP2_v1_0_0 = Band{
	ID: CN_470_510_26_B,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 48,
	UplinkChannels:    cn47051026BUplinkChannels(0),

	MaxDownlinkChannels: 24,
	DownlinkChannels:    cn47051026BDownlinkChannels(0),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexModulo(24),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask48,
	ParseChMask:     parseChMask48,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 502500000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
		Frequencies:   cn47051026BBeaconFrequencies,
	},
	PingSlotFrequencies: cn47051026BBeaconFrequencies,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_26_B_RP2_v1_0_0 is the band definition for CN470-510 26MHz antenna, type B in the RP002-1.0.0 specification.

View Source
var CN_470_510_26_B_RP2_v1_0_1 = Band{
	ID: CN_470_510_26_B,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 48,
	UplinkChannels:    cn47051026BUplinkChannels(1),

	MaxDownlinkChannels: 24,
	DownlinkChannels:    cn47051026BDownlinkChannels(1),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(31)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(94)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(172)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexModulo(24),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask48,
	ParseChMask:     parseChMask48,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 502500000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
		Frequencies:   cn47051026BBeaconFrequencies,
	},
	PingSlotFrequencies: cn47051026BBeaconFrequencies,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_26_B_RP2_v1_0_1 is the band definition for CN470-510 26MHz antenna, type B in the RP002-1.0.1 specification.

View Source
var CN_470_510_26_B_RP2_v1_0_2 = Band{
	ID: CN_470_510_26_B,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 48,
	UplinkChannels:    cn47051026BUplinkChannels(1),

	MaxDownlinkChannels: 24,
	DownlinkChannels:    cn47051026BDownlinkChannels(1),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(31)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(94)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(172)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexModulo(24),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask48,
	ParseChMask:     parseChMask48,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 502500000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
		Frequencies:   cn47051026BBeaconFrequencies,
	},
	PingSlotFrequencies: cn47051026BBeaconFrequencies,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_26_B_RP2_v1_0_2 is the band definition for CN470-510 26MHz antenna, type B in the RP002-1.0.2 specification.

View Source
var CN_470_510_26_B_RP2_v1_0_3 = Band{
	ID: CN_470_510_26_B,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 48,
	UplinkChannels:    cn47051026BUplinkChannels(1),

	MaxDownlinkChannels: 24,
	DownlinkChannels:    cn47051026BDownlinkChannels(1),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(31)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(94)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(172)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexModulo(24),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask48,
	ParseChMask:     parseChMask48,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 502500000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
		Frequencies:   cn47051026BBeaconFrequencies,
	},
	PingSlotFrequencies: cn47051026BBeaconFrequencies,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_26_B_RP2_v1_0_3 is the band definition for CN470-510 26MHz antenna, type B in the RP002-1.0.3 specification.

View Source
var CN_470_510_26_B_RP2_v1_0_4 = Band{
	ID: CN_470_510_26_B,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 48,
	UplinkChannels:    cn47051026BUplinkChannels(1),

	MaxDownlinkChannels: 24,
	DownlinkChannels:    cn47051026BDownlinkChannels(1),

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(31)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(94)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(172)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexModulo(24),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}

		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask48,
	ParseChMask:     parseChMask48,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 502500000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
		Frequencies:   cn47051026BBeaconFrequencies,
	},
	PingSlotFrequencies: cn47051026BBeaconFrequencies,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	Relay: cn470510RelayParameters,

	SharedParameters: relayAwareSharedParameters,
}

CN_470_510_26_B_RP2_v1_0_4 is the band definition for CN470-510 26MHz antenna, type B in the RP002-1.0.4 specification.

View Source
var CN_470_510_RP1_v1_0_2 = Band{
	ID: CN_470_510,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 96,
	UplinkChannels:    cn470510UplinkChannels,

	MaxDownlinkChannels: 48,
	DownlinkChannels:    cn470510DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 17,
	TxOffset: []float32{
		0,
		-1,
		-3,
		-5,
		-7,
		-10,
		-12,
		-15,
	},

	Rx1Channel: channelIndexModulo(48),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask96,
	ParseChMask:     parseChMask96,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 505300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
		Frequencies:   cn470510BeaconFrequencies,
	},
	PingSlotFrequencies: cn470510BeaconFrequencies,

	FreqMultiplier:   100,
	ImplementsCFList: false,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_RP1_v1_0_2 is the band definition for CN470-510 in the RP1 v1.0.2 specification.

View Source
var CN_470_510_RP1_v1_0_2_RevB = Band{
	ID: CN_470_510,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 96,
	UplinkChannels:    cn470510UplinkChannels,

	MaxDownlinkChannels: 48,
	DownlinkChannels:    cn470510DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexModulo(48),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask96,
	ParseChMask:     parseChMask96,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 505300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
		Frequencies:   cn470510BeaconFrequencies,
	},
	PingSlotFrequencies: cn470510BeaconFrequencies,

	FreqMultiplier:   100,
	ImplementsCFList: false,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_RP1_v1_0_2_RevB is the band definition for CN470-510 in the RP1 v1.0.2 rev. B specification.

View Source
var CN_470_510_RP1_v1_0_3_RevA = Band{
	ID: CN_470_510,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 96,
	UplinkChannels:    cn470510UplinkChannels,

	MaxDownlinkChannels: 48,
	DownlinkChannels:    cn470510DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexModulo(48),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask96,
	ParseChMask:     parseChMask96,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 505300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
		Frequencies:   cn470510BeaconFrequencies,
	},
	PingSlotFrequencies: cn470510BeaconFrequencies,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_RP1_v1_0_3_RevA is the band definition for CN470-510 in the RP1 v1.0.3 rev. A specification.

View Source
var CN_470_510_RP1_v1_1_RevA = Band{
	ID: CN_470_510,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 96,
	UplinkChannels:    cn470510UplinkChannels,

	MaxDownlinkChannels: 48,
	DownlinkChannels:    cn470510DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexModulo(48),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask96,
	ParseChMask:     parseChMask96,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 505300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
		Frequencies:   cn470510BeaconFrequencies,
	},
	PingSlotFrequencies: cn470510BeaconFrequencies,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_RP1_v1_1_RevA is the band definition for CN470-510 in the RP1 v1.1 rev. A specification.

View Source
var CN_470_510_RP1_v1_1_RevB = Band{
	ID: CN_470_510,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 96,
	UplinkChannels:    cn470510UplinkChannels,

	MaxDownlinkChannels: 48,
	DownlinkChannels:    cn470510DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 19.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexModulo(48),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask96,
	ParseChMask:     parseChMask96,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 505300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
		Frequencies:   cn470510BeaconFrequencies,
	},
	PingSlotFrequencies: cn470510BeaconFrequencies,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_RP1_v1_1_RevB is the band definition for CN470-510 in the RP1 v1.1 rev. B specification.

View Source
var CN_470_510_TS1_v1_0_1 = Band{
	ID: CN_470_510,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 96,
	UplinkChannels:    cn470510UplinkChannels,

	MaxDownlinkChannels: 48,
	DownlinkChannels:    cn470510DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 470000000,
			MaxFrequency: 510000000,
			DutyCycle:    1,
			MaxEIRP:      17.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 17,
	TxOffset: []float32{
		0,
		-1,
		-3,
		-5,
		-7,
		-10,
		-12,
		-15,
	},

	Rx1Channel: channelIndexModulo(48),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return cn470510DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask96,
	ParseChMask:     parseChMask96,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 505300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_2,
		CodingRate:    Cr4_5,
		Frequencies:   cn470510BeaconFrequencies,
	},
	PingSlotFrequencies: cn470510BeaconFrequencies,

	FreqMultiplier:   100,
	ImplementsCFList: false,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	SharedParameters: universalSharedParameters,
}

CN_470_510_TS1_v1_0_1 is the band definition for CN470-510 in the TS1 v1.0.1 specification.

View Source
var CN_779_787_RP1_V1_0 = Band{
	ID: CN_779_787,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    cn779787DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    cn779787DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 779000000,
			MaxFrequency: 787000000,
			DutyCycle:    0.01,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return cn779787DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 786000000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   cn779787BeaconFrequencies,
	},
	PingSlotFrequencies: cn779787BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

CN_779_787_RP1_V1_0 is the band definition for CN779-787 in the TS1 v1.0 specification.

View Source
var CN_779_787_RP1_V1_0_1 = Band{
	ID: CN_779_787,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    cn779787DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    cn779787DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 779000000,
			MaxFrequency: 787000000,
			DutyCycle:    0.01,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return cn779787DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 786000000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   cn779787BeaconFrequencies,
	},
	PingSlotFrequencies: cn779787BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

CN_779_787_RP1_V1_0_1 is the band definition for CN779-787 in the TS1 v1.0.1 specification.

View Source
var CN_779_787_RP1_V1_0_2 = Band{
	ID: CN_779_787,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    cn779787DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    cn779787DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 779000000,
			MaxFrequency: 787000000,
			DutyCycle:    0.01,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return cn779787DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 786000000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   cn779787BeaconFrequencies,
	},
	PingSlotFrequencies: cn779787BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

CN_779_787_RP1_V1_0_2 is the band definition for CN779-787 in the RP1 v1.0.2 specification.

View Source
var CN_779_787_RP1_V1_0_2_RevB = Band{
	ID: CN_779_787,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    cn779787DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    cn779787DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 779000000,
			MaxFrequency: 787000000,
			DutyCycle:    0.01,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return cn779787DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 786000000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   cn779787BeaconFrequencies,
	},
	PingSlotFrequencies: cn779787BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

CN_779_787_RP1_V1_0_2_RevB is the band definition for CN779-787 in the RP1 v1.0.2 rev. B specification.

View Source
var CN_779_787_RP1_V1_0_3_RevA = Band{
	ID: CN_779_787,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    cn779787DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    cn779787DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 779000000,
			MaxFrequency: 787000000,
			DutyCycle:    0.01,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return cn779787DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 786000000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   cn779787BeaconFrequencies,
	},
	PingSlotFrequencies: cn779787BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

CN_779_787_RP1_V1_0_3_RevA is the band definition for CN779-787 in the RP1 v1.0.3 rev. A specification.

View Source
var CN_779_787_RP1_V1_1_RevA = Band{
	ID: CN_779_787,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    cn779787DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    cn779787DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 779000000,
			MaxFrequency: 787000000,
			DutyCycle:    0.01,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return cn779787DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 786000000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   cn779787BeaconFrequencies,
	},
	PingSlotFrequencies: cn779787BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

CN_779_787_RP1_V1_1_RevA is the band definition for CN779-787 in the RP1 v1.1 rev. A specification.

View Source
var CN_779_787_RP1_V1_1_RevB = Band{
	ID: CN_779_787,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    cn779787DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    cn779787DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 779000000,
			MaxFrequency: 787000000,
			DutyCycle:    0.01,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return cn779787DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 786000000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   cn779787BeaconFrequencies,
	},
	PingSlotFrequencies: cn779787BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

CN_779_787_RP1_V1_1_RevB is the band definition for CN779-787 in the RP1 v1.1 rev. B specification.

View Source
var CN_779_787_RP2_V1_0_0 = Band{
	ID: CN_779_787,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    cn779787DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    cn779787DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 779000000,
			MaxFrequency: 787000000,
			DutyCycle:    0.01,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return cn779787DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 786000000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   cn779787BeaconFrequencies,
	},
	PingSlotFrequencies: cn779787BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

CN_779_787_RP2_V1_0_0 is the band definition for CN779-787 in the RP002-1.0.0 specification.

View Source
var CN_779_787_RP2_V1_0_1 = Band{
	ID: CN_779_787,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    cn779787DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    cn779787DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 779000000,
			MaxFrequency: 787000000,
			DutyCycle:    0.01,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return cn779787DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 786000000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   cn779787BeaconFrequencies,
	},
	PingSlotFrequencies: cn779787BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

CN_779_787_RP2_V1_0_1 is the band definition for CN779-787 in the RP002-1.0.1 specification.

View Source
var CN_779_787_RP2_V1_0_2 = Band{
	ID: CN_779_787,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    cn779787DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    cn779787DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 779000000,
			MaxFrequency: 787000000,
			DutyCycle:    0.01,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return cn779787DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 786000000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   cn779787BeaconFrequencies,
	},
	PingSlotFrequencies: cn779787BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

CN_779_787_RP2_V1_0_2 is the band definition for CN779-787 in the RP002-1.0.2 specification.

View Source
var CN_779_787_RP2_V1_0_3 = Band{
	ID: CN_779_787,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    cn779787DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    cn779787DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 779000000,
			MaxFrequency: 787000000,
			DutyCycle:    0.01,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return cn779787DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 786000000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   cn779787BeaconFrequencies,
	},
	PingSlotFrequencies: cn779787BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

CN_779_787_RP2_V1_0_3 is the band definition for CN779-787 in the RP002-1.0.3 specification.

View Source
var EU_433_RP1_V1_0_2 = Band{
	ID: EU_433,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu433DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu433DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 433175000,
			MaxFrequency: 434665000,
			DutyCycle:    0.1,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu433DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{0, 434665000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu433BeaconFrequencies,
	},
	PingSlotFrequencies: eu433BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_433_RP1_V1_0_2 is the band definition for EU433 in the RP1 v1.0.2 specification.

View Source
var EU_433_RP1_V1_0_2_Rev_B = Band{
	ID: EU_433,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu433DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu433DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 433175000,
			MaxFrequency: 434665000,
			DutyCycle:    0.1,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu433DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{0, 434665000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu433BeaconFrequencies,
	},
	PingSlotFrequencies: eu433BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_433_RP1_V1_0_2_Rev_B is the band definition for EU433 in the RP1 v1.0.2 rev. B specification.

View Source
var EU_433_RP1_V1_0_3_Rev_A = Band{
	ID: EU_433,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu433DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu433DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 433175000,
			MaxFrequency: 434665000,
			DutyCycle:    0.1,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu433DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{0, 434665000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu433BeaconFrequencies,
	},
	PingSlotFrequencies: eu433BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_433_RP1_V1_0_3_Rev_A is the band definition for EU433 in the RP1 v1.0.3 rev. A specification.

View Source
var EU_433_RP1_V1_1_Rev_A = Band{
	ID: EU_433,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu433DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu433DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 433175000,
			MaxFrequency: 434665000,
			DutyCycle:    0.1,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu433DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{0, 434665000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu433BeaconFrequencies,
	},
	PingSlotFrequencies: eu433BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_433_RP1_V1_1_Rev_A is the band definition for EU433 in the RP1 v1.1 rev. A specification.

View Source
var EU_433_RP1_V1_1_Rev_B = Band{
	ID: EU_433,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu433DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu433DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 433175000,
			MaxFrequency: 434665000,
			DutyCycle:    0.1,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu433DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{0, 434665000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu433BeaconFrequencies,
	},
	PingSlotFrequencies: eu433BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_433_RP1_V1_1_Rev_B is the band definition for EU433 in the RP1 v1.1 rev. B specification.

View Source
var EU_433_RP2_V1_0_0 = Band{
	ID: EU_433,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu433DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu433DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 433175000,
			MaxFrequency: 434665000,
			DutyCycle:    0.1,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu433DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{0, 434665000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu433BeaconFrequencies,
	},
	PingSlotFrequencies: eu433BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_433_RP2_V1_0_0 is the band definition for EU433 in the RP002-1.0.0 specification.

View Source
var EU_433_RP2_V1_0_1 = Band{
	ID: EU_433,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu433DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu433DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 433175000,
			MaxFrequency: 434665000,
			DutyCycle:    0.1,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu433DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{0, 434665000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu433BeaconFrequencies,
	},
	PingSlotFrequencies: eu433BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_433_RP2_V1_0_1 is the band definition for EU433 in the RP002-1.0.1 specification.

View Source
var EU_433_RP2_V1_0_2 = Band{
	ID: EU_433,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu433DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu433DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 433175000,
			MaxFrequency: 434665000,
			DutyCycle:    0.1,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu433DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{0, 434665000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu433BeaconFrequencies,
	},
	PingSlotFrequencies: eu433BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_433_RP2_V1_0_2 is the band definition for EU433 in the RP002-1.0.2 specification.

View Source
var EU_433_RP2_V1_0_3 = Band{
	ID: EU_433,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu433DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu433DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 433175000,
			MaxFrequency: 434665000,
			DutyCycle:    0.1,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu433DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{0, 434665000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu433BeaconFrequencies,
	},
	PingSlotFrequencies: eu433BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_433_RP2_V1_0_3 is the band definition for EU433 in the RP002-1.0.3 specification.

View Source
var EU_433_RP2_V1_0_4 = Band{
	ID: EU_433,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu433DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu433DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 433175000,
			MaxFrequency: 434665000,
			DutyCycle:    0.1,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu433DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{0, 434665000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu433BeaconFrequencies,
	},
	PingSlotFrequencies: eu433BeaconFrequencies,

	SharedParameters: relayAwareSharedParameters,
}

EU_433_RP2_V1_0_4 is the band definition for EU433 in the RP002-1.0.4 specification.

View Source
var EU_433_TS1_V1_0 = Band{
	ID: EU_433,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu433DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu433DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 433175000,
			MaxFrequency: 434665000,
			DutyCycle:    0.1,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu433DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{0, 434665000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu433BeaconFrequencies,
	},
	PingSlotFrequencies: eu433BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_433_TS1_V1_0 is the band definition for EU433 in the TS1 v1.0 specification.

View Source
var EU_433_TS1_V1_0_1 = Band{
	ID: EU_433,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu433DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu433DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 433175000,
			MaxFrequency: 434665000,
			DutyCycle:    0.1,
			MaxEIRP:      10.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 12.15,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu433DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{0, 434665000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu433BeaconFrequencies,
	},
	PingSlotFrequencies: eu433BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_433_TS1_V1_0_1 is the band definition for EU433 in the TS1 v1.0.1 specification.

View Source
var EU_863_870_RP1_V1_0_2 = Band{
	ID: EU_863_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu863870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu863870DefaultChannels,

	SubBands: []SubBandParameters{
		{

			MinFrequency: 863000000,
			MaxFrequency: 865000000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 865000000,
			MaxFrequency: 868000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868000000,
			MaxFrequency: 868600000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868700000,
			MaxFrequency: 869200000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},

		{

			MinFrequency: 869400000,
			MaxFrequency: 869650000,
			DutyCycle:    0.1,
			MaxEIRP:      27.0 + eirpDelta,
		},
		{

			MinFrequency: 869700000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu863870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869525000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu863870BeaconFrequencies,
	},
	PingSlotFrequencies: eu863870BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_863_870_RP1_V1_0_2 is the band definition for EU863-870 in the RP1 v1.0.2 specification.

View Source
var EU_863_870_RP1_V1_0_2_Rev_B = Band{
	ID: EU_863_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu863870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu863870DefaultChannels,

	SubBands: []SubBandParameters{
		{

			MinFrequency: 863000000,
			MaxFrequency: 865000000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 865000000,
			MaxFrequency: 868000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868000000,
			MaxFrequency: 868600000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868700000,
			MaxFrequency: 869200000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},

		{

			MinFrequency: 869400000,
			MaxFrequency: 869650000,
			DutyCycle:    0.1,
			MaxEIRP:      27.0 + eirpDelta,
		},
		{

			MinFrequency: 869700000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu863870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869525000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu863870BeaconFrequencies,
	},
	PingSlotFrequencies: eu863870BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_863_870_RP1_V1_0_2_Rev_B is the band definition for EU863-870 in the RP1 v1.0.2 rev. B specification.

View Source
var EU_863_870_RP1_V1_0_3_Rev_A = Band{
	ID: EU_863_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu863870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu863870DefaultChannels,

	SubBands: []SubBandParameters{
		{

			MinFrequency: 863000000,
			MaxFrequency: 865000000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 865000000,
			MaxFrequency: 868000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868000000,
			MaxFrequency: 868600000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868700000,
			MaxFrequency: 869200000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},

		{

			MinFrequency: 869400000,
			MaxFrequency: 869650000,
			DutyCycle:    0.1,
			MaxEIRP:      27.0 + eirpDelta,
		},
		{

			MinFrequency: 869700000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu863870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869525000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu863870BeaconFrequencies,
	},
	PingSlotFrequencies: eu863870BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_863_870_RP1_V1_0_3_Rev_A is the band definition for EU863-870 in the RP1 v1.0.3 rev. A specification.

View Source
var EU_863_870_RP1_V1_1_Rev_A = Band{
	ID: EU_863_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu863870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu863870DefaultChannels,

	SubBands: []SubBandParameters{
		{

			MinFrequency: 863000000,
			MaxFrequency: 865000000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 865000000,
			MaxFrequency: 868000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868000000,
			MaxFrequency: 868600000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868700000,
			MaxFrequency: 869200000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},

		{

			MinFrequency: 869400000,
			MaxFrequency: 869650000,
			DutyCycle:    0.1,
			MaxEIRP:      27.0 + eirpDelta,
		},
		{

			MinFrequency: 869700000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu863870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869525000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu863870BeaconFrequencies,
	},
	PingSlotFrequencies: eu863870BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_863_870_RP1_V1_1_Rev_A is the band definition for EU863-870 in the RP1 v1.1 rev. A specification.

View Source
var EU_863_870_RP1_V1_1_Rev_B = Band{
	ID: EU_863_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu863870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu863870DefaultChannels,

	SubBands: []SubBandParameters{
		{

			MinFrequency: 863000000,
			MaxFrequency: 865000000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 865000000,
			MaxFrequency: 868000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868000000,
			MaxFrequency: 868600000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868700000,
			MaxFrequency: 869200000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},

		{

			MinFrequency: 869400000,
			MaxFrequency: 869650000,
			DutyCycle:    0.1,
			MaxEIRP:      27.0 + eirpDelta,
		},
		{

			MinFrequency: 869700000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu863870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869525000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu863870BeaconFrequencies,
	},
	PingSlotFrequencies: eu863870BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_863_870_RP1_V1_1_Rev_B is the band definition for EU863-870 in the RP1 v1.1 rev. B specification.

View Source
var EU_863_870_RP2_V1_0_0 = Band{
	ID: EU_863_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu863870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu863870DefaultChannels,

	SubBands: []SubBandParameters{
		{

			MinFrequency: 863000000,
			MaxFrequency: 865000000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 865000000,
			MaxFrequency: 868000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868000000,
			MaxFrequency: 868600000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868700000,
			MaxFrequency: 869200000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},

		{

			MinFrequency: 869400000,
			MaxFrequency: 869650000,
			DutyCycle:    0.1,
			MaxEIRP:      27.0 + eirpDelta,
		},
		{

			MinFrequency: 869700000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu863870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869525000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu863870BeaconFrequencies,
	},
	PingSlotFrequencies: eu863870BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_863_870_RP2_V1_0_0 is the band definition for EU863-870 in the RP002-1.0.0 specification.

View Source
var EU_863_870_RP2_V1_0_1 = Band{
	ID: EU_863_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu863870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu863870DefaultChannels,

	SubBands: []SubBandParameters{
		{

			MinFrequency: 863000000,
			MaxFrequency: 865000000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 865000000,
			MaxFrequency: 868000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868000000,
			MaxFrequency: 868600000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868700000,
			MaxFrequency: 869200000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},

		{

			MinFrequency: 869400000,
			MaxFrequency: 869650000,
			DutyCycle:    0.1,
			MaxEIRP:      27.0 + eirpDelta,
		},
		{

			MinFrequency: 869700000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu863870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869525000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu863870BeaconFrequencies,
	},
	PingSlotFrequencies: eu863870BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_863_870_RP2_V1_0_1 is the band definition for EU863-870 in the RP002-1.0.1 specification.

View Source
var EU_863_870_RP2_V1_0_2 = Band{
	ID: EU_863_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu863870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu863870DefaultChannels,

	SubBands: []SubBandParameters{
		{

			MinFrequency: 863000000,
			MaxFrequency: 865000000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 865000000,
			MaxFrequency: 868000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868000000,
			MaxFrequency: 868600000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868700000,
			MaxFrequency: 869200000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},

		{

			MinFrequency: 869400000,
			MaxFrequency: 869650000,
			DutyCycle:    0.1,
			MaxEIRP:      27.0 + eirpDelta,
		},
		{

			MinFrequency: 869700000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0:  makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1:  makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2:  makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3:  makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4:  makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5:  makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6:  makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7:  makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_8:  makeLRFHSSDataRate(0, 137000, "1/3", makeConstMaxMACPayloadSizeFunc(58)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLRFHSSDataRate(0, 137000, "2/3", makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLRFHSSDataRate(0, 336000, "1/3", makeConstMaxMACPayloadSizeFunc(58)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLRFHSSDataRate(0, 336000, "2/3", makeConstMaxMACPayloadSizeFunc(123)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_11 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 11)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu863870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869525000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu863870BeaconFrequencies,
	},
	PingSlotFrequencies: eu863870BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_863_870_RP2_V1_0_2 is the band definition for EU863-870 in the RP002-1.0.2 specification.

View Source
var EU_863_870_RP2_V1_0_3 = Band{
	ID: EU_863_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu863870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu863870DefaultChannels,

	SubBands: []SubBandParameters{
		{

			MinFrequency: 863000000,
			MaxFrequency: 865000000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 865000000,
			MaxFrequency: 868000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868000000,
			MaxFrequency: 868600000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868700000,
			MaxFrequency: 869200000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},

		{

			MinFrequency: 869400000,
			MaxFrequency: 869650000,
			DutyCycle:    0.1,
			MaxEIRP:      27.0 + eirpDelta,
		},
		{

			MinFrequency: 869700000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0:  makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1:  makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2:  makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3:  makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4:  makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5:  makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6:  makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7:  makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_8:  makeLRFHSSDataRate(0, 137000, "1/3", makeConstMaxMACPayloadSizeFunc(58)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLRFHSSDataRate(0, 137000, "2/3", makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLRFHSSDataRate(0, 336000, "1/3", makeConstMaxMACPayloadSizeFunc(58)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLRFHSSDataRate(0, 336000, "2/3", makeConstMaxMACPayloadSizeFunc(123)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_11 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 11)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu863870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869525000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu863870BeaconFrequencies,
	},
	PingSlotFrequencies: eu863870BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_863_870_RP2_V1_0_3 is the band definition for EU863-870 in the RP002-1.0.3 specification.

View Source
var EU_863_870_RP2_V1_0_4 = Band{
	ID: EU_863_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu863870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu863870DefaultChannels,

	SubBands: []SubBandParameters{
		{

			MinFrequency: 863000000,
			MaxFrequency: 865000000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 865000000,
			MaxFrequency: 868000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868000000,
			MaxFrequency: 868600000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868700000,
			MaxFrequency: 869200000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},

		{

			MinFrequency: 869400000,
			MaxFrequency: 869650000,
			DutyCycle:    0.1,
			MaxEIRP:      27.0 + eirpDelta,
		},
		{

			MinFrequency: 869700000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0:  makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1:  makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2:  makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3:  makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4:  makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5:  makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6:  makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7:  makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_8:  makeLRFHSSDataRate(0, 137000, "1/3", makeConstMaxMACPayloadSizeFunc(58)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLRFHSSDataRate(0, 137000, "2/3", makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLRFHSSDataRate(0, 336000, "1/3", makeConstMaxMACPayloadSizeFunc(58)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLRFHSSDataRate(0, 336000, "2/3", makeConstMaxMACPayloadSizeFunc(123)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_11 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 11)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu863870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869525000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu863870BeaconFrequencies,
	},
	PingSlotFrequencies: eu863870BeaconFrequencies,

	Relay: eu863870RelayParameters,

	SharedParameters: relayAwareSharedParameters,
}

EU_863_870_RP2_V1_0_4 is the band definition for EU863-870 in the RP002-1.0.4 specification.

View Source
var EU_863_870_TS1_V1_0 = Band{
	ID: EU_863_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu863870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu863870DefaultChannels,

	SubBands: []SubBandParameters{
		{

			MinFrequency: 863000000,
			MaxFrequency: 865000000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 865000000,
			MaxFrequency: 868000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868000000,
			MaxFrequency: 868600000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868700000,
			MaxFrequency: 869200000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},

		{

			MinFrequency: 869400000,
			MaxFrequency: 869650000,
			DutyCycle:    0.1,
			MaxEIRP:      27.0 + eirpDelta,
		},
		{

			MinFrequency: 869700000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu863870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869525000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu863870BeaconFrequencies,
	},
	PingSlotFrequencies: eu863870BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_863_870_TS1_V1_0 is the band definition for EU863-870 in the TS1 v1.0 specification.

View Source
var EU_863_870_TS1_V1_0_1 = Band{
	ID: EU_863_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    eu863870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    eu863870DefaultChannels,

	SubBands: []SubBandParameters{
		{

			MinFrequency: 863000000,
			MaxFrequency: 865000000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 865000000,
			MaxFrequency: 868000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868000000,
			MaxFrequency: 868600000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{

			MinFrequency: 868700000,
			MaxFrequency: 869200000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},

		{

			MinFrequency: 869400000,
			MaxFrequency: 869650000,
			DutyCycle:    0.1,
			MaxEIRP:      27.0 + eirpDelta,
		},
		{

			MinFrequency: 869700000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return eu863870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869525000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   eu863870BeaconFrequencies,
	},
	PingSlotFrequencies: eu863870BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

EU_863_870_TS1_V1_0_1 is the band definition for EU863-870 in the TS1 v1.0.1 specification.

View Source
var IN_865_867_RP1_V1_0_2_Rev_B = Band{
	ID: IN_865_867,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    in865867DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    in865867DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 865000000,
			MaxFrequency: 867000000,
			DutyCycle:    1,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		so := int8(offset)
		if so > 5 {
			so = 5 - so
		}
		si := int8(idx) - so

		switch {
		case si <= 0:
			return ttnpb.DataRateIndex_DATA_RATE_0, nil
		case si >= 5:
			return ttnpb.DataRateIndex_DATA_RATE_5, nil
		}
		return ttnpb.DataRateIndex(si), nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_2, 866550000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_4,
		CodingRate:    Cr4_5,
		Frequencies:   in865867BeaconFrequencies,
	},
	PingSlotFrequencies: in865867BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

IN_865_867_RP1_V1_0_2_Rev_B is the band definition for IN865-867 in the RP1 v1.0.2 rev. B specification.

View Source
var IN_865_867_RP1_V1_0_3_Rev_A = Band{
	ID: IN_865_867,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    in865867DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    in865867DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 865000000,
			MaxFrequency: 867000000,
			DutyCycle:    1,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		so := int8(offset)
		if so > 5 {
			so = 5 - so
		}
		si := int8(idx) - so

		switch {
		case si <= 0:
			return ttnpb.DataRateIndex_DATA_RATE_0, nil
		case si >= 5:
			return ttnpb.DataRateIndex_DATA_RATE_5, nil
		}
		return ttnpb.DataRateIndex(si), nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_2, 866550000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_4,
		CodingRate:    Cr4_5,
		Frequencies:   in865867BeaconFrequencies,
	},
	PingSlotFrequencies: in865867BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

IN_865_867_RP1_V1_0_3_Rev_A is the band definition for IN865-867 in the RP1 v1.0.3 rev. A specification.

View Source
var IN_865_867_RP1_V1_1_Rev_A = Band{
	ID: IN_865_867,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    in865867DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    in865867DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 865000000,
			MaxFrequency: 867000000,
			DutyCycle:    1,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		so := int8(offset)
		if so > 5 {
			so = 5 - so
		}
		si := int8(idx) - so

		switch {
		case si <= 0:
			return ttnpb.DataRateIndex_DATA_RATE_0, nil
		case si >= 5:
			return ttnpb.DataRateIndex_DATA_RATE_5, nil
		}
		return ttnpb.DataRateIndex(si), nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_2, 866550000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_4,
		CodingRate:    Cr4_5,
		Frequencies:   in865867BeaconFrequencies,
	},
	PingSlotFrequencies: in865867BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

IN_865_867_RP1_V1_1_Rev_A is the band definition for IN865-867 in the RP1 v1.1 rev. A specification.

View Source
var IN_865_867_RP1_V1_1_Rev_B = Band{
	ID: IN_865_867,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    in865867DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    in865867DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 865000000,
			MaxFrequency: 867000000,
			DutyCycle:    1,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		so := int8(offset)
		if so > 5 {
			so = 5 - so
		}
		si := int8(idx) - so

		switch {
		case si <= 0:
			return ttnpb.DataRateIndex_DATA_RATE_0, nil
		case si >= 5:
			return ttnpb.DataRateIndex_DATA_RATE_5, nil
		}
		return ttnpb.DataRateIndex(si), nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_2, 866550000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_4,
		CodingRate:    Cr4_5,
		Frequencies:   in865867BeaconFrequencies,
	},
	PingSlotFrequencies: in865867BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

IN_865_867_RP1_V1_1_Rev_B is the band definition for IN865-867 in the RP1 v1.1 rev. B specification.

View Source
var IN_865_867_RP2_V1_0_0 = Band{
	ID: IN_865_867,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    in865867DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    in865867DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 865000000,
			MaxFrequency: 867000000,
			DutyCycle:    1,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		so := int8(offset)
		if so > 5 {
			so = 5 - so
		}
		si := int8(idx) - so

		switch {
		case si <= 0:
			return ttnpb.DataRateIndex_DATA_RATE_0, nil
		case si >= 7:
			return ttnpb.DataRateIndex_DATA_RATE_7, nil
		}
		return ttnpb.DataRateIndex(si), nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_2, 866550000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_4,
		CodingRate:    Cr4_5,
		Frequencies:   in865867BeaconFrequencies,
	},
	PingSlotFrequencies: in865867BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

IN_865_867_RP2_V1_0_0 is the band definition for IN865-867 in the RP002-1.0.0 specification.

View Source
var IN_865_867_RP2_V1_0_1 = Band{
	ID: IN_865_867,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    in865867DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    in865867DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 865000000,
			MaxFrequency: 867000000,
			DutyCycle:    1,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		so := int8(offset)
		if so > 5 {
			so = 5 - so
		}
		si := int8(idx) - so

		switch {
		case si <= 0:
			return ttnpb.DataRateIndex_DATA_RATE_0, nil
		case si >= 7:
			return ttnpb.DataRateIndex_DATA_RATE_7, nil
		}
		return ttnpb.DataRateIndex(si), nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_2, 866550000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_4,
		CodingRate:    Cr4_5,
		Frequencies:   in865867BeaconFrequencies,
	},
	PingSlotFrequencies: in865867BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

IN_865_867_RP2_V1_0_1 is the band definition for IN865-867 in the RP002-1.0.1 specification.

View Source
var IN_865_867_RP2_V1_0_2 = Band{
	ID: IN_865_867,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    in865867DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    in865867DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 865000000,
			MaxFrequency: 867000000,
			DutyCycle:    1,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		so := int8(offset)
		if so > 5 {
			so = 5 - so
		}
		si := int8(idx) - so

		switch {
		case si <= 0:
			return ttnpb.DataRateIndex_DATA_RATE_0, nil
		case si >= 7:
			return ttnpb.DataRateIndex_DATA_RATE_7, nil
		}
		return ttnpb.DataRateIndex(si), nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_2, 866550000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_4,
		CodingRate:    Cr4_5,
		Frequencies:   in865867BeaconFrequencies,
	},
	PingSlotFrequencies: in865867BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

IN_865_867_RP2_V1_0_2 is the band definition for IN865-867 in the RP002-1.0.2 specification.

View Source
var IN_865_867_RP2_V1_0_3 = Band{
	ID: IN_865_867,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    in865867DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    in865867DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 865000000,
			MaxFrequency: 867000000,
			DutyCycle:    1,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		so := int8(offset)
		if so > 5 {
			so = 5 - so
		}
		si := int8(idx) - so

		switch {
		case si <= 0:
			return ttnpb.DataRateIndex_DATA_RATE_0, nil
		case si >= 7:
			return ttnpb.DataRateIndex_DATA_RATE_7, nil
		}
		return ttnpb.DataRateIndex(si), nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_2, 866550000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_4,
		CodingRate:    Cr4_5,
		Frequencies:   in865867BeaconFrequencies,
	},
	PingSlotFrequencies: in865867BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

IN_865_867_RP2_V1_0_3 is the band definition for IN865-867 in the RP002-1.0.3 specification.

View Source
var IN_865_867_RP2_V1_0_4 = Band{
	ID: IN_865_867,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    in865867DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    in865867DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 865000000,
			MaxFrequency: 867000000,
			DutyCycle:    1,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		so := int8(offset)
		if so > 5 {
			so = 5 - so
		}
		si := int8(idx) - so

		switch {
		case si <= 0:
			return ttnpb.DataRateIndex_DATA_RATE_0, nil
		case si >= 7:
			return ttnpb.DataRateIndex_DATA_RATE_7, nil
		}
		return ttnpb.DataRateIndex(si), nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_2, 866550000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_4,
		CodingRate:    Cr4_5,
		Frequencies:   in865867BeaconFrequencies,
	},
	PingSlotFrequencies: in865867BeaconFrequencies,

	Relay: in865867RelayParameters,

	SharedParameters: relayAwareSharedParameters,
}

IN_865_867_RP2_V1_0_4 is the band definition for IN865-867 in the RP002-1.0.4 specification.

View Source
var ISM_2400_Universal = Band{
	ID: ISM_2400,

	MaxUplinkChannels: 16,
	UplinkChannels:    ism2400DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    ism2400DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 2400000000,
			MaxFrequency: 2500000000,
			DutyCycle:    1,
			MaxEIRP:      8.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 812000, Cr4_8LI, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 812000, Cr4_8LI, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 812000, Cr4_8LI, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 812000, Cr4_8LI, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 812000, Cr4_8LI, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 812000, Cr4_8LI, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(6, 812000, Cr4_8LI, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeLoRaDataRate(5, 812000, Cr4_8LI, makeConstMaxMACPayloadSizeFunc(250)),
	},
	StrictCodingRate: true,

	DefaultMaxEIRP: 10,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return ism2400DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   200,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 2423000000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_8LI,
		Frequencies:   ism2400BeaconFrequencies,
	},
	PingSlotFrequencies: ism2400BeaconFrequencies,

	SharedParameters: relayAwareSharedParameters,
}

ISM_2400_Universal is the band definition for universal LoRa 2.4 GHz.

View Source
var KR_920_923_RP1_V1_0_2 = Band{
	ID: KR_920_923,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    kr920923DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    kr920923DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 920000000,
			MaxFrequency: 923000000,
			DutyCycle:    1,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 20,
	TxOffset: []float32{
		0,
		-6,
		-10,
		-12,
		-15,
		-18,
		-20,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return kr920923DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 921900000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   kr920923BeaconFrequencies,
	},
	PingSlotFrequencies: kr920923BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

KR_920_923_RP1_V1_0_2 is the band definition for KR920-923 in the RP1 v1.0.2 specification.

View Source
var KR_920_923_RP1_V1_0_2_Rev_B = Band{
	ID: KR_920_923,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    kr920923DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    kr920923DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 920000000,
			MaxFrequency: 923000000,
			DutyCycle:    1,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 14,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return kr920923DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 921900000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   kr920923BeaconFrequencies,
	},
	PingSlotFrequencies: kr920923BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

KR_920_923_RP1_V1_0_2_Rev_B is the band definition for KR920-923 in the RP1 v1.0.2 rev. B specification.

View Source
var KR_920_923_RP1_V1_0_3_Rev_A = Band{
	ID: KR_920_923,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    kr920923DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    kr920923DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 920000000,
			MaxFrequency: 923000000,
			DutyCycle:    1,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 14,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return kr920923DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 921900000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   kr920923BeaconFrequencies,
	},
	PingSlotFrequencies: kr920923BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

KR_920_923_RP1_V1_0_3_Rev_A is the band definition for KR920-923 in the RP1 v1.0.3 rev. A specification.

View Source
var KR_920_923_RP1_V1_1_Rev_A = Band{
	ID: KR_920_923,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    kr920923DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    kr920923DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 920000000,
			MaxFrequency: 923000000,
			DutyCycle:    1,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 14,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return kr920923DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 921900000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   kr920923BeaconFrequencies,
	},
	PingSlotFrequencies: kr920923BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

KR_920_923_RP1_V1_1_Rev_A is the band definition for KR920-923 in the RP1 v1.1 rev. A specification.

View Source
var KR_920_923_RP1_V1_1_Rev_B = Band{
	ID: KR_920_923,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    kr920923DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    kr920923DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 920000000,
			MaxFrequency: 923000000,
			DutyCycle:    1,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 14,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return kr920923DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 921900000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   kr920923BeaconFrequencies,
	},
	PingSlotFrequencies: kr920923BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

KR_920_923_RP1_V1_1_Rev_B is the band definition for KR920-923 in the RP1 v1.1 rev. B specification.

View Source
var KR_920_923_RP2_V1_0_0 = Band{
	ID: KR_920_923,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    kr920923DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    kr920923DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 920000000,
			MaxFrequency: 923000000,
			DutyCycle:    1,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 14,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return kr920923DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 921900000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   kr920923BeaconFrequencies,
	},
	PingSlotFrequencies: kr920923BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

KR_920_923_RP2_V1_0_0 is the band definition for KR920-923 in the RP002-1.0.0 specification.

View Source
var KR_920_923_RP2_V1_0_1 = Band{
	ID: KR_920_923,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    kr920923DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    kr920923DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 920000000,
			MaxFrequency: 923000000,
			DutyCycle:    1,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 14,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return kr920923DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 921900000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   kr920923BeaconFrequencies,
	},
	PingSlotFrequencies: kr920923BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

KR_920_923_RP2_V1_0_1 is the band definition for KR920-923 in the RP002-1.0.1 specification.

View Source
var KR_920_923_RP2_V1_0_2 = Band{
	ID: KR_920_923,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    kr920923DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    kr920923DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 920000000,
			MaxFrequency: 923000000,
			DutyCycle:    1,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 14,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return kr920923DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 921900000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   kr920923BeaconFrequencies,
	},
	PingSlotFrequencies: kr920923BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

KR_920_923_RP2_V1_0_2 is the band definition for KR920-923 in the RP002-1.0.2 specification.

View Source
var KR_920_923_RP2_V1_0_3 = Band{
	ID: KR_920_923,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    kr920923DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    kr920923DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 920000000,
			MaxFrequency: 923000000,
			DutyCycle:    1,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 14,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return kr920923DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 921900000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   kr920923BeaconFrequencies,
	},
	PingSlotFrequencies: kr920923BeaconFrequencies,

	SharedParameters: universalSharedParameters,
}

KR_920_923_RP2_V1_0_3 is the band definition for KR920-923 in the RP002-1.0.3 specification.

View Source
var KR_920_923_RP2_V1_0_4 = Band{
	ID: KR_920_923,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    kr920923DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    kr920923DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 920000000,
			MaxFrequency: 923000000,
			DutyCycle:    1,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 14,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_5 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 5)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return kr920923DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 921900000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   kr920923BeaconFrequencies,
	},
	PingSlotFrequencies: kr920923BeaconFrequencies,

	Relay: kr920923RelayParameters,

	SharedParameters: relayAwareSharedParameters,
}

KR_920_923_RP2_V1_0_4 is the band definition for KR920-923 in the RP002-1.0.4 specification.

View Source
var MA_869_870_Draft_Universal = Band{
	ID: MA_869_870_DRAFT,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    ma869870DraftDefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    ma869870DraftDefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 869000000,
			MaxFrequency: 869400000,
			DutyCycle:    0.001,
			MaxEIRP:      14.0 + eirpDelta,
		},
		{
			MinFrequency: 869400000,
			MaxFrequency: 869650000,
			DutyCycle:    0.1,
			MaxEIRP:      27.0 + eirpDelta,
		},
		{
			MinFrequency: 869650000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      14.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0:  makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1:  makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2:  makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3:  makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4:  makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5:  makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6:  makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7:  makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_8:  makeLRFHSSDataRate(0, 137000, "1/3", makeConstMaxMACPayloadSizeFunc(58)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLRFHSSDataRate(0, 137000, "2/3", makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLRFHSSDataRate(0, 336000, "1/3", makeConstMaxMACPayloadSizeFunc(58)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLRFHSSDataRate(0, 336000, "2/3", makeConstMaxMACPayloadSizeFunc(123)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return ma869870DraftDownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869525000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   ma869870DraftBeaconFrequencies,
	},
	PingSlotFrequencies: ma869870DraftBeaconFrequencies,

	SharedParameters: relayAwareSharedParameters,
}

MA_869_870_Draft_Universal is the band definition for MA869-870.

View Source
var RU_864_870_RP1_V1_0_3_Rev_A = Band{
	ID: RU_864_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    ru864870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    ru864870DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 864000000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      20.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return ru864870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869100000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   ru864870BeaconFrequencies,
	},
	PingSlotFrequencies: ru864870PingSlotFrequencies,

	SharedParameters: universalSharedParameters,
}

RU_864_870_RP1_V1_0_3_Rev_A is the band definition for RU864-870 in the RP1 v1.0.3 rev. A specification.

View Source
var RU_864_870_RP1_V1_1_Rev_A = Band{
	ID: RU_864_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    ru864870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    ru864870DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 864000000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      20.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return ru864870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869100000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   ru864870BeaconFrequencies,
	},
	PingSlotFrequencies: ru864870PingSlotFrequencies,

	SharedParameters: universalSharedParameters,
}

RU_864_870_RP1_V1_1_Rev_A is the band definition for RU864-870 in the RP1 v1.1 rev. A specification.

View Source
var RU_864_870_RP1_V1_1_Rev_B = Band{
	ID: RU_864_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    ru864870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    ru864870DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 864000000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      20.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return ru864870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869100000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   ru864870BeaconFrequencies,
	},
	PingSlotFrequencies: ru864870PingSlotFrequencies,

	SharedParameters: universalSharedParameters,
}

RU_864_870_RP1_V1_1_Rev_B is the band definition for RU864-870 in the RP1 v1.1 rev. B specification.

View Source
var RU_864_870_RP2_V1_0_0 = Band{
	ID: RU_864_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    ru864870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    ru864870DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 864000000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      20.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return ru864870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869100000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   ru864870BeaconFrequencies,
	},
	PingSlotFrequencies: ru864870PingSlotFrequencies,

	SharedParameters: universalSharedParameters,
}

RU_864_870_RP2_V1_0_0 is the band definition for RU864-870 in the RP002-1.0.0 specification.

View Source
var RU_864_870_RP2_V1_0_1 = Band{
	ID: RU_864_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    ru864870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    ru864870DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 864000000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      20.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return ru864870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869100000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   ru864870BeaconFrequencies,
	},
	PingSlotFrequencies: ru864870PingSlotFrequencies,

	SharedParameters: universalSharedParameters,
}

RU_864_870_RP2_V1_0_1 is the band definition for RU864-870 in the RP002-1.0.1 specification.

View Source
var RU_864_870_RP2_V1_0_2 = Band{
	ID: RU_864_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    ru864870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    ru864870DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 864000000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      20.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return ru864870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869100000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   ru864870BeaconFrequencies,
	},
	PingSlotFrequencies: ru864870PingSlotFrequencies,

	SharedParameters: universalSharedParameters,
}

RU_864_870_RP2_V1_0_2 is the band definition for RU864-870 in the RP002-1.0.2 specification.

View Source
var RU_864_870_RP2_V1_0_3 = Band{
	ID: RU_864_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    ru864870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    ru864870DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 864000000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      20.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return ru864870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869100000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   ru864870BeaconFrequencies,
	},
	PingSlotFrequencies: ru864870PingSlotFrequencies,

	SharedParameters: universalSharedParameters,
}

RU_864_870_RP2_V1_0_3 is the band definition for RU864-870 in the RP002-1.0.3 specification.

View Source
var RU_864_870_RP2_V1_0_4 = Band{
	ID: RU_864_870,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 16,
	UplinkChannels:    ru864870DefaultChannels,

	MaxDownlinkChannels: 16,
	DownlinkChannels:    ru864870DefaultChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 864000000,
			MaxFrequency: 870000000,
			DutyCycle:    0.01,
			MaxEIRP:      20.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(12, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(11, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(59)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(123)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLoRaDataRate(7, 250000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_7: makeFSKDataRate(50000, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_5,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 16,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
	},

	Rx1Channel: channelIndexIdentity,
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_7 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 7)
		}
		if offset > 5 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 5)
		}
		return ru864870DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: generateChMask16,
	ParseChMask:     parseChMask16,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_FREQUENCIES,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_0, 869100000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   ru864870BeaconFrequencies,
	},
	PingSlotFrequencies: ru864870PingSlotFrequencies,

	Relay: ru864870RelayParameters,

	SharedParameters: relayAwareSharedParameters,
}

RU_864_870_RP2_V1_0_4 is the band definition for RU864-870 in the RP002-1.0.4 specification.

View Source
var US_902_928_RP1_V1_0_2 = Band{
	ID: US_902_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    us902928UplinkChannels(0),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    us902928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 902300000,
			MaxFrequency: 914900000,
			DutyCycle:    1,
			MaxEIRP:      21.0 + eirpDelta,
		},
		{
			MinFrequency: 923300000,
			MaxFrequency: 927500000,
			DutyCycle:    1,
			MaxEIRP:      26.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(19)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(133)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
	},

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_4 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 4)
		}
		if offset > 3 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 3)
		}
		return us902928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(false, true),
	ParseChMask:     parseChMask72,

	FreqMultiplier:   100,
	ImplementsCFList: false,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	SharedParameters: universalSharedParameters,
}

US_902_928_RP1_V1_0_2 is the band definition for US902-928 in the RP1 v1.0.2 specification.

View Source
var US_902_928_RP1_V1_0_2_Rev_B = Band{
	ID: US_902_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    us902928UplinkChannels(0),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    us902928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 902300000,
			MaxFrequency: 914900000,
			DutyCycle:    1,
			MaxEIRP:      21.0 + eirpDelta,
		},
		{
			MinFrequency: 923300000,
			MaxFrequency: 927500000,
			DutyCycle:    1,
			MaxEIRP:      26.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(19)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(133)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
	},

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_4 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 4)
		}
		if offset > 3 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 3)
		}
		return us902928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(false, true),
	ParseChMask:     parseChMask72,

	FreqMultiplier:   100,
	ImplementsCFList: false,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_8,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	SharedParameters: universalSharedParameters,
}

US_902_928_RP1_V1_0_2_Rev_B is the band definition for US902-928 in the RP1 v1.0.2 rev. B specification.

View Source
var US_902_928_RP1_V1_0_3_Rev_A = Band{
	ID: US_902_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    us902928UplinkChannels(0),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    us902928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 902300000,
			MaxFrequency: 914900000,
			DutyCycle:    1,
			MaxEIRP:      21.0 + eirpDelta,
		},
		{
			MinFrequency: 923300000,
			MaxFrequency: 927500000,
			DutyCycle:    1,
			MaxEIRP:      26.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(19)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(133)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
		-22,
		-24,
		-26,
		-28,
		-30,
	},

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_4 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 4)
		}
		if offset > 3 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 3)
		}
		return us902928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(true, true),
	ParseChMask:     parseChMask72,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_8,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	SharedParameters: universalSharedParameters,
}

US_902_928_RP1_V1_0_3_Rev_A is the band definition for US902-928 in the RP1 v1.0.3 rev. A specification.

View Source
var US_902_928_RP1_V1_1_Rev_A = Band{
	ID: US_902_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    us902928UplinkChannels(0),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    us902928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 902300000,
			MaxFrequency: 914900000,
			DutyCycle:    1,
			MaxEIRP:      21.0 + eirpDelta,
		},
		{
			MinFrequency: 923300000,
			MaxFrequency: 927500000,
			DutyCycle:    1,
			MaxEIRP:      26.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(19)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(133)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
		-22,
		-24,
		-26,
		-28,
	},

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_4 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 4)
		}
		if offset > 3 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 3)
		}
		return us902928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(true, true),
	ParseChMask:     parseChMask72,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_8,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	SharedParameters: universalSharedParameters,
}

US_902_928_RP1_V1_1_Rev_A is the band definition for US902-928 in the RP1 v1.1 rev. A specification.

View Source
var US_902_928_RP1_V1_1_Rev_B = Band{
	ID: US_902_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    us902928UplinkChannels(0),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    us902928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 902300000,
			MaxFrequency: 914900000,
			DutyCycle:    1,
			MaxEIRP:      21.0 + eirpDelta,
		},
		{
			MinFrequency: 923300000,
			MaxFrequency: 927500000,
			DutyCycle:    1,
			MaxEIRP:      26.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(19)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(133)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
		-22,
		-24,
		-26,
		-28,
	},

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_4 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 4)
		}
		if offset > 3 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 3)
		}
		return us902928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(true, true),
	ParseChMask:     parseChMask72,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_8,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	SharedParameters: universalSharedParameters,
}

US_902_928_RP1_V1_1_Rev_B is the band definition for US902-928 in the RP1 v1.1 rev. B specification.

View Source
var US_902_928_RP2_V1_0_0 = Band{
	ID: US_902_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    us902928UplinkChannels(0),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    us902928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 902300000,
			MaxFrequency: 914900000,
			DutyCycle:    1,
			MaxEIRP:      21.0 + eirpDelta,
		},
		{
			MinFrequency: 923300000,
			MaxFrequency: 927500000,
			DutyCycle:    1,
			MaxEIRP:      26.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(19)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(133)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
		-22,
		-24,
		-26,
		-28,
	},

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_4 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 4)
		}
		if offset > 3 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 3)
		}
		return us902928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(true, true),
	ParseChMask:     parseChMask72,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_8,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	SharedParameters: universalSharedParameters,
}

US_902_928_RP2_V1_0_0 is the band definition for US902-928 in the RP002-1.0.0 specification.

View Source
var US_902_928_RP2_V1_0_1 = Band{
	ID: US_902_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    us902928UplinkChannels(0),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    us902928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 902300000,
			MaxFrequency: 914900000,
			DutyCycle:    1,
			MaxEIRP:      21.0 + eirpDelta,
		},
		{
			MinFrequency: 923300000,
			MaxFrequency: 927500000,
			DutyCycle:    1,
			MaxEIRP:      26.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(19)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(133)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
		-22,
		-24,
		-26,
		-28,
	},

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_4 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 4)
		}
		if offset > 3 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 3)
		}
		return us902928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(true, true),
	ParseChMask:     parseChMask72,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_8,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	SharedParameters: universalSharedParameters,
}

US_902_928_RP2_V1_0_1 is the band definition for US902-928 in the RP002-1.0.1 specification.

View Source
var US_902_928_RP2_V1_0_2 = Band{
	ID: US_902_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    us902928UplinkChannels(2),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    us902928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 902300000,
			MaxFrequency: 914900000,
			DutyCycle:    1,
			MaxEIRP:      21.0 + eirpDelta,
		},
		{
			MinFrequency: 923300000,
			MaxFrequency: 927500000,
			DutyCycle:    1,
			MaxEIRP:      26.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(19)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(133)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLRFHSSDataRate(0, 1523000, "1/3", makeConstMaxMACPayloadSizeFunc(58)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLRFHSSDataRate(0, 1523000, "2/3", makeConstMaxMACPayloadSizeFunc(133)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
		-22,
		-24,
		-26,
		-28,
	},

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_6 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 6)
		}
		if offset > 3 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 3)
		}
		return us902928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(true, true),
	ParseChMask:     parseChMask72,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_8,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	SharedParameters: universalSharedParameters,
}

US_902_928_RP2_V1_0_2 is the band definition for US902-928 in the RP002-1.0.2 specification.

View Source
var US_902_928_RP2_V1_0_3 = Band{
	ID: US_902_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    us902928UplinkChannels(2),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    us902928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 902300000,
			MaxFrequency: 914900000,
			DutyCycle:    1,
			MaxEIRP:      21.0 + eirpDelta,
		},
		{
			MinFrequency: 923300000,
			MaxFrequency: 927500000,
			DutyCycle:    1,
			MaxEIRP:      26.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(19)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(133)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLRFHSSDataRate(0, 1523000, "1/3", makeConstMaxMACPayloadSizeFunc(58)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLRFHSSDataRate(0, 1523000, "2/3", makeConstMaxMACPayloadSizeFunc(133)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
		-22,
		-24,
		-26,
		-28,
	},

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_6 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 6)
		}
		if offset > 3 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 3)
		}
		return us902928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(true, true),
	ParseChMask:     parseChMask72,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_8,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	SharedParameters: universalSharedParameters,
}

US_902_928_RP2_V1_0_3 is the band definition for US902-928 in the RP002-1.0.3 specification.

View Source
var US_902_928_RP2_V1_0_4 = Band{
	ID: US_902_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    us902928UplinkChannels(2),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    us902928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 902300000,
			MaxFrequency: 914900000,
			DutyCycle:    1,
			MaxEIRP:      21.0 + eirpDelta,
		},
		{
			MinFrequency: 923300000,
			MaxFrequency: 927500000,
			DutyCycle:    1,
			MaxEIRP:      26.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(19)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(133)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_5: makeLRFHSSDataRate(0, 1523000, "1/3", makeConstMaxMACPayloadSizeFunc(58)),
		ttnpb.DataRateIndex_DATA_RATE_6: makeLRFHSSDataRate(0, 1523000, "2/3", makeConstMaxMACPayloadSizeFunc(133)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
	StrictCodingRate:    true,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
		-22,
		-24,
		-26,
		-28,
	},

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_6 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 6)
		}
		if offset > 3 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 3)
		}
		return us902928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(true, true),
	ParseChMask:     parseChMask72,

	FreqMultiplier:   100,
	ImplementsCFList: true,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_8,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	Relay: us902928RelayParameters,

	SharedParameters: relayAwareSharedParameters,
}

US_902_928_RP2_V1_0_4 is the band definition for US902-928 in the RP002-1.0.4 specification.

View Source
var US_902_928_TS1_V1_0 = Band{
	ID: US_902_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    us902928UplinkChannels(0),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    us902928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 902300000,
			MaxFrequency: 914900000,
			DutyCycle:    1,
			MaxEIRP:      21.0 + eirpDelta,
		},
		{
			MinFrequency: 923300000,
			MaxFrequency: 927500000,
			DutyCycle:    1,
			MaxEIRP:      26.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(19)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(133)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
	},

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_4 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 4)
		}
		if offset > 3 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 3)
		}
		return us902928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(false, false),
	ParseChMask:     parseChMask72,

	FreqMultiplier:   100,
	ImplementsCFList: false,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	SharedParameters: universalSharedParameters,
}

US_902_928_TS1_V1_0 is the band definition for US902-928 in the TS1 v1.0 specification.

View Source
var US_902_928_TS1_V1_0_1 = Band{
	ID: US_902_928,

	SupportsDynamicADR: true,

	MaxUplinkChannels: 72,
	UplinkChannels:    us902928UplinkChannels(0),

	MaxDownlinkChannels: 8,
	DownlinkChannels:    us902928DownlinkChannels,

	SubBands: []SubBandParameters{
		{
			MinFrequency: 902300000,
			MaxFrequency: 914900000,
			DutyCycle:    1,
			MaxEIRP:      21.0 + eirpDelta,
		},
		{
			MinFrequency: 923300000,
			MaxFrequency: 927500000,
			DutyCycle:    1,
			MaxEIRP:      26.0 + eirpDelta,
		},
	},

	DataRates: map[ttnpb.DataRateIndex]DataRate{
		ttnpb.DataRateIndex_DATA_RATE_0: makeLoRaDataRate(10, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(19)),
		ttnpb.DataRateIndex_DATA_RATE_1: makeLoRaDataRate(9, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_2: makeLoRaDataRate(8, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(133)),
		ttnpb.DataRateIndex_DATA_RATE_3: makeLoRaDataRate(7, 125000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_4: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),

		ttnpb.DataRateIndex_DATA_RATE_8:  makeLoRaDataRate(12, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(61)),
		ttnpb.DataRateIndex_DATA_RATE_9:  makeLoRaDataRate(11, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(137)),
		ttnpb.DataRateIndex_DATA_RATE_10: makeLoRaDataRate(10, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_11: makeLoRaDataRate(9, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_12: makeLoRaDataRate(8, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
		ttnpb.DataRateIndex_DATA_RATE_13: makeLoRaDataRate(7, 500000, Cr4_5, makeConstMaxMACPayloadSizeFunc(250)),
	},
	MaxADRDataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,

	DefaultMaxEIRP: 30,
	TxOffset: []float32{
		0,
		-2,
		-4,
		-6,
		-8,
		-10,
		-12,
		-14,
		-16,
		-18,
		-20,
	},

	Rx1Channel: channelIndexModulo(8),
	Rx1DataRate: func(idx ttnpb.DataRateIndex, offset ttnpb.DataRateOffset, _ bool) (ttnpb.DataRateIndex, error) {
		if idx > ttnpb.DataRateIndex_DATA_RATE_4 {
			return 0, errDataRateIndexTooHigh.WithAttributes("max", 4)
		}
		if offset > 3 {
			return 0, errDataRateOffsetTooHigh.WithAttributes("max", 3)
		}
		return us902928DownlinkDRTable[idx][offset], nil
	},

	GenerateChMasks: makeGenerateChMask72(false, false),
	ParseChMask:     parseChMask72,

	FreqMultiplier:   100,
	ImplementsCFList: false,
	CFListType:       ttnpb.CFListType_CHANNEL_MASKS,

	DefaultRx2Parameters: Rx2Parameters{ttnpb.DataRateIndex_DATA_RATE_8, 923300000},

	Beacon: Beacon{
		DataRateIndex: ttnpb.DataRateIndex_DATA_RATE_3,
		CodingRate:    Cr4_5,
		Frequencies:   usAuBeaconFrequencies,
	},
	PingSlotFrequencies: usAuBeaconFrequencies,

	BootDwellTime: DwellTime{
		Uplinks:   boolPtr(true),
		Downlinks: boolPtr(false),
	},

	SharedParameters: universalSharedParameters,
}

US_902_928_TS1_V1_0_1 is the band definition for US902-928 in the TS1 v1.0.1 specification.

Functions

func ComputePeriodicFrequency added in v3.21.2

func ComputePeriodicFrequency(t time.Duration, p time.Duration, offset uint32, frequencies ...uint64) uint64

ComputePeriodicFrequency computes the frequency at time t given the period p and offset offset. It panics if no frequencies are provided.

func EqualChMasks added in v3.10.0

func EqualChMasks(a, b []bool) bool

EqualChMasks returns true if both channel masks are equal.

func GetPhyVersions added in v3.15.0

GetPhyVersions returns the list of supported phy versions for the given band.

func ListBands added in v3.21.2

ListBands returns the list of supported bands.

Types

type Band

type Band struct {
	ID string

	Beacon              Beacon
	PingSlotFrequencies []uint64

	// MaxUplinkChannels is the maximum amount of uplink channels that can be defined.
	MaxUplinkChannels uint8
	// UplinkChannels are the default uplink channels.
	UplinkChannels []Channel

	// MaxDownlinkChannels is the maximum amount of downlink channels that can be defined.
	MaxDownlinkChannels uint8
	// DownlinkChannels are the default downlink channels.
	DownlinkChannels []Channel

	// SubBands define the sub-bands, their duty-cycle limit and Tx power. The frequency ranges may not overlap.
	SubBands []SubBandParameters

	DataRates map[ttnpb.DataRateIndex]DataRate
	// StrictCodingRate depicts if the coding rate has been defined in the specifications for this band.
	StrictCodingRate bool

	FreqMultiplier   uint64
	ImplementsCFList bool
	CFListType       ttnpb.CFListType

	// SupportsDynamicADR determines whether the Adaptive Data Rate algorithm is supported.
	SupportsDynamicADR bool

	// TxOffset in dB: Tx power is computed by taking the MaxEIRP (default: +16dBm) and subtracting the offset.
	TxOffset []float32
	// MaxADRDataRateIndex represents the maximum non-RFU DataRateIndex suitable for ADR, which can be used according
	// to the band's spec.
	MaxADRDataRateIndex ttnpb.DataRateIndex

	TxParamSetupReqSupport bool

	// DefaultMaxEIRP in dBm
	DefaultMaxEIRP float32

	// Rx1Channel computes the Rx1 channel index.
	Rx1Channel func(uint8) (uint8, error)
	// Rx1DataRate computes the Rx1 data rate index.
	Rx1DataRate func(ttnpb.DataRateIndex, ttnpb.DataRateOffset, bool) (ttnpb.DataRateIndex, error)

	// GenerateChMasks generates a mapping ChMaskCntl -> ChMask.
	// Length of desiredChs must be equal to length of currentChs.
	// Meaning of desiredChs is as follows: for i in range 0..len(desiredChs) if desiredChs[i] == true,
	// then channel with index i should be enabled, otherwise it should be disabled.
	// Meaning of currentChs is as follows: for i in range 0..len(currentChs) if currentChs[i] == true,
	// then channel with index i is enabled, otherwise it is disabled.
	// In case desiredChs equals currentChs, GenerateChMasks returns a singleton, which represents a noop.
	GenerateChMasks func(currentChs, desiredChs []bool) ([]ChMaskCntlPair, error)
	// ParseChMask computes the channels that have to be masked given ChMask mask and ChMaskCntl cntl.
	ParseChMask func(mask [16]bool, cntl uint8) (map[uint8]bool, error)

	// DefaultRx2Parameters are the default parameters that determine the settings for a Tx sent during Rx2.
	DefaultRx2Parameters Rx2Parameters

	// BootDwellTime contains the dwell time values expected for a device on boot.
	BootDwellTime DwellTime

	// Relay contains the relay settings.
	Relay RelayParameters

	SharedParameters
}

Band contains a band's properties.

func Get added in v3.15.1

func Get(id string, version ttnpb.PHYVersion) (Band, error)

Get returns the band if it was found, and returns an error otherwise.

func GetLatest added in v3.15.1

func GetLatest(id string) (Band, error)

GetLatest returns the latest version of the band if it was found, and returns an error otherwise.

func (Band) BandDescription added in v3.21.2

func (b Band) BandDescription() *ttnpb.BandDescription

BandDescription parses a band into a ttnpb.BandDescription.

func (Band) FindDownlinkDataRate added in v3.14.1

func (b Band) FindDownlinkDataRate(dr *ttnpb.DataRate) (ttnpb.DataRateIndex, DataRate, bool)

FindDownlinkDataRate returns the downlink data rate with index by API data rate, if any.

func (Band) FindSubBand

func (b Band) FindSubBand(frequency uint64) (SubBandParameters, bool)

FindSubBand returns the sub-band by frequency, if any.

func (Band) FindUplinkDataRate

func (b Band) FindUplinkDataRate(dr *ttnpb.DataRate) (ttnpb.DataRateIndex, DataRate, bool)

FindUplinkDataRate returns the uplink data rate with index by API data rate, if any.

func (Band) MaxTxPowerIndex

func (b Band) MaxTxPowerIndex() uint8

MaxTxPowerIndex returns the maximum TxPower index for the band.

type Beacon

type Beacon struct {
	DataRateIndex ttnpb.DataRateIndex
	CodingRate    string
	Frequencies   []uint64
}

Beacon parameters of a specific band.

type ChMaskCntlPair

type ChMaskCntlPair struct {
	Cntl uint8
	Mask [16]bool
}

ChMaskCntlPair pairs a ChMaskCntl with a mask.

type Channel

type Channel struct {
	// Frequency indicates the frequency of the channel.
	Frequency uint64
	// MinDataRate indicates the index of the minimal data rates accepted on this channel.
	MinDataRate ttnpb.DataRateIndex
	// MinDataRate indicates the index of the maximal data rates accepted on this channel.
	MaxDataRate ttnpb.DataRateIndex
}

Channel abstracts a band's channel properties.

type DataRate

type DataRate struct {
	Rate              *ttnpb.DataRate
	MaxMACPayloadSize MaxMACPayloadSizeFunc
}

DataRate indicates the properties of a band's data rate.

type DwellTime added in v3.18.0

type DwellTime struct {
	Uplinks   *bool
	Downlinks *bool
}

DwellTime contains the band dwell time settings.

type MaxMACPayloadSizeFunc

type MaxMACPayloadSizeFunc func(dwellTime bool) uint16

MaxMACPayloadSizeFunc is a function that returns the maximum payload size depending on whether dwell time restrictions apply or not.

type RelayParameters added in v3.27.2

type RelayParameters struct {
	WORChannels []RelayWORChannel
}

RelayParameters contains relay parameters.

type RelayWORChannel added in v3.27.2

type RelayWORChannel struct {
	Frequency     uint64
	ACKFrequency  uint64
	DataRateIndex ttnpb.DataRateIndex
}

RelayWORChannel encapsulates a relay channel.

type Rx2Parameters

type Rx2Parameters struct {
	DataRateIndex ttnpb.DataRateIndex
	Frequency     uint64
}

Rx2Parameters contains downlink datarate index and channel.

type SharedParameters added in v3.27.2

type SharedParameters struct {
	// ReceiveDelay1 is the default Rx1 window timing in seconds.
	ReceiveDelay1 time.Duration
	// ReceiveDelay2 is the default Rx2 window timing in seconds (ReceiveDelay1 + 1s).
	ReceiveDelay2 time.Duration
	// ReceiveDelay1 is the default join-accept window timing in seconds.
	JoinAcceptDelay1 time.Duration
	// ReceiveDelay2 is the default join-accept second window timing in seconds.
	JoinAcceptDelay2 time.Duration
	// MaxFCntGap is the maximum allowed frame counter gap between two uplink messages.
	MaxFCntGap uint
	// ADRAckLimit is the default ADR acknowledgement limit.
	ADRAckLimit ttnpb.ADRAckLimitExponent
	// ADRAckDelay is the default ADR acknowledgement delay.
	ADRAckDelay ttnpb.ADRAckDelayExponent
	// MinRetransmitTimeout is the minimum retransmit timeout.
	MinRetransmitTimeout time.Duration
	// MaxRetransmitTimeout is the maximum retransmit timeout.
	MaxRetransmitTimeout time.Duration

	// RelayForwardDelay is the default delay between the end of the uplink transmission and the start of the
	// relay transmission.
	RelayForwardDelay time.Duration
	// RelayReceiveDelay is the default RxR window timing in seconds.
	RelayReceiveDelay time.Duration
	// ServedRelayBackoff is the default number of wake on radio attempts before sending the uplink message directly
	// by a served relay device.
	ServedRelayBackoff uint32
}

SharedParameters contains the properties which are shared by multiple bands within the same Regional Parameters version.

type SubBandParameters

type SubBandParameters struct {
	MinFrequency uint64
	MaxFrequency uint64
	DutyCycle    float32
	MaxEIRP      float32
}

SubBandParameters contains the sub-band frequency range, duty cycle and Tx power.

func (SubBandParameters) Comprises

func (d SubBandParameters) Comprises(frequency uint64) bool

Comprises returns whether the duty cycle applies to the given frequency.

func (SubBandParameters) MaxEmissionDuring

func (d SubBandParameters) MaxEmissionDuring(period time.Duration) time.Duration

MaxEmissionDuring the period passed as parameter, that is allowed by that duty cycle.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL