MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / Duration

Method Duration

pkg/ttnpb/lorawan.go:771–778  ·  view source on GitHub ↗

Duration returns v as time.Duration.

()

Source from the content-addressed store, hash-verified

769
770// Duration returns v as time.Duration.
771func (v RxDelay) Duration() time.Duration {
772 switch v {
773 case RxDelay_RX_DELAY_0, RxDelay_RX_DELAY_1:
774 return time.Second
775 default:
776 return time.Duration(v) * time.Second
777 }
778}
779
780// Validate reports whether v represents a valid RxDelay.
781func (v RxDelay) Validate() error {

Callers 15

JitterFunction · 0.45
TestJitterFunction · 0.45
TestCanJitterFunction · 0.45
mac.goFile · 0.45
TestLoRaWANEncodingMACFunction · 0.45
ServerCertificateMethod · 0.45
ClientCertificateMethod · 0.45
MaxEmissionDuringMethod · 0.45
toPBDownlinkFunction · 0.45
timeMultFunction · 0.45
SaveAuthorizeMethod · 0.45
SaveAccessMethod · 0.45

Calls

no outgoing calls

Tested by 15

TestJitterFunction · 0.36
TestCanJitterFunction · 0.36
TestLoRaWANEncodingMACFunction · 0.36
timeMultFunction · 0.36
TestProcessDownlinkTaskFunction · 0.36
TestNextDataDownlinkSlotFunction · 0.36
TestNextPingSlotAtFunction · 0.36
TestDifferentLoRaSFsFunction · 0.36
TestDifferentLoRaBWsFunction · 0.36
TestDifferentLoRaCRsFunction · 0.36