src/lte/model/lte-enb-phy.h
author Marco Miozzo <marco.miozzo@cttc.es>
Tue, 26 Jun 2012 16:35:04 +0200
changeset 9038 e1d67c8aa95b
parent 9036 5e09b29d4af5
child 9039 5bdf0c1be85f
permissions -rw-r--r--
Polish code according to codereview
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7385
10beb0e53130 standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents: 7238
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
     2
/*
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
     3
 * Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
     4
 *
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
     7
 * published by the Free Software Foundation;
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
     8
 *
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    12
 * GNU General Public License for more details.
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    13
 *
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    17
 *
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    18
 * Author: Giuseppe Piro  <g.piro@poliba.it>
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    19
 * Author: Marco Miozzo <marco.miozzo@cttc.es>
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    20
 */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    21
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    22
#ifndef ENB_LTE_PHY_H
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    23
#define ENB_LTE_PHY_H
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    24
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    25
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    26
#include "lte-phy.h"
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    27
#include <ns3/lte-enb-phy-sap.h>
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    28
#include <map>
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    29
#include <ns3/lte-ue-phy.h>
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    30
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    31
namespace ns3 {
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    32
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    33
class PacketBurst;
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    34
class LteNetDevice;
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    35
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    36
/**
7238
85a7e87bb4cc Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents: 6852
diff changeset
    37
 * \ingroup lte
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    38
 * LteEnbPhy models the physical layer for the eNodeB
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    39
 */
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    40
class LteEnbPhy : public LtePhy
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    41
{
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    42
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    43
  friend class EnbMemberLteEnbPhySapProvider;
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    44
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    45
public:
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    46
  /**
7980
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    47
   * @warning the default constructor should not be used
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    48
   */
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    49
  LteEnbPhy ();
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    50
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    51
  /**
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    52
   *
7980
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    53
   * \param dlPhy the downlink LteSpectrumPhy instance
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    54
   * \param ulPhy the uplink LteSpectrumPhy instance
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    55
   */
7980
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    56
  LteEnbPhy (Ptr<LteSpectrumPhy> dlPhy, Ptr<LteSpectrumPhy> ulPhy);
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    57
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    58
  virtual ~LteEnbPhy ();
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    59
8015
e8fd3bf1692f flexible spectrum model
Nicola Baldo <nbaldo@cttc.es>
parents: 7981
diff changeset
    60
  // inherited from Object
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    61
  static TypeId GetTypeId (void);
8015
e8fd3bf1692f flexible spectrum model
Nicola Baldo <nbaldo@cttc.es>
parents: 7981
diff changeset
    62
  virtual void DoStart (void);
7913
ed3a9f8a76d7 added DoDispose to lte-phy and lte-spectrum-phy
Nicola Baldo <nbaldo@cttc.es>
parents: 7887
diff changeset
    63
  virtual void DoDispose (void);
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    64
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    65
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    66
  /**
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    67
  * \brief Get the PHY SAP provider
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    68
  * \return a pointer to the SAP Provider of the PHY
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    69
  */
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    70
  LteEnbPhySapProvider* GetLteEnbPhySapProvider ();
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    71
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    72
  /**
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    73
  * \brief Set the PHY SAP User
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    74
  * \param s a pointer to the PHY SAP user
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    75
  */
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    76
  void SetLteEnbPhySapUser (LteEnbPhySapUser* s);
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    77
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    78
  /**
7949
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7937
diff changeset
    79
   * \param pw the transmission power in dBm
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7937
diff changeset
    80
   */
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    81
  void SetTxPower (double pow);
7949
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7937
diff changeset
    82
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7937
diff changeset
    83
  /**
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7937
diff changeset
    84
   * \return the transmission power in dBm
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7937
diff changeset
    85
   */
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    86
  double GetTxPower () const;
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    87
8670
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
    88
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    89
  /**
7981
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
    90
   * \param pw the noise figure in dB
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
    91
   */
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    92
  void SetNoiseFigure (double pow);
7981
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
    93
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
    94
  /**
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
    95
   * \return the noise figure in dB
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
    96
   */
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    97
  double GetNoiseFigure () const;
7981
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
    98
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    99
  /**
8670
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
   100
   * \param delay the TTI delay between MAC and channel
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
   101
   */
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
   102
  void SetMacChDelay (uint8_t delay);
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
   103
  
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
   104
  /**
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
   105
   * \returns the TTI delay between MAC and channel
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
   106
   */
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
   107
  uint8_t GetMacChDelay (void) const;
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
   108
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
   109
  /**
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   110
  * \brief Queue the MAC PDU to be sent
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   111
  * \param p the MAC PDU to sent
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   112
  */
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   113
  virtual void DoSendMacPdu (Ptr<Packet> p);
8729
74de12409ee5 Update m_macChTtiDelay fixed to 4 in UL (standard) and make schedulers unaware of channel delays (tests updated according to new delay)
mmiozzo
parents: 8728
diff changeset
   114
  
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   115
  virtual void DoSetTransmissionMode (uint16_t  rnti, uint8_t txMode);
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   116
  
9038
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   117
  virtual void DoSetSrsConfigurationIndex (uint16_t  rnti, uint16_t srcCi);
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   118
    
8729
74de12409ee5 Update m_macChTtiDelay fixed to 4 in UL (standard) and make schedulers unaware of channel delays (tests updated according to new delay)
mmiozzo
parents: 8728
diff changeset
   119
  virtual uint8_t DoGetMacChTtiDelay ();
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   120
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   121
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   122
  void DoSetDownlinkSubChannels ();
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   123
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   124
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   125
   * \brief Create the PSD for TX
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   126
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   127
  virtual Ptr<SpectrumValue> CreateTxPowerSpectralDensity ();
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   128
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   129
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   130
   * \brief Calculate the channel quality for a given UE
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   131
   * \param sinr a list of computed SINR
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   132
   * \param ue the UE
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   133
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   134
  void CalcChannelQualityForUe (std::vector <double> sinr, Ptr<LteSpectrumPhy> ue);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   135
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   136
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   137
   * \brief Receive the control message
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   138
   * \param msg the received message
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   139
   */
9035
e40974228d94 Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8729
diff changeset
   140
  virtual void ReceiveLteControlMessage (Ptr<LteControlMessage> msg);
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
   141
7910
d7083e401e59 PUSCH based UL-CQI generation at eNB PHY side
mmiozzo
parents: 7887
diff changeset
   142
  /**
d7083e401e59 PUSCH based UL-CQI generation at eNB PHY side
mmiozzo
parents: 7887
diff changeset
   143
  * \brief Create the UL CQI feedback from SINR values perceived at
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   144
  * the physical layer with the PUSCH signal received from eNB
7910
d7083e401e59 PUSCH based UL-CQI generation at eNB PHY side
mmiozzo
parents: 7887
diff changeset
   145
  * \param sinr SINR values vector
d7083e401e59 PUSCH based UL-CQI generation at eNB PHY side
mmiozzo
parents: 7887
diff changeset
   146
  */
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   147
  UlCqi_s CreatePuschCqiReport (const SpectrumValue& sinr);
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   148
  
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   149
  /**
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   150
  * \brief Create the UL CQI feedback from SINR values perceived at
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   151
  * the physical layer with the SRS signal received from eNB
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   152
  * \param sinr SINR values vector
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   153
  */
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   154
  UlCqi_s CreateSrsCqiReport (const SpectrumValue& sinr);
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   155
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   156
9035
e40974228d94 Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8729
diff changeset
   157
  void DoSendLteControlMessage (Ptr<LteControlMessage> msg);
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   158
8180
5429db8b8c37 Fix Bug JIRA:LENA-145, RNTI as uint16_t in LteEnbPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8148
diff changeset
   159
  bool AddUePhy (uint16_t rnti, Ptr<LteUePhy> phy);
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   160
8180
5429db8b8c37 Fix Bug JIRA:LENA-145, RNTI as uint16_t in LteEnbPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8148
diff changeset
   161
  bool DeleteUePhy (uint16_t rnti);
9038
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   162
  
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   163
  /**
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   164
  * \brief Send the PDCCH and PCFICH in the first 3 symbols
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   165
  * \param ctrlMsgList the list of control messages of PDCCH
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   166
  */
9035
e40974228d94 Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8729
diff changeset
   167
  void SendControlChannels (std::list<Ptr<LteControlMessage> > ctrlMsgList);
9038
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   168
  
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   169
  /**
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   170
  * \brief Send the PDSCH
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   171
  * \param pb the PacketBurst to be sent
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   172
  */
9035
e40974228d94 Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8729
diff changeset
   173
  void SendDataChannels (Ptr<PacketBurst> pb);
e40974228d94 Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8729
diff changeset
   174
  
8728
5a99218bfd1b Bug-fix on m_macChTtiDelay management on UE-eNB PHY and consequently update RR-PF schedulers and tests
mmiozzo
parents: 8726
diff changeset
   175
  /**
5a99218bfd1b Bug-fix on m_macChTtiDelay management on UE-eNB PHY and consequently update RR-PF schedulers and tests
mmiozzo
parents: 8726
diff changeset
   176
  * \param m the UL-CQI to be queued
5a99218bfd1b Bug-fix on m_macChTtiDelay management on UE-eNB PHY and consequently update RR-PF schedulers and tests
mmiozzo
parents: 8726
diff changeset
   177
  */
9035
e40974228d94 Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8729
diff changeset
   178
  void QueueUlDci (UlDciLteControlMessage m);
8728
5a99218bfd1b Bug-fix on m_macChTtiDelay management on UE-eNB PHY and consequently update RR-PF schedulers and tests
mmiozzo
parents: 8726
diff changeset
   179
  
5a99218bfd1b Bug-fix on m_macChTtiDelay management on UE-eNB PHY and consequently update RR-PF schedulers and tests
mmiozzo
parents: 8726
diff changeset
   180
  /**
5a99218bfd1b Bug-fix on m_macChTtiDelay management on UE-eNB PHY and consequently update RR-PF schedulers and tests
mmiozzo
parents: 8726
diff changeset
   181
  * \returns the list of UL-CQI to be processed
5a99218bfd1b Bug-fix on m_macChTtiDelay management on UE-eNB PHY and consequently update RR-PF schedulers and tests
mmiozzo
parents: 8726
diff changeset
   182
  */
9035
e40974228d94 Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8729
diff changeset
   183
  std::list<UlDciLteControlMessage> DequeueUlDci (void);
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   184
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   185
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   186
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   187
   * \brief Start a LTE frame
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   188
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   189
  void StartFrame (void);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   190
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   191
   * \brief Start a LTE sub frame
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   192
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   193
  void StartSubFrame (void);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   194
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   195
   * \brief End a LTE sub frame
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   196
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   197
  void EndSubFrame (void);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   198
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   199
   * \brief End a LTE frame
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   200
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   201
  void EndFrame (void);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   202
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   203
  /**
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   204
   * \brief PhySpectrum received a new PHY-PDU
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   205
   */
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   206
  void PhyPduReceived (Ptr<Packet> p);
9035
e40974228d94 Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8729
diff changeset
   207
  
e40974228d94 Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8729
diff changeset
   208
  /**
e40974228d94 Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8729
diff changeset
   209
  * \brief PhySpectrum received a new list of LteControlMessage
e40974228d94 Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8729
diff changeset
   210
  */
e40974228d94 Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8729
diff changeset
   211
  virtual void ReceiveLteControlMessageList (std::list<Ptr<LteControlMessage> >);
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
   212
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   213
  // inherited from LtePhy
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   214
  virtual void GenerateCtrlCqiReport (const SpectrumValue& sinr);
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   215
  virtual void GenerateDataCqiReport (const SpectrumValue& sinr);
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
   216
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   217
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   218
private:
8180
5429db8b8c37 Fix Bug JIRA:LENA-145, RNTI as uint16_t in LteEnbPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8148
diff changeset
   219
  std::map <uint16_t, Ptr<LteUePhy> > m_ueAttached;
8728
5a99218bfd1b Bug-fix on m_macChTtiDelay management on UE-eNB PHY and consequently update RR-PF schedulers and tests
mmiozzo
parents: 8726
diff changeset
   220
  
9035
e40974228d94 Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8729
diff changeset
   221
  std::vector <int> m_dlDataRbMap;
e40974228d94 Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8729
diff changeset
   222
  
e40974228d94 Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8729
diff changeset
   223
  std::vector< std::list<UlDciLteControlMessage> > m_ulDciQueue; // for storing info on future receptions
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   224
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   225
  LteEnbPhySapProvider* m_enbPhySapProvider;
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   226
  LteEnbPhySapUser* m_enbPhySapUser;
9035
e40974228d94 Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8729
diff changeset
   227
  
e40974228d94 Update Phy Layer for managing different frames for different set of channels (data vs. ctrl and srs)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8729
diff changeset
   228
  std::vector <uint16_t> m_ulRntiRxed;
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   229
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   230
  uint32_t m_nrFrames;
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   231
  uint32_t m_nrSubFrames;
8714
398bbcbb3f42 Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8253
diff changeset
   232
  
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   233
  uint16_t m_srsPeriodicity;
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   234
  std::map <uint16_t,uint16_t> m_srsCounter;
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   235
  
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   236
};
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   237
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   238
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   239
}
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   240
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
   241
#endif /* LTE_ENB_PHY_H */