author | Lalith Suresh <suresh.lalith@gmail.com> |
Fri, 04 Mar 2011 01:26:54 +0000 | |
changeset 6852 | 8f1a53d3f6ca |
parent 6710 | src/devices/lte/model/ue-phy.h@3cd651349cb6 |
child 7238 | 85a7e87bb4cc |
child 7886 | b65c16d4da83 |
permissions | -rw-r--r-- |
6705 | 1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
3 |
* Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari |
|
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: Giuseppe Piro <g.piro@poliba.it> |
|
19 |
*/ |
|
20 |
||
21 |
#ifndef UE_PHY_H |
|
22 |
#define UE_PHY_H |
|
23 |
||
24 |
||
25 |
#include "lte-phy.h" |
|
26 |
||
27 |
namespace ns3 { |
|
28 |
||
29 |
class PacketBurst; |
|
30 |
class LteNetDevice; |
|
31 |
||
32 |
/** |
|
33 |
* The LteSpectrumPhy models the physical layer of LTE |
|
34 |
*/ |
|
35 |
class UeLtePhy : public LtePhy |
|
36 |
{ |
|
37 |
||
38 |
public: |
|
39 |
UeLtePhy (); |
|
40 |
||
41 |
/** |
|
42 |
* \brief Create the physical layer |
|
43 |
* \param d the device where the physical layer is attached |
|
44 |
*/ |
|
45 |
UeLtePhy (Ptr<LteNetDevice> d); |
|
46 |
||
47 |
virtual ~UeLtePhy (); |
|
48 |
static TypeId GetTypeId (void); |
|
49 |
||
50 |
/** |
|
51 |
* \brief Send the packet to the channel |
|
52 |
* \param pb the burst of packet to send |
|
53 |
* \return true if |
|
54 |
*/ |
|
55 |
virtual bool SendPacket (Ptr<PacketBurst> pb); |
|
56 |
||
57 |
/** |
|
58 |
* \brief Create the PSD for the TX |
|
59 |
* \return the pointer to the PSD |
|
60 |
*/ |
|
61 |
virtual Ptr<SpectrumValue> CreateTxPowerSpectralDensity (); |
|
62 |
||
63 |
/** |
|
64 |
* \brief Update available channel for TX |
|
65 |
*/ |
|
66 |
virtual void DoSetUplinkSubChannels (); |
|
67 |
||
68 |
/** |
|
69 |
* \brief Set a list of sub channels to use in TX |
|
70 |
* \param mask a list of sub channels |
|
71 |
*/ |
|
72 |
void SetSubChannelsForTransmission (std::vector <int> mask); |
|
73 |
/** |
|
74 |
* \brief Get a list of sub channels to use in RX |
|
75 |
* \return a list of sub channels |
|
76 |
*/ |
|
77 |
std::vector <int> GetSubChannelsForTransmission (void); |
|
78 |
||
79 |
/** |
|
80 |
* \brief Get a list of sub channels to use in RX |
|
81 |
* \param mask list of sub channels |
|
82 |
*/ |
|
83 |
void SetSubChannelsForReception (std::vector <int> mask); |
|
84 |
/** |
|
85 |
* \brief Get a list of sub channels to use in RX |
|
86 |
* \return a list of sub channels |
|
87 |
*/ |
|
88 |
std::vector <int> GetSubChannelsForReception (void); |
|
89 |
||
90 |
||
91 |
/** |
|
92 |
* \brief Create CQI feedbacks from SINR values. SINR values are |
|
93 |
* computed at the physical layer when is received a signal from the eNB |
|
94 |
* \param sinr list of SINR values |
|
95 |
*/ |
|
96 |
void CreateCqiFeedbacks (std::vector<double> sinr); |
|
97 |
||
6710
3cd651349cb6
lte examples now passing valgrind tests
Nicola Baldo <nbaldo@cttc.es>
parents:
6705
diff
changeset
|
98 |
virtual void SendIdealControlMessage (Ptr<IdealControlMessage> msg); |
3cd651349cb6
lte examples now passing valgrind tests
Nicola Baldo <nbaldo@cttc.es>
parents:
6705
diff
changeset
|
99 |
virtual void ReceiveIdealControlMessage (Ptr<IdealControlMessage> msg); |
6705 | 100 |
|
101 |
private: |
|
102 |
std::vector <int> m_subChannelsForTransmission; |
|
103 |
std::vector <int> m_subChannelsForReception; |
|
104 |
}; |
|
105 |
||
106 |
||
107 |
} |
|
108 |
||
109 |
#endif /* UE_PHY_H */ |