A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
lte-common.h
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 #define HARQ_PERIOD 7
31 
32 namespace ns3 {
33 
34 
36 {
37  uint16_t m_rnti;
38  uint8_t m_lcId;
39 
40 public:
41  LteFlowId_t ();
42  LteFlowId_t (const uint16_t a, const uint8_t b);
43 
44  friend bool operator == (const LteFlowId_t &a, const LteFlowId_t &b);
45  friend bool operator < (const LteFlowId_t &a, const LteFlowId_t &b);
46 };
47 
49 {
50  uint64_t m_imsi;
51  uint8_t m_lcId;
52 
53 public:
54  ImsiLcidPair_t ();
55  ImsiLcidPair_t (const uint64_t a, const uint8_t b);
56 
57  friend bool operator == (const ImsiLcidPair_t &a, const ImsiLcidPair_t &b);
58  friend bool operator < (const ImsiLcidPair_t &a, const ImsiLcidPair_t &b);
59 };
60 
65 {
66  uint16_t m_rnti;
79 
80  public:
81  LteUeConfig_t ();
82 
83  friend bool operator == (const LteUeConfig_t &a, const LteUeConfig_t &b);
84  friend bool operator < (const LteUeConfig_t &a, const LteUeConfig_t &b);
85 };
86 
87 
89 {
90 
91 public:
92  static uint16_t double2fpS11dot3 (double val);
93  static double fpS11dot3toDouble (uint16_t val);
94  static double getMinFpS11dot3Value ();
95 
96  //static const double MIN_FP_S11DOT3_VALUE = -4096;
97 
98 
99 };
100 
102 {
103 
104  public:
105  static uint32_t BsrId2BufferSize (uint8_t val);
106  static uint8_t BufferSize2BsrId (uint32_t val);
107 
108  static int m_bufferSizeLevelBsr[64];
109 
110 
111 };
112 
114 {
115  public:
116  static uint8_t TxMode2LayerNum (uint8_t txMode);
117 };
118 
119 
121 {
122  int64_t m_timestamp; // in millisecond
123  uint16_t m_cellId;
124  uint64_t m_imsi;
125  uint16_t m_rnti;
126  uint8_t m_txMode;
127  uint8_t m_layer;
128  uint8_t m_mcs;
129  uint16_t m_size;
130  uint8_t m_rv;
131  uint8_t m_ndi;
132 };
133 
134 
136 {
137  int64_t m_timestamp; // in millisecond
138  uint16_t m_cellId;
139  uint64_t m_imsi;
140  uint16_t m_rnti;
141  uint8_t m_txMode;
142  uint8_t m_layer;
143  uint8_t m_mcs;
144  uint16_t m_size;
145  uint8_t m_rv;
146  uint8_t m_ndi;
147  uint8_t m_correctness;
148 };
149 
150 
151 }; // namespace ns3
152 
153 
154 #endif /* LTE_COMMON_H_ */
uint16_t m_srsConfigurationIndex
Definition: lte-common.h:78
uint8_t m_transmissionMode
Definition: lte-common.h:74
Parameters for configuring the UE.
Definition: lte-common.h:64