Function commandEncode

  • Encode a command with the given length of the data that follows.

    Parameters

    • cmd: number

      the command

    • len: number

      the length

    Returns number

    • the encoded command and length into a single number