A Discrete-Event Network Simulator
API
 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 
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 
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 
63 {
64  uint16_t m_rnti;
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 
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 
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 
112 {
113  public:
114  static uint8_t TxMode2LayerNum (uint8_t txMode);
115 };
116 
117 
118 }; // namespace ns3
119 
120 
121 #endif /* LTE_COMMON_H_ */