Documentation ¶
Overview ¶
Internal package contains various Network Server utilities
Index ¶
- Variables
- func DeviceBand(dev *ttnpb.EndDevice, fps *frequencyplans.Store) (*band.Band, error)
- func DeviceFrequencyPlanAndBand(dev *ttnpb.EndDevice, fps *frequencyplans.Store) (*frequencyplans.FrequencyPlan, *band.Band, error)
- func FrequencyPlanAndBand(frequencyPlanID string, phyVersion ttnpb.PHYVersion, fps *frequencyplans.Store) (*frequencyplans.FrequencyPlan, *band.Band, error)
- func FullFCnt(fCnt uint16, lastFCnt uint32, supports32BitFCnt bool) uint32
- func LastDownlink(downs ...*ttnpb.MACState_DownlinkMessage) *ttnpb.MACState_DownlinkMessage
- func LastUplink(ups ...*ttnpb.MACState_UplinkMessage) *ttnpb.MACState_UplinkMessage
- func RXMetadataStats(ctx context.Context, mds []*ttnpb.RxMetadata) (gateways int, maxSNR float32)
- func TimePtr(v time.Time) *time.Time
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_channel", "channel is unknown") ErrNetworkDownlinkSlot = errors.DefineCorruption("network_downlink_slot", "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", "generate channel datarate range") ErrChannelMask = errors.DefineCorruption("channel_mask", "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 }()
View Source
var LoRaWANVersionPairs = map[ttnpb.MACVersion]map[ttnpb.PHYVersion]struct{}{ ttnpb.MACVersion_MAC_V1_0: { ttnpb.PHYVersion_TS001_V1_0: struct{}{}, }, ttnpb.MACVersion_MAC_V1_0_1: { ttnpb.PHYVersion_TS001_V1_0_1: struct{}{}, }, ttnpb.MACVersion_MAC_V1_0_2: { ttnpb.PHYVersion_RP001_V1_0_2: struct{}{}, ttnpb.PHYVersion_RP001_V1_0_2_REV_B: struct{}{}, }, ttnpb.MACVersion_MAC_V1_0_3: { ttnpb.PHYVersion_RP001_V1_0_3_REV_A: struct{}{}, }, ttnpb.MACVersion_MAC_V1_1: { ttnpb.PHYVersion_RP001_V1_1_REV_A: struct{}{}, ttnpb.PHYVersion_RP001_V1_1_REV_B: struct{}{}, }, }
Functions ¶
func DeviceBand ¶
func DeviceFrequencyPlanAndBand ¶
func DeviceFrequencyPlanAndBand(dev *ttnpb.EndDevice, fps *frequencyplans.Store) (*frequencyplans.FrequencyPlan, *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 ¶
FullFCnt returns full FCnt given fCnt, lastFCnt and whether or not 32-bit FCnts are supported.
func LastDownlink ¶
func LastDownlink(downs ...*ttnpb.MACState_DownlinkMessage) *ttnpb.MACState_DownlinkMessage
func LastUplink ¶
func LastUplink(ups ...*ttnpb.MACState_UplinkMessage) *ttnpb.MACState_UplinkMessage
func RXMetadataStats ¶
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. |
Click to show internal directories.
Click to hide internal directories.