openthread / ot-commissioner

OpenThread Commissioner, a Thread commissioner for joining new Thread devices and managing Thread networks.
https://openthread.io/
BSD 3-Clause "New" or "Revised" License
49 stars 36 forks source link

[diag] add a function to generate diag type list TLV based on a flag #269

Closed ZhangLe2016 closed 3 months ago

ZhangLe2016 commented 3 months ago

Based on spec 10.11.4.6, the type list TLV(18) concatenates the list of type identifiers of diagnostic TLVs. This TLV is used to request or reset the diag vlaues from other Thread devices.

This PR implements a function to generate the type list TLV vlaue based on a flag. Users can custmize the flag based on the diag TLVs type value. E.x. if users want to requeset or reset type 0, 1, 2 TLVs, they can set the flag to 0x7, where the position of bits 111 represent the required TLV types.

ZhangLe2016 commented 3 months ago

Close this PR for merging it into #270