A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
lte-common.h
Go to the documentation of this file.
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Manuel Requena <manuel.requena@cttc.es>
19
* Author: Marco Miozzo <marco.miozzo@cttc.es>
20
*/
21
#ifndef LTE_COMMON_H
22
#define LTE_COMMON_H
23
24
#include "ns3/uinteger.h"
25
#include <cmath>
26
27
// see 36.213 section 8
28
#define UL_PUSCH_TTIS_DELAY 4
29
30
namespace
ns3 {
31
32
33
struct
LteFlowId_t
34
{
35
uint16_t
m_rnti
;
36
uint8_t
m_lcId
;
37
38
public
:
39
LteFlowId_t
();
40
LteFlowId_t
(
const
uint16_t a,
const
uint8_t b);
41
42
friend
bool
operator ==
(
const
LteFlowId_t
&a,
const
LteFlowId_t
&b);
43
friend
bool
operator <
(
const
LteFlowId_t
&a,
const
LteFlowId_t
&b);
44
};
45
46
struct
ImsiLcidPair_t
47
{
48
uint64_t
m_imsi
;
49
uint8_t
m_lcId
;
50
51
public
:
52
ImsiLcidPair_t
();
53
ImsiLcidPair_t
(
const
uint64_t a,
const
uint8_t b);
54
55
friend
bool
operator ==
(
const
ImsiLcidPair_t
&a,
const
ImsiLcidPair_t
&b);
56
friend
bool
operator <
(
const
ImsiLcidPair_t
&a,
const
ImsiLcidPair_t
&b);
57
};
58
62
struct
LteUeConfig_t
63
{
64
uint16_t
m_rnti
;
68
bool
m_reconfigureFlag
;
72
uint8_t
m_transmissionMode
;
76
uint16_t
m_srsConfigurationIndex
;
77
78
public
:
79
LteUeConfig_t
();
80
81
friend
bool
operator ==
(
const
LteUeConfig_t
&a,
const
LteUeConfig_t
&b);
82
friend
bool
operator <
(
const
LteUeConfig_t
&a,
const
LteUeConfig_t
&b);
83
};
84
85
86
class
LteFfConverter
87
{
88
89
public
:
90
static
uint16_t
double2fpS11dot3
(
double
val);
91
static
double
fpS11dot3toDouble
(uint16_t val);
92
static
double
getMinFpS11dot3Value
();
93
94
//static const double MIN_FP_S11DOT3_VALUE = -4096;
95
96
97
};
98
99
class
BufferSizeLevelBsr
100
{
101
102
public
:
103
static
uint32_t
BsrId2BufferSize
(uint8_t val);
104
static
uint8_t
BufferSize2BsrId
(uint32_t val);
105
106
static
int
m_bufferSizeLevelBsr
[64];
107
108
109
};
110
111
class
TransmissionModesLayers
112
{
113
public
:
114
static
uint8_t
TxMode2LayerNum
(uint8_t txMode);
115
};
116
117
118
};
// namespace ns3
119
120
121
#endif
/* LTE_COMMON_H_ */
src
lte
model
lte-common.h
Generated on Fri Dec 21 2012 19:00:39 for ns-3 by
1.8.1.2