band

package
v0.0.0-...-a932a70 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package band provides band specific defaults and configuration.

To select the desired band, use the corresponding build tag.

Index

Constants

View Source
const (
	ReceiveDelay1    time.Duration = 0
	ReceiveDelay2    time.Duration = 0
	JoinAcceptDelay1 time.Duration = 0
	JoinAcceptDelay2 time.Duration = 0
	MaxFCntGap       uint32        = 0
	ADRAckLimit                    = 0
	ADRAckDelay                    = 0
	AckTimeoutMin    time.Duration = 0
	AckTimeoutMax    time.Duration = 0
)

Default settings for this band

View Source
const CFListAllowed = false

CFListAllowed defines if the optional JoinAccept CFList is allowed for this band

View Source
const DefaultTXPower = 0

DefaultTXPower defines the default TX power in dBm

View Source
const Name = "placeholder"

Name defines the name of the band

View Source
const RX2DataRate = 0

RX2DataRate defines the RX2 receive window data rate to use

View Source
const RX2Frequency = 0

RX2Frequency defines the RX2 receive window frequency to use (in Hz)

Variables

View Source
var DataRateConfiguration = [0]DataRate{}

DataRateConfiguration defines the available data rates

View Source
var DownlinkChannelConfiguration = [0]Channel{}

DownlinkChannelConfiguration defines the (default) available downlink channels.

View Source
var MACPayloadSizeConfiguration = [0]MaxPayloadSize{}

MACPayloadSizeConfiguration defines the maximum payload size for each data rate

View Source
var RX1DROffsetConfiguration = [0][6]int{}

RX1DROffsetConfiguration defines the available RX1DROffset configurations per data rate.

View Source
var TXPowerConfiguration = [0]int{}

TXPowerConfiguration defines the available TXPower settings in dBm

View Source
var UplinkChannelConfiguration = [0]Channel{}

UplinkChannelConfiguration defines the (default) available uplink channels

Functions

func GetDataRate

func GetDataRate(dr DataRate) (int, error)

GetDataRate returns the index of the given DataRate.

func GetRX1Frequency

func GetRX1Frequency(frequency, dataRate int) (int, error)

GetRX1Frequency returns the frequency to be used for RX1 given the uplink frequency and data rate.

Types

type Channel

type Channel struct {
	Frequency int   // frequency in Hz
	DataRates []int // each int mapping to an index in DataRateConfiguration
}

Channel defines the channel structure

type DataRate

type DataRate struct {
	Modulation   Modulation `json:"modulation"`
	SpreadFactor int        `json:"spreadFactor,omitempty"` // used for LoRa
	Bandwidth    int        `json:"bandwidth,omitempty"`    // in kHz, used for LoRa
	BitRate      int        `json:"bitRate,omitempty"`      // bits per second, used for FSK
}

DataRate defines a data rate

type MaxPayloadSize

type MaxPayloadSize struct {
	M int // The maximum MACPayload size length
	N int // The maximum application payload length in the absence of the optional FOpt control field
}

MaxPayloadSize defines the max payload size

type Modulation

type Modulation string

Modulation defines the modulation type.

const (
	LoRaModulation Modulation = "LORA"
	FSKModulation  Modulation = "FSK"
)

Possible modulation types.

Jump to

Keyboard shortcuts

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