Every time a WifiMacQueueItem is created, there's a timestamp associated with the process.
Assuming your code creates devices of type WaveNetDevice, you can do this
std::string path = "/NodeList/*/DeviceList/*/$ns3::WaveNetDevice/MacEntities/*/$ns3::OcbWifiMac/*/Queue/Dequeue"
Config::Connect(path,MakeCallback(&MyDequeueTraceFun))
and then you have to create a function MyDequeueTraceFun that matches the callback as follows
DequeueTrace(std::string context, Ptr<const WifiMacQueueItem> item)
{
std::cout << item->GetTimeStamp() << std::endl; //time packet was in queue
}
That's it! Keep in mind that a packet can be dequeued if the TTL in queue was exceeded. Study at all the other trace sources and see how they work. I believe one is used for packet drops due to full queue, and other events.
2.
If you're using WaveNetDevice, you're specifying the Access Category (AC), like BE, BK, VI or VO by using TxInfo struct, then the default value is 7, for VO. This can be found in wave-net-device.cc file