Uploaded image for project: 'OASIS Message Queuing Telemetry Transport (MQTT) TC'
  1. OASIS Message Queuing Telemetry Transport (MQTT) TC
  2. MQTT-540

Messages shorter than 256 octets may use the 1-octet format

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Applied
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: MQTT-SN-1.2
    • Fix Version/s: wd04
    • Component/s: MQTT-SN
    • Labels:
      None
    • Proposal:
      Hide

      In section 5.2.1, change

      "smaller than 256 octets"

      to

      "up to and including 255 octets"

       

      rather than "may use the shorter 1-octet format", it should be "MUST use the shorter 1-octet format"

       

      Show
      In section 5.2.1, change "smaller than 256 octets" to "up to and including 255 octets"   rather than "may use the shorter 1-octet format", it should be "MUST use the shorter 1-octet format"  

      Description

      5.2.1 Length

      Via Tomoaki Yamaguchi.

      The Length field is either 1- or 3-octet long and specifies the total number of octets contained in the message (including the Length field itself).
      If the first octet of the Length field is coded “0x01” then the Length field is 3-octet long; in this case, the two following octets specify the total number of octets of the message (most-significant octet first). Otherwise, the Length field is only 1-octet long and specifies itself the total number of octets contained in the message.
      The 3-octet format allows the encoding of message lengths up to 65535 octets. Messages with lengths smaller than 256 octets may use the shorter 1-octet format. 5.2.1 Length
      The Length field is either 1- or 3-octet long and specifies the total number of octets contained in the message (including the Length field itself).
      If the first octet of the Length field is coded “0x01” then the Length field is 3-octet long; in this case, the two following octets specify the total number of octets of the message (most-significant octet first). Otherwise, the Length field is only 1-octet long and specifies itself the total number of octets contained in the message.
      The 3-octet format allows the encoding of message lengths up to 65535 octets. Messages with lengths smaller than 256 octets may use the shorter 1-octet format. 256 should be changed to 255.    255 + 1 = 256 but the hex value of 256 is 2 octet.   254 + 1 = 255 = 0xff.    255 + 3 = 258 = 0x0102

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ian.craggs Ian Craggs
                Reporter:
                ian.craggs Ian Craggs
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: