A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
wifi-mac-queue-scheduler.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2022 Universita' degli Studi di Napoli Federico II
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Stefano Avallone <stavallo@unina.it>
7
*/
8
9
#include "
wifi-mac-queue-scheduler.h
"
10
11
#include "
wifi-mac-queue.h
"
12
#include "
wifi-mac.h
"
13
14
namespace
ns3
15
{
16
17
NS_LOG_COMPONENT_DEFINE
(
"WifiMacQueueScheduler"
);
18
19
NS_OBJECT_ENSURE_REGISTERED
(
WifiMacQueueScheduler
);
20
21
TypeId
22
WifiMacQueueScheduler::GetTypeId
()
23
{
24
static
TypeId
tid =
25
TypeId
(
"ns3::WifiMacQueueScheduler"
).
SetParent
<
Object
>().SetGroupName(
"Wifi"
);
26
return
tid;
27
}
28
29
void
30
WifiMacQueueScheduler::DoDispose
()
31
{
32
m_mac
=
nullptr
;
33
}
34
35
void
36
WifiMacQueueScheduler::SetWifiMac
(
Ptr<WifiMac>
mac)
37
{
38
NS_LOG_FUNCTION
(
this
<< mac);
39
NS_ABORT_MSG_IF
(
m_mac
,
"Cannot set the MAC twice"
);
40
m_mac
= mac;
41
}
42
43
void
44
WifiMacQueueScheduler::SetWifiMacQueue
(
AcIndex
ac,
Ptr<WifiMacQueue>
queue)
45
{
46
NS_LOG_FUNCTION
(
this
<< ac << queue);
47
NS_ABORT_MSG_IF
(!queue,
"Cannot set a null wifi MAC queue"
);
48
queue->SetScheduler(
this
);
49
}
50
51
Ptr<WifiMac>
52
WifiMacQueueScheduler::GetMac
()
const
53
{
54
return
m_mac
;
55
}
56
57
}
// namespace ns3
ns3::Object::Object
Object()
Caller graph was not generated because of its size.
Definition
object.cc:93
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
ptr.h:70
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:50
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition
type-id.cc:999
ns3::WifiMacQueueScheduler
WifiMacQueueScheduler is an abstract base class defining the public interface for a wifi MAC queue sc...
Definition
wifi-mac-queue-scheduler.h:85
ns3::WifiMacQueueScheduler::SetWifiMac
virtual void SetWifiMac(Ptr< WifiMac > mac)
Set the wifi MAC.
Definition
wifi-mac-queue-scheduler.cc:36
ns3::WifiMacQueueScheduler::GetMac
Ptr< WifiMac > GetMac() const
Get the wifi MAC.
Definition
wifi-mac-queue-scheduler.cc:52
ns3::WifiMacQueueScheduler::DoDispose
void DoDispose() override
Destructor implementation.
Definition
wifi-mac-queue-scheduler.cc:30
ns3::WifiMacQueueScheduler::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
wifi-mac-queue-scheduler.cc:22
ns3::WifiMacQueueScheduler::m_mac
Ptr< WifiMac > m_mac
MAC layer.
Definition
wifi-mac-queue-scheduler.h:302
ns3::WifiMacQueueScheduler::SetWifiMacQueue
virtual void SetWifiMacQueue(AcIndex ac, Ptr< WifiMacQueue > queue)
Set the Wifi MAC queue associated with the given Access Category.
Definition
wifi-mac-queue-scheduler.cc:44
NS_ABORT_MSG_IF
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
Definition
abort.h:97
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition
log.h:194
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Definition
log-macros-enabled.h:231
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition
object-base.h:35
ns3::AcIndex
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Definition
qos-utils.h:64
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
wifi-mac-queue-scheduler.h
wifi-mac-queue.h
wifi-mac.h
src
wifi
model
wifi-mac-queue-scheduler.cc
Generated on
for ns-3 by
1.16.1