A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
default-channel-scheduler.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* This program is free software; you can redistribute it and/or modify
4
* it under the terms of the GNU General Public License version 2 as
5
* published by the Free Software Foundation;
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software
14
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15
*
16
* Author: Junling Bu <linlinjavaer@gmail.com>
17
*/
18
#ifndef DEFAULT_CHANNEL_SCHEDULER_H
19
#define DEFAULT_CHANNEL_SCHEDULER_H
20
21
#include "
wave-net-device.h
"
22
namespace
ns3
{
23
class
WaveNetDevice;
24
32
class
DefaultChannelScheduler
:
public
ChannelScheduler
33
{
34
public
:
39
static
TypeId
GetTypeId
(
void
);
40
DefaultChannelScheduler
();
41
virtual
~DefaultChannelScheduler
();
42
46
virtual
void
SetWaveNetDevice
(
Ptr<WaveNetDevice>
device);
51
virtual
enum
ChannelAccess
GetAssignedAccessType
(uint32_t channelNumber)
const
;
52
57
void
NotifyCchSlotStart
(
Time
duration);
62
void
NotifySchSlotStart
(
Time
duration);
68
void
NotifyGuardSlotStart
(
Time
duration,
bool
cchi);
69
private
:
70
virtual
void
DoInitialize
(
void
);
71
virtual
void
DoDispose
(
void
);
79
virtual
bool
AssignAlternatingAccess
(uint32_t channelNumber,
bool
immediate);
87
virtual
bool
AssignContinuousAccess
(uint32_t channelNumber,
bool
immediate);
96
virtual
bool
AssignExtendedAccess
(uint32_t channelNumber, uint32_t extends,
bool
immediate);
101
virtual
bool
AssignDefaultCchAccess
(
void
);
107
virtual
bool
ReleaseAccess
(uint32_t channelNumber);
112
void
SwitchToNextChannel
(uint32_t curChannelNumber, uint32_t nextChannelNumber);
113
114
Ptr<ChannelManager>
m_manager
;
115
Ptr<ChannelCoordinator>
m_coordinator
;
116
Ptr<WifiPhy>
m_phy
;
117
127
uint32_t
m_channelNumber
;
128
uint32_t
m_extend
;
129
EventId
m_extendEvent
;
130
enum
ChannelAccess
m_channelAccess
;
131
132
EventId
m_waitEvent
;
133
uint32_t
m_waitChannelNumber
;
134
uint32_t
m_waitExtend
;
135
136
Ptr<ChannelCoordinationListener>
m_coordinationListener
;
137
};
138
139
}
140
#endif
/* DEFAULT_CHANNEL_SCHEDULER_H */
ns3::ChannelScheduler
This class will assign channel access for requests from higher layers.
Definition:
channel-scheduler.h:130
ns3::DefaultChannelScheduler
This class uses a simple mechanism to assign channel access with following features: (1) only in the ...
Definition:
default-channel-scheduler.h:33
ns3::DefaultChannelScheduler::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
default-channel-scheduler.cc:65
ns3::DefaultChannelScheduler::AssignDefaultCchAccess
virtual bool AssignDefaultCchAccess(void)
This method will assign default CCH access for CCH.
Definition:
default-channel-scheduler.cc:328
ns3::DefaultChannelScheduler::m_channelAccess
enum ChannelAccess m_channelAccess
channel access
Definition:
default-channel-scheduler.h:130
ns3::DefaultChannelScheduler::m_manager
Ptr< ChannelManager > m_manager
channel manager
Definition:
default-channel-scheduler.h:114
ns3::DefaultChannelScheduler::DoInitialize
virtual void DoInitialize(void)
Initialize() implementation.
Definition:
default-channel-scheduler.cc:91
ns3::DefaultChannelScheduler::DefaultChannelScheduler
DefaultChannelScheduler()
Definition:
default-channel-scheduler.cc:75
ns3::DefaultChannelScheduler::m_extend
uint32_t m_extend
extend
Definition:
default-channel-scheduler.h:128
ns3::DefaultChannelScheduler::DoDispose
virtual void DoDispose(void)
Destructor implementation.
Definition:
default-channel-scheduler.cc:98
ns3::DefaultChannelScheduler::GetAssignedAccessType
virtual enum ChannelAccess GetAssignedAccessType(uint32_t channelNumber) const
Definition:
default-channel-scheduler.cc:136
ns3::DefaultChannelScheduler::m_extendEvent
EventId m_extendEvent
extend event
Definition:
default-channel-scheduler.h:129
ns3::DefaultChannelScheduler::NotifyGuardSlotStart
void NotifyGuardSlotStart(Time duration, bool cchi)
Notify guard slot start.
Definition:
default-channel-scheduler.cc:425
ns3::DefaultChannelScheduler::NotifyCchSlotStart
void NotifyCchSlotStart(Time duration)
Notify CCH slot start.
Definition:
default-channel-scheduler.cc:413
ns3::DefaultChannelScheduler::SwitchToNextChannel
void SwitchToNextChannel(uint32_t curChannelNumber, uint32_t nextChannelNumber)
Definition:
default-channel-scheduler.cc:359
ns3::DefaultChannelScheduler::m_coordinator
Ptr< ChannelCoordinator > m_coordinator
channel coordinator
Definition:
default-channel-scheduler.h:115
ns3::DefaultChannelScheduler::m_waitEvent
EventId m_waitEvent
wait event
Definition:
default-channel-scheduler.h:132
ns3::DefaultChannelScheduler::~DefaultChannelScheduler
virtual ~DefaultChannelScheduler()
Definition:
default-channel-scheduler.cc:85
ns3::DefaultChannelScheduler::AssignAlternatingAccess
virtual bool AssignAlternatingAccess(uint32_t channelNumber, bool immediate)
Definition:
default-channel-scheduler.cc:148
ns3::DefaultChannelScheduler::AssignContinuousAccess
virtual bool AssignContinuousAccess(uint32_t channelNumber, bool immediate)
Definition:
default-channel-scheduler.cc:185
ns3::DefaultChannelScheduler::AssignExtendedAccess
virtual bool AssignExtendedAccess(uint32_t channelNumber, uint32_t extends, bool immediate)
Definition:
default-channel-scheduler.cc:243
ns3::DefaultChannelScheduler::NotifySchSlotStart
void NotifySchSlotStart(Time duration)
Notify SCH slot start.
Definition:
default-channel-scheduler.cc:419
ns3::DefaultChannelScheduler::m_channelNumber
uint32_t m_channelNumber
when m_channelAccess is ContinuousAccess, m_channelNumber is continuous channel number; when m_channe...
Definition:
default-channel-scheduler.h:127
ns3::DefaultChannelScheduler::m_phy
Ptr< WifiPhy > m_phy
Phy.
Definition:
default-channel-scheduler.h:116
ns3::DefaultChannelScheduler::m_waitChannelNumber
uint32_t m_waitChannelNumber
wait channel number
Definition:
default-channel-scheduler.h:133
ns3::DefaultChannelScheduler::m_waitExtend
uint32_t m_waitExtend
wait extend
Definition:
default-channel-scheduler.h:134
ns3::DefaultChannelScheduler::m_coordinationListener
Ptr< ChannelCoordinationListener > m_coordinationListener
coordination listener
Definition:
default-channel-scheduler.h:136
ns3::DefaultChannelScheduler::ReleaseAccess
virtual bool ReleaseAccess(uint32_t channelNumber)
Definition:
default-channel-scheduler.cc:386
ns3::DefaultChannelScheduler::SetWaveNetDevice
virtual void SetWaveNetDevice(Ptr< WaveNetDevice > device)
Definition:
default-channel-scheduler.cc:119
ns3::EventId
An identifier for simulation events.
Definition:
event-id.h:54
ns3::Ptr< WaveNetDevice >
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:103
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::ChannelAccess
ChannelAccess
ChannelAccess enumeration.
Definition:
channel-scheduler.h:112
wave-net-device.h
src
wave
model
default-channel-scheduler.h
Generated on Tue Feb 6 2024 19:21:28 for ns-3 by
1.9.1