internal

package
v3.25.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Internal package contains various Network Server utilities

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCorruptedMACState = errors.DefineCorruption("corrupted_mac_state", "MAC state is corrupted")
	ErrInvalidDataRate   = errors.DefineInvalidArgument("data_rate", "invalid data rate")
	ErrInvalidPayload    = errors.DefineInvalidArgument("payload", "invalid payload")
	ErrUnknownChannel    = errors.Define("unknown_chanel", "channel is unknown")

	ErrNetworkDownlinkSlot  = errors.DefineCorruption("network_downlink_slot", "could not generate network initiated downlink slot")
	ErrUplinkChannel        = errors.DefineCorruption("uplink_channel", "channel does not allow downlinks")
	ErrDownlinkChannel      = errors.DefineCorruption("downlink_channel", "channel does not allow uplinks")
	ErrSession              = errors.DefineCorruption("session", "no device session")
	ErrMACHandler           = errors.DefineCorruption("mac_handler", "missing MAC handler")
	ErrChannelDataRateRange = errors.DefineCorruption("channel_data_rate_range", "could not generate channel datarate range")
	ErrChannelMask          = errors.DefineCorruption("channel_mask", "could not generate channel mask")
)
View Source
var LoRaWANBands = func() map[string]map[ttnpb.PHYVersion]*band.Band {
	bands := make(map[string]map[ttnpb.PHYVersion]*band.Band, len(band.All))
	for id, vers := range band.All {
		m := make(map[ttnpb.PHYVersion]*band.Band, len(vers))
		for ver, b := range vers {
			b := b
			m[ver] = &b
		}
		bands[id] = m
	}
	return bands
}()

Functions

func DeviceBand

func DeviceBand(dev *ttnpb.EndDevice, fps *frequencyplans.Store) (*band.Band, error)

func FrequencyPlanAndBand added in v3.14.0

func FrequencyPlanAndBand(frequencyPlanID string, phyVersion ttnpb.PHYVersion, fps *frequencyplans.Store) (*frequencyplans.FrequencyPlan, *band.Band, error)

func FullFCnt

func FullFCnt(fCnt uint16, lastFCnt uint32, supports32BitFCnt bool) uint32

FullFCnt returns full FCnt given fCnt, lastFCnt and whether or not 32-bit FCnts are supported.

func RXMetadataStats

func RXMetadataStats(ctx context.Context, mds []*ttnpb.RxMetadata) (gateways int, maxSNR float32)

func TimePtr

func TimePtr(v time.Time) *time.Time

Types

This section is empty.

Directories

Path Synopsis
Package test contains testing utilities usable by all subpackages of networkserver including itself.
Package test contains testing utilities usable by all subpackages of networkserver including itself.
shared
Package test contains testing utilities usable by all subpackages of networkserver excluding itself.
Package test contains testing utilities usable by all subpackages of networkserver excluding itself.
Package time wraps "time" and allows for custom implementations of key functions.
Package time wraps "time" and allows for custom implementations of key functions.

Jump to

Keyboard shortcuts

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