Table of Contents

Class LorawanBackoff

Namespace
Pamoja.Lorawan
Assembly
Pamoja.Lorawan.dll

A device's count of how long the network has been silent.

public sealed class LorawanBackoff : IDisposable
Inheritance
LorawanBackoff
Implements
Inherited Members

Remarks

A network running adaptive data rate moves a device to the fastest rate and lowest power that still reach it. Once uplinks go unanswered, this says when to ask the network to answer and which of those settings to give back, a step at a time, as LoRaWAN 1.0.3 or TS001-1.0.4 describes.

Constructors

LorawanBackoff(LorawanVersion, uint, uint)

Starts a count from zero.

public LorawanBackoff(LorawanVersion version = LorawanVersion.V1_0_4, uint limit = 64, uint delay = 32)

Parameters

version LorawanVersion

The revision whose steps to follow.

limit uint

How many unanswered uplinks before asking.

delay uint

How many more before the first step, and between steps after that. Zero is taken as one.

Exceptions

PamojaException

The version names no revision.

Properties

Counter

How many uplinks have gone unanswered.

public uint Counter { get; }

Property Value

uint

Version

The revision whose steps this count follows.

public LorawanVersion Version { get; }

Property Value

LorawanVersion

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Counts a Class A downlink, which proves the network still hears the device.

public void Downlink()

Counts one new uplink, and says what to do before sending it.

public LorawanBackoffStep Uplink(bool atDefaultDataRate)

Parameters

atDefaultDataRate bool

Whether the device is already at its default data rate, the slowest it uses.

Returns

LorawanBackoffStep

Whether to ask for an answer, and which step this uplink takes.

Call it once per uplink the frame counter moves for; a repeat of the same uplink does not count.