Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue 635 - make session expiry interval in connack optional #52

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 24 additions & 22 deletions mqtt-sn-2.0/prose/edit/src/images/packet/connack-packet-diagram.edn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;; This is the source for 3.1.5 CONNACK packet diagram of MQTT-SN v2.0.
(def boxes-per-row 9)
(def box-width 145)
(def box-width 90)
(def left-margin 20)
(defattrs :plain {:font-family "Arial" :font-size 18})
(defattrs :cursive {:font-family "Arial" :font-size 18 :font-style "italic"})
Expand All @@ -9,6 +9,7 @@
(defattrs :bg-lightgray {:fill "#eeeeee"})
;;(defattrs :left {:text-anchor "start"})
(defattrs :byte {:span 8})
(defattrs :field-name {:span 9 :text-anchor "start"})

(defn row-header-fn
[{:keys [address gap?]}]
Expand All @@ -25,21 +26,21 @@
(draw-box (text "2"))
(draw-box "Packet Type" :byte)

(draw-box (text ""))
(draw-box (text "CONNACK FLAGS") [:bg-mediumgray :byte])
(draw-box (text "Connack Flags") [:bg-mediumgray :field-name])

(draw-box (text ""))
(draw-box "Reserved" [:bg-lightgray {:span 6}])
(draw-box "Reserved" [:bg-lightgray {:span 5}])
(draw-box "Auth" [:bg-lightgray {:span 1}])
(draw-box "Session Present" [:bg-lightgray {:span 1}])
(draw-box "Sess Exp" [:bg-lightgray {:span 1}])
(draw-box "Sess Pres" [:bg-lightgray {:span 1}])

(draw-box (text "3"))
(draw-box "0" {:span 1})
(draw-box "0" {:span 1})
(draw-box "0" {:span 1})
(draw-box "0" {:span 1})
(draw-box "0" {:span 1})
(draw-box "0" {:span 1})
(draw-box "X" {:span 1})
(draw-box "X" {:span 1})
(draw-box "X" {:span 1})

Expand All @@ -52,37 +53,38 @@
(draw-box (text "6"))
(draw-box "Reason Code" :byte)

(draw-box (text "7"))
(draw-box "Session Expiry Interval MSB" :byte)
(draw-box (text "Session Expiry" :plain [:cursive " [optional] (only when Sess Exp flag set)"]) [:bg-mediumgray :field-name])

(draw-box (text "8"))
(draw-box "Session Expiry Interval" :byte)
(draw-box (text "7") :bg-lightgray)
(draw-box "Session Expiry Interval MSB" [:bg-lightgray :byte])

(draw-box (text "9"))
(draw-box "Session Expiry Interval" :byte)
(draw-box (text "8") :bg-lightgray)
(draw-box "Session Expiry Interval" [:bg-lightgray :byte])

(draw-box (text "10"))
(draw-box "Session Expiry Interval LSB" :byte)
(draw-box (text "9") :bg-lightgray)
(draw-box "Session Expiry Interval" [:bg-lightgray :byte])

(draw-box (text ""))
(draw-box (text "AUTH DATA" :plain [:cursive "[OPT] (ONLY WHEN AUTH FLAG SET)"]) [:bg-mediumgray :byte])
(draw-box (text "10") :bg-lightgray)
(draw-box "Session Expiry Interval LSB" [:bg-lightgray :byte])

(draw-box (text "Authentication" :plain [:cursive " [optional] (only when Auth flag set)"]) [:bg-mediumgray :field-name])

(draw-box (text "10+1") :bg-lightgray)
(draw-box "Auth Method Length" [:bg-lightgray :byte])
(draw-box "Authentication Method Length" [:bg-lightgray :byte])

(draw-box (text "10+2") :bg-lightgray)
(draw-box "Auth Method" [:bg-lightgray :byte])
(draw-box "Authentication Method" [:bg-lightgray :byte])

(draw-box (text "10+3") :bg-lightgray)
(draw-box "Auth Data Length MSB" [:bg-lightgray :byte])
(draw-box "Authentication Data Length MSB" [:bg-lightgray :byte])

(draw-box (text "10+4") :bg-lightgray)
(draw-box "Auth Data Length LSB" [:bg-lightgray :byte])
(draw-box "Authentication Data Length LSB" [:bg-lightgray :byte])

(draw-box (text "10+5") :bg-lightgray)
(draw-gap "Auth Data (K)" [:bg-lightgray :byte])
(draw-gap "Authentication Data (K)" [:bg-lightgray :byte])

(draw-box (text "11+K ... N") :bg-lightgray)
(draw-gap (text "Assigned Client Identifier [OPT] (N)") [:bg-lightgray :byte])
(draw-gap (text "Assigned Client Identifier [optional] (N)") [:bg-lightgray :byte])

(draw-bottom)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading