Documentation ¶
Overview ¶
Package band provides band specific defaults and configuration.
To select the desired band, use the corresponding build tag.
Index ¶
Constants ¶
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
const CFListAllowed = false
CFListAllowed defines if the optional JoinAccept CFList is allowed for this band
const DefaultTXPower = 0
DefaultTXPower defines the default TX power in dBm
const Name = "placeholder"
Name defines the name of the band
const RX2DataRate = 0
RX2DataRate defines the RX2 receive window data rate to use
const RX2Frequency = 0
RX2Frequency defines the RX2 receive window frequency to use (in Hz)
Variables ¶
var DataRateConfiguration = [0]DataRate{}
DataRateConfiguration defines the available data rates
var DownlinkChannelConfiguration = [0]Channel{}
DownlinkChannelConfiguration defines the (default) available downlink channels.
var MACPayloadSizeConfiguration = [0]MaxPayloadSize{}
MACPayloadSizeConfiguration defines the maximum payload size for each data rate
var RX1DROffsetConfiguration = [0][6]int{}
RX1DROffsetConfiguration defines the available RX1DROffset configurations per data rate.
var TXPowerConfiguration = [0]int{}
TXPowerConfiguration defines the available TXPower settings in dBm
var UplinkChannelConfiguration = [0]Channel{}
UplinkChannelConfiguration defines the (default) available uplink channels
Functions ¶
func GetDataRate ¶
GetDataRate returns the index of the given DataRate.
func GetRX1Frequency ¶
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.