src/lte/model/lte-phy.h
author Peter D. Barnes, Jr. <barnes26@llnl.gov>
Fri, 26 Sep 2014 15:51:00 -0700
changeset 10968 2d29fee2b7b8
parent 10425 1867d8c25aa7
child 10983 087597a150da
permissions -rw-r--r--
[Bug 1551] Redux: NS_LOG_COMPONENT_DEFINE inside or outside of ns3 namespace?
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
 *         Marco Miozzo <mmiozzo@cttc.es>
8339
bfa05e51eecf merge ns-3-lena-dev with ns-3-dev
Nicola Baldo <nbaldo@cttc.es>
parents: 8253 7581
diff changeset
    20
 *         Nicola Baldo <nbaldo@cttc.es>
6705
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
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    23
#ifndef LTE_PHY_H
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    24
#define LTE_PHY_H
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    25
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    26
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    27
#include <ns3/spectrum-value.h>
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    28
#include <ns3/mobility-model.h>
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    29
#include <ns3/packet.h>
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    30
#include <ns3/nstime.h>
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    31
#include <ns3/spectrum-phy.h>
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    32
#include <ns3/spectrum-channel.h>
7581
6ac3fa410583 spectrum API change
Nicola Baldo <nicola@baldo.biz>
parents: 7385
diff changeset
    33
#include <ns3/spectrum-signal-parameters.h>
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    34
#include <ns3/spectrum-interference.h>
6969
1288d191868b PhyMac --> GenericPhy
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
    35
#include <ns3/generic-phy.h>
7581
6ac3fa410583 spectrum API change
Nicola Baldo <nicola@baldo.biz>
parents: 7385
diff changeset
    36
#include <ns3/lte-spectrum-phy.h>
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;
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    41
class LteNetDevice;
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: 8670
diff changeset
    42
class 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: 8670
diff changeset
    43
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: 8670
diff changeset
    44
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
/**
7238
85a7e87bb4cc Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents: 6969
diff changeset
    47
 * \ingroup lte
85a7e87bb4cc Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents: 6969
diff changeset
    48
 *
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    49
 * The LtePhy models the physical layer of LTE. It is composed by two
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    50
 * LteSpectrumPhy, one for the downlink and one for the uplink.
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
class LtePhy : public Object
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    53
{
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    54
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    55
public:
7980
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    56
  /** 
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    57
   * @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
    58
   */
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    59
  LtePhy ();
7980
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    60
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    61
  /** 
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    62
   * 
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    63
   * \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
    64
   * \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
    65
   */
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    66
  LtePhy (Ptr<LteSpectrumPhy> dlPhy, Ptr<LteSpectrumPhy> ulPhy);
f07d99163a56 LteSpectrumPhy instances now plugged onto LtePhy via its constructor
Nicola Baldo <nbaldo@cttc.es>
parents: 7949
diff changeset
    67
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    68
  virtual ~LtePhy ();
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    69
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    70
  static TypeId GetTypeId (void);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    71
7581
6ac3fa410583 spectrum API change
Nicola Baldo <nicola@baldo.biz>
parents: 7385
diff changeset
    72
  /**
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    73
   * \brief Set the device where the phy layer is attached
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    74
   * \param d the device
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    75
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    76
  void SetDevice (Ptr<LteNetDevice> d);
7581
6ac3fa410583 spectrum API change
Nicola Baldo <nicola@baldo.biz>
parents: 7385
diff changeset
    77
  /**
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    78
   * \brief Get the device where the phy layer is attached
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    79
   * \return the pointer to the device
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    80
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    81
  Ptr<LteNetDevice> GetDevice ();
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    82
8064
026861f85f53 added SNR test to lte-test-link-adaptation & updated it with new tx psd & noise values
Nicola Baldo <nbaldo@cttc.es>
parents: 8036
diff changeset
    83
  /** 
026861f85f53 added SNR test to lte-test-link-adaptation & updated it with new tx psd & noise values
Nicola Baldo <nbaldo@cttc.es>
parents: 8036
diff changeset
    84
   * 
026861f85f53 added SNR test to lte-test-link-adaptation & updated it with new tx psd & noise values
Nicola Baldo <nbaldo@cttc.es>
parents: 8036
diff changeset
    85
   * \return a pointer to the LteSpectrumPhy instance that manages the downlink
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    86
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    87
  Ptr<LteSpectrumPhy> GetDownlinkSpectrumPhy ();
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    88
8064
026861f85f53 added SNR test to lte-test-link-adaptation & updated it with new tx psd & noise values
Nicola Baldo <nbaldo@cttc.es>
parents: 8036
diff changeset
    89
026861f85f53 added SNR test to lte-test-link-adaptation & updated it with new tx psd & noise values
Nicola Baldo <nbaldo@cttc.es>
parents: 8036
diff changeset
    90
  /** 
026861f85f53 added SNR test to lte-test-link-adaptation & updated it with new tx psd & noise values
Nicola Baldo <nbaldo@cttc.es>
parents: 8036
diff changeset
    91
   * 
026861f85f53 added SNR test to lte-test-link-adaptation & updated it with new tx psd & noise values
Nicola Baldo <nbaldo@cttc.es>
parents: 8036
diff changeset
    92
   * \return a pointer to the LteSpectrumPhy instance that manages the uplink
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    93
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    94
  Ptr<LteSpectrumPhy> GetUplinkSpectrumPhy ();
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    95
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    96
  /**
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    97
  * \brief Queue the MAC PDU to be sent (according to m_macChTtiDelay)
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    98
  * \param p the MAC PDU to sent
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    99
  */
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   100
  virtual void DoSendMacPdu (Ptr<Packet> p) = 0;
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   101
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   102
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   103
   * Set the downlink channel
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   104
   * \param c the downlink channel
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   105
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   106
  void SetDownlinkChannel (Ptr<SpectrumChannel> c);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   107
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   108
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   109
   * Set the uplink channel
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   110
   * \param c the uplink channel
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   111
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   112
  void SetUplinkChannel (Ptr<SpectrumChannel> c);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   113
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   114
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   115
  /**
7581
6ac3fa410583 spectrum API change
Nicola Baldo <nicola@baldo.biz>
parents: 7385
diff changeset
   116
   * \brief Compute the TX Power Spectral Density
8036
52262ea6db24 documented units for TX and noise PSD
Nicola Baldo <nbaldo@cttc.es>
parents: 8015
diff changeset
   117
   * \return a pointer to a newly allocated SpectrumValue representing the TX Power Spectral Density in W/Hz for each Resource Block
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   118
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   119
  virtual Ptr<SpectrumValue> CreateTxPowerSpectralDensity () = 0;
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   120
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   121
  void DoDispose ();
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   122
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   123
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   124
   * \param tti transmission time interval
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   125
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   126
  void SetTti (double tti);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   127
  /**
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   128
   * \returns transmission time interval
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   129
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   130
  double GetTti (void) const;
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   131
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   132
  /** 
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   133
   * 
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   134
   * \param cellId the Cell Identifier
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   135
   */
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   136
  void DoSetCellId (uint16_t cellId);
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   137
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   138
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   139
  /**
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   140
  * \returns the RB gruop size according to the bandwidth
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   141
  */
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   142
  uint8_t GetRbgSize (void) const;
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   143
  
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   144
  
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   145
  /**
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   146
  * \returns the SRS periodicity (see Table 8.2-1 of 36.213)
9038
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   147
  * \param srcCi the SRS Configuration Index
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   148
  */
9038
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   149
  uint16_t GetSrsPeriodicity (uint16_t srcCi) const;
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   150
  
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   151
  /**
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   152
  * \returns the SRS Subframe offset (see Table 8.2-1 of 36.213)
9038
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   153
  * \param srcCi the SRS Configuration Index
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   154
  */
9038
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9036
diff changeset
   155
  uint16_t GetSrsSubframeOffset (uint16_t srcCi) const;
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   156
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   157
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   158
  /**
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   159
  * \param p queue MAC PDU to be sent
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   160
  */
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   161
  void SetMacPdu (Ptr<Packet> p);
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   162
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   163
  /**
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   164
  * \returns the packet burst to be sent
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   165
  */
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   166
  Ptr<PacketBurst> GetPacketBurst (void);
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   167
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   168
  /**
8664
ab4c821fc251 revision after Giuseppe's comments http://codereview.appspot.com/4626069/#msg1
Nicola Baldo <nbaldo@cttc.es>
parents: 8339
diff changeset
   169
  * \param m the control message to be sent
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   170
  */
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: 8670
diff changeset
   171
  void SetControlMessages (Ptr<LteControlMessage> m);
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
   172
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   173
  /**
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   174
  * \returns the list of control messages to be sent
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   175
  */
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: 8670
diff changeset
   176
  std::list<Ptr<LteControlMessage> > GetControlMessages (void);
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   177
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   178
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   179
  /** 
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   180
   * generate a CQI report based on the given SINR of Ctrl frame
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   181
   * 
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   182
   * \param sinr the SINR vs frequency measured by the device
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   183
   */
10425
1867d8c25aa7 doxygen warnings for lte module
Budiarto Herman <budiarto.herman@magister.fi>
parents: 9389
diff changeset
   184
  virtual void GenerateCtrlCqiReport (const SpectrumValue& sinr) = 0;
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: 8670
diff changeset
   185
  
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: 8670
diff changeset
   186
  /** 
9036
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   187
  * generate a CQI report based on the given SINR of Data frame
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   188
  * (used for PUSCH CQIs)
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   189
  * 
5e09b29d4af5 Add SRS signaling
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   190
  * \param sinr the SINR vs frequency measured by the device
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: 8670
diff changeset
   191
  */
10425
1867d8c25aa7 doxygen warnings for lte module
Budiarto Herman <budiarto.herman@magister.fi>
parents: 9389
diff changeset
   192
  virtual void GenerateDataCqiReport (const SpectrumValue& sinr) = 0;
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   193
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: 9346
diff changeset
   194
  /**
d52b94f66fe7 Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9346
diff changeset
   195
  * generate a report based on the linear interference and noise power
d52b94f66fe7 Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9346
diff changeset
   196
  * perceived during DATA frame
d52b94f66fe7 Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9346
diff changeset
   197
  * NOTE: used only by eNB 
d52b94f66fe7 Add trace sources for DL RSRP/RSRQ (dummy values, TBD), UL SRS and interference power traces
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9346
diff changeset
   198
  *
10425
1867d8c25aa7 doxygen warnings for lte module
Budiarto Herman <budiarto.herman@magister.fi>
parents: 9389
diff changeset
   199
  * \param interf the interference + noise power measured by the device
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: 9346
diff changeset
   200
  */
10425
1867d8c25aa7 doxygen warnings for lte module
Budiarto Herman <budiarto.herman@magister.fi>
parents: 9389
diff changeset
   201
  virtual void ReportInterference (const SpectrumValue& interf) = 0;
9389
4bd2725add01 Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9357
diff changeset
   202
4bd2725add01 Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9357
diff changeset
   203
  /**
4bd2725add01 Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9357
diff changeset
   204
  * generate a report based on the linear RS power perceived during CTRL 
4bd2725add01 Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9357
diff changeset
   205
  * frame
4bd2725add01 Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9357
diff changeset
   206
  * NOTE: used only by UE for evaluating RSRP
4bd2725add01 Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9357
diff changeset
   207
  *
10425
1867d8c25aa7 doxygen warnings for lte module
Budiarto Herman <budiarto.herman@magister.fi>
parents: 9389
diff changeset
   208
  * \param power the RS power measured by the device
9389
4bd2725add01 Update RSRP and RSRQ evaluation (RSRQ as average SINR)
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9357
diff changeset
   209
  */
10425
1867d8c25aa7 doxygen warnings for lte module
Budiarto Herman <budiarto.herman@magister.fi>
parents: 9389
diff changeset
   210
  virtual void ReportRsReceivedPower (const SpectrumValue& power) = 0;
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: 9346
diff changeset
   211
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   212
8148
09e2d03022a2 run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents: 8098
diff changeset
   213
7893
8dba98ae26ee PHY synchronization
Nicola Baldo <nbaldo@cttc.es>
parents: 7886
diff changeset
   214
protected:
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   215
  Ptr<LteNetDevice> m_netDevice;
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   216
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   217
  Ptr<LteSpectrumPhy> m_downlinkSpectrumPhy;
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   218
  Ptr<LteSpectrumPhy> m_uplinkSpectrumPhy;
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
  double m_txPower;
7981
aacecd825d99 noise figure attribute
Nicola Baldo <nbaldo@cttc.es>
parents: 7980
diff changeset
   221
  double m_noiseFigure;
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   222
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   223
  double m_tti;
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   224
  uint8_t m_ulBandwidth;
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   225
  uint8_t m_dlBandwidth;
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   226
  uint8_t m_rbgSize;
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   227
8015
e8fd3bf1692f flexible spectrum model
Nicola Baldo <nbaldo@cttc.es>
parents: 8010
diff changeset
   228
  uint16_t m_dlEarfcn;
e8fd3bf1692f flexible spectrum model
Nicola Baldo <nbaldo@cttc.es>
parents: 8010
diff changeset
   229
  uint16_t m_ulEarfcn;
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   230
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   231
  std::vector< Ptr<PacketBurst> > m_packetBurstQueue;
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: 8670
diff changeset
   232
  std::vector< std::list<Ptr<LteControlMessage> > > m_controlMessagesQueue;
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   233
  uint8_t m_macChTtiDelay; // delay between MAC and channel layer in terms of TTIs
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   234
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   235
  uint16_t m_cellId;
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   236
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   237
};
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   238
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   239
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   240
}
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   241
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   242
#endif /* LTE_PHY_H */