46 const auto dev = mac->GetDevice();
47 for (uint8_t phyId = 0; phyId < dev->GetNPhys(); ++phyId)
49 dev->GetPhy(phyId)->TraceConnectWithoutContext(
64 const auto linkId =
GetMac()->GetLinkForPhy(phyId);
67 "PHY " << +phyId <<
" transmitted a PSDU but it is not operating on any link");
69 for (
const auto& [staId, psdu] : psduMap)
71 if (
const auto mpdu = *psdu->begin(); mpdu->IsQueued())
73 const auto ac = mpdu->GetQueueAc();
75 if (
auto txop =
GetMac()->GetTxopFor(ac);
97 SetPriority(ac, queueId, {it->second, queueId.type});
Smart pointer class similar to boost::intrusive_ptr.
RrWifiQueueScheduler is a wifi queue scheduler that serves container queues in a round robin fashion.
std::vector< QueueIdLastTimeMap > m_perAcQueueIdLastTxTime
per-AC map of last time a frame in each container queue was transmitted
void PsduTransmitted(uint8_t phyId, WifiConstPsduMap psduMap, WifiTxVector txVector, Watt_u txPower)
Callback connected to the PHY trace that is fired every time a PSDU (map) is transmitted.
void DoNotifyEnqueue(AcIndex ac, Ptr< WifiMpdu > mpdu) override
Notify the scheduler that the given MPDU has been enqueued by the given Access Category.
void SetWifiMac(Ptr< WifiMac > mac) override
Set the wifi MAC.
static TypeId GetTypeId()
Get the type ID.
void DoNotifyDequeue(AcIndex ac, const std::list< Ptr< WifiMpdu > > &mpdus) override
Notify the scheduler that the given list of MPDUs have been dequeued by the given Access Category.
void DoNotifyRemove(AcIndex ac, const std::list< Ptr< WifiMpdu > > &mpdus) override
Notify the scheduler that the given list of MPDUs have been removed by the given Access Category.
static Time Now()
Return the current simulation virtual time.
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
static WifiContainerQueueId GetQueueId(Ptr< const WifiMpdu > mpdu)
Return the QueueId identifying the container queue in which the given MPDU is (or is to be) enqueued.
Ptr< WifiMac > GetMac() const
Get the wifi MAC.
WifiMacQueueSchedulerImpl()
void SetPriority(AcIndex ac, const WifiContainerQueueId &queueId, const WifiSchedPrecedence< Time > &priority)
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_TEMPLATE_DEFINE(name)
Initialize a reference to a Log component.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< T1 > StaticCast(const Ptr< T2 > &p)
Cast a Ptr.
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
double Watt_u
Watt weak type.