src/lte/model/lte-spectrum-signal-parameters.cc
author Nicola Baldo <nbaldo@cttc.es>
Mon, 04 Feb 2013 18:47:25 +0100
changeset 9653 382d27da8905
parent 9038 e1d67c8aa95b
child 9983 0091ab7a897c
permissions -rw-r--r--
merged lena-dev with ns-3-dev
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7582
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
     2
/*
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
     3
 * Copyright (c) 2011 CTTC
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
     4
 *
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
     7
 * published by the Free Software Foundation;
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
     8
 *
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    12
 * GNU General Public License for more details.
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    13
 *
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    17
 *
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    18
 * Author: Nicola Baldo <nbaldo@cttc.es>
9038
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
    19
 * Modified by Marco Miozzo <mmiozzo@cttc.es> (add data and ctrl diversity)
7582
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    20
 */
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    21
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    22
#include <ns3/log.h>
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    23
#include <ns3/packet-burst.h>
8579
1ecef525784c more efficient LteSpectrumSignalParameters::Copy ()
Nicola Baldo <nbaldo@cttc.es>
parents: 7582
diff changeset
    24
#include <ns3/ptr.h>
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: 8579
diff changeset
    25
#include <ns3/lte-spectrum-signal-parameters.h>
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: 8579
diff changeset
    26
#include <ns3/lte-control-messages.h>
7582
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    27
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    28
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    29
NS_LOG_COMPONENT_DEFINE ("LteSpectrumSignalParameters");
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    30
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    31
namespace ns3 {
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    32
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    33
LteSpectrumSignalParameters::LteSpectrumSignalParameters ()
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    34
{
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    35
  NS_LOG_FUNCTION (this);
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    36
}
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    37
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    38
LteSpectrumSignalParameters::LteSpectrumSignalParameters (const LteSpectrumSignalParameters& p)
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    39
  : SpectrumSignalParameters (p)
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    40
{
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    41
  NS_LOG_FUNCTION (this << &p);
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    42
  packetBurst = p.packetBurst->Copy ();
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    43
}
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    44
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    45
Ptr<SpectrumSignalParameters>
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    46
LteSpectrumSignalParameters::Copy ()
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    47
{
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    48
  NS_LOG_FUNCTION (this);
8579
1ecef525784c more efficient LteSpectrumSignalParameters::Copy ()
Nicola Baldo <nbaldo@cttc.es>
parents: 7582
diff changeset
    49
  // Ideally we would use:
1ecef525784c more efficient LteSpectrumSignalParameters::Copy ()
Nicola Baldo <nbaldo@cttc.es>
parents: 7582
diff changeset
    50
  //   return Copy<LteSpectrumSignalParameters> (*this);
1ecef525784c more efficient LteSpectrumSignalParameters::Copy ()
Nicola Baldo <nbaldo@cttc.es>
parents: 7582
diff changeset
    51
  // but for some reason it doesn't work. Another alternative is 
1ecef525784c more efficient LteSpectrumSignalParameters::Copy ()
Nicola Baldo <nbaldo@cttc.es>
parents: 7582
diff changeset
    52
  //   return Copy<LteSpectrumSignalParameters> (this);
1ecef525784c more efficient LteSpectrumSignalParameters::Copy ()
Nicola Baldo <nbaldo@cttc.es>
parents: 7582
diff changeset
    53
  // but it causes a double creation of the object, hence it is less efficient.
1ecef525784c more efficient LteSpectrumSignalParameters::Copy ()
Nicola Baldo <nbaldo@cttc.es>
parents: 7582
diff changeset
    54
  // The solution below is copied from the implementation of Copy<> (Ptr<>) in ptr.h
1ecef525784c more efficient LteSpectrumSignalParameters::Copy ()
Nicola Baldo <nbaldo@cttc.es>
parents: 7582
diff changeset
    55
  Ptr<LteSpectrumSignalParameters> lssp (new LteSpectrumSignalParameters (*this), false);  
1ecef525784c more efficient LteSpectrumSignalParameters::Copy ()
Nicola Baldo <nbaldo@cttc.es>
parents: 7582
diff changeset
    56
  return lssp;
7582
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    57
}
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
    58
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: 8579
diff changeset
    59
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: 8579
diff changeset
    60
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: 8579
diff changeset
    61
LteSpectrumSignalParametersDataFrame::LteSpectrumSignalParametersDataFrame ()
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: 8579
diff changeset
    62
{
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: 8579
diff changeset
    63
  NS_LOG_FUNCTION (this);
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: 8579
diff changeset
    64
}
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: 8579
diff changeset
    65
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: 8579
diff changeset
    66
LteSpectrumSignalParametersDataFrame::LteSpectrumSignalParametersDataFrame (const LteSpectrumSignalParametersDataFrame& p)
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: 8579
diff changeset
    67
: SpectrumSignalParameters (p)
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: 8579
diff changeset
    68
{
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: 8579
diff changeset
    69
  NS_LOG_FUNCTION (this << &p);
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: 8579
diff changeset
    70
  cellId = p.cellId;
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: 8579
diff changeset
    71
  if (p.packetBurst)
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: 8579
diff changeset
    72
    {
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: 8579
diff changeset
    73
      packetBurst = p.packetBurst->Copy ();
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: 8579
diff changeset
    74
    }
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: 8579
diff changeset
    75
  ctrlMsgList = p.ctrlMsgList;
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: 8579
diff changeset
    76
}
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: 8579
diff changeset
    77
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: 8579
diff changeset
    78
Ptr<SpectrumSignalParameters>
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: 8579
diff changeset
    79
LteSpectrumSignalParametersDataFrame::Copy ()
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: 8579
diff changeset
    80
{
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: 8579
diff changeset
    81
  NS_LOG_FUNCTION (this);
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: 8579
diff changeset
    82
  // Ideally we would use:
9038
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
    83
  //   return Copy<LteSpectrumSignalParametersDataFrame> (*this);
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: 8579
diff changeset
    84
  // but for some reason it doesn't work. Another alternative is 
9038
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
    85
  //   return Copy<LteSpectrumSignalParametersDataFrame> (this);
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: 8579
diff changeset
    86
  // but it causes a double creation of the object, hence it is less efficient.
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: 8579
diff changeset
    87
  // The solution below is copied from the implementation of Copy<> (Ptr<>) in ptr.h
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: 8579
diff changeset
    88
  Ptr<LteSpectrumSignalParametersDataFrame> lssp (new LteSpectrumSignalParametersDataFrame (*this), false);  
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: 8579
diff changeset
    89
  return lssp;
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: 8579
diff changeset
    90
}
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: 8579
diff changeset
    91
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: 8579
diff changeset
    92
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: 8579
diff changeset
    93
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: 8579
diff changeset
    94
LteSpectrumSignalParametersDlCtrlFrame::LteSpectrumSignalParametersDlCtrlFrame ()
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: 8579
diff changeset
    95
{
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: 8579
diff changeset
    96
  NS_LOG_FUNCTION (this);
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: 8579
diff changeset
    97
}
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: 8579
diff changeset
    98
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: 8579
diff changeset
    99
LteSpectrumSignalParametersDlCtrlFrame::LteSpectrumSignalParametersDlCtrlFrame (const LteSpectrumSignalParametersDlCtrlFrame& p)
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: 8579
diff changeset
   100
: SpectrumSignalParameters (p)
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: 8579
diff changeset
   101
{
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: 8579
diff changeset
   102
  NS_LOG_FUNCTION (this << &p);
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: 8579
diff changeset
   103
  cellId = p.cellId;
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: 8579
diff changeset
   104
  ctrlMsgList = p.ctrlMsgList;
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: 8579
diff changeset
   105
}
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: 8579
diff changeset
   106
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: 8579
diff changeset
   107
Ptr<SpectrumSignalParameters>
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: 8579
diff changeset
   108
LteSpectrumSignalParametersDlCtrlFrame::Copy ()
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: 8579
diff changeset
   109
{
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: 8579
diff changeset
   110
  NS_LOG_FUNCTION (this);
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: 8579
diff changeset
   111
  // Ideally we would use:
9038
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   112
  //   return Copy<LteSpectrumSignalParametersDlCtrlFrame> (*this);
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: 8579
diff changeset
   113
  // but for some reason it doesn't work. Another alternative is 
9038
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   114
  //   return Copy<LteSpectrumSignalParametersDlCtrlFrame> (this);
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: 8579
diff changeset
   115
  // but it causes a double creation of the object, hence it is less efficient.
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: 8579
diff changeset
   116
  // The solution below is copied from the implementation of Copy<> (Ptr<>) in ptr.h
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: 8579
diff changeset
   117
  Ptr<LteSpectrumSignalParametersDlCtrlFrame> lssp (new LteSpectrumSignalParametersDlCtrlFrame (*this), false);  
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: 8579
diff changeset
   118
  return lssp;
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: 8579
diff changeset
   119
}
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: 8579
diff changeset
   120
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: 8579
diff changeset
   121
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: 8579
diff changeset
   122
LteSpectrumSignalParametersUlSrsFrame::LteSpectrumSignalParametersUlSrsFrame ()
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: 8579
diff changeset
   123
{
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: 8579
diff changeset
   124
  NS_LOG_FUNCTION (this);
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: 8579
diff changeset
   125
}
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: 8579
diff changeset
   126
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: 8579
diff changeset
   127
LteSpectrumSignalParametersUlSrsFrame::LteSpectrumSignalParametersUlSrsFrame (const LteSpectrumSignalParametersUlSrsFrame& p)
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: 8579
diff changeset
   128
: SpectrumSignalParameters (p)
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: 8579
diff changeset
   129
{
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: 8579
diff changeset
   130
  NS_LOG_FUNCTION (this << &p);
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: 8579
diff changeset
   131
  cellId = p.cellId;
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: 8579
diff changeset
   132
}
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: 8579
diff changeset
   133
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: 8579
diff changeset
   134
Ptr<SpectrumSignalParameters>
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: 8579
diff changeset
   135
LteSpectrumSignalParametersUlSrsFrame::Copy ()
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: 8579
diff changeset
   136
{
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: 8579
diff changeset
   137
  NS_LOG_FUNCTION (this);
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: 8579
diff changeset
   138
  // Ideally we would use:
9038
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   139
  //   return Copy<LteSpectrumSignalParametersUlSrsFrame> (*this);
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: 8579
diff changeset
   140
  // but for some reason it doesn't work. Another alternative is 
9038
e1d67c8aa95b Polish code according to codereview
Marco Miozzo <marco.miozzo@cttc.es>
parents: 9035
diff changeset
   141
  //   return Copy<LteSpectrumSignalParametersUlSrsFrame> (this);
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: 8579
diff changeset
   142
  // but it causes a double creation of the object, hence it is less efficient.
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: 8579
diff changeset
   143
  // The solution below is copied from the implementation of Copy<> (Ptr<>) in ptr.h
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: 8579
diff changeset
   144
  Ptr<LteSpectrumSignalParametersUlSrsFrame> lssp (new LteSpectrumSignalParametersUlSrsFrame (*this), false);  
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: 8579
diff changeset
   145
  return lssp;
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: 8579
diff changeset
   146
}
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: 8579
diff changeset
   147
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: 8579
diff changeset
   148
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: 8579
diff changeset
   149
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: 8579
diff changeset
   150
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: 8579
diff changeset
   151
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: 8579
diff changeset
   152
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: 8579
diff changeset
   153
7582
b87e5f12a8f2 spectrum API change (missing files)
Nicola Baldo <nbaldo@cttc.es>
parents:
diff changeset
   154
} // namespace ns3