Address for queue in wifi

12 views
Skip to first unread message

Ella Robinson

unread,
Sep 11, 2025, 4:52:30 PM (yesterday) Sep 11
to ns-3-...@googlegroups.com
Hi,

I have a simple wi-fi network, 1 AP, 1 STA.
Trying to see the queue in packet transmission using Config.

However, I am facing the error that ns3::RegularWifiMac not found,
even when I include the .h for regular wifi mac in header.

When I change RegularWifiMac to just WifiMac, I am getting the error
//ERROR: msg="Could not connect callback to
/NodeList/1/DeviceList/0/$ns3::WifiNetDevice/Mac/$ns3:WifiMac/DcaTxop/Queue".

Here's my callback function:
// Callback for queue trace
void QueueTrace(Ptr<OutputStreamWrapper> stream, uint32_t oldValue,
uint32_t newValue) {
*stream->GetStream() << Simulator::Now().GetSeconds() << "s," <<
newValue << std::endl;
}

and in my main:

Ptr<OutputStreamWrapper> queueStream =
ascii.CreateFileStream("queue_trace.csv");

Config::ConnectWithoutContext("/NodeList/1/DeviceList/0/$ns3::WifiNetDevice/Mac/$ns3::WifiMac/DcaTxop/Queue",
MakeBoundCallback(&QueueTrace, queueStream));

The error is in Config line.
Thanks,
Ella

Kaushika Rathod

unread,
2:09 AM (16 hours ago) 2:09 AM
to ns-3-users
Hello Ella,

The issue about RegularWifiMac not found could be due to version change. Older ns-3 versions had the RegularWifiMac class, in newer versions, it might not be under same name. Before using/defining any classes/objects, u need to check if thats compatible with your current ns-3 version or not.

About the WifiMac error, when you mention Queue in the connect callback, it means you are trying to access a trace source named Queue under DcaTxop object, and WifiMac class. The Queue trace source might not exist or might be represented under different name.

To find out valid trace sources, u need to go into .h and .cc files under path src/wifi/model.

Let me know if error still persists.

Best,
Kaushika.
Reply all
Reply to author
Forward
0 new messages