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

    Function macParse

    • Reads the commands packed into a frame options field, or a payload sent on port 0.

      The same identifier means a different command in each direction, so the direction decides what is read and there is no default: 0x03 going down is a request to change data rate, and the same byte coming up answers one.

      A command does not carry its own length, so a reader that meets one this build does not know cannot step over it. Reading stops there and returns what came before, rather than guessing.

      Parameters

      • direction: LorawanDirection

        Which way the frame carrying them travels.

      • bytes: Uint8Array

        The options field, or the payload from port 0.

      Returns LorawanMacCommand[]

      The commands that were readable, in order.