models

package
v2.0.0-test.1+incompat... Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: MIT Imports: 6 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
	RFChain           int
	Channel           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.

func (RXPacket) GetGWUplinkRXInfoSet

func (r RXPacket) GetGWUplinkRXInfoSet() []*gw.UplinkRXInfo

GetGWUplinkRXInfoSet returns the gw.UplinkTXInfo set. TODO: replace original RXInfo with gw.UplinkTXInfo.

func (RXPacket) GetGWUplinkTXInfo

func (r RXPacket) GetGWUplinkTXInfo() *gw.UplinkTXInfo

GetGWUplinkTXInfo returns the gw.UplinkTXInfo struct. TODO: replace original TXInfo with this gw.UplinkTXInfo.

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