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

    Class DutyCycle

    The silence a radio owes after its transmissions under a duty-cycle limit.

    Index
    • Creates a guard for a limit in parts per thousand, ready to transmit at once.

      10 is 1%; 0 forbids transmitting and 1000 or more imposes no silence.

      Parameters

      • permille: number

      Returns DutyCycle

    • get earliestUs(): number | null

      The earliest time the next transmission may start, in microseconds on the caller's clock, or null when the limit forbids transmitting.

      Returns number | null

    • get permille(): number

      The limit the guard enforces, in parts per thousand.

      Returns number

    • Whether a transmission may start at a time in microseconds on the caller's clock.

      Parameters

      • nowUs: number

      Returns boolean

    • Records a transmission and the silence it owes, returning its airtime in microseconds.

      Parameters

      • startedUs: number
      • link: LoraLink
      • payloadLength: number

      Returns number

    • How long the radio must still stay silent, in microseconds, or null when the limit forbids transmitting.

      Parameters

      • nowUs: number

      Returns number | null