mirror of
https://github.com/espressif/openthread.git
synced 2026-09-15 13:40:06 +00:00
[netdiag] rename namespace NetworkDiagnostic to NetDiag (#13154)
This commit renames the `NetworkDiagnostic` namespace in `src/core/thread/` and its related types to `NetDiag` for brevity. It updates the corresponding filenames and header guards as well.
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "platform/nexus_core.hpp"
|
||||
#include "platform/nexus_node.hpp"
|
||||
#include "thread/network_diagnostic.hpp"
|
||||
#include "thread/net_diag.hpp"
|
||||
|
||||
namespace ot {
|
||||
namespace Nexus {
|
||||
@@ -155,15 +155,13 @@ void Test5_7_1(void)
|
||||
Log("Step 2: Leader");
|
||||
|
||||
uint8_t tlvTypes2[] = {
|
||||
NetworkDiagnostic::Tlv::kExtMacAddress, NetworkDiagnostic::Tlv::kAddress16,
|
||||
NetworkDiagnostic::Tlv::kMode, NetworkDiagnostic::Tlv::kConnectivity,
|
||||
NetworkDiagnostic::Tlv::kRoute, NetworkDiagnostic::Tlv::kLeaderData,
|
||||
NetworkDiagnostic::Tlv::kNetworkData, NetworkDiagnostic::Tlv::kIp6AddressList,
|
||||
NetworkDiagnostic::Tlv::kChannelPages,
|
||||
NetDiag::Tlv::kExtMacAddress, NetDiag::Tlv::kAddress16, NetDiag::Tlv::kMode,
|
||||
NetDiag::Tlv::kConnectivity, NetDiag::Tlv::kRoute, NetDiag::Tlv::kLeaderData,
|
||||
NetDiag::Tlv::kNetworkData, NetDiag::Tlv::kIp6AddressList, NetDiag::Tlv::kChannelPages,
|
||||
};
|
||||
|
||||
SuccessOrQuit(leader.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(dutRloc, tlvTypes2, sizeof(tlvTypes2),
|
||||
nullptr, nullptr));
|
||||
SuccessOrQuit(
|
||||
leader.Get<NetDiag::Client>().SendDiagnosticGet(dutRloc, tlvTypes2, sizeof(tlvTypes2), nullptr, nullptr));
|
||||
nexus.AdvanceTime(kDiagResponseTime);
|
||||
|
||||
/**
|
||||
@@ -180,10 +178,10 @@ void Test5_7_1(void)
|
||||
*/
|
||||
Log("Step 3: Leader");
|
||||
|
||||
uint8_t tlvTypes3[] = {NetworkDiagnostic::Tlv::kMacCounters};
|
||||
uint8_t tlvTypes3[] = {NetDiag::Tlv::kMacCounters};
|
||||
|
||||
SuccessOrQuit(leader.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(dutRloc, tlvTypes3, sizeof(tlvTypes3),
|
||||
nullptr, nullptr));
|
||||
SuccessOrQuit(
|
||||
leader.Get<NetDiag::Client>().SendDiagnosticGet(dutRloc, tlvTypes3, sizeof(tlvTypes3), nullptr, nullptr));
|
||||
nexus.AdvanceTime(kDiagResponseTime);
|
||||
|
||||
/**
|
||||
@@ -199,10 +197,10 @@ void Test5_7_1(void)
|
||||
*/
|
||||
Log("Step 4: Leader");
|
||||
|
||||
uint8_t tlvTypes4[] = {NetworkDiagnostic::Tlv::kTimeout};
|
||||
uint8_t tlvTypes4[] = {NetDiag::Tlv::kTimeout};
|
||||
|
||||
SuccessOrQuit(leader.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(dutRloc, tlvTypes4, sizeof(tlvTypes4),
|
||||
nullptr, nullptr));
|
||||
SuccessOrQuit(
|
||||
leader.Get<NetDiag::Client>().SendDiagnosticGet(dutRloc, tlvTypes4, sizeof(tlvTypes4), nullptr, nullptr));
|
||||
nexus.AdvanceTime(kDiagResponseTime);
|
||||
|
||||
/**
|
||||
@@ -220,10 +218,10 @@ void Test5_7_1(void)
|
||||
*/
|
||||
Log("Step 5: Leader");
|
||||
|
||||
uint8_t tlvTypes5[] = {NetworkDiagnostic::Tlv::kBatteryLevel, NetworkDiagnostic::Tlv::kSupplyVoltage};
|
||||
uint8_t tlvTypes5[] = {NetDiag::Tlv::kBatteryLevel, NetDiag::Tlv::kSupplyVoltage};
|
||||
|
||||
SuccessOrQuit(leader.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(dutRloc, tlvTypes5, sizeof(tlvTypes5),
|
||||
nullptr, nullptr));
|
||||
SuccessOrQuit(
|
||||
leader.Get<NetDiag::Client>().SendDiagnosticGet(dutRloc, tlvTypes5, sizeof(tlvTypes5), nullptr, nullptr));
|
||||
nexus.AdvanceTime(kDiagResponseTime);
|
||||
|
||||
/**
|
||||
@@ -241,10 +239,10 @@ void Test5_7_1(void)
|
||||
*/
|
||||
Log("Step 6: Leader");
|
||||
|
||||
uint8_t tlvTypes6[] = {NetworkDiagnostic::Tlv::kChildTable};
|
||||
uint8_t tlvTypes6[] = {NetDiag::Tlv::kChildTable};
|
||||
|
||||
SuccessOrQuit(leader.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(dutRloc, tlvTypes6, sizeof(tlvTypes6),
|
||||
nullptr, nullptr));
|
||||
SuccessOrQuit(
|
||||
leader.Get<NetDiag::Client>().SendDiagnosticGet(dutRloc, tlvTypes6, sizeof(tlvTypes6), nullptr, nullptr));
|
||||
nexus.AdvanceTime(kDiagResponseTime);
|
||||
|
||||
/**
|
||||
@@ -258,9 +256,9 @@ void Test5_7_1(void)
|
||||
*/
|
||||
Log("Step 7: Leader");
|
||||
|
||||
uint8_t tlvTypes7[] = {NetworkDiagnostic::Tlv::kMacCounters};
|
||||
uint8_t tlvTypes7[] = {NetDiag::Tlv::kMacCounters};
|
||||
|
||||
SuccessOrQuit(leader.Get<NetworkDiagnostic::Client>().SendDiagnosticReset(dutRloc, tlvTypes7, sizeof(tlvTypes7)));
|
||||
SuccessOrQuit(leader.Get<NetDiag::Client>().SendDiagnosticReset(dutRloc, tlvTypes7, sizeof(tlvTypes7)));
|
||||
nexus.AdvanceTime(kDiagResponseTime);
|
||||
|
||||
/**
|
||||
@@ -278,10 +276,10 @@ void Test5_7_1(void)
|
||||
*/
|
||||
Log("Step 8: Leader");
|
||||
|
||||
uint8_t tlvTypes8[] = {NetworkDiagnostic::Tlv::kMacCounters};
|
||||
uint8_t tlvTypes8[] = {NetDiag::Tlv::kMacCounters};
|
||||
|
||||
SuccessOrQuit(leader.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(dutRloc, tlvTypes8, sizeof(tlvTypes8),
|
||||
nullptr, nullptr));
|
||||
SuccessOrQuit(
|
||||
leader.Get<NetDiag::Client>().SendDiagnosticGet(dutRloc, tlvTypes8, sizeof(tlvTypes8), nullptr, nullptr));
|
||||
nexus.AdvanceTime(kDiagResponseTime);
|
||||
|
||||
nexus.SaveTestInfo("test_1_1_5_7_1.json");
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "platform/nexus_core.hpp"
|
||||
#include "platform/nexus_node.hpp"
|
||||
#include "thread/network_diagnostic.hpp"
|
||||
#include "thread/net_diag.hpp"
|
||||
|
||||
namespace ot {
|
||||
namespace Nexus {
|
||||
@@ -74,17 +74,15 @@ static constexpr uint8_t kNumRouters = 15;
|
||||
* Base diagnostic TLV types used in Steps 2 and 8.
|
||||
*/
|
||||
static constexpr uint8_t kBaseDiagGetTlvs[] = {
|
||||
NetworkDiagnostic::Tlv::kExtMacAddress, NetworkDiagnostic::Tlv::kAddress16,
|
||||
NetworkDiagnostic::Tlv::kMode, NetworkDiagnostic::Tlv::kConnectivity,
|
||||
NetworkDiagnostic::Tlv::kRoute, NetworkDiagnostic::Tlv::kLeaderData,
|
||||
NetworkDiagnostic::Tlv::kNetworkData, NetworkDiagnostic::Tlv::kIp6AddressList,
|
||||
NetworkDiagnostic::Tlv::kChannelPages,
|
||||
NetDiag::Tlv::kExtMacAddress, NetDiag::Tlv::kAddress16, NetDiag::Tlv::kMode,
|
||||
NetDiag::Tlv::kConnectivity, NetDiag::Tlv::kRoute, NetDiag::Tlv::kLeaderData,
|
||||
NetDiag::Tlv::kNetworkData, NetDiag::Tlv::kIp6AddressList, NetDiag::Tlv::kChannelPages,
|
||||
};
|
||||
|
||||
/**
|
||||
* MAC Counters diagnostic TLV type used in Steps 3, 6, and 7.
|
||||
*/
|
||||
static constexpr uint8_t kMacCountersTlv[] = {NetworkDiagnostic::Tlv::kMacCounters};
|
||||
static constexpr uint8_t kMacCountersTlv[] = {NetDiag::Tlv::kMacCounters};
|
||||
|
||||
void Test5_7_2(void)
|
||||
{
|
||||
@@ -196,8 +194,8 @@ void Test5_7_2(void)
|
||||
* - The presence of each TLV MUST be validated. Where possible, the value of the TLVs MUST be validated.
|
||||
*/
|
||||
|
||||
SuccessOrQuit(leader.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(
|
||||
reedRloc, kBaseDiagGetTlvs, sizeof(kBaseDiagGetTlvs), nullptr, nullptr));
|
||||
SuccessOrQuit(leader.Get<NetDiag::Client>().SendDiagnosticGet(reedRloc, kBaseDiagGetTlvs, sizeof(kBaseDiagGetTlvs),
|
||||
nullptr, nullptr));
|
||||
nexus.AdvanceTime(kDiagResponseTime);
|
||||
|
||||
Log("---------------------------------------------------------------------------------------");
|
||||
@@ -216,8 +214,8 @@ void Test5_7_2(void)
|
||||
* - TLV Type 9 - MAC Counters MUST contain a list of MAC Counters.
|
||||
*/
|
||||
|
||||
SuccessOrQuit(leader.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(reedRloc, kMacCountersTlv,
|
||||
sizeof(kMacCountersTlv), nullptr, nullptr));
|
||||
SuccessOrQuit(leader.Get<NetDiag::Client>().SendDiagnosticGet(reedRloc, kMacCountersTlv, sizeof(kMacCountersTlv),
|
||||
nullptr, nullptr));
|
||||
nexus.AdvanceTime(kDiagResponseTime);
|
||||
|
||||
Log("---------------------------------------------------------------------------------------");
|
||||
@@ -236,10 +234,10 @@ void Test5_7_2(void)
|
||||
* - The Timeout TLV MUST NOT be present.
|
||||
*/
|
||||
|
||||
uint8_t tlvTypes4[] = {NetworkDiagnostic::Tlv::kTimeout, NetworkDiagnostic::Tlv::kChildTable};
|
||||
uint8_t tlvTypes4[] = {NetDiag::Tlv::kTimeout, NetDiag::Tlv::kChildTable};
|
||||
|
||||
SuccessOrQuit(leader.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(reedRloc, tlvTypes4, sizeof(tlvTypes4),
|
||||
nullptr, nullptr));
|
||||
SuccessOrQuit(
|
||||
leader.Get<NetDiag::Client>().SendDiagnosticGet(reedRloc, tlvTypes4, sizeof(tlvTypes4), nullptr, nullptr));
|
||||
nexus.AdvanceTime(kDiagResponseTime);
|
||||
|
||||
Log("---------------------------------------------------------------------------------------");
|
||||
@@ -259,10 +257,10 @@ void Test5_7_2(void)
|
||||
* - TLV Type 15 – Supply Voltage (optional)
|
||||
*/
|
||||
|
||||
uint8_t tlvTypes5[] = {NetworkDiagnostic::Tlv::kBatteryLevel, NetworkDiagnostic::Tlv::kSupplyVoltage};
|
||||
uint8_t tlvTypes5[] = {NetDiag::Tlv::kBatteryLevel, NetDiag::Tlv::kSupplyVoltage};
|
||||
|
||||
SuccessOrQuit(leader.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(reedRloc, tlvTypes5, sizeof(tlvTypes5),
|
||||
nullptr, nullptr));
|
||||
SuccessOrQuit(
|
||||
leader.Get<NetDiag::Client>().SendDiagnosticGet(reedRloc, tlvTypes5, sizeof(tlvTypes5), nullptr, nullptr));
|
||||
nexus.AdvanceTime(kDiagResponseTime);
|
||||
|
||||
Log("---------------------------------------------------------------------------------------");
|
||||
@@ -289,8 +287,8 @@ void Test5_7_2(void)
|
||||
* - CoAP Response Code: 2.04 Changed
|
||||
*/
|
||||
|
||||
SuccessOrQuit(leader.Get<NetworkDiagnostic::Client>().SendDiagnosticReset(reedRloc, kMacCountersTlv,
|
||||
sizeof(kMacCountersTlv)));
|
||||
SuccessOrQuit(
|
||||
leader.Get<NetDiag::Client>().SendDiagnosticReset(reedRloc, kMacCountersTlv, sizeof(kMacCountersTlv)));
|
||||
nexus.AdvanceTime(kDiagResponseTime);
|
||||
|
||||
Log("---------------------------------------------------------------------------------------");
|
||||
@@ -321,8 +319,8 @@ void Test5_7_2(void)
|
||||
* step 3.
|
||||
*/
|
||||
|
||||
SuccessOrQuit(leader.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(reedRloc, kMacCountersTlv,
|
||||
sizeof(kMacCountersTlv), nullptr, nullptr));
|
||||
SuccessOrQuit(leader.Get<NetDiag::Client>().SendDiagnosticGet(reedRloc, kMacCountersTlv, sizeof(kMacCountersTlv),
|
||||
nullptr, nullptr));
|
||||
nexus.AdvanceTime(kDiagResponseTime);
|
||||
|
||||
Log("---------------------------------------------------------------------------------------");
|
||||
@@ -356,7 +354,7 @@ void Test5_7_2(void)
|
||||
* - The presence of each TLV MUST be validated. Where possible, the value of the TLVs MUST be validated.
|
||||
*/
|
||||
|
||||
SuccessOrQuit(leader.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(
|
||||
SuccessOrQuit(leader.Get<NetDiag::Client>().SendDiagnosticGet(
|
||||
Ip6::Address::GetRealmLocalAllNodesMulticast(), kBaseDiagGetTlvs, sizeof(kBaseDiagGetTlvs), nullptr, nullptr));
|
||||
nexus.AdvanceTime(kDiagResponseTime);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "mac/data_poll_sender.hpp"
|
||||
#include "platform/nexus_core.hpp"
|
||||
#include "platform/nexus_node.hpp"
|
||||
#include "thread/network_diagnostic.hpp"
|
||||
#include "thread/net_diag.hpp"
|
||||
|
||||
namespace ot {
|
||||
namespace Nexus {
|
||||
@@ -65,11 +65,10 @@ static constexpr uint32_t kPollPeriod = 500;
|
||||
* Diagnostic TLV types used in the query.
|
||||
*/
|
||||
static constexpr uint8_t kDiagGetTlvs[] = {
|
||||
NetworkDiagnostic::Tlv::kExtMacAddress, NetworkDiagnostic::Tlv::kAddress16,
|
||||
NetworkDiagnostic::Tlv::kMode, NetworkDiagnostic::Tlv::kConnectivity,
|
||||
NetworkDiagnostic::Tlv::kRoute, NetworkDiagnostic::Tlv::kLeaderData,
|
||||
NetworkDiagnostic::Tlv::kNetworkData, NetworkDiagnostic::Tlv::kIp6AddressList,
|
||||
NetworkDiagnostic::Tlv::kChildTable, NetworkDiagnostic::Tlv::kChannelPages,
|
||||
NetDiag::Tlv::kExtMacAddress, NetDiag::Tlv::kAddress16, NetDiag::Tlv::kMode,
|
||||
NetDiag::Tlv::kConnectivity, NetDiag::Tlv::kRoute, NetDiag::Tlv::kLeaderData,
|
||||
NetDiag::Tlv::kNetworkData, NetDiag::Tlv::kIp6AddressList, NetDiag::Tlv::kChildTable,
|
||||
NetDiag::Tlv::kChannelPages,
|
||||
};
|
||||
|
||||
struct DiagGetContext
|
||||
@@ -100,9 +99,9 @@ static void HandleDiagnosticGetAnswer(otError aError,
|
||||
|
||||
Log("Diagnostic Answer from %s", AsCoreType(&aMessageInfo->mPeerAddr).ToString().AsCString());
|
||||
|
||||
SuccessOrQuit(Tlv::Find<NetworkDiagnostic::ExtMacAddressTlv>(*message, extAddress));
|
||||
SuccessOrQuit(Tlv::Find<NetworkDiagnostic::Address16Tlv>(*message, shortAddress));
|
||||
SuccessOrQuit(Tlv::Find<NetworkDiagnostic::ModeTlv>(*message, mode));
|
||||
SuccessOrQuit(Tlv::Find<NetDiag::ExtMacAddressTlv>(*message, extAddress));
|
||||
SuccessOrQuit(Tlv::Find<NetDiag::Address16Tlv>(*message, shortAddress));
|
||||
SuccessOrQuit(Tlv::Find<NetDiag::ModeTlv>(*message, mode));
|
||||
}
|
||||
|
||||
void Test5_7_3(void)
|
||||
@@ -205,7 +204,7 @@ void Test5_7_3(void)
|
||||
* - Pass Criteria: N/A.
|
||||
*/
|
||||
|
||||
SuccessOrQuit(leader.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(
|
||||
SuccessOrQuit(leader.Get<NetDiag::Client>().SendDiagnosticGet(
|
||||
leader.Get<Mle::Mle>().GetRealmLocalAllThreadNodesAddress(), kDiagGetTlvs, sizeof(kDiagGetTlvs),
|
||||
HandleDiagnosticGetAnswer, &context));
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "platform/nexus_core.hpp"
|
||||
#include "platform/nexus_node.hpp"
|
||||
#include "thread/network_diagnostic.hpp"
|
||||
#include "thread/net_diag.hpp"
|
||||
#include "utils/mesh_diag.hpp"
|
||||
|
||||
namespace ot {
|
||||
@@ -165,16 +165,12 @@ void TestDiagTc1(const char *aJsonFileName)
|
||||
dutRloc.SetToRoutingLocator(leader.Get<Mle::Mle>().GetMeshLocalPrefix(), router1.Get<Mle::Mle>().GetRloc16());
|
||||
|
||||
uint8_t tlvTypesStep2[] = {
|
||||
NetworkDiagnostic::Tlv::kMaxChildTimeout,
|
||||
NetworkDiagnostic::Tlv::kEui64,
|
||||
NetworkDiagnostic::Tlv::kVersion,
|
||||
NetworkDiagnostic::Tlv::kVendorName,
|
||||
NetworkDiagnostic::Tlv::kVendorModel,
|
||||
NetworkDiagnostic::Tlv::kVendorSwVersion,
|
||||
NetworkDiagnostic::Tlv::kThreadStackVersion,
|
||||
NetDiag::Tlv::kMaxChildTimeout, NetDiag::Tlv::kEui64, NetDiag::Tlv::kVersion,
|
||||
NetDiag::Tlv::kVendorName, NetDiag::Tlv::kVendorModel, NetDiag::Tlv::kVendorSwVersion,
|
||||
NetDiag::Tlv::kThreadStackVersion,
|
||||
};
|
||||
SuccessOrQuit(leader.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(dutRloc, tlvTypesStep2,
|
||||
sizeof(tlvTypesStep2), nullptr, nullptr));
|
||||
SuccessOrQuit(leader.Get<NetDiag::Client>().SendDiagnosticGet(dutRloc, tlvTypesStep2, sizeof(tlvTypesStep2),
|
||||
nullptr, nullptr));
|
||||
|
||||
/**
|
||||
* Step 3
|
||||
@@ -242,9 +238,9 @@ void TestDiagTc1(const char *aJsonFileName)
|
||||
* - Pass Criteria:
|
||||
* - N/A
|
||||
*/
|
||||
uint8_t tlvTypesStep5[] = {NetworkDiagnostic::Tlv::kMaxChildTimeout, NetworkDiagnostic::Tlv::kMleCounters};
|
||||
SuccessOrQuit(leader.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(dutRloc, tlvTypesStep5,
|
||||
sizeof(tlvTypesStep5), nullptr, nullptr));
|
||||
uint8_t tlvTypesStep5[] = {NetDiag::Tlv::kMaxChildTimeout, NetDiag::Tlv::kMleCounters};
|
||||
SuccessOrQuit(leader.Get<NetDiag::Client>().SendDiagnosticGet(dutRloc, tlvTypesStep5, sizeof(tlvTypesStep5),
|
||||
nullptr, nullptr));
|
||||
|
||||
/**
|
||||
* Step 6
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include "platform/nexus_core.hpp"
|
||||
#include "platform/nexus_node.hpp"
|
||||
#include "thread/network_diagnostic.hpp"
|
||||
#include "thread/net_diag.hpp"
|
||||
|
||||
namespace ot {
|
||||
namespace Nexus {
|
||||
@@ -153,16 +153,12 @@ void TestDiagTc2(const char *aJsonFile)
|
||||
td1Rloc.SetToRoutingLocator(leader1.Get<Mle::Mle>().GetMeshLocalPrefix(), td1.Get<Mle::Mle>().GetRloc16());
|
||||
|
||||
uint8_t tlvTypesStep2[] = {
|
||||
NetworkDiagnostic::Tlv::kMaxChildTimeout,
|
||||
NetworkDiagnostic::Tlv::kEui64,
|
||||
NetworkDiagnostic::Tlv::kVersion,
|
||||
NetworkDiagnostic::Tlv::kVendorName,
|
||||
NetworkDiagnostic::Tlv::kVendorModel,
|
||||
NetworkDiagnostic::Tlv::kVendorSwVersion,
|
||||
NetworkDiagnostic::Tlv::kThreadStackVersion,
|
||||
NetDiag::Tlv::kMaxChildTimeout, NetDiag::Tlv::kEui64, NetDiag::Tlv::kVersion,
|
||||
NetDiag::Tlv::kVendorName, NetDiag::Tlv::kVendorModel, NetDiag::Tlv::kVendorSwVersion,
|
||||
NetDiag::Tlv::kThreadStackVersion,
|
||||
};
|
||||
SuccessOrQuit(leader1.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(td1Rloc, tlvTypesStep2,
|
||||
sizeof(tlvTypesStep2), nullptr, nullptr));
|
||||
SuccessOrQuit(leader1.Get<NetDiag::Client>().SendDiagnosticGet(td1Rloc, tlvTypesStep2, sizeof(tlvTypesStep2),
|
||||
nullptr, nullptr));
|
||||
|
||||
Log("---------------------------------------------------------------------------------------");
|
||||
Log("Step 3: TD_1 (DUT) Automatically responds either with 1. DIAG_GET.rsp or 2. CoAP response 4.04.");
|
||||
@@ -213,9 +209,9 @@ void TestDiagTc2(const char *aJsonFile)
|
||||
* - Pass Criteria:
|
||||
* - N/A
|
||||
*/
|
||||
uint8_t tlvTypesStep4[] = {NetworkDiagnostic::Tlv::kMleCounters};
|
||||
SuccessOrQuit(leader1.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(td1Rloc, tlvTypesStep4,
|
||||
sizeof(tlvTypesStep4), nullptr, nullptr));
|
||||
uint8_t tlvTypesStep4[] = {NetDiag::Tlv::kMleCounters};
|
||||
SuccessOrQuit(leader1.Get<NetDiag::Client>().SendDiagnosticGet(td1Rloc, tlvTypesStep4, sizeof(tlvTypesStep4),
|
||||
nullptr, nullptr));
|
||||
|
||||
Log("---------------------------------------------------------------------------------------");
|
||||
Log("Step 5: TD_1 (DUT) Automatically responds with DIAG_GET.rsp containing the requested Diagnostic TLVs.");
|
||||
|
||||
@@ -281,9 +281,9 @@ void Test_1_3_GEN_TC_1(Topology aTopology, const char *aJsonFileName)
|
||||
*/
|
||||
Ip6::Address br1Rloc;
|
||||
br1Rloc.SetToRoutingLocator(router1.Get<Mle::Mle>().GetMeshLocalPrefix(), br1.Get<Mle::Mle>().GetRloc16());
|
||||
uint8_t tlvTypes[] = {NetworkDiagnostic::Tlv::kVersion};
|
||||
SuccessOrQuit(router1.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(br1Rloc, tlvTypes, sizeof(tlvTypes),
|
||||
nullptr, nullptr));
|
||||
uint8_t tlvTypes[] = {NetDiag::Tlv::kVersion};
|
||||
SuccessOrQuit(
|
||||
router1.Get<NetDiag::Client>().SendDiagnosticGet(br1Rloc, tlvTypes, sizeof(tlvTypes), nullptr, nullptr));
|
||||
|
||||
Log("---------------------------------------------------------------------------------------");
|
||||
Log("Step 14: BR_1 Automatically responds with Get Diagnostic Response unicast to Router_1.");
|
||||
@@ -313,8 +313,8 @@ void Test_1_3_GEN_TC_1(Topology aTopology, const char *aJsonFileName)
|
||||
*/
|
||||
Ip6::Address router1Rloc;
|
||||
router1Rloc.SetToRoutingLocator(br1.Get<Mle::Mle>().GetMeshLocalPrefix(), router1.Get<Mle::Mle>().GetRloc16());
|
||||
SuccessOrQuit(br1.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(router1Rloc, tlvTypes, sizeof(tlvTypes),
|
||||
nullptr, nullptr));
|
||||
SuccessOrQuit(
|
||||
br1.Get<NetDiag::Client>().SendDiagnosticGet(router1Rloc, tlvTypes, sizeof(tlvTypes), nullptr, nullptr));
|
||||
|
||||
Log("---------------------------------------------------------------------------------------");
|
||||
Log("Step 16: Router_1 Automatically responds with Get Diagnostic Response unicast to the DUT.");
|
||||
@@ -344,8 +344,8 @@ void Test_1_3_GEN_TC_1(Topology aTopology, const char *aJsonFileName)
|
||||
*/
|
||||
Ip6::Address ed1Rloc;
|
||||
ed1Rloc.SetToRoutingLocator(router1.Get<Mle::Mle>().GetMeshLocalPrefix(), ed1.Get<Mle::Mle>().GetRloc16());
|
||||
SuccessOrQuit(router1.Get<NetworkDiagnostic::Client>().SendDiagnosticGet(ed1Rloc, tlvTypes, sizeof(tlvTypes),
|
||||
nullptr, nullptr));
|
||||
SuccessOrQuit(
|
||||
router1.Get<NetDiag::Client>().SendDiagnosticGet(ed1Rloc, tlvTypes, sizeof(tlvTypes), nullptr, nullptr));
|
||||
|
||||
Log("---------------------------------------------------------------------------------------");
|
||||
Log("Step 18: ED_1 Optionally responds with Get Diagnostic Response unicast to Router_1.");
|
||||
|
||||
@@ -3175,7 +3175,7 @@ void TestBorderAdmitterForwardingUdpProxy(void)
|
||||
|
||||
static const char *kEnrollerIds[kNumEnrollers] = {"1", "2", "3", "4"};
|
||||
|
||||
static const uint8_t kDiagTlvs[] = {NetworkDiagnostic::Tlv::kExtMacAddress, NetworkDiagnostic::Tlv::kVersion};
|
||||
static const uint8_t kDiagTlvs[] = {NetDiag::Tlv::kExtMacAddress, NetDiag::Tlv::kVersion};
|
||||
|
||||
Core nexus;
|
||||
Node &admitter = nexus.CreateNode();
|
||||
@@ -3347,7 +3347,7 @@ void TestBorderAdmitterForwardingUdpProxy(void)
|
||||
|
||||
diagMessage = enrollers[0]->Get<Tmf::Agent>().AllocateAndInitNonConfirmablePostMessage(kUriDiagnosticGetQuery);
|
||||
VerifyOrQuit(diagMessage != nullptr);
|
||||
SuccessOrQuit(Tlv::Append<NetworkDiagnostic::TypeListTlv>(*diagMessage, kDiagTlvs, sizeof(kDiagTlvs)));
|
||||
SuccessOrQuit(Tlv::Append<NetDiag::TypeListTlv>(*diagMessage, kDiagTlvs, sizeof(kDiagTlvs)));
|
||||
diagMessage->WriteMessageId(0);
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
Reference in New Issue
Block a user