class MyYansWifiPhy : public YansWifiPhy
{
public:
static TypeId GetTypeId (void)
{
static TypeId tid = TypeId ("MyYansWifiPhy")
.SetParent<ns3::YansWifiPhy> ()
.AddConstructor<MyYansWifiPhy> ()
.AddTraceSource ("ChannelWidth",
"Trace channel width.",
MakeTraceSourceAccessor (&MyYansWifiPhy::m_channelWidth),
"ns3::TracedValueCallback::uint32_t")
;
return tid;
}
MyYansWifiPhy () {}
TracedValue<uint32_t> m_channelWidth;
};
void
ChannelWidthTrace (uint32_t oldValue, uint32_t newValue)
{
std::cout << "Traced Channel Width " << oldValue << " to " << newValue << std::endl;
}