Dear All,
I am trying to use MonitorSnifferRx and MonitorSnifferTx trace sources in my implementation. I have configured callback signature as showed below.
void DevMonitorSnifferRx (std::string context,Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble,WifiTxVector txVector, struct mpduInfo aMpdu, struct signalNoiseDbm signalNoise)
{
std::stringstream ss;
ss << "MonitorSnifferRx.log";
static std::fstream f (ss.str ().c_str (), std::ios::out);
f << "SIGNAL_POWER = " << signalNoise.signal << " NOISE_POER = " << signalNoise.noise << " AMPDU_REFNUM = " << aMpdu.mpduRefNumber << " PKT_SIZE = "<<packet->GetSize() << " "<< " = MonitorSnifferRx" << std::endl;
}
void DevMonitorSnifferTx (std::string context, Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble,WifiTxVector txVector, struct mpduInfo aMpdu, struct signalNoiseDbm signalNoise)
{
std::stringstream ss;
ss << "MonitorSnifferTx.log";
static std::fstream f (ss.str ().c_str (), std::ios::out);
f << "SIGNAL_POWER = " << signalNoise.signal << " NOISE_POER = " << signalNoise.noise << " PKT_SIZE = "<<packet->GetSize() << " "<< " = MonitorSnifferRx" << std::endl;
}
Config::ConnectWithoutContext ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/MonitorSnifferRx", MakeCallback(&DevMonitorSnifferRx));
Config::ConnectWithoutContext ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/MonitorSnifferTx", MakeCallback (&DevMonitorSnifferTx));
But i am getting below error while running the simulation.
msg="Incompatible types. (feed to "c++filt -t" if needed)
got=CallbackImpl<void,std::string,ns3::Ptr<ns3::Packet const>,unsigned short,unsigned short,unsigned int,ns3::WifiPreamble,ns3::WifiTxVector,ns3::mpduInfo,ns3::signalNoiseDbm>
expected=CallbackImpl<void,ns3::Ptr<ns3::Packet const>,unsigned short,unsigned short,unsigned int,ns3::WifiPreamble,ns3::WifiTxVector,ns3::mpduInfo,ns3::signalNoiseDbm>", file=./ns3/callback.h, line=1449
file=./ns3/traced-callback.h, line=268
terminate called without an active exception
I have checked many threads but it seems signature is correct and i am not able to figure out the problem here. Can anyone please help me with it?
PS: I am using ns-3-lbt module.
Best Regards
Saumil Shah