examples: Fix running wifi-spatial-reuse example with OBSS PD disabled

This commit is contained in:
Daniel Kopacz
2025-04-22 16:02:25 +02:00
parent 8916c909dc
commit 970f9aa99e

View File

@@ -345,6 +345,8 @@ main(int argc, char* argv[])
Config::Connect("/NodeList/*/ApplicationList/*/$ns3::PacketSocketServer/Rx",
MakeCallback(&SocketRx));
if (enableObssPd)
{
// Obtain pointers to the ObssPdAlgorithm objects and hook trace sinks
// to the Reset trace source on each STA. Note that this trace connection
// cannot be done through the Config path system, so pointers are used.
@@ -356,6 +358,7 @@ main(int argc, char* argv[])
auto hePhyB = DynamicCast<HePhy>(deviceB->GetPhy()->GetPhyEntity(WIFI_MOD_CLASS_HE));
// Pass in the context string "2" to allow the trace to distinguish objects
hePhyB->GetObssPdAlgorithm()->TraceConnect("Reset", "2", MakeCallback(&ResetTrace));
}
Simulator::Stop(duration);
Simulator::Run();