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 <math.h>
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 
60 {
61  uint16_t m_rnti;
63 
64  public:
65  LteUeConfig_t ();
66 
67  friend bool operator == (const LteUeConfig_t &a, const LteUeConfig_t &b);
68  friend bool operator < (const LteUeConfig_t &a, const LteUeConfig_t &b);
69 };
70 
71 
73 {
74 
75 public:
76  static uint16_t double2fpS11dot3 (double val);
77  static double fpS11dot3toDouble (uint16_t val);
78  static double getMinFpS11dot3Value ();
79 
80  //static const double MIN_FP_S11DOT3_VALUE = -4096;
81 
82 
83 };
84 
86 {
87 
88  public:
89  static uint32_t BsrId2BufferSize (uint8_t val);
90  static uint8_t BufferSize2BsrId (uint32_t val);
91 
92  static int m_bufferSizeLevelBsr[64];
93 
94 
95 };
96 
98 {
99  public:
100  static uint8_t TxMode2LayerNum (uint8_t txMode);
101 };
102 
103 
104 }; // namespace ns3
105 
106 
107 #endif /* LTE_COMMON_H_ */