mirror of
https://github.com/espressif/openthread.git
synced 2026-08-29 13:29:54 +00:00
[nexus] use Dataset::Info method to simplify test_1_2_BBR_TC_3 (#12812)
This commit updates `test_1_2_BBR_TC_3.cpp` to use the `Get<>()` method when accessing the network name and extended PAN ID from the `MeshCoP::Dataset::Info` instance.
This commit is contained in:
@@ -104,12 +104,10 @@ void TestBbrTc3(void)
|
||||
|
||||
{
|
||||
MeshCoP::Dataset::Info datasetInfo;
|
||||
String<17> xpanIdString;
|
||||
|
||||
SuccessOrQuit(br1.Get<MeshCoP::ActiveDatasetManager>().Read(datasetInfo));
|
||||
nexus.AddTestVar("NETWORK_NAME", datasetInfo.mNetworkName.m8);
|
||||
xpanIdString.AppendHexBytes(datasetInfo.mExtendedPanId.m8, sizeof(datasetInfo.mExtendedPanId.m8));
|
||||
nexus.AddTestVar("XPAN_ID", xpanIdString.AsCString());
|
||||
nexus.AddTestVar("NETWORK_NAME", datasetInfo.Get<MeshCoP::Dataset::kNetworkName>().GetAsCString());
|
||||
nexus.AddTestVar("XPAN_ID", datasetInfo.Get<MeshCoP::Dataset::kExtendedPanId>().ToString().AsCString());
|
||||
}
|
||||
|
||||
nexus.AdvanceTime(0);
|
||||
|
||||
Reference in New Issue
Block a user