band

package
v2.7.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrADRUnavailable = errors.New("ADR Unavailable")

ErrADRUnavailable is returned when ADR is not available

Functions

func Guess

func Guess(frequency uint64) string

Guess the region based on frequency

Types

type ADRConfig added in v2.5.0

type ADRConfig struct {
	MinDataRate int
	MaxDataRate int
	MinTXPower  int
	MaxTXPower  int
}

ADRConfig contains configuration for Adaptive Data Rate

type FrequencyPlan

type FrequencyPlan struct {
	lora.Band
	ADR    *ADRConfig
	CFList *lorawan.CFList
}

FrequencyPlan includes band configuration and CFList

func Get

func Get(region string) (frequencyPlan FrequencyPlan, err error)

Get the frequency plan for the given region

func (*FrequencyPlan) ADRSettings added in v2.5.0

func (f *FrequencyPlan) ADRSettings(dataRate string, txPower int, snr float32, deviceMargin float32) (desiredDataRate string, desiredTxPower int, err error)

ADRSettings gets the ADR settings given a dataRate, txPower, SNR and device margin

func (*FrequencyPlan) GetDataRateIndexFor added in v2.5.0

func (f *FrequencyPlan) GetDataRateIndexFor(dataRate string) (int, error)

func (*FrequencyPlan) GetDataRateStringForIndex added in v2.5.0

func (f *FrequencyPlan) GetDataRateStringForIndex(drIdx int) (string, error)

func (*FrequencyPlan) GetTxPowerIndexFor added in v2.5.0

func (f *FrequencyPlan) GetTxPowerIndexFor(txPower int) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL