pamoja for TypeScript - v0.2.0
    Preparing search index...

    Class Backoff

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

    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, the way LoRaWAN 1.0.3 or TS001-1.0.4 describes.

    const backoff = new Backoff(Version.V1_0_4)
    const step = backoff.uplink(dataRate === 0)
    if (step.lowerDataRate) dataRate -= 1
    Index
    • Starts a count from zero.

      Parameters

      • version: LorawanVersion = Version.V1_0_4

        The revision whose steps to follow, TS001-1.0.4 by default.

      • Optionallimit: number

        How many unanswered uplinks before asking, 64 by default.

      • Optionaldelay: number

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

      Returns Backoff

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

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

      Parameters

      • atDefaultDataRate: boolean

        Whether the device is already at its default data rate, the slowest it uses, so there is no lower rate to step to.

      Returns BackoffStep

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