Thanks Tommaso! Your suggestion makes good sense. However, when I try this, I keep on getting the following error:
I've been trying to resolve this for the past two days, but can't figure it out. I've tried a number variations, but the attached file (from .../ns-3.38/src/spectrum/model) contains the simplest one. Here, to the original multi-model-spectrum-channel.cc, I first add the following in lines 18-19
//Added
#include <ns3/lte-enb-net-device.h>
and the following in lines 351-353
//Added
Ptr<NetDevice> txNetDevice = txParams->txPhy->GetDevice();
Ptr<LteEnbNetDevice> enbDev = DynamicCast<LteEnbNetDevice>(txNetDevice);
If I comment out the last line, there is no error. txNetDevice seems to be getting correctly identified, and its TypeId does show as ns3::NetDevice. Just FYI, I also tried to first access LteNetDevice - the first derived class from NetDevice, but it didn't work. I'm really puzzled here. What am I doing wrong?
Thanks,
Shyam