src/lte/model/lte-enb-phy.h
author Nicola Baldo <nicola@baldo.biz>
Sun, 29 Jul 2012 20:32:28 +0200
changeset 9053 974762654b12
parent 9049 9079248e111b
child 9346 00e674a0d567
permissions -rw-r--r--
subframe indication now triggered independently by LteUePhy
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
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    26
#include <ns3/lte-enb-phy-sap.h>
9053
974762654b12 subframe indication now triggered independently by LteUePhy
Nicola Baldo <nicola@baldo.biz>
parents: 9049
diff changeset
    27
#include <ns3/lte-phy.h>
974762654b12 subframe indication now triggered independently by LteUePhy
Nicola Baldo <nicola@baldo.biz>
parents: 9049
diff changeset
    28
#include <ns3/lte-ue-phy.h>
974762654b12 subframe indication now triggered independently by LteUePhy
Nicola Baldo <nicola@baldo.biz>
parents: 9049
diff changeset
    29
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    30
#include <map>
9053
974762654b12 subframe indication now triggered independently by LteUePhy
Nicola Baldo <nicola@baldo.biz>
parents: 9049
diff changeset
    31
#include <set>
974762654b12 subframe indication now triggered independently by LteUePhy
Nicola Baldo <nicola@baldo.biz>
parents: 9049
diff changeset
    32
974762654b12 subframe indication now triggered independently by LteUePhy
Nicola Baldo <nicola@baldo.biz>
parents: 9049
diff changeset
    33
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    34
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    35
namespace ns3 {
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    36
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    37
class PacketBurst;
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    38
class LteNetDevice;
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    39
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    40
/**
7238
85a7e87bb4cc Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents: 6852
diff changeset
    41
 * \ingroup lte
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    42
 * LteEnbPhy models the physical layer for the eNodeB
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    43
 */
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    44
class LteEnbPhy : public LtePhy
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    45
{
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    46
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    47
  friend class EnbMemberLteEnbPhySapProvider;
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    48
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    49
public:
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    50
  /**
7980
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    51
   * @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
    52
   */
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    53
  LteEnbPhy ();
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    54
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    55
  /**
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    56
   *
7980
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    57
   * \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
    58
   * \param ulPhy the uplink LteSpectrumPhy instance
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    59
   */
7980
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    60
  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
    61
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    62
  virtual ~LteEnbPhy ();
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    63
8015
e8fd3bf1692f flexible spectrum model
Nicola Baldo <nbaldo@cttc.es>
parents: 7981
diff changeset
    64
  // inherited from Object
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    65
  static TypeId GetTypeId (void);
8015
e8fd3bf1692f flexible spectrum model
Nicola Baldo <nbaldo@cttc.es>
parents: 7981
diff changeset
    66
  virtual void DoStart (void);
7913
ed3a9f8a76d7 added DoDispose to lte-phy and lte-spectrum-phy
Nicola Baldo <nbaldo@cttc.es>
parents: 7887
diff changeset
    67
  virtual void DoDispose (void);
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    68
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    69
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    70
  /**
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    71
  * \brief Get the PHY SAP provider
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    72
  * \return a pointer to the SAP Provider of the PHY
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    73
  */
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    74
  LteEnbPhySapProvider* GetLteEnbPhySapProvider ();
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    75
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    76
  /**
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    77
  * \brief Set the PHY SAP User
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    78
  * \param s a pointer to the PHY SAP user
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    79
  */
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    80
  void SetLteEnbPhySapUser (LteEnbPhySapUser* s);
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    81
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    82
  /**
7949
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7937
diff changeset
    83
   * \param pw the transmission power in dBm
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7937
diff changeset
    84
   */
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    85
  void SetTxPower (double pow);
7949
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7937
diff changeset
    86
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7937
diff changeset
    87
  /**
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7937
diff changeset
    88
   * \return the transmission power in dBm
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7937
diff changeset
    89
   */
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    90
  double GetTxPower () const;
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    91
8670
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
    92
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    93
  /**
7981
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
    94
   * \param pw the noise figure in dB
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
    95
   */
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    96
  void SetNoiseFigure (double pow);
7981
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
    97
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
    98
  /**
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
    99
   * \return the noise figure in dB
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
   100
   */
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
   101
  double GetNoiseFigure () const;
7981
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
   102
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   103
  /**
8670
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
   104
   * \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
   105
   */
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
   106
  void SetMacChDelay (uint8_t delay);
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
   107
  
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
   * \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
   110
   */
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
   111
  uint8_t GetMacChDelay (void) const;
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
   112
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
   113
  /**
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   114
  * \brief Queue the MAC PDU to be sent
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   115
  * \param p the MAC PDU to sent
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   116
  */
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   117
  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
   118
  
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   119
  virtual void DoSetTransmissionMode (uint16_t  rnti, uint8_t txMode);
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   120
  
9038
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   121
  virtual void DoSetSrsConfigurationIndex (uint16_t  rnti, uint16_t srcCi);
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   122
    
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
   123
  virtual uint8_t DoGetMacChTtiDelay ();
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   124
9048
4aeb9111981b removed useless LtePhy::{Get,Set}{Up,down}linkSubChannels
Nicola Baldo <nbaldo@cttc.es>
parents: 9039
diff changeset
   125
  /**
4aeb9111981b removed useless LtePhy::{Get,Set}{Up,down}linkSubChannels
Nicola Baldo <nbaldo@cttc.es>
parents: 9039
diff changeset
   126
   * \brief set the resource blocks (a.k.a. sub channels) to be used in the downlink for transmission
4aeb9111981b removed useless LtePhy::{Get,Set}{Up,down}linkSubChannels
Nicola Baldo <nbaldo@cttc.es>
parents: 9039
diff changeset
   127
   * 
9049
9079248e111b updated doxygen of Get/SetDownlinkSubChannels to reflect actual usage
Nicola Baldo <nbaldo@cttc.es>
parents: 9048
diff changeset
   128
   * \param mask a vector of integers, if the i-th value is j it means
9079248e111b updated doxygen of Get/SetDownlinkSubChannels to reflect actual usage
Nicola Baldo <nbaldo@cttc.es>
parents: 9048
diff changeset
   129
   * that the j-th resource block is used for transmission in the
9079248e111b updated doxygen of Get/SetDownlinkSubChannels to reflect actual usage
Nicola Baldo <nbaldo@cttc.es>
parents: 9048
diff changeset
   130
   * downlink. If there is no i such that the value of the i-th
9079248e111b updated doxygen of Get/SetDownlinkSubChannels to reflect actual usage
Nicola Baldo <nbaldo@cttc.es>
parents: 9048
diff changeset
   131
   * element is j, it means that RB j is not used.
9048
4aeb9111981b removed useless LtePhy::{Get,Set}{Up,down}linkSubChannels
Nicola Baldo <nbaldo@cttc.es>
parents: 9039
diff changeset
   132
   */
4aeb9111981b removed useless LtePhy::{Get,Set}{Up,down}linkSubChannels
Nicola Baldo <nbaldo@cttc.es>
parents: 9039
diff changeset
   133
  void SetDownlinkSubChannels (std::vector<int> mask );
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   134
9048
4aeb9111981b removed useless LtePhy::{Get,Set}{Up,down}linkSubChannels
Nicola Baldo <nbaldo@cttc.es>
parents: 9039
diff changeset
   135
4aeb9111981b removed useless LtePhy::{Get,Set}{Up,down}linkSubChannels
Nicola Baldo <nbaldo@cttc.es>
parents: 9039
diff changeset
   136
  /**
4aeb9111981b removed useless LtePhy::{Get,Set}{Up,down}linkSubChannels
Nicola Baldo <nbaldo@cttc.es>
parents: 9039
diff changeset
   137
   * 
9049
9079248e111b updated doxygen of Get/SetDownlinkSubChannels to reflect actual usage
Nicola Baldo <nbaldo@cttc.es>
parents: 9048
diff changeset
   138
   * \return  a vector of integers, if the i-th value is j it means
9079248e111b updated doxygen of Get/SetDownlinkSubChannels to reflect actual usage
Nicola Baldo <nbaldo@cttc.es>
parents: 9048
diff changeset
   139
   * that the j-th resource block is used for transmission in the
9079248e111b updated doxygen of Get/SetDownlinkSubChannels to reflect actual usage
Nicola Baldo <nbaldo@cttc.es>
parents: 9048
diff changeset
   140
   * downlink. If there is no i such that the value of the i-th
9079248e111b updated doxygen of Get/SetDownlinkSubChannels to reflect actual usage
Nicola Baldo <nbaldo@cttc.es>
parents: 9048
diff changeset
   141
   * element is j, it means that RB j is not used.
9048
4aeb9111981b removed useless LtePhy::{Get,Set}{Up,down}linkSubChannels
Nicola Baldo <nbaldo@cttc.es>
parents: 9039
diff changeset
   142
   */
4aeb9111981b removed useless LtePhy::{Get,Set}{Up,down}linkSubChannels
Nicola Baldo <nbaldo@cttc.es>
parents: 9039
diff changeset
   143
  std::vector<int> GetDownlinkSubChannels (void);
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   144
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   145
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   146
   * \brief Create the PSD for TX
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   147
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   148
  virtual Ptr<SpectrumValue> CreateTxPowerSpectralDensity ();
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   149
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   150
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   151
   * \brief Calculate the channel quality for a given UE
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   152
   * \param sinr a list of computed SINR
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   153
   * \param ue the UE
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   154
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   155
  void CalcChannelQualityForUe (std::vector <double> sinr, Ptr<LteSpectrumPhy> ue);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   156
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   157
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   158
   * \brief Receive the control message
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   159
   * \param msg the received message
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   160
   */
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
   161
  virtual void ReceiveLteControlMessage (Ptr<LteControlMessage> msg);
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
   162
7910
d7083e401e59 PUSCH based UL-CQI generation at eNB PHY side
mmiozzo
parents: 7887
diff changeset
   163
  /**
d7083e401e59 PUSCH based UL-CQI generation at eNB PHY side
mmiozzo
parents: 7887
diff changeset
   164
  * \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
   165
  * 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
   166
  * \param sinr SINR values vector
d7083e401e59 PUSCH based UL-CQI generation at eNB PHY side
mmiozzo
parents: 7887
diff changeset
   167
  */
9039
5bdf0c1be85f Add SRS based UL-CQI and update RR and PF schedulers for managing them
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9038
diff changeset
   168
  FfMacSchedSapProvider::SchedUlCqiInfoReqParameters CreatePuschCqiReport (const SpectrumValue& sinr);
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   169
  
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   170
  /**
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   171
  * \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
   172
  * the physical layer with the SRS signal received from eNB
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   173
  * \param sinr SINR values vector
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   174
  */
9039
5bdf0c1be85f Add SRS based UL-CQI and update RR and PF schedulers for managing them
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9038
diff changeset
   175
  FfMacSchedSapProvider::SchedUlCqiInfoReqParameters CreateSrsCqiReport (const SpectrumValue& sinr);
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   176
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
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 DoSendLteControlMessage (Ptr<LteControlMessage> msg);
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   179
9053
974762654b12 subframe indication now triggered independently by LteUePhy
Nicola Baldo <nicola@baldo.biz>
parents: 9049
diff changeset
   180
  bool AddUePhy (uint16_t rnti);
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   181
8180
5429db8b8c37 Fix Bug JIRA:LENA-145, RNTI as uint16_t in LteEnbPhy
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8148
diff changeset
   182
  bool DeleteUePhy (uint16_t rnti);
9038
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   183
  
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   184
  /**
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   185
  * \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
   186
  * \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
   187
  */
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
   188
  void SendControlChannels (std::list<Ptr<LteControlMessage> > ctrlMsgList);
9038
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   189
  
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   190
  /**
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   191
  * \brief Send the PDSCH
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   192
  * \param pb the PacketBurst to be sent
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   193
  */
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
   194
  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
   195
  
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
   196
  /**
5a99218bfd1b Bug-fix on m_macChTtiDelay management on UE-eNB PHY and consequently update RR-PF schedulers and tests
mmiozzo
parents: 8726
diff changeset
   197
  * \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
   198
  */
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
   199
  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
   200
  
5a99218bfd1b Bug-fix on m_macChTtiDelay management on UE-eNB PHY and consequently update RR-PF schedulers and tests
mmiozzo
parents: 8726
diff changeset
   201
  /**
5a99218bfd1b Bug-fix on m_macChTtiDelay management on UE-eNB PHY and consequently update RR-PF schedulers and tests
mmiozzo
parents: 8726
diff changeset
   202
  * \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
   203
  */
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
   204
  std::list<UlDciLteControlMessage> DequeueUlDci (void);
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   205
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   206
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   207
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   208
   * \brief Start a LTE frame
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   209
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   210
  void StartFrame (void);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   211
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   212
   * \brief Start a LTE sub frame
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   213
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   214
  void StartSubFrame (void);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   215
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   216
   * \brief End a LTE sub frame
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
  void EndSubFrame (void);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   219
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   220
   * \brief End a LTE frame
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   221
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   222
  void EndFrame (void);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   223
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
   * \brief PhySpectrum received a new PHY-PDU
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   226
   */
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   227
  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
   228
  
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
   229
  /**
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
   230
  * \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
   231
  */
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
   232
  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
   233
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   234
  // inherited from LtePhy
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   235
  virtual void GenerateCtrlCqiReport (const SpectrumValue& sinr);
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   236
  virtual void GenerateDataCqiReport (const SpectrumValue& sinr);
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
   237
6705
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
private:
9053
974762654b12 subframe indication now triggered independently by LteUePhy
Nicola Baldo <nicola@baldo.biz>
parents: 9049
diff changeset
   240
  std::set <uint16_t> 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
   241
  
9048
4aeb9111981b removed useless LtePhy::{Get,Set}{Up,down}linkSubChannels
Nicola Baldo <nbaldo@cttc.es>
parents: 9039
diff changeset
   242
  std::vector <int> m_listOfDownlinkSubchannel;
4aeb9111981b removed useless LtePhy::{Get,Set}{Up,down}linkSubChannels
Nicola Baldo <nbaldo@cttc.es>
parents: 9039
diff changeset
   243
  
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
   244
  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
   245
  
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
   246
  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
   247
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   248
  LteEnbPhySapProvider* m_enbPhySapProvider;
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   249
  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
   250
  
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
   251
  std::vector <uint16_t> m_ulRntiRxed;
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   252
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   253
  uint32_t m_nrFrames;
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   254
  uint32_t m_nrSubFrames;
8714
398bbcbb3f42 Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8253
diff changeset
   255
  
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   256
  uint16_t m_srsPeriodicity;
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   257
  std::map <uint16_t,uint16_t> m_srsCounter;
9039
5bdf0c1be85f Add SRS based UL-CQI and update RR and PF schedulers for managing them
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9038
diff changeset
   258
  std::vector <uint16_t> m_srsUeOffset;
5bdf0c1be85f Add SRS based UL-CQI and update RR and PF schedulers for managing them
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9038
diff changeset
   259
  uint16_t m_currentSrsOffset;
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   260
  
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   261
};
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   262
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   263
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   264
}
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   265
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
   266
#endif /* LTE_ENB_PHY_H */