-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmodel.go
1544 lines (1283 loc) · 31.2 KB
/
model.go
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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package znp
type StatusResponse struct {
Status Status
}
// =======AF=======
type AfRegister struct {
EndPoint uint8
AppProfID uint16
AppDeviceID uint16
AddDevVer uint8
LatencyReq Latency
AppInClusterList []uint16 `size:"1"`
AppOutClusterList []uint16 `size:"1"`
}
type AfDataRequestOptions struct {
WildcardProfileID uint8 `bits:"0b00000010" bitmask:"start" `
APSAck uint8 `bits:"0b00010000"`
DiscoverRoute uint8 `bits:"0b00100000"`
APSSecurity uint8 `bits:"0b01000000"`
SkipRouting uint8 `bits:"0b10000000" bitmask:"end" `
}
type AfDataRequest struct {
DstAddr string `hex:"2"`
DstEndpoint uint8
SrcEndpoint uint8
ClusterID uint16
TransID uint8
Options *AfDataRequestOptions
Radius uint8
Data []uint8 `size:"1"`
}
type AfDataRequestExt struct {
DstAddrMode AddrMode
DstAddr string `hex:"8"`
DstEndpoint uint8
DstPanID uint16 //PAN - personal area networks
SrcEndpoint uint8
ClusterID uint16
TransID uint8
Options *AfDataRequestOptions
Radius uint8
Data []uint8 `size:"2"`
}
type AfDataRequestSrcRtgOptions struct {
APSAck uint8 `bits:"0b00000001" bitmask:"start`
APSSecurity uint8 `bits:"0b00000100"`
SkipRouting uint8 `bits:"0b00001000" bitmask:"end" `
}
type AfDataRequestSrcRtg struct {
DstAddr string `hex:"2"`
DstEndpoint uint8
SrcEndpoint uint8
ClusterID uint16
TransID uint8
Options *AfDataRequestSrcRtgOptions
Radius uint8
RelayList []string `size:"1" hex:"2"`
Data []uint8 `size:"1"`
}
type AfInterPanCtlData interface {
AfInterPanCtlData()
}
type AfInterPanClrData struct{}
func (a *AfInterPanClrData) AfInterPanCtlData() {}
type AfInterPanSetData struct {
Channel uint8
}
func (a *AfInterPanSetData) AfInterPanCtlData() {}
type AfInterPanRegData struct {
Endpoint uint8
}
func (a *AfInterPanRegData) AfInterPanCtlData() {}
type AfInterPanChkData struct {
PanID uint16
Endpoint uint8
}
func (a *AfInterPanChkData) AfInterPanCtlData() {}
type AfInterPanCtl struct {
Command InterPanCommand
Data AfInterPanCtlData
}
type AfDataRetrieve struct {
Timestamp uint32
Index uint16
Length uint8
}
type AfDataRetrieveResponse struct {
Status StatusResponse
Data []uint8 `size:"1"`
}
type AfApsfConfigSet struct {
Endpoint uint8
FrameDelay uint8
WindowSize uint8
}
type AfDataConfirm struct {
Status Status
Endpoint uint8
TransID uint8
}
type AfReflectError struct {
Status Status
Endpoint uint8
TransID uint8
DstAddrMode AddrMode
DstAddr string `hex:"2"`
}
type AfIncomingMessage struct {
GroupID uint16
ClusterID uint16
SrcAddr string `hex:"2"`
SrcEndpoint uint8
DstEndpoint uint8
WasBroadcast uint8
LinkQuality uint8
SecurityUse uint8
Timestamp uint32
TransSeqNumber uint8
Data []uint8 `size:"1"`
}
type AfDataStore struct {
Index uint16
Data []uint8 `size:"1"`
}
type AfIncomingMessageExt struct {
GroupID uint16
ClusterID uint16
SrcAddrMode AddrMode
SrcAddr string `hex:"8"`
SrcEndpoint uint8
SrcPanID uint16
DstEndpoint uint8
WasBroadcast uint8
LinkQuality uint8
SecurityUse uint8
Timestamp uint32
TransSeqNumber uint8
Data []uint8 `size:"2"`
}
// =======APP=======
type AppMsg struct {
AppEndpoint uint8
DstAddr string `hex:"2"`
DstEndpoint uint8
ClusterID uint16
Message []uint8 `size:"1"`
}
type AppUserTest struct {
SrcEndpoint uint8
CommandID uint16
Parameter1 uint16
Parameter2 uint16
}
// =======DEBUG=======
type DebugSetThreshold struct {
ComponentID uint8
Threshold uint8
}
type DebugMsg struct {
String string `size:"1"`
}
// =======SAPI=======
type EmptyResponse struct{}
type SapiZbPermitJoiningRequest struct {
Destination string `hex:"2"`
Timeout uint8
}
type SapiZbBindDevice struct {
Create uint8
CommandID uint16
Destination string `hex:"8"`
}
type SapiZbAllowBind struct {
Timeout uint8
}
type SapiZbSendDataRequest struct {
Destination string `hex:"2"`
CommandID uint16
Handle uint8
Ack uint8
Radius uint8
Data []uint8 `size:"1"`
}
type SapiZbReadConfiguration struct {
ConfigID uint8
}
type SapiZbReadConfigurationResponse struct {
Status Status
ConfigID uint8
Value []uint8 `size:"1"`
}
type SapiZbWriteConfiguration struct {
ConfigID uint8
Value []uint8 `size:"1"`
}
type SapiZbGetDeviceInfo struct {
Param uint8
}
type SapiZbGetDeviceInfoResponse struct {
Param uint8
Value uint16
}
type SapiZbFindDeviceRequest struct {
SearchKey string `hex:"8"`
}
type SapiZbStartConfirm struct {
Status Status
}
type SapiZbBindConfirm struct {
CommandID uint16
Status Status
}
type SapiZbAllowBindConfirm struct {
Source string `hex:"2"`
}
type SapiZbSendDataConfirm struct {
Handle uint8
Status Status
}
type SapiZbReceiveDataIndication struct {
Source string `hex:"2"`
CommandID uint16
Data []uint8 `size:"1"`
}
type SapiZbFindDeviceConfirm struct {
SearchType uint8
Result string `hex:"2"`
SearchKey string `hex:"8"`
}
// =======SYS=======
type SysResetReq struct {
//This command will reset the device by using a hardware reset (i.e.
//watchdog reset) if ‘Type’ is zero. Otherwise a soft reset (i.e. a jump to the
//reset vector) is done. This is especially useful in the CC2531, for
//instance, so that the USB host does not have to contend with the USB
//H/W resetting (and thus causing the USB host to re-enumerate the device
//which can cause an open virtual serial port to hang.)
ResetType byte
}
//Capabilities represents the interfaces that this device can handle (compiled into the device)
type Capabilities struct {
Sys uint16 `bitmask:"start" bits:"0x0001"`
Mac uint16 `bits:"0x0002"`
Nwk uint16 `bits:"0x0004"`
Af uint16 `bits:"0x0008"`
Zdo uint16 `bits:"0x0010"`
Sapi uint16 `bits:"0x0020"`
Util uint16 `bits:"0x0040"`
Debug uint16 `bits:"0x0080"`
App uint16 `bits:"0x0100"`
Zoad uint16 `bitmask:"end" bits:"0x1000"`
}
type SysPingResponse struct {
Capabilities *Capabilities
}
type SysVersionResponse struct {
TransportRev uint8 //Transport protocol revision
Product uint8 //Product Id
MajorRel uint8 //Software major release number
MinorRel uint8 //Software minor release number
MaintRel uint8 //Software maintenance release number
}
type SysSetExtAddr struct {
ExtAddress string `hex:"8"` //The device’s extended address.
}
type SysGetExtAddrResponse struct {
ExtAddress string `hex:"8"` //The device’s extended address.
}
type SysRamRead struct {
Address uint16 //Address of the memory that will be read.
Len uint8 //The number of bytes that will be read from the target RAM.
}
type SysRamReadResponse struct {
Status uint8 //Status is either Success (0) or Failure (1).
Value []uint8 `size:"1"` //The value read from the target RAM.
}
type SysRamWrite struct {
Address uint16 //Address of the memory that will be written.
Value []uint8 `size:"1"` //The value written to the target RAM.
}
type SysOsalNvRead struct {
ID uint16
Offset uint8
}
type SysOsalNvReadResponse struct {
Status Status
Value []uint8 `size:"1"`
}
type SysOsalNvWrite struct {
ID uint16
Offset uint8
Value []uint8 `size:"1"`
}
type SysOsalNvItemInit struct {
ID uint16
ItemLen uint16
InitData []uint8 `size:"1"`
}
type SysOsalNvDelete struct {
ID uint16
ItemLen uint16
}
type SysOsalNvLength struct {
ID uint16
}
type SysOsalNvLengthResponse struct {
Length uint16
}
type SysOsalStartTimer struct {
ID uint8
Timeout uint16
}
type SysOsalStopTimer struct {
ID uint8
}
type SysRandomResponse struct {
Value uint16
}
type SysAdcRead struct {
Channel Channel
Resolution Resolution
}
type SysAdcReadResponse struct {
Value uint16
}
type SysGpio struct {
Operation Operation
Value uint8
}
type SysGpioResponse struct {
Value uint8
}
type SysTime struct {
UTCTime uint32
Hour uint8
Minute uint8
Second uint8
Month uint8
Day uint8
Year uint16
}
type SysSetTxPower struct {
TXPower uint8
}
type SysSetTxPowerResponse struct {
TXPower uint8
}
type SysZDiagsClearStats struct {
ClearNV uint8
}
type SysZDiagsClearStatsResponse struct {
SysClock uint32
}
type SysZDiagsGetStats struct {
AttributeID uint16
}
type SysZDiagsGetStatsResponse struct {
AttributeValue uint32
}
type SysZDiagsSaveStatsToNvResponse struct {
SysClock uint32
}
type SysNvCreate struct {
SysID uint8
ItemID uint16
SubID uint16
Length uint32
}
type SysNvDelete struct {
SysID uint8
ItemID uint16
SubID uint16
}
type SysNvLength struct {
SysID uint8
ItemID uint16
SubID uint16
}
type SysNvLengthResponse struct {
Length uint8
}
type SysNvRead struct {
SysID uint8
ItemID uint16
SubID uint16
Offset uint16
Length uint8
}
type SysNvReadResponse struct {
Status Status
Value []uint8 `size:"1"`
}
type SysNvWrite struct {
SysID uint8
ItemID uint16
SubID uint16
Offset uint16
Value []uint8 `size:"1"`
}
type SysNvUpdate struct {
SysID uint8
ItemID uint16
SubID uint16
Value []uint8 `size:"1"`
}
type SysNvCompact struct {
Threshold uint16
}
type SysNvReadExt struct {
ID uint16
Offset uint16
}
type SysNvWriteExt struct {
ID uint16
Offset uint16
Value []uint8 `size:"1"`
}
type SysResetInd struct {
Reason Reason
TransportRev uint8
Product uint8
MinorRel uint8
HwRev uint8
}
type SysOsalTimerExpired struct {
ID uint8
}
// =======UTIL=======
type DeviceType struct {
Coordinator uint8 `bits:"0x01" bitmask:"start"`
Router uint8 `bits:"0x02"`
EndDevice uint8 `bits:"0x04" bitmask:"end"`
}
type UtilGetDeviceInfoResponse struct {
Status Status
IEEEAddr string `hex:"8"`
ShortAddr string `hex:"2"`
DeviceType *DeviceType
DeviceState DeviceState
AssocDevicesList []string `size:"1" hex:"2"`
}
type NvInfoStatus struct {
IEEEAddress Status `bits:"0b00000001" bitmask:"start"`
ScanChannels Status `bits:"0b00000010"`
PanID Status `bits:"0b00000100"`
SecurityLevel Status `bits:"0b00001000"`
PreConfigKey Status `bits:"0b00010000" bitmask:"end"`
}
type UtilGetNvInfoResponse struct {
Status *NvInfoStatus
IEEEAddr string `hex:"8"`
ScanChannels uint32
PanID uint16
SecurityLevel uint8
PreConfigKey [16]uint8
}
type UtilSetPanId struct {
PanID uint16
}
type UtilSetChannels struct {
Channels *Channels
}
type UtilSetSecLevel struct {
SecLevel uint8
}
type UtilSetPreCfgKey struct {
PreCfgKey [16]uint8
}
type UtilCallbackSubCmd struct {
SubsystemID SubsystemId
Action Action
}
type Keys struct {
Key1 uint8 `bits:"0x01" bitmask:"start"`
Key2 uint8 `bits:"0x02"`
Key3 uint8 `bits:"0x04"`
Key4 uint8 `bits:"0x08"`
Key5 uint8 `bits:"0x10"`
Key6 uint8 `bits:"0x20"`
Key7 uint8 `bits:"0x40"`
Key8 uint8 `bits:"0x80" bitmask:"end"`
}
type UtilKeyEvent struct {
Keys *Keys
Shift Shift
}
type UtilTimeAliveResponse struct {
Seconds uint32
}
type UtilLedControl struct {
LedID uint8
Mode Mode
}
type UtilLoopback struct {
Data []uint8
}
type UtilDataReq struct {
SecurityUse uint8
}
type UtilSrcMatchAddEntry struct {
AddrMode AddrMode
Address string `hex:"8"`
PanID uint16
}
type UtilSrcMatchDelEntry struct {
AddrMode AddrMode
Address string `hex:"8"`
PanID uint16
}
type UtilSrcMatchCheckSrcAddr struct {
AddrMode AddrMode
Address string `hex:"8"`
PanID uint16
}
type UtilSrcMatchAckAllPending struct {
Option Action
}
type UtilSrcMatchCheckAllPendingResponse struct {
Status Status
Value uint8
}
type UtilAddrMgrExtAddrLookup struct {
ExtAddr string `hex:"8"`
}
type UtilAddrMgrExtAddrLookupResponse struct {
NwkAddr string `hex:"2"`
}
type UtilAddrMgrAddrLookup struct {
NwkAddr string `hex:"2"`
}
type UtilAddrMgrAddrLookupResponse struct {
ExtAddr string `hex:"8"`
}
type UtilApsmeLinkKeyDataGet struct {
ExtAddr string `hex:"8"`
}
type UtilApsmeLinkKeyDataGetResponse struct {
Status Status
SecKey [16]uint8
TxFrmCntr uint32
RxFrmCntr uint32
}
type UtilApsmeLinkKeyNvIdGet struct {
ExtAddr string `hex:"8"`
}
type UtilApsmeLinkKeyNvIdGetResponse struct {
Status Status
LinkKeyNvId uint16
}
type UtilApsmeRequestKeyCmd struct {
PartnerAddr string `hex:"8"`
}
type UtilAssocCount struct {
StartRelation Relation
EndRelation Relation
}
type UtilAssocCountResponse struct {
Count uint16
}
type LinkInfo struct {
TxCounter uint8 // Counter of transmission success/failures
TxCost uint8 // Average of sending rssi values if link staus is enabled
// i.e. NWK_LINK_STATUS_PERIOD is defined as non zero
RxLqi uint8 // average of received rssi values
// needs to be converted to link cost (1-7) before used
InKeySeqNum uint8 // security key sequence number
InFrmCntr uint32 // security frame counter..
TxFailure uint16 // higher values indicate more failures
}
type AgingEndDevice struct {
EndDevCfg uint8
DeviceTimeout uint32
}
type Device struct {
ShortAddr string `hex:"2"` // Short address of associated device, or invalid 0xfffe
AddrIdx uint16 // Index from the address manager
NodeRelation uint8
DevStatus uint8 // bitmap of various status values
AssocCnt uint8
Age uint8
LinkInfo *LinkInfo
EndDev *AgingEndDevice
TimeoutCounter uint32
KeepaliveRcv uint8
}
type UtilAssocFindDevice struct {
Number uint8
}
type UtilAssocFindDeviceResponse struct {
Device *Device
}
type UtilAssocGetWithAddr struct {
ExtAddr string `hex:"8"`
NwkAddr string `hex:"2"`
}
type UtilAssocGetWithAddrResponse struct {
Device *Device
}
type UtilBindAddEntry struct {
AddrMode AddrMode
DstAddr string `hex:"8"`
DstEndpoint uint8
ClusterIDs []uint16 `size:"1"`
}
type BindEntry struct {
SrcEP uint8
DstGroupMode uint8
DstIdx uint16
DstEP uint8
ClusterIDList []uint16 `size:"1"`
}
type UtilBindAddEntryResponse struct {
BindEntry *BindEntry
}
type UtilZclKeyEstInitEst struct {
TaskID uint8
SeqNum uint8
EndPoint uint8
AddrMode AddrMode
Addr string `hex:"8"`
}
type UtilZclKeyEstSign struct {
Input []uint8 `size:"1"`
}
type UtilZclKeyEstSignResponse struct {
Status Status
Key [42]uint8
}
type UtilSrngGenResponse struct {
SecureRandomNumbers [100]uint8
}
type UtilSyncReq struct{}
type UtilZclKeyEstablishInd struct {
TaskId uint8
Event uint8
Status uint8
WaitTime uint8
Suite uint16
}
// =======ZDO=======
type ZdoNwkAddrReq struct {
IEEEAddress string `hex:"8"`
ReqType ReqType
StartIndex uint8
}
type ZdoIeeeAddrReq struct {
ShortAddr string `hex:"2"`
ReqType ReqType
StartIndex uint8
}
type ZdoNodeDescReq struct {
DstAddr string `hex:"2"`
NWKAddrOfInterest string `hex:"2"`
}
type ZdoPowerDescReq struct {
DstAddr string `hex:"2"`
NWKAddrOfInterest string `hex:"2"`
}
type ZdoUserDescReq struct {
DstAddr string `hex:"2"`
NWKAddrOfInterest string `hex:"2"`
}
type ZdoComplexDescReq struct {
DstAddr string `hex:"2"`
NWKAddrOfInterest string `hex:"2"`
}
type ZdoMatchDescReq struct {
DstAddr string `hex:"2"`
NWKAddrOfInterest string `hex:"2"`
ProfileID uint16
InClusterList []uint16 `size:"1"`
OutClusterList []uint16 `size:"1"`
}
type ZdoSimpleDescReq struct {
DstAddr string `hex:"2"`
NWKAddrOfInterest string `hex:"2"`
Endpoint uint8
}
type ZdoActiveEpReq struct {
DstAddr string `hex:"2"`
NWKAddrOfInterest string `hex:"2"`
}
type CapInfo struct {
AlternatePANCoordinator uint8 `bits:"0b00000001" bitmask:"start"`
Router uint8 `bits:"0b00000010"`
MainPowered uint8 `bits:"0b00000100"`
ReceiverOnWhenIdle uint8 `bits:"0b00001000"`
Reserved1 uint8 `bits:"0b00010000"`
Reserved2 uint8 `bits:"0b00100000"`
Security uint8 `bits:"0b01000000"`
AllocAddr uint8 `bits:"0b10000000" bitmask:"end"`
}
type ZdoEndDeviceAnnce struct {
NwkAddr string `hex:"2"`
IEEEAddr string `hex:"8"`
Capabilities *CapInfo
}
type ZdoUserDescSet struct {
DstAddr string `hex:"2"`
NWKAddrOfInterest string `hex:"2"`
UserDescriptor string `size:"1"`
}
type ServerMask struct {
PrimTrustCenter uint16 `bits:"0x01" bitmask:"start"`
BkupTrustCenter uint16 `bits:"0x02"`
PrimBindTable uint16 `bits:"0x04"`
BkupBindTable uint16 `bits:"0x08"`
PrimDiscTable uint16 `bits:"0x10"`
BkupDiscTable uint16 `bits:"0x20"`
NetworkManager uint16 `bits:"0x40" bitmask:"end"`
}
type ZdoServerDiscReq struct {
ServerMask *ServerMask
}
type ZdoEndDeviceBindReq struct {
DstAddr string `hex:"2"`
LocalCoordinatorAddr string `hex:"2"`
IEEEAddr string `hex:"8"`
Endpoint uint8
ProfileID uint16
InClusterList []uint16 `size:"1"`
OutClusterList []uint16 `size:"1"`
}
type ZdoBindUnbindReq struct {
DstAddr string `hex:"2"`
SrcAddress string `hex:"8"`
SrcEndpoint uint8
ClusterID uint16
DstAddrMode AddrMode
DstAddress string `hex:"8"`
DstEndpoint uint8
}
type Channels struct {
Channel11 uint32 `bits:"0x00000800" bitmask:"start"`
Channel12 uint32 `bits:"0x00001000"`
Channel13 uint32 `bits:"0x00002000"`
Channel14 uint32 `bits:"0x00004000"`
Channel15 uint32 `bits:"0x00008000"`
Channel16 uint32 `bits:"0x00010000"`
Channel17 uint32 `bits:"0x00020000"`
Channel18 uint32 `bits:"0x00040000"`
Channel19 uint32 `bits:"0x00080000"`
Channel20 uint32 `bits:"0x00100000"`
Channel21 uint32 `bits:"0x00200000"`
Channel22 uint32 `bits:"0x00400000"`
Channel23 uint32 `bits:"0x00800000"`
Channel24 uint32 `bits:"0x01000000"`
Channel25 uint32 `bits:"0x02000000"`
Channel26 uint32 `bits:"0b04000000" bitmask:"end"`
}
type ZdoMgmtNwkDiskReq struct {
DstAddr string `hex:"2"`
ScanChannels *Channels
ScanDuration uint8
StartIndex uint8
}
type ZdoMgmtLqiReq struct {
DstAddr string `hex:"2"`
StartIndex uint8
}
type ZdoMgmtRtgReq struct {
DstAddr string `hex:"2"`
StartIndex uint8
}
type ZdoMgmtBindReq struct {
DstAddr string `hex:"2"`
StartIndex uint8
}
type RemoveChildrenRejoin struct {
Rejoin uint8 `bits:"0b00000001" bitmask:"start"`
RemoveChildren uint8 `bits:"0b00000010" bitmask:"end"`
}
type ZdoMgmtLeaveReq struct {
DstAddr string `hex:"2"`
DeviceAddr string `hex:"8"`
RemoveChildrenRejoin *RemoveChildrenRejoin
}
type ZdoMgmtDirectJoinReq struct {
DstAddr string `hex:"2"`
DeviceAddr string `hex:"8"`
CapInfo *CapInfo
}
type ZdoMgmtPermitJoinReq struct {
AddrMode AddrMode
DstAddr string `hex:"2"`
Duration uint8
TCSignificance uint8
}
type ZdoMgmtNwkUpdateReq struct {
DstAddr string `hex:"2"`
DstAddrMode AddrMode
ChannelMask *Channels
ScanDuration uint8
}
type ZdoMsgCbRegister struct {
ClusterID uint16
}
type ZdoMsgCbRemove struct {
ClusterID uint16
}
type ZdoStartupFromApp struct {
StartDelay uint16
}
type ZdoStartupFromAppResponse struct {
Status StartupFromAppStatus
}
type ZdoSetLinkKey struct {
ShortAddr string `hex:"2"`
IEEEAddr string `hex:"8"`
LinkKeyData [16]uint8
}
type ZdoRemoveLinkKey struct {
IEEEAddr string `hex:"8"`
}
type ZdoGetLinkKey struct {
IEEEAddr string `hex:"8"`
}
type ZdoGetLinkKeyResponse struct {
Status Status
IEEEAddr string `hex:"8"`
LinkKeyData [16]uint8
}