models

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RXInfo

type RXInfo struct {
	MAC               lorawan.EUI64
	Time              *time.Time
	TimeSinceGPSEpoch *gw.Duration
	Timestamp         uint32
	RSSI              int
	LoRaSNR           float64
	Board             int
	Antenna           int
}

RXInfo defines the RX related metadata (for each receiving gateway).

type RXInfoSet

type RXInfoSet []RXInfo

RXInfoSet implements a sortable slice of RXInfo elements. First it is sorted by LoRaSNR, within the sub-set where LoRaSNR > maxSNRForSort, it will sort by RSSI.

func (RXInfoSet) Len

func (s RXInfoSet) Len() int

Len implements sort.Interface.

func (RXInfoSet) Less

func (s RXInfoSet) Less(i, j int) bool

Less implements sort.Interface.

func (RXInfoSet) Swap

func (s RXInfoSet) Swap(i, j int)

Swap implements sort.Interface.

type RXPacket

type RXPacket struct {
	PHYPayload lorawan.PHYPayload
	TXInfo     TXInfo
	RXInfoSet  RXInfoSet
}

RXPacket contains a received PHYPayload together with its RX metadata.

type TXInfo

type TXInfo struct {
	Frequency int
	DataRate  band.DataRate
	CodeRate  string
}

TXInfo defines the metadata used for the transmission.

Jump to

Keyboard shortcuts

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