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

    Class LorawanDefragmenter

    A fragmentation session being put back together, TS004-2.0.0 appendix A.2.

    The uncoded fragments go straight into the block. A coded fragment is reduced against everything already known and kept only if it says something new, so the working memory is sized by the losses rather than by the block.

    Index
    • Opens a session for a block of nbFrag fragments of fragSize bytes.

      maxLost is the most uncoded fragments to be able to solve for, which decides how much working memory the session takes.

      Parameters

      • nbFrag: number
      • fragSize: number
      • maxLost: number

      Returns LorawanDefragmenter

    • get block(): Buffer

      The block, as far as it has been put back together, padding and all.

      Returns Buffer

    • get done(): boolean

      Whether the whole block is there.

      Returns boolean

    • get missing(): number

      How many uncoded fragments are still missing.

      Returns number

    • get received(): number

      How many fragments arrived, coded, uncoded and repeated.

      Returns number

    • Takes one fragment of the session, counting from one.

      Returns true once the block is whole.

      Parameters

      • n: number
      • data: Buffer

      Returns boolean