src/lte/model/lte-ue-phy.h
author Budiarto Herman <budiarto.herman@magister.fi>
Thu, 26 Sep 2013 13:22:58 +0300
changeset 10374 bad9fbe96995
parent 10331 15d40b3ee6a1
child 10376 e040472b2b56
permissions -rw-r--r--
Added const to some Get functions in LTE module
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 <mmiozzo@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
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    22
#ifndef LTE_UE_PHY_H
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    23
#define LTE_UE_PHY_H
6705
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-phy.h>
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    27
#include <ns3/ff-mac-common.h>
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    28
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
    29
#include <ns3/lte-control-messages.h>
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    30
#include <ns3/lte-amc.h>
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    31
#include <ns3/lte-ue-phy-sap.h>
9337
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
    32
#include <ns3/lte-ue-cphy-sap.h>
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    33
#include <ns3/ptr.h>
8517
4446f1535b9e Update LteUePhy for working with new LteAmc object
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8253
diff changeset
    34
#include <ns3/lte-amc.h>
10288
ea6c9b15169c Attempt to initial synchronization, cell search, MIB and SIB1
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10063
diff changeset
    35
#include <set>
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    36
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    37
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    38
namespace ns3 {
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
class PacketBurst;
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    41
class LteEnbPhy;
9351
6e074e67a1ad HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents: 9346
diff changeset
    42
class LteHarqPhy;
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    43
9986
d1c0357a227f Update Phy support for Ue Measurements with time filtering and c-phy-sap measurements grouping
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9983
diff changeset
    44
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    45
/**
7238
85a7e87bb4cc Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents: 6852
diff changeset
    46
 * \ingroup lte
85a7e87bb4cc Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents: 6852
diff changeset
    47
 *
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    48
 * The LteSpectrumPhy models the physical layer of LTE
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    49
 */
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    50
class LteUePhy : public LtePhy
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    51
{
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    52
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    53
  friend class UeMemberLteUePhySapProvider;
9337
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
    54
  friend class MemberLteUeCphySapProvider<LteUePhy>;
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    55
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    56
public:
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    57
  /**
10288
ea6c9b15169c Attempt to initial synchronization, cell search, MIB and SIB1
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10063
diff changeset
    58
   * \brief The states of the UE PHY entity
ea6c9b15169c Attempt to initial synchronization, cell search, MIB and SIB1
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10063
diff changeset
    59
   */
ea6c9b15169c Attempt to initial synchronization, cell search, MIB and SIB1
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10063
diff changeset
    60
  enum State
ea6c9b15169c Attempt to initial synchronization, cell search, MIB and SIB1
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10063
diff changeset
    61
  {
ea6c9b15169c Attempt to initial synchronization, cell search, MIB and SIB1
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10063
diff changeset
    62
    CELL_SEARCH = 0,
10295
4d25257ec2e6 Moved several cell selection functionality from UE PHY to RRC
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10293
diff changeset
    63
    SYNCHRONIZED,
10288
ea6c9b15169c Attempt to initial synchronization, cell search, MIB and SIB1
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10063
diff changeset
    64
    NUM_STATES
ea6c9b15169c Attempt to initial synchronization, cell search, MIB and SIB1
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10063
diff changeset
    65
  };
ea6c9b15169c Attempt to initial synchronization, cell search, MIB and SIB1
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10063
diff changeset
    66
ea6c9b15169c Attempt to initial synchronization, cell search, MIB and SIB1
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10063
diff changeset
    67
  /**
7980
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    68
   * @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
    69
   */
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    70
  LteUePhy ();
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    71
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    72
  /**
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    73
   *
7980
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    74
   * \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
    75
   * \param ulPhy the uplink LteSpectrumPhy instance
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    76
   */
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    77
  LteUePhy (Ptr<LteSpectrumPhy> dlPhy, Ptr<LteSpectrumPhy> ulPhy);
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
    78
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    79
  virtual ~LteUePhy ();
7980
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    80
8015
e8fd3bf1692f flexible spectrum model
Nicola Baldo <nbaldo@cttc.es>
parents: 7981
diff changeset
    81
  // inherited from Object
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    82
  static TypeId GetTypeId (void);
9703
681f35b212ff Rename Start and DoStart methods to Initialize and DoInitialize
Vedran Mileti? <rivanvx@gmail.com>
parents: 9636
diff changeset
    83
  virtual void DoInitialize (void);
8015
e8fd3bf1692f flexible spectrum model
Nicola Baldo <nbaldo@cttc.es>
parents: 7981
diff changeset
    84
  virtual void DoDispose (void);
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    85
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    86
  /**
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    87
   * \brief Get the PHY SAP provider
9337
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
    88
   * \return a pointer to the SAP Provider 
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    89
   */
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    90
  LteUePhySapProvider* GetLteUePhySapProvider ();
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    91
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    92
  /**
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    93
  * \brief Set the PHY SAP User
9337
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
    94
  * \param s a pointer to the SAP user
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    95
  */
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    96
  void SetLteUePhySapUser (LteUePhySapUser* s);
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    97
9337
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
    98
  /**
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
    99
   * \brief Get the CPHY SAP provider
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
   100
   * \return a pointer to the SAP Provider
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
   101
   */
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
   102
  LteUeCphySapProvider* GetLteUeCphySapProvider ();
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
   103
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
   104
  /**
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
   105
  * \brief Set the CPHY SAP User
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
   106
  * \param s a pointer to the SAP user
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
   107
  */
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
   108
  void SetLteUeCphySapUser (LteUeCphySapUser* s);
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
   109
7949
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7895
diff changeset
   110
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
   111
  /**
7949
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7895
diff changeset
   112
   * \param pw the transmission power in dBm
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7895
diff changeset
   113
   */
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
   114
  void SetTxPower (double pow);
7949
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7895
diff changeset
   115
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7895
diff changeset
   116
  /**
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7895
diff changeset
   117
   * \return the transmission power in dBm
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7895
diff changeset
   118
   */
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
   119
  double GetTxPower () const;
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
   120
  /**
7981
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
   121
   * \param pw the noise figure in dB
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
   122
   */
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
   123
  void SetNoiseFigure (double pow);
7981
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
   124
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
   125
  /**
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
   126
   * \return the noise figure in dB
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
   127
   */
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
   128
  double GetNoiseFigure () const;
7949
3bf9450ac03f added TX power attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7895
diff changeset
   129
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   130
  /**
8670
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
   131
   * \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
   132
   */
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
   133
  uint8_t GetMacChDelay (void) const;
8f63d16fb2e8 fixed compilation error with g++-4.4
Nicola Baldo <nbaldo@cttc.es>
parents: 8664
diff changeset
   134
9636
91e31f0e569c make Dl/UlSpectrumPhy attributes in LteUe/EnbPhy use getter instead of member variable to fix compilation issue with gcc 4.4.3
Nicola Baldo <nbaldo@cttc.es>
parents: 9562
diff changeset
   135
  /**
91e31f0e569c make Dl/UlSpectrumPhy attributes in LteUe/EnbPhy use getter instead of member variable to fix compilation issue with gcc 4.4.3
Nicola Baldo <nbaldo@cttc.es>
parents: 9562
diff changeset
   136
   * \return a pointer to the LteSpectrumPhy instance relative to the downlink
91e31f0e569c make Dl/UlSpectrumPhy attributes in LteUe/EnbPhy use getter instead of member variable to fix compilation issue with gcc 4.4.3
Nicola Baldo <nbaldo@cttc.es>
parents: 9562
diff changeset
   137
   */
91e31f0e569c make Dl/UlSpectrumPhy attributes in LteUe/EnbPhy use getter instead of member variable to fix compilation issue with gcc 4.4.3
Nicola Baldo <nbaldo@cttc.es>
parents: 9562
diff changeset
   138
  Ptr<LteSpectrumPhy> GetDlSpectrumPhy () const;
91e31f0e569c make Dl/UlSpectrumPhy attributes in LteUe/EnbPhy use getter instead of member variable to fix compilation issue with gcc 4.4.3
Nicola Baldo <nbaldo@cttc.es>
parents: 9562
diff changeset
   139
91e31f0e569c make Dl/UlSpectrumPhy attributes in LteUe/EnbPhy use getter instead of member variable to fix compilation issue with gcc 4.4.3
Nicola Baldo <nbaldo@cttc.es>
parents: 9562
diff changeset
   140
  /**
91e31f0e569c make Dl/UlSpectrumPhy attributes in LteUe/EnbPhy use getter instead of member variable to fix compilation issue with gcc 4.4.3
Nicola Baldo <nbaldo@cttc.es>
parents: 9562
diff changeset
   141
   * \return a pointer to the LteSpectrumPhy instance relative to the uplink
91e31f0e569c make Dl/UlSpectrumPhy attributes in LteUe/EnbPhy use getter instead of member variable to fix compilation issue with gcc 4.4.3
Nicola Baldo <nbaldo@cttc.es>
parents: 9562
diff changeset
   142
   */
91e31f0e569c make Dl/UlSpectrumPhy attributes in LteUe/EnbPhy use getter instead of member variable to fix compilation issue with gcc 4.4.3
Nicola Baldo <nbaldo@cttc.es>
parents: 9562
diff changeset
   143
  Ptr<LteSpectrumPhy> GetUlSpectrumPhy () const;
91e31f0e569c make Dl/UlSpectrumPhy attributes in LteUe/EnbPhy use getter instead of member variable to fix compilation issue with gcc 4.4.3
Nicola Baldo <nbaldo@cttc.es>
parents: 9562
diff changeset
   144
10289
c2a694b5598c DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10288
diff changeset
   145
  /**
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   146
   * \brief Create the PSD for the TX
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   147
   * \return the pointer to the PSD
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   148
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   149
  virtual Ptr<SpectrumValue> CreateTxPowerSpectralDensity ();
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
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   152
   * \brief Set a list of sub channels to use in TX
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   153
   * \param mask a list of sub channels
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 SetSubChannelsForTransmission (std::vector <int> mask);
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
   * \brief Get a list of sub channels to use in RX
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   158
   * \return a list of sub channels
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   159
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   160
  std::vector <int> GetSubChannelsForTransmission (void);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   161
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   162
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   163
   * \brief Get a list of sub channels to use in RX
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   164
   * \param mask list of sub channels
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   165
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   166
  void SetSubChannelsForReception (std::vector <int> mask);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   167
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   168
   * \brief Get a list of sub channels to use in RX
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   169
   * \return a list of sub channels
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   170
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   171
  std::vector <int> GetSubChannelsForReception (void);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   172
10296
13ff285523bf Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10295
diff changeset
   173
  /**
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   174
  * \brief Create the DL CQI feedback from SINR values perceived at
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   175
  * the physical layer with the signal received from eNB
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   176
  * \param sinr SINR values vector
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
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
  Ptr<DlCqiLteControlMessage> CreateDlCqiFeedbackMessage (const SpectrumValue& sinr);
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   179
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   180
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   181
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   182
  // inherited from LtePhy
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   183
  virtual void GenerateCtrlCqiReport (const SpectrumValue& sinr);
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   184
  virtual void GenerateDataCqiReport (const SpectrumValue& sinr);
9357
d52b94f66fe7 Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9351
diff changeset
   185
  virtual void ReportInterference (const SpectrumValue& interf);
9389
4bd2725add01 Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9386
diff changeset
   186
  virtual void ReportRsReceivedPower (const SpectrumValue& power);
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   187
9983
0091ab7a897c Add RSRP-RSRQ UE measurement and correspondent c-phy primitive for reporting them to LteUeRrr
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9636
diff changeset
   188
  // callbacks for LteSpectrumPhy
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
   189
  virtual void ReceiveLteControlMessageList (std::list<Ptr<LteControlMessage> >);
9996
62697fe2165d Bug-fix LteUePhy UE Measurements PSS storage by introducing PssElement struct
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9986
diff changeset
   190
  virtual void ReceivePss (uint16_t cellId, Ptr<SpectrumValue> p);
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   191
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   192
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   193
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   194
  /**
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   195
   * \brief PhySpectrum received a new PHY-PDU
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   196
   */
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   197
  void PhyPduReceived (Ptr<Packet> p);
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
   198
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
   199
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   200
  /**
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   201
  * \brief trigger from eNB the start from a new frame
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   202
  *
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   203
  * \param frameNo frame number
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   204
  * \param subframeNo subframe number
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 SubframeIndication (uint32_t frameNo, uint32_t subframeNo);
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   207
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   208
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   209
  /**
10289
c2a694b5598c DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10288
diff changeset
   210
   * \brief Send the SRS signal in the last symbols of the frame
c2a694b5598c DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10288
diff changeset
   211
   */
9038
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   212
  void SendSrs ();
10296
13ff285523bf Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10295
diff changeset
   213
10289
c2a694b5598c DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10288
diff changeset
   214
  /**
c2a694b5598c DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10288
diff changeset
   215
   * \brief PhySpectrum generated a new DL HARQ feedback
c2a694b5598c DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10288
diff changeset
   216
   */
9351
6e074e67a1ad HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents: 9346
diff changeset
   217
  virtual void ReceiveLteDlHarqFeedback (DlInfoListElement_s mes);
6e074e67a1ad HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents: 9346
diff changeset
   218
6e074e67a1ad HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents: 9346
diff changeset
   219
  /**
10289
c2a694b5598c DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10288
diff changeset
   220
   * \brief Set the HARQ PHY module
c2a694b5598c DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10288
diff changeset
   221
   */
9351
6e074e67a1ad HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents: 9346
diff changeset
   222
  void SetHarqPhyModule (Ptr<LteHarqPhy> harq);
6e074e67a1ad HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents: 9346
diff changeset
   223
10288
ea6c9b15169c Attempt to initial synchronization, cell search, MIB and SIB1
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10063
diff changeset
   224
  /**
ea6c9b15169c Attempt to initial synchronization, cell search, MIB and SIB1
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10063
diff changeset
   225
   * \return The current state
ea6c9b15169c Attempt to initial synchronization, cell search, MIB and SIB1
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10063
diff changeset
   226
   */
10374
bad9fbe96995 Added const to some Get functions in LTE module
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10331
diff changeset
   227
  State GetState () const;
9351
6e074e67a1ad HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents: 9346
diff changeset
   228
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   229
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   230
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   231
private:
10312
d37b9d88c6f1 Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10309
diff changeset
   232
8714
398bbcbb3f42 Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8522
diff changeset
   233
  void SetTxMode1Gain (double gain);
398bbcbb3f42 Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8522
diff changeset
   234
  void SetTxMode2Gain (double gain);
398bbcbb3f42 Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8522
diff changeset
   235
  void SetTxMode3Gain (double gain);
398bbcbb3f42 Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8522
diff changeset
   236
  void SetTxMode4Gain (double gain);
398bbcbb3f42 Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8522
diff changeset
   237
  void SetTxMode5Gain (double gain);
398bbcbb3f42 Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8522
diff changeset
   238
  void SetTxMode6Gain (double gain);
398bbcbb3f42 Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8522
diff changeset
   239
  void SetTxMode7Gain (double gain);
8725
e8df5f68c35e Update SetTxModeXGain for reducing the copy-and-paste code
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8714
diff changeset
   240
  void SetTxModeGain (uint8_t txMode, double gain);
9337
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
   241
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
   242
  void QueueSubChannelsForTransmission (std::vector <int> rbMap);
9337
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
   243
10309
96a33e5eae5c Separated RSRP and RSRQ calculation in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10308
diff changeset
   244
  /**
96a33e5eae5c Separated RSRP and RSRQ calculation in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10308
diff changeset
   245
   * \brief Layer-1 filtering of RSRP and RSRQ measurements and reporting to
96a33e5eae5c Separated RSRP and RSRQ calculation in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10308
diff changeset
   246
   *        the RRC entity.
96a33e5eae5c Separated RSRP and RSRQ calculation in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10308
diff changeset
   247
   *
96a33e5eae5c Separated RSRP and RSRQ calculation in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10308
diff changeset
   248
   * Initially executed at +0.200s, and then repeatedly executed with
96a33e5eae5c Separated RSRP and RSRQ calculation in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10308
diff changeset
   249
   * periodicity as indicated by the UeMeasurementsFilterPeriod attribute.
96a33e5eae5c Separated RSRP and RSRQ calculation in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10308
diff changeset
   250
   */
9986
d1c0357a227f Update Phy support for Ue Measurements with time filtering and c-phy-sap measurements grouping
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9983
diff changeset
   251
  void ReportUeMeasurements ();
d1c0357a227f Update Phy support for Ue Measurements with time filtering and c-phy-sap measurements grouping
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9983
diff changeset
   252
10288
ea6c9b15169c Attempt to initial synchronization, cell search, MIB and SIB1
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10063
diff changeset
   253
  void SwitchToState (State s);
ea6c9b15169c Attempt to initial synchronization, cell search, MIB and SIB1
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10063
diff changeset
   254
9406
7f0f9d8f8e20 new LTE RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 9346
diff changeset
   255
  // UE CPHY SAP methods
10289
c2a694b5598c DL EARFCN attribute for UE
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10288
diff changeset
   256
  void DoReset ();
10312
d37b9d88c6f1 Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10309
diff changeset
   257
  void DoStartCellSearch (uint16_t dlEarfcn);
d37b9d88c6f1 Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10309
diff changeset
   258
  void DoSynchronizeWithEnb (uint16_t cellId);
d37b9d88c6f1 Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10309
diff changeset
   259
  void DoSynchronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn);
9406
7f0f9d8f8e20 new LTE RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 9346
diff changeset
   260
  void DoSetDlBandwidth (uint8_t ulBandwidth);
7f0f9d8f8e20 new LTE RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 9346
diff changeset
   261
  void DoConfigureUplink (uint16_t ulEarfcn, uint8_t ulBandwidth);
7f0f9d8f8e20 new LTE RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 9346
diff changeset
   262
  void DoSetRnti (uint16_t rnti);
9337
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
   263
  void DoSetTransmissionMode (uint8_t txMode);
9406
7f0f9d8f8e20 new LTE RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 9346
diff changeset
   264
  void DoSetSrsConfigurationIndex (uint16_t srcCi);
7f0f9d8f8e20 new LTE RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 9346
diff changeset
   265
7f0f9d8f8e20 new LTE RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 9346
diff changeset
   266
  // UE PHY SAP methods 
10312
d37b9d88c6f1 Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10309
diff changeset
   267
  virtual void DoSendMacPdu (Ptr<Packet> p);
9406
7f0f9d8f8e20 new LTE RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 9346
diff changeset
   268
  virtual void DoSendLteControlMessage (Ptr<LteControlMessage> msg);
9460
0674e66ee483 Introduces RACH procedures in the schedulers and UL grant at PHY layer
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9414
diff changeset
   269
  virtual void DoSendRachPreamble (uint32_t prachId, uint32_t raRnti);
10312
d37b9d88c6f1 Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10309
diff changeset
   270
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   271
  std::vector <int> m_subChannelsForTransmission;
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   272
  std::vector <int> m_subChannelsForReception;
10312
d37b9d88c6f1 Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10309
diff changeset
   273
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
   274
  std::vector< std::vector <int> > m_subChannelsForTransmissionQueue;
10295
4d25257ec2e6 Moved several cell selection functionality from UE PHY to RRC
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10293
diff changeset
   275
4d25257ec2e6 Moved several cell selection functionality from UE PHY to RRC
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10293
diff changeset
   276
8522
795ea37db2ff Change LteAmc* to Ptr<LteAmc> in LteUePhy
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8517
diff changeset
   277
  Ptr<LteAmc> m_amc;
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   278
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   279
  Time m_p10CqiPeriocity; /**< Wideband Periodic CQI: 2, 5, 10, 16, 20, 32, 40, 64, 80 or 160 ms */
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   280
  Time m_p10CqiLast;
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
   281
7895
f20bb71f9b71 Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7893
diff changeset
   282
  /**< SubBand Aperiodic CQI: activated by  DCI format 0 or Random Access Response Grant */
f20bb71f9b71 Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7893
diff changeset
   283
  // NOTE defines a periodicity for academic studies
f20bb71f9b71 Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7893
diff changeset
   284
  Time m_a30CqiPeriocity;
f20bb71f9b71 Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7893
diff changeset
   285
  Time m_a30CqiLast;
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   286
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   287
  LteUePhySapProvider* m_uePhySapProvider;
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   288
  LteUePhySapUser* m_uePhySapUser;
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   289
9337
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
   290
  LteUeCphySapProvider* m_ueCphySapProvider;
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
   291
  LteUeCphySapUser* m_ueCphySapUser;
ae7126b266ce revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 8729
diff changeset
   292
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   293
  uint16_t  m_rnti;
9406
7f0f9d8f8e20 new LTE RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 9346
diff changeset
   294
 
8714
398bbcbb3f42 Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8522
diff changeset
   295
  uint8_t m_transmissionMode;
398bbcbb3f42 Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8522
diff changeset
   296
  std::vector <double> m_txModeGain;
10309
96a33e5eae5c Separated RSRP and RSRQ calculation in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10308
diff changeset
   297
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   298
  uint16_t m_srsPeriodicity;
9406
7f0f9d8f8e20 new LTE RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 9346
diff changeset
   299
  uint16_t m_srsSubframeOffset;
7f0f9d8f8e20 new LTE RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 9346
diff changeset
   300
  uint16_t m_srsConfigured;
9469
28a7b04a0b11 removed spurious LteUePhy::m_enbCellId; fixed bug in LteEnbRrc::GetNewSrsConfigurationIndex ()
Nicola Baldo <nbaldo@cttc.es>
parents: 9460
diff changeset
   301
  Time     m_srsStartTime;
9406
7f0f9d8f8e20 new LTE RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 9346
diff changeset
   302
7f0f9d8f8e20 new LTE RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 9346
diff changeset
   303
  bool m_dlConfigured;
7f0f9d8f8e20 new LTE RRC model
Nicola Baldo <nbaldo@cttc.es>
parents: 9346
diff changeset
   304
  bool m_ulConfigured;
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
   305
10288
ea6c9b15169c Attempt to initial synchronization, cell search, MIB and SIB1
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10063
diff changeset
   306
  State m_state;
ea6c9b15169c Attempt to initial synchronization, cell search, MIB and SIB1
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10063
diff changeset
   307
  //             cellid    rnti
ea6c9b15169c Attempt to initial synchronization, cell search, MIB and SIB1
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10063
diff changeset
   308
  TracedCallback<uint16_t, uint16_t, State, State> m_stateTransitionTrace;
ea6c9b15169c Attempt to initial synchronization, cell search, MIB and SIB1
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10063
diff changeset
   309
9983
0091ab7a897c Add RSRP-RSRQ UE measurement and correspondent c-phy primitive for reporting them to LteUeRrr
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9636
diff changeset
   310
  uint8_t m_subframeNo;
0091ab7a897c Add RSRP-RSRQ UE measurement and correspondent c-phy primitive for reporting them to LteUeRrr
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9636
diff changeset
   311
9389
4bd2725add01 Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9386
diff changeset
   312
  bool m_rsReceivedPowerUpdated;
4bd2725add01 Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9386
diff changeset
   313
  SpectrumValue m_rsReceivedPower;
4bd2725add01 Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9386
diff changeset
   314
9983
0091ab7a897c Add RSRP-RSRQ UE measurement and correspondent c-phy primitive for reporting them to LteUeRrr
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9636
diff changeset
   315
  bool m_rsInterferencePowerUpdated;
10308
792c0df5b082 Renamed some variables in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10296
diff changeset
   316
  SpectrumValue m_rsInterferencePower;
9983
0091ab7a897c Add RSRP-RSRQ UE measurement and correspondent c-phy primitive for reporting them to LteUeRrr
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9636
diff changeset
   317
0091ab7a897c Add RSRP-RSRQ UE measurement and correspondent c-phy primitive for reporting them to LteUeRrr
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9636
diff changeset
   318
  bool m_pssReceived;
9996
62697fe2165d Bug-fix LteUePhy UE Measurements PSS storage by introducing PssElement struct
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9986
diff changeset
   319
  struct PssElement
10309
96a33e5eae5c Separated RSRP and RSRQ calculation in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10308
diff changeset
   320
  {
96a33e5eae5c Separated RSRP and RSRQ calculation in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10308
diff changeset
   321
    uint16_t cellId;
96a33e5eae5c Separated RSRP and RSRQ calculation in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10308
diff changeset
   322
    double pssPsdSum;
96a33e5eae5c Separated RSRP and RSRQ calculation in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10308
diff changeset
   323
    uint16_t nRB;
96a33e5eae5c Separated RSRP and RSRQ calculation in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10308
diff changeset
   324
  };
9996
62697fe2165d Bug-fix LteUePhy UE Measurements PSS storage by introducing PssElement struct
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9986
diff changeset
   325
  std::list <PssElement> m_pssList;
9983
0091ab7a897c Add RSRP-RSRQ UE measurement and correspondent c-phy primitive for reporting them to LteUeRrr
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9636
diff changeset
   326
0091ab7a897c Add RSRP-RSRQ UE measurement and correspondent c-phy primitive for reporting them to LteUeRrr
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9636
diff changeset
   327
  double m_pssReceptionThreshold; // on RSRQ [W]
0091ab7a897c Add RSRP-RSRQ UE measurement and correspondent c-phy primitive for reporting them to LteUeRrr
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9636
diff changeset
   328
9986
d1c0357a227f Update Phy support for Ue Measurements with time filtering and c-phy-sap measurements grouping
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9983
diff changeset
   329
  struct UeMeasurementsElement
10309
96a33e5eae5c Separated RSRP and RSRQ calculation in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10308
diff changeset
   330
  {
96a33e5eae5c Separated RSRP and RSRQ calculation in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10308
diff changeset
   331
    double rsrpSum;
96a33e5eae5c Separated RSRP and RSRQ calculation in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10308
diff changeset
   332
    uint8_t rsrpNum;
96a33e5eae5c Separated RSRP and RSRQ calculation in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10308
diff changeset
   333
    double rsrqSum;
96a33e5eae5c Separated RSRP and RSRQ calculation in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10308
diff changeset
   334
    uint8_t rsrqNum;
96a33e5eae5c Separated RSRP and RSRQ calculation in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10308
diff changeset
   335
  };
9986
d1c0357a227f Update Phy support for Ue Measurements with time filtering and c-phy-sap measurements grouping
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9983
diff changeset
   336
10308
792c0df5b082 Renamed some variables in LteUePhy
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10296
diff changeset
   337
  std::map <uint16_t, UeMeasurementsElement> m_ueMeasurementsMap;
9986
d1c0357a227f Update Phy support for Ue Measurements with time filtering and c-phy-sap measurements grouping
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9983
diff changeset
   338
  Time m_ueMeasurementsFilterPeriod;
d1c0357a227f Update Phy support for Ue Measurements with time filtering and c-phy-sap measurements grouping
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9983
diff changeset
   339
  Time m_ueMeasurementsFilterLast;
d1c0357a227f Update Phy support for Ue Measurements with time filtering and c-phy-sap measurements grouping
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9983
diff changeset
   340
9351
6e074e67a1ad HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents: 9346
diff changeset
   341
  Ptr<LteHarqPhy> m_harqPhyModule;
6e074e67a1ad HARQ first draft version: RR works, PF todo, LteMiErrorModel on-going
mmiozzo
parents: 9346
diff changeset
   342
9460
0674e66ee483 Introduces RACH procedures in the schedulers and UL grant at PHY layer
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9414
diff changeset
   343
  uint32_t m_raPreambleId;
0674e66ee483 Introduces RACH procedures in the schedulers and UL grant at PHY layer
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9414
diff changeset
   344
  uint32_t m_raRnti;
0674e66ee483 Introduces RACH procedures in the schedulers and UL grant at PHY layer
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9414
diff changeset
   345
9357
d52b94f66fe7 Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9351
diff changeset
   346
  /**
9390
d51829659a57 Change RSRQ stats for average SINR ones
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9389
diff changeset
   347
   * Trace information regarding RSRP and average SINR (see TS 36.214)
d51829659a57 Change RSRQ stats for average SINR ones
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9389
diff changeset
   348
   * uint16_t cellId, uint16_t rnti, double rsrp, double sinr
9357
d52b94f66fe7 Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9351
diff changeset
   349
   */
9390
d51829659a57 Change RSRQ stats for average SINR ones
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9389
diff changeset
   350
  TracedCallback<uint16_t, uint16_t, double, double> m_reportCurrentCellRsrpSinrTrace;
d51829659a57 Change RSRQ stats for average SINR ones
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9389
diff changeset
   351
  uint16_t m_rsrpSinrSamplePeriod;
d51829659a57 Change RSRQ stats for average SINR ones
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9389
diff changeset
   352
  uint16_t m_rsrpSinrSampleCounter;
9357
d52b94f66fe7 Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9351
diff changeset
   353
10000
2c29c6f2bddf Add TestSuite for UE Measurements: on-going work, test does not pass
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9996
diff changeset
   354
  /**
2c29c6f2bddf Add TestSuite for UE Measurements: on-going work, test does not pass
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9996
diff changeset
   355
   * Trace information regarding RSRP and RSRQ (see TS 36.214)
10331
15d40b3ee6a1 Updated LTE handover documentation
Budiarto Herman <budiarto.herman@magister.fi>
parents: 10312
diff changeset
   356
   * uint16_t rnti, uint16_t cellId, double rsrpDbm, double rsrqDb, bool isServingCell
10000
2c29c6f2bddf Add TestSuite for UE Measurements: on-going work, test does not pass
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9996
diff changeset
   357
   */
2c29c6f2bddf Add TestSuite for UE Measurements: on-going work, test does not pass
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9996
diff changeset
   358
  TracedCallback<uint16_t, uint16_t, double, double, bool> m_reportUeMeasurements;
2c29c6f2bddf Add TestSuite for UE Measurements: on-going work, test does not pass
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9996
diff changeset
   359
9485
938edff6f281 reset LteUePhy upon handover
Nicola Baldo <nbaldo@cttc.es>
parents: 9469
diff changeset
   360
  EventId m_sendSrsEvent;
938edff6f281 reset LteUePhy upon handover
Nicola Baldo <nbaldo@cttc.es>
parents: 9469
diff changeset
   361
9519
fc6e45584ef4 Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9460
diff changeset
   362
  /**
fc6e45584ef4 Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9460
diff changeset
   363
   * Trace information regarding PHY stats from DL Tx perspective
fc6e45584ef4 Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9460
diff changeset
   364
   * PhyTrasmissionStatParameters  see lte-common.h
fc6e45584ef4 Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9460
diff changeset
   365
   */
fc6e45584ef4 Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9460
diff changeset
   366
  TracedCallback<PhyTransmissionStatParameters> m_ulPhyTransmission;
fc6e45584ef4 Add DL and UL PHY traces on transmission and reception statistics
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9460
diff changeset
   367
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   368
};
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   369
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   370
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   371
}
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   372
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
   373
#endif /* LTE_UE_PHY_H */