toa

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: 5 Imported by: 0

Documentation

Overview

Package toa provides methods for computing a LoRaWAN packet's time-on-air.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compute

func Compute(payloadSize int, settings *ttnpb.TxSettings) (d time.Duration, err error)

Compute computes the time-on-air for the given payload size and the TxSettings. This function takes into account PHYPayload.

Example
downlink := getDownlink()
toa, err := Compute(len(downlink.RawPayload), downlink.GetScheduled())
if err != nil {
	panic(err)
}

fmt.Println("Time on air:", toa)
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

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