Documentation ¶
Overview ¶
Package band provides band specific defaults and configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Band ¶
type Band struct { // DefaultTXPower defines the default radiated transmit output power DefaultTXPower int // ImplementsCFlist defines if the band implements the optional channel // frequency list. ImplementsCFlist bool // RX2Frequency defines the fixed frequency for the RX2 receive window RX2Frequency int // RX2DataRate defines the fixed data-rate for the RX2 receive window RX2DataRate int // MaxFcntGap defines the MAC_FCNT_GAP default value. MaxFCntGap uint32 // ADRACKLimit defines the ADR_ACK_LIMIT default value. ADRACKLimit int // ADRACKDelay defines the ADR_ACK_DELAY default value. ADRACKDelay int // ReceiveDelay1 defines the RECEIVE_DELAY1 default value. ReceiveDelay1 time.Duration // ReceiveDelay2 defines the RECEIVE_DELAY2 default value. ReceiveDelay2 time.Duration // JoinAcceptDelay1 defines the JOIN_ACCEPT_DELAY1 default value. JoinAcceptDelay1 time.Duration // JoinAcceptDelay2 defines the JOIN_ACCEPT_DELAY2 default value. JoinAcceptDelay2 time.Duration // ACKTimeoutMin defines the ACK_TIMEOUT min. default value. ACKTimeoutMin time.Duration // ACKTimeoutMax defines the ACK_TIMEOUT max. default value. ACKTimeoutMax time.Duration // DataRates defines the available data rates. DataRates []DataRate // MaxPayloadSize defines the maximum payload size, per data-rate. MaxPayloadSize []MaxPayloadSize // RX1DataRate defines the RX1 data-rate given the uplink data-rate // and a RX1DROffset value. RX1DataRate [][]int // TXPower defines the TX power configuration. TXPower []int // UplinkChannels defines the list of (default) configured uplink channels. UplinkChannels []Channel // DownlinkChannels defines the list of (default) configured downlink // channels. DownlinkChannels []Channel // contains filtered or unexported fields }
Band defines an region specific ISM band implementation for LoRa.
func (*Band) GetDataRate ¶
GetDataRate returns the index of the given DataRate.
func (*Band) GetRX1Channel ¶
GetRX1Channel returns the channel to use for RX1 given the channel used for uplink.
func (*Band) GetRX1DataRateForOffset ¶
GetRX1DataRateForOffset returns the data-rate for the given offset.
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.
Click to show internal directories.
Click to hide internal directories.