Documentation ¶
Overview ¶
Internal package contains various Network Server utilities
Index ¶
- Variables
- func CopyEndDevice(pb *ttnpb.EndDevice) *ttnpb.EndDevice
- func CopyUplinkMessage(pb *ttnpb.UplinkMessage) *ttnpb.UplinkMessage
- 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 EndDevicePtr(v ttnpb.EndDevice) *ttnpb.EndDevice
- func FullFCnt(fCnt uint16, lastFCnt uint32, supports32BitFCnt bool) uint32
- func LastDownlink(downs ...*ttnpb.DownlinkMessage) *ttnpb.DownlinkMessage
- func LastUplink(ups ...*ttnpb.UplinkMessage) *ttnpb.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_chanel", "channel is unknown") )
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 _, b := range band.All { vers := b.Versions() m := make(map[ttnpb.PHYVersion]*band.Band, len(vers)) for _, ver := range vers { b, err := b.Version(ver) if err != nil { panic(fmt.Errorf("failed to obtain %s band of version %s", b.ID, ver)) } m[ver] = &b } bands[b.ID] = m } return bands }()
View Source
var LoRaWANVersionPairs = map[ttnpb.MACVersion]map[ttnpb.PHYVersion]struct{}{ ttnpb.MAC_V1_0: { ttnpb.PHY_V1_0: struct{}{}, }, ttnpb.MAC_V1_0_1: { ttnpb.PHY_V1_0_1: struct{}{}, }, ttnpb.MAC_V1_0_2: { ttnpb.PHY_V1_0_2_REV_A: struct{}{}, ttnpb.PHY_V1_0_2_REV_B: struct{}{}, }, ttnpb.MAC_V1_0_3: { ttnpb.PHY_V1_0_3_REV_A: struct{}{}, }, ttnpb.MAC_V1_1: { ttnpb.PHY_V1_1_REV_A: struct{}{}, ttnpb.PHY_V1_1_REV_B: struct{}{}, }, }
Functions ¶
func CopyEndDevice ¶
CopyEndDevice returns a deep copy of ttnpb.EndDevice pb.
func CopyUplinkMessage ¶
func CopyUplinkMessage(pb *ttnpb.UplinkMessage) *ttnpb.UplinkMessage
CopyUplinkMessage returns a deep copy of ttnpb.UplinkMessage pb.
func DeviceBand ¶
func DeviceFrequencyPlanAndBand ¶
func DeviceFrequencyPlanAndBand(dev *ttnpb.EndDevice, 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.DownlinkMessage) *ttnpb.DownlinkMessage
func LastUplink ¶
func LastUplink(ups ...*ttnpb.UplinkMessage) *ttnpb.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.