macspec

package
v3.24.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package macspec provides access to LoRaWAN MAC specification-specific settings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowDuplicateLinkADRAns

func AllowDuplicateLinkADRAns(v ttnpb.MACVersion) bool

AllowDuplicateLinkADRAns reports whether v is allowed to use duplicate LinkADRAns MAC responses within the same message.

func EncryptFOpts

func EncryptFOpts(v ttnpb.MACVersion) bool

EncryptFOpts reports whether v requires MAC commands in FOpts to be encrypted.

func EncryptionOptions

func EncryptionOptions(v ttnpb.MACVersion, frameType FrameType, fPort uint32, cmdsInFOpts bool) (opts []crypto.EncryptionOption)

EncryptionOptions reports the encryption options for v.

func HasMaxFCntGap

func HasMaxFCntGap(v ttnpb.MACVersion) bool

HasMaxFCntGap reports whether v defines a MaxFCntGap.

func HasNoChangeDataRateIndex

func HasNoChangeDataRateIndex(v ttnpb.MACVersion) bool

HasNoChangeDataRateIndex reports whether v defines a no-change DataRateIndex value.

func HasNoChangeTXPowerIndex

func HasNoChangeTXPowerIndex(v ttnpb.MACVersion) bool

HasNoChangeTXPowerIndex reports whether v defines a no-change TxPowerIndex value.

func IgnoreUplinksExceedingLengthLimit

func IgnoreUplinksExceedingLengthLimit(v ttnpb.MACVersion) bool

IgnoreUplinksExceedingLengthLimit reports whether v requires Network Server to silently drop uplinks exceeding selected data rate payload length limits.

func IncrementDevNonce

func IncrementDevNonce(v ttnpb.MACVersion) bool

IncrementDevNonce reports whether v defines DevNonce as an incrementing counter.

func LimitConfirmedTransmissions

func LimitConfirmedTransmissions(v ttnpb.MACVersion) bool

LimitConfirmedTransmissions reports whether v must limit the number of confirmed uplink transmissions.

func NegotiatedVersion

func NegotiatedVersion(v ttnpb.MACVersion, upperBound ttnpb.Minor) (ttnpb.MACVersion, ttnpb.Minor)

NegotiatedVersion returns the MAC version and minor version that should be used by the end device and network server as part of the RekeyInd{Conf} handshake. v is the Network Server requested MAC version, while upperBound represents the maximum minor accepted by the end device.

func RekeyPeriodVersion

func RekeyPeriodVersion(v ttnpb.MACVersion) ttnpb.MACVersion

RekeyPeriodVersion returns the version that should be assumed after a device joins in order to decrypt the RekeyInd and encrypt the RekeyIndConf MAC commands.

func RequireDevEUIForABP

func RequireDevEUIForABP(v ttnpb.MACVersion) bool

RequireDevEUIForABP reports whether v requires ABP devices to have a DevEUI associated.

func SingularLinkADRAns

func SingularLinkADRAns(v ttnpb.MACVersion) bool

SingularLinkADRAns reports whether v will accept or reject all channel masks in a singular LinkADRAns MAC response.

func UseADRParamSetupReq

func UseADRParamSetupReq(v ttnpb.MACVersion) bool

UseADRParamSetupReq reports whether v is allowed to use the ADRParamSetup{Req|Ans} MAC commands.

func UseDLChannelReq

func UseDLChannelReq(v ttnpb.MACVersion) bool

UseDLChannelReq reports whether v is allowed to use the DLChannel{Req|Ans} MAC commands.

func UseDeviceModeInd

func UseDeviceModeInd(v ttnpb.MACVersion) bool

UseDeviceModeInd reports whether v is allowed to use the DeviceModeInd MAC command.

func UseLegacyMIC

func UseLegacyMIC(v ttnpb.MACVersion) bool

UseLegacyMIC reports whether v uses legacy MIC computation algorithm.

func UseNwkKey

func UseNwkKey(v ttnpb.MACVersion) bool

UseNwkKey reports whether v uses a root NwkKey.

func UseRejoinParamSetupReq

func UseRejoinParamSetupReq(v ttnpb.MACVersion) bool

UseRejoinParamSetupReq reports whether v is allowed to use the RejoinParamSetup{Req|Ans} MAC commands.

func UseRekeyInd

func UseRekeyInd(v ttnpb.MACVersion) bool

UseRekeyInd reports whether v is allowed to use the RekeyInd{Conf} MAC commands.

func UseSharedFCntDown

func UseSharedFCntDown(v ttnpb.MACVersion) bool

UseSharedFCntDown reports whether v uses the same frame counter for both network and application downlinks.

func UseTxParamSetupReq

func UseTxParamSetupReq(v ttnpb.MACVersion) bool

UseTxParamSetupReq reports whether v is allowed to use the TxParamSetup{Req|Ans} MAC commands.

func ValidateUplinkPayloadSize

func ValidateUplinkPayloadSize(v ttnpb.MACVersion) bool

ValidateUplinkPayloadSize reports whether v requires that the Network Server must not force the end device to generate an uplink that would be too large for the regional and data rate requirements. This can occur if the Network Server includes too many MAC commands as part of a downlink.

Types

type FrameType

type FrameType uint8

FrameType captures the frame type.

const (
	// UplinkFrame represents the uplink frame.
	UplinkFrame FrameType = iota
	// DownlinkFrame represents the downlink frame.
	DownlinkFrame
)

Jump to

Keyboard shortcuts

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