A Discrete-Event Network Simulator
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"
26#include "wimax-channel.h"
27#include "wimax-phy.h"
28
29#include "ns3/propagation-loss-model.h"
30
31#include <list>
32
33namespace ns3
34{
35
36class Packet;
37class PacketBurst;
38class SimpleOfdmWimaxPhy;
39
40/**
41 * \ingroup wimax
42 * \brief SimpleOfdmWimaxChannel class
43 */
45{
46 public:
48 ~SimpleOfdmWimaxChannel() override;
49
50 /// PropModel enumeration
52 {
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 */
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 */
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;
135};
136
137} // namespace ns3
138
139#endif /* SIMPLE_OFDM_WIMAX_CHANNEL_H */
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
SimpleOfdmSendParam class.
SimpleOfdmWimaxChannel class.
Ptr< PropagationLossModel > m_loss
loss
void SetPropagationModel(PropModel propModel)
sets the propagation model
void DoAttach(Ptr< WimaxPhy > phy) override
Attach function.
std::size_t DoGetNDevices() const override
Get number of devices function.
static TypeId GetTypeId()
Register this type.
std::list< Ptr< SimpleOfdmWimaxPhy > > m_phyList
phy list
void EndSendDummyBlock(Ptr< SimpleOfdmWimaxPhy > rxphy, SimpleOfdmSendParam *param)
End send dummy block function.
Ptr< NetDevice > DoGetDevice(std::size_t i) const override
Get device function.
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.
int64_t AssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:59
The channel object to attach Wimax NetDevices.
Definition: wimax-channel.h:43
ModulationType
ModulationType enumeration.
Definition: wimax-phy.h:54
Every class exported by the ns3 library is enclosed in the ns3 namespace.