band

package
v2.6.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 23, 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

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

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

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

func (*FrequencyPlan) GetDataRateStringForIndex

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

func (*FrequencyPlan) GetTxPowerIndexFor

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