toa

package
v3.7.3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: Apache-2.0 Imports: 4 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
var downlink ttnpb.DownlinkMessage
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