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
simple-ofdm-wimax-channel.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007,2008, 2009 INRIA, UDcast
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
18
* <amine.ismail@udcast.com>
19
*/
20
21
#ifndef SIMPLE_OFDM_WIMAX_CHANNEL_H
22
#define SIMPLE_OFDM_WIMAX_CHANNEL_H
23
24
#include "
bvec.h
"
25
#include "
simple-ofdm-send-param.h
"
26
#include "
wimax-channel.h
"
27
#include "
wimax-phy.h
"
28
29
#include "ns3/propagation-loss-model.h"
30
31
#include <list>
32
33
namespace
ns3
34
{
35
36
class
Packet;
37
class
PacketBurst;
38
class
SimpleOfdmWimaxPhy;
39
40
/**
41
* \ingroup wimax
42
* \brief SimpleOfdmWimaxChannel class
43
*/
44
class
SimpleOfdmWimaxChannel
:
public
WimaxChannel
45
{
46
public
:
47
SimpleOfdmWimaxChannel
();
48
~SimpleOfdmWimaxChannel
()
override
;
49
50
/// PropModel enumeration
51
enum
PropModel
52
{
53
RANDOM_PROPAGATION
,
54
FRIIS_PROPAGATION
,
55
LOG_DISTANCE_PROPAGATION
,
56
COST231_PROPAGATION
57
};
58
59
/**
60
* Register this type.
61
* \return The TypeId.
62
*/
63
static
TypeId
GetTypeId
();
64
65
/**
66
* \brief Creates a channel and sets the propagation model
67
* \param propModel the propagation model to use
68
*/
69
SimpleOfdmWimaxChannel
(
PropModel
propModel);
70
71
/**
72
* \brief Sends a dummy fec block to all connected physical devices
73
* \param BlockTime the time needed to send the block
74
* \param burstSize the size of the burst
75
* \param phy the sender device
76
* \param isFirstBlock true if this block is the first one, false otherwise
77
* \param isLastBlock true if this block is the last one, false otherwise
78
* \param frequency the frequency on which the block is sent
79
* \param modulationType the modulation used to send the fec block
80
* \param direction uplink or downlink
81
* \param txPowerDbm the transmission power
82
* \param burst the packet burst to send
83
*/
84
void
Send
(
Time
BlockTime,
85
uint32_t
burstSize,
86
Ptr<WimaxPhy>
phy,
87
bool
isFirstBlock,
88
bool
isLastBlock,
89
uint64_t frequency,
90
WimaxPhy::ModulationType
modulationType,
91
uint8_t direction,
92
double
txPowerDbm,
93
Ptr<PacketBurst>
burst);
94
/**
95
* \brief sets the propagation model
96
* \param propModel the propagation model to used
97
*/
98
void
SetPropagationModel
(
PropModel
propModel);
99
100
/**
101
* Assign a fixed random variable stream number to the random variables
102
* used by this model. Return the number of streams (possibly zero) that
103
* have been assigned.
104
*
105
* \param stream first stream index to use
106
* \return the number of stream indices assigned by this model
107
*/
108
int64_t
AssignStreams
(int64_t stream)
override
;
109
110
private
:
111
/**
112
* Attach function
113
* \param phy the phy layer
114
*/
115
void
DoAttach
(
Ptr<WimaxPhy>
phy)
override
;
116
std::list<Ptr<SimpleOfdmWimaxPhy>>
m_phyList
;
///< phy list
117
/**
118
* Get number of devices function
119
* \returns the number of devices
120
*/
121
std::size_t
DoGetNDevices
()
const override
;
122
/**
123
* End send dummy block function
124
* \param rxphy the Ptr<SimpleOfdmWimaxPhy>
125
* \param param the SimpleOfdmSendParam *
126
*/
127
void
EndSendDummyBlock
(
Ptr<SimpleOfdmWimaxPhy>
rxphy,
SimpleOfdmSendParam
* param);
128
/**
129
* Get device function
130
* \param i the device index
131
* \returns the device
132
*/
133
Ptr<NetDevice>
DoGetDevice
(std::size_t i)
const override
;
134
Ptr<PropagationLossModel>
m_loss
;
///< loss
135
};
136
137
}
// namespace ns3
138
139
#endif
/* SIMPLE_OFDM_WIMAX_CHANNEL_H */
bvec.h
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ns3::SimpleOfdmSendParam
SimpleOfdmSendParam class.
Definition:
simple-ofdm-send-param.h:40
ns3::SimpleOfdmWimaxChannel
SimpleOfdmWimaxChannel class.
Definition:
simple-ofdm-wimax-channel.h:45
ns3::SimpleOfdmWimaxChannel::~SimpleOfdmWimaxChannel
~SimpleOfdmWimaxChannel() override
Definition:
simple-ofdm-wimax-channel.cc:49
ns3::SimpleOfdmWimaxChannel::m_loss
Ptr< PropagationLossModel > m_loss
loss
Definition:
simple-ofdm-wimax-channel.h:134
ns3::SimpleOfdmWimaxChannel::SetPropagationModel
void SetPropagationModel(PropModel propModel)
sets the propagation model
Definition:
simple-ofdm-wimax-channel.cc:90
ns3::SimpleOfdmWimaxChannel::DoAttach
void DoAttach(Ptr< WimaxPhy > phy) override
Attach function.
Definition:
simple-ofdm-wimax-channel.cc:115
ns3::SimpleOfdmWimaxChannel::DoGetNDevices
std::size_t DoGetNDevices() const override
Get number of devices function.
Definition:
simple-ofdm-wimax-channel.cc:122
ns3::SimpleOfdmWimaxChannel::SimpleOfdmWimaxChannel
SimpleOfdmWimaxChannel()
Definition:
simple-ofdm-wimax-channel.cc:44
ns3::SimpleOfdmWimaxChannel::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition:
simple-ofdm-wimax-channel.cc:56
ns3::SimpleOfdmWimaxChannel::m_phyList
std::list< Ptr< SimpleOfdmWimaxPhy > > m_phyList
phy list
Definition:
simple-ofdm-wimax-channel.h:116
ns3::SimpleOfdmWimaxChannel::EndSendDummyBlock
void EndSendDummyBlock(Ptr< SimpleOfdmWimaxPhy > rxphy, SimpleOfdmSendParam *param)
End send dummy block function.
Definition:
simple-ofdm-wimax-channel.cc:203
ns3::SimpleOfdmWimaxChannel::DoGetDevice
Ptr< NetDevice > DoGetDevice(std::size_t i) const override
Get device function.
Definition:
simple-ofdm-wimax-channel.cc:128
ns3::SimpleOfdmWimaxChannel::Send
void Send(Time BlockTime, uint32_t burstSize, Ptr< WimaxPhy > phy, bool isFirstBlock, bool isLastBlock, uint64_t frequency, WimaxPhy::ModulationType modulationType, uint8_t direction, double txPowerDbm, Ptr< PacketBurst > burst)
Sends a dummy fec block to all connected physical devices.
Definition:
simple-ofdm-wimax-channel.cc:145
ns3::SimpleOfdmWimaxChannel::PropModel
PropModel
PropModel enumeration.
Definition:
simple-ofdm-wimax-channel.h:52
ns3::SimpleOfdmWimaxChannel::FRIIS_PROPAGATION
@ FRIIS_PROPAGATION
Definition:
simple-ofdm-wimax-channel.h:54
ns3::SimpleOfdmWimaxChannel::COST231_PROPAGATION
@ COST231_PROPAGATION
Definition:
simple-ofdm-wimax-channel.h:56
ns3::SimpleOfdmWimaxChannel::RANDOM_PROPAGATION
@ RANDOM_PROPAGATION
Definition:
simple-ofdm-wimax-channel.h:53
ns3::SimpleOfdmWimaxChannel::LOG_DISTANCE_PROPAGATION
@ LOG_DISTANCE_PROPAGATION
Definition:
simple-ofdm-wimax-channel.h:55
ns3::SimpleOfdmWimaxChannel::AssignStreams
int64_t AssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
Definition:
simple-ofdm-wimax-channel.cc:216
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::WimaxChannel
The channel object to attach Wimax NetDevices.
Definition:
wimax-channel.h:43
ns3::WimaxPhy::ModulationType
ModulationType
ModulationType enumeration.
Definition:
wimax-phy.h:54
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
simple-ofdm-send-param.h
wimax-channel.h
wimax-phy.h
src
wimax
model
simple-ofdm-wimax-channel.h
Generated on Tue May 28 2024 23:41:15 for ns-3 by
1.9.6