OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

mqtt message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (MQTT-540) Messages shorter than 256 octets may use the 1-octet format


    [ https://issues.oasis-open.org/browse/MQTT-540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=76838#comment-76838 ] 

Simon Johnson commented on MQTT-540:
------------------------------------

Both issues related to the specification of the message length

> Messages shorter than 256 octets may use the 1-octet format
> -----------------------------------------------------------
>
>                 Key: MQTT-540
>                 URL: https://issues.oasis-open.org/browse/MQTT-540
>             Project: OASIS Message Queuing Telemetry Transport (MQTT) TC
>          Issue Type: Improvement
>          Components: MQTT-SN
>    Affects Versions: MQTT-SN-1.2
>            Reporter: Ian Craggs
>            Priority: Trivial
>
> 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
> Â



--
This message was sent by Atlassian Jira
(v8.3.3#803004)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]