author | Andrey Mazo <mazo@iitp.ru> |
Fri, 23 Apr 2010 15:09:31 +0400 | |
changeset 6273 | 8d70de29d514 |
parent 6111 | 0b22ae082153 |
child 6402 | 088c5e38acb3 |
permissions | -rw-r--r-- |
6111
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
2 |
/* |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
3 |
* Copyright (c) 2007,2008, 2009 INRIA, UDcast |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
4 |
* |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation; |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
8 |
* |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
13 |
* |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
17 |
* |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
18 |
* Author: Mohamed Amine Ismail <amine.ismail@sophia.inria.fr> |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
19 |
* <amine.ismail@udcast.com> |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
20 |
*/ |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
21 |
|
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
22 |
#include <list> |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
23 |
#include "wimax-channel.h" |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
24 |
#include "bvec.h" |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
25 |
#include "wimax-phy.h" |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
26 |
#include "ns3/propagation-loss-model.h" |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
27 |
|
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
28 |
#ifndef SIMPLEOFDMSENDPARAM_H_ |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
29 |
#define SIMPLEOFDMSENDPARAM_H_ |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
30 |
|
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
31 |
namespace ns3 { |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
32 |
class simpleOfdmSendParam |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
33 |
{ |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
34 |
public: |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
35 |
simpleOfdmSendParam (void); |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
36 |
simpleOfdmSendParam (const bvec &fecBlock, uint32_t burstSize, |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
37 |
bool isFirstBlock, uint64_t Frequency, |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
38 |
WimaxPhy::ModulationType modulationType, uint8_t direction, |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
39 |
double rxPowerDbm); |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
40 |
~simpleOfdmSendParam (void); |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
41 |
/** |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
42 |
* \brief sent the fec block to send |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
43 |
* \param fecBlock the fec block to send |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
44 |
*/ |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
45 |
void SetFecBlock (const bvec &fecBlock); |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
46 |
/** |
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
6111
diff
changeset
|
47 |
* \brief set the burst size |
6111
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
48 |
* \param burstSize the burst size in bytes |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
49 |
*/ |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
50 |
void SetBurstSize (uint32_t burstSize); |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
51 |
/** |
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
6111
diff
changeset
|
52 |
* \param isFirstBlock Set to true if this fec block is the first one in the burst, set to false otherwise |
6111
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
53 |
*/ |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
54 |
void SetIsFirstBlock (bool isFirstBlock); |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
55 |
/** |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
56 |
* \param Frequency set the frequency of the channel in wich this fec block will be sent |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
57 |
*/ |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
58 |
void SetFrequency (uint64_t Frequency); |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
59 |
/** |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
60 |
* \param modulationType the modulation type used to send this fec block |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
61 |
*/ |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
62 |
void SetModulationType (WimaxPhy::ModulationType modulationType); |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
63 |
/** |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
64 |
* \param direction the direction on which this fec block will be sent |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
65 |
*/ |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
66 |
void SetDirection (uint8_t direction); |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
67 |
/** |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
68 |
* \param rxPowerDbm the received power |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
69 |
*/ |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
70 |
void SetRxPowerDbm (double rxPowerDbm); |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
71 |
/** |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
72 |
* \return the fec block |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
73 |
*/ |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
74 |
bvec GetFecBlock (void); |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
75 |
/** |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
76 |
* \return the burst size |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
77 |
*/ |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
78 |
uint32_t GetBurstSize (void); |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
79 |
/** |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
80 |
* \return true if this fec block is the first one in the burst, false otherwise |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
81 |
*/ |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
82 |
bool GetIsFirstBlock (void); |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
83 |
/** |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
84 |
* \return the frequency on which the fec block is sent/received |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
85 |
*/ |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
86 |
uint64_t GetFrequency (void); |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
87 |
/** |
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
6111
diff
changeset
|
88 |
* \return the modulation type used to send this fec block |
6111
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
89 |
*/ |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
90 |
WimaxPhy::ModulationType GetModulationType (void); |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
91 |
/** |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
92 |
* \return the direction on which this fec block was sent. UP or DOWN |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
93 |
*/ |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
94 |
uint8_t GetDirection (void); |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
95 |
/** |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
96 |
* \return the Received power |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
97 |
*/ |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
98 |
double GetRxPowerDbm (void); |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
99 |
|
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
100 |
private: |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
101 |
bvec m_fecBlock; |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
102 |
uint32_t m_burstSize; |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
103 |
bool m_isFirstBlock; |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
104 |
uint64_t m_frequency; |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
105 |
WimaxPhy::ModulationType m_modulationType; |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
106 |
uint8_t m_direction; |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
107 |
double m_rxPowerDbm; |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
108 |
|
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
109 |
}; |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
110 |
} // namespace ns3 |
0b22ae082153
Merge WiMAX module
Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
parents:
diff
changeset
|
111 |
#endif /* SIMPLEOFDMSENDPARAM_H_ */ |