-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.xml
262 lines (230 loc) · 12.7 KB
/
schema.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<?xml version="1.0" encoding="UTF-8"?>
<schema name="cc_mqttsn" endian="big" dslVersion="6">
<platform name="Prot" />
<platform name="Gw" />
<platform name="Fwd" />
<fields>
<string name="AdvertiseName" defaultValue="ADVERTISE" />
<string name="SearchgwName" defaultValue="SEARCHGW" />
<string name="GwinfoName" defaultValue="GWINFO" />
<string name="ConnectName" defaultValue="CONNECT" />
<string name="ConnackName" defaultValue="CONNACK" />
<string name="WilltopicreqName" defaultValue="WILLTOPICREQ" />
<string name="WilltopicName" defaultValue="WILLTOPIC" />
<string name="WillmsgreqName" defaultValue="WILLMSGREQ" />
<string name="WillmsgName" defaultValue="WILLMSG" />
<string name="RegisterName" defaultValue="REGISTER" />
<string name="RegackName" defaultValue="REGACK" />
<string name="PublishName" defaultValue="PUBLISH" />
<string name="PubackName" defaultValue="PUBACK" />
<string name="PubcompName" defaultValue="PUBCOMP" />
<string name="PubrecName" defaultValue="PUBREC" />
<string name="PubrelName" defaultValue="PUBREL" />
<string name="SubscribeName" defaultValue="SUBSCRIBE" />
<string name="SubackName" defaultValue="SUBACK" />
<string name="UnsubscribeName" defaultValue="UNSUBSCRIBE" />
<string name="UnsubackName" defaultValue="UNSUBACK" />
<string name="PingreqName" defaultValue="PINGREQ" />
<string name="PingrespName" defaultValue="PINGRESP" />
<string name="DisconnectName" defaultValue="DISCONNECT" />
<string name="WilltopicupdName" defaultValue="WILLTOPICUPD" />
<string name="WilltopicrespName" defaultValue="WILLTOPICRESP" />
<string name="WillmsgupdName" defaultValue="WILLMSGUPD" />
<string name="WillmsgrespName" defaultValue="WILLMSGRESP" />
<string name="FwdName" defaultValue="FWD" />
<enum name="MsgId" type="uint8" semanticType="messageId" hexAssign="true">
<validValue name="Advertise" val="0x0" displayName="^AdvertiseName" />
<validValue name="Searchgw" val="0x1" displayName="^SearchgwName" />
<validValue name="Gwinfo" val="0x2" displayName="^GwinfoName" />
<validValue name="Connect" val="0x4" displayName="^ConnectName" />
<validValue name="Connack" val="0x5" displayName="^ConnackName" />
<validValue name="Willtopicreq" val="0x6" displayName="^WilltopicreqName" />
<validValue name="Willtopic" val="0x7" displayName="^WilltopicName" />
<validValue name="Willmsgreq" val="0x8" displayName="^WillmsgreqName" />
<validValue name="Willmsg" val="0x9" displayName="^WillmsgName" />
<validValue name="Register" val="0xa" displayName="^RegisterName" />
<validValue name="Regack" val="0xb" displayName="^RegackName" />
<validValue name="Publish" val="0xc" displayName="^PublishName" />
<validValue name="Puback" val="0xd" displayName="^PubackName" />
<validValue name="Pubcomp" val="0xe" displayName="^PubcompName" />
<validValue name="Pubrec" val="0xf" displayName="^PubrecName" />
<validValue name="Pubrel" val="0x10" displayName="^PubrelName" />
<validValue name="Subscribe" val="0x12" displayName="^SubscribeName" />
<validValue name="Suback" val="0x13" displayName="^SubackName" />
<validValue name="Unsubscribe" val="0x14" displayName="^UnsubscribeName" />
<validValue name="Unsuback" val="0x15" displayName="^UnsubackName" />
<validValue name="Pingreq" val="0x16" displayName="^PingreqName" />
<validValue name="Pingresp" val="0x17" displayName="^PingrespName" />
<validValue name="Disconnect" val="0x18" displayName="^DisconnectName" />
<validValue name="Willtopicupd" val="0x1a" displayName="^WilltopicupdName" />
<validValue name="Willtopicresp" val="0x1b" displayName="^WilltopicrespName" />
<validValue name="Willmsgupd" val="0x1c" displayName="^WillmsgupdName" />
<validValue name="Willmsgresp" val="0x1d" displayName="^WillmsgrespName" />
<validValue name="Fwd" val="0xfe" displayName="^FwdName" />
</enum>
<bundle name="MsgLengthField" displayName="Length" semanticType="length" valueOverride="replace">
<int name="short" type="uint8" serOffset="1" displayOffset="1"/>
<optional name="long" cond="$short = 0">
<int name="long" type="uint16" serOffset="3" displayOffset="3"/>
</optional>
</bundle>
<int name="GwId" type="uint8" />
<int name="Duration" type="uint16" units="seconds" />
<int name="Radius" type="uint8">
<special name="BroadcastToAll" val="0" />
</int>
<data name="GwAdd" />
<enum name="Qos" type="uint8">
<validValue name="AtMostOnceDelivery" val="0" />
<validValue name="AtLeastOnceDelivery" val="1" />
<validValue name="ExactlyOnceDelivery" val="2" />
<validValue name="NoGwPublish" val="3" />
</enum>
<enum name="TopicIdType" type="uint8">
<validValue name="Normal" val="0" />
<validValue name="PredefinedTopicId" val="1" />
<validValue name="ShortTopicName" val="2" />
</enum>
<bitfield name="Flags">
<ref field="TopicIdType" bitLength="2" />
<set name="mid" bitLength="3" displayName="_">
<bit name="CleanSession" idx="0" />
<bit name="Will" idx="1" />
<bit name="Retain" idx="2" />
</set>
<ref field="Qos" bitLength="2" />
<set name="high" bitLength="1" displayName="_">
<bit name="Dup" idx="0" />
</set>
</bitfield>
<int name="ProtocolId" type="uint8" defaultValue="0x1" validValue="0x1" />
<string name="ClientId" />
<enum name="ReturnCode" type="uint8">
<validValue name="Accepted" val="0" />
<validValue name="Congestion" val="1" />
<validValue name="InvalidTopicId" val="2" />
<validValue name="NotSupported" val="3" />
</enum>
<string name="WillTopic" />
<data name="WillMsg" />
<int name="TopicId" type="uint16" validRange="[0x0, 0xfffe]" />
<int name="MessageId" type="uint16" displayName="MsgId"/>
<string name="TopicName" />
<data name="Data" />
<bitfield name="Ctrl">
<ref field="Radius" bitLength="2" />
<int name="Reserved" type="uint8" defaultValidValue="0" bitLength="6" />
</bitfield>
<data name="NodeId" />
</fields>
<frame name="Frame">
<size name="Length" field="MsgLengthField" />
<id name="Id" field="MsgId" />
<payload name="Data" />
</frame>
<message name="Advertise" id="MsgId.Advertise" displayName="^AdvertiseName" sender="server">
<ref field="GwId" />
<ref field="Duration" />
</message>
<message name="Searchgw" id="MsgId.Searchgw" displayName="^SearchgwName">
<ref field="Radius" />
</message>
<message name="Gwinfo" id="MsgId.Gwinfo" displayName="^GwinfoName">
<ref field="GwId" />
<ref field="GwAdd" />
</message>
<message name="Connect" id="MsgId.Connect" displayName="^ConnectName" sender="client" platforms="+Prot,Gw">
<ref field="Flags" />
<ref field="ProtocolId" />
<ref field="Duration" />
<ref field="ClientId" />
</message>
<message name="Connack" id="MsgId.Connack" displayName="^ConnackName" sender="server" platforms="+Prot,Gw">
<ref field="ReturnCode" />
</message>
<message name="Willtopicreq" id="MsgId.Willtopicreq" displayName="^WilltopicreqName" sender="server" platforms="+Prot,Gw" />
<message name="Willtopic" id="MsgId.Willtopic" displayName="^WilltopicName" readOverride="replace" refreshOverride="replace" sender="client" platforms="+Prot,Gw">
<optional name="Flags" defaultMode="tentative">
<ref field="Flags" name="FlagsField" />
</optional>
<ref field="WillTopic" />
</message>
<message name="Willmsgreq" id="MsgId.Willmsgreq" displayName="^WillmsgreqName" sender="server" platforms="+Prot,Gw" />
<message name="Willmsg" id="MsgId.Willmsg" displayName="^WillmsgName" sender="client" platforms="+Prot,Gw">
<ref field="WillMsg" />
</message>
<message name="Register" id="MsgId.Register" displayName="^RegisterName" platforms="+Prot,Gw">
<ref field="TopicId" />
<ref name="MsgId" field="MessageId" />
<ref field="TopicName" />
</message>
<message name="Regack" id="MsgId.Regack" displayName="^RegackName" platforms="+Prot,Gw">
<ref field="TopicId" />
<ref name="MsgId" field="MessageId" />
<ref field="ReturnCode" />
</message>
<message name="Publish" id="MsgId.Publish" displayName="^PublishName" platforms="+Prot,Gw">
<ref field="Flags" />
<ref field="TopicId" />
<ref name="MsgId" field="MessageId" />
<ref field="Data" />
</message>
<message name="Puback" id="MsgId.Puback" displayName="^PubackName" platforms="+Prot,Gw">
<ref field="TopicId" />
<ref name="MsgId" field="MessageId" />
<ref field="ReturnCode" />
</message>
<message name="Pubrec" id="MsgId.Pubrec" displayName="^PubrecName" platforms="+Prot,Gw">
<ref name="MsgId" field="MessageId" />
</message>
<message name="Pubrel" id="MsgId.Pubrel" displayName="^PubrelName" copyFieldsFrom="Pubrec" platforms="+Prot,Gw" />
<message name="Pubcomp" id="MsgId.Pubcomp" displayName="^PubcompName" copyFieldsFrom="Pubrec" platforms="+Prot,Gw" />
<message name="Subscribe" id="MsgId.Subscribe" displayName="^SubscribeName" sender="client" platforms="+Prot,Gw">
<ref field="Flags" />
<ref name="MsgId" field="MessageId" />
<optional name="TopicId" defaultMode="exists" displayExtModeCtrl="true" cond="$Flags.TopicIdType != TopicIdType.Normal">
<ref field="TopicId" />
</optional>
<optional name="TopicName" defaultMode="missing" displayExtModeCtrl="true" cond="$Flags.TopicIdType = TopicIdType.Normal">
<ref field="TopicName" />
</optional>
</message>
<message name="Suback" id="MsgId.Suback" displayName="^SubackName" sender="server" platforms="+Prot,Gw">
<ref field="Flags" />
<ref field="TopicId" />
<ref name="MsgId" field="MessageId" />
<ref field="ReturnCode" />
</message>
<message name="Unsubscribe" id="MsgId.Unsubscribe" displayName="^UnsubscribeName" copyFieldsFrom="Subscribe" sender="client" platforms="+Prot,Gw" />
<message name="Unsuback" id="MsgId.Unsuback" displayName="^UnsubackName" sender="server" platforms="+Prot,Gw">
<ref name="MsgId" field="MessageId" />
</message>
<message name="Pingreq" id="MsgId.Pingreq" displayName="^PingreqName" platforms="+Prot,Gw">
<ref field="ClientId" />
</message>
<message name="Pingresp" id="MsgId.Pingresp" displayName="^PingrespName" platforms="+Prot,Gw" />
<message name="Disconnect" id="MsgId.Disconnect" displayName="^DisconnectName" platforms="+Prot,Gw">
<optional name="Duration" defaultMode="tentative">
<ref field="Duration" />
</optional>
</message>
<message name="Willtopicupd" id="MsgId.Willtopicupd" displayName="^WilltopicupdName" readOverride="replace" refreshOverride="replace" sender="client" platforms="+Prot,Gw">
<optional name="Flags" defaultMode="tentative">
<ref field="Flags" name="FlagsField" />
</optional>
<ref field="WillTopic" />
</message>
<message name="Willmsgupd" id="MsgId.Willmsgupd" displayName="^WillmsgupdName" sender="client" platforms="+Prot,Gw">
<ref field="WillMsg" />
</message>
<message name="Willtopicresp" id="MsgId.Willtopicresp" displayName="^WilltopicrespName" sender="server" platforms="+Prot,Gw">
<ref field="ReturnCode" />
</message>
<message name="Willmsgresp" id="MsgId.Willmsgresp" displayName="^WillmsgrespName" sender="server" platforms="+Prot,Gw">
<copyFieldsFrom value="Willtopicresp" />
</message>
<message name="Fwd" id="MsgId.Fwd" displayName="^FwdName" platforms="+Gw,Fwd">
<ref field="Ctrl" />
<ref field="NodeId" />
</message>
</schema>