A Discrete-Event Network Simulator
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"
22namespace ns3 {
23class WaveNetDevice;
24
33{
34public:
39 static TypeId GetTypeId (void);
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);
69private:
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
117
131
135
137};
138
139}
140#endif /* DEFAULT_CHANNEL_SCHEDULER_H */
This class will assign channel access for requests from higher layers.
This class uses a simple mechanism to assign channel access with following features: (1) only in the ...
static TypeId GetTypeId(void)
Get the type ID.
virtual bool AssignDefaultCchAccess(void)
This method will assign default CCH access for CCH.
enum ChannelAccess m_channelAccess
channel access
Ptr< ChannelManager > m_manager
channel manager
virtual void DoInitialize(void)
Initialize() implementation.
virtual void DoDispose(void)
Destructor implementation.
virtual enum ChannelAccess GetAssignedAccessType(uint32_t channelNumber) const
void NotifyGuardSlotStart(Time duration, bool cchi)
Notify guard slot start.
void NotifyCchSlotStart(Time duration)
Notify CCH slot start.
void SwitchToNextChannel(uint32_t curChannelNumber, uint32_t nextChannelNumber)
Ptr< ChannelCoordinator > m_coordinator
channel coordinator
virtual bool AssignAlternatingAccess(uint32_t channelNumber, bool immediate)
virtual bool AssignContinuousAccess(uint32_t channelNumber, bool immediate)
virtual bool AssignExtendedAccess(uint32_t channelNumber, uint32_t extends, bool immediate)
void NotifySchSlotStart(Time duration)
Notify SCH slot start.
uint32_t m_channelNumber
when m_channelAccess is ContinuousAccess, m_channelNumber is continuous channel number; when m_channe...
uint32_t m_waitChannelNumber
wait channel number
Ptr< ChannelCoordinationListener > m_coordinationListener
coordination listener
virtual bool ReleaseAccess(uint32_t channelNumber)
virtual void SetWaveNetDevice(Ptr< WaveNetDevice > device)
An identifier for simulation events.
Definition: event-id.h:54
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ChannelAccess
ChannelAccess enumeration.