[mesh-diag] update kMaxTlvsToRequest constant (#8853)

This commit updates `kMaxTlvsToRequest` constant to account for the
recently added `VersionTlv`. It also moves its definition from header
file to cpp file in `SendDiagGetTo()` method so to make it easier to
track and update it when/if new TLV types are added.
This commit is contained in:
Abtin Keshavarzian
2023-03-13 10:37:24 -07:00
committed by GitHub
parent baa796dd47
commit b2e813429b
2 changed files with 3 additions and 2 deletions
+2
View File
@@ -90,6 +90,8 @@ void MeshDiag::Cancel(void)
Error MeshDiag::SendDiagGetTo(uint16_t aRloc16, const DiscoverConfig &aConfig)
{
static constexpr uint8_t kMaxTlvsToRequest = 6;
Error error = kErrorNone;
Coap::Message *message = nullptr;
Tmf::MessageInfo messageInfo(GetInstance());
+1 -2
View File
@@ -182,8 +182,7 @@ public:
private:
typedef ot::NetworkDiagnostic::Tlv Tlv;
static constexpr uint32_t kResponseTimeout = OPENTHREAD_CONFIG_MESH_DIAG_RESPONSE_TIMEOUT;
static constexpr uint8_t kMaxTlvsToRequest = 5;
static constexpr uint32_t kResponseTimeout = OPENTHREAD_CONFIG_MESH_DIAG_RESPONSE_TIMEOUT;
Error SendDiagGetTo(uint16_t aRloc16, const DiscoverConfig &aConfig);
void HandleTimer(void);