Attached is a minimal working example.
The signature for MeshHelper::Install requires a
const WifiPhyHelper &
SpectrumWifiPhyHelper inherits from WifiPhyHelper, so I see no reason why this should not work, but it doesn't. The line in
That line meshDevices = mesh.Install (spectrumPhy, nodes);
where mesh = MeshHelper::Default() and meshDevices is a NetDeviceContainer,
causes the error
assert failed. cond="m_ptr", msg="Attempted to dereference zero pointer", file=./ns3/ptr.h, line=630
terminate called without an active exception
Program received signal SIGABRT, Aborted.
0x00007fffede9d438 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
The line where this issue is coming is in
Ptr<WifiPhy> phy = phyHelper.Create (node, device); and then in that Create function, the line is phy->SetDevice (device); (seems not to work)
Could someone please assist with how to use SpectrumWifiPhy with Mesh, and why that error occurs?