src/lte/model/lte-enb-net-device.cc
author Nicola Baldo <nbaldo@cttc.es>
Thu, 31 Mar 2011 12:25:44 +0200
changeset 7928 b736f63e9bdf
parent 7921 0a504caf445d
child 7944 f7e5e0540487
permissions -rw-r--r--
removed LtePhy::Get{Up,Down}linkSpectrumPhy methods which are evil
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
     1
/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
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> : Update to FF API Architecture
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    20
 * Author: Nicola Baldo <nbaldo@cttc.es>  : Integrated with new RRC and MAC architecture
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
7897
313a02778014 DL PF Scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7887
diff changeset
    23
#include <ns3/llc-snap-header.h>
313a02778014 DL PF Scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7887
diff changeset
    24
#include <ns3/simulator.h>
313a02778014 DL PF Scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7887
diff changeset
    25
#include <ns3/callback.h>
313a02778014 DL PF Scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7887
diff changeset
    26
#include <ns3/node.h>
313a02778014 DL PF Scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7887
diff changeset
    27
#include <ns3/packet.h>
313a02778014 DL PF Scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7887
diff changeset
    28
#include <ns3/lte-net-device.h>
313a02778014 DL PF Scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7887
diff changeset
    29
#include <ns3/packet-burst.h>
313a02778014 DL PF Scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7887
diff changeset
    30
#include <ns3/uinteger.h>
313a02778014 DL PF Scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7887
diff changeset
    31
#include <ns3/trace-source-accessor.h>
313a02778014 DL PF Scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7887
diff changeset
    32
#include <ns3/pointer.h>
313a02778014 DL PF Scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7887
diff changeset
    33
#include <ns3/enum.h>
313a02778014 DL PF Scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7887
diff changeset
    34
#include <ns3/lte-amc.h>
313a02778014 DL PF Scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7887
diff changeset
    35
#include <ns3/lte-enb-mac.h>
313a02778014 DL PF Scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7887
diff changeset
    36
#include <ns3/lte-enb-net-device.h>
313a02778014 DL PF Scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7887
diff changeset
    37
#include <ns3/lte-enb-rrc.h>
313a02778014 DL PF Scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7887
diff changeset
    38
#include <ns3/lte-ue-net-device.h>
313a02778014 DL PF Scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7887
diff changeset
    39
#include <ns3/lte-enb-phy.h>
313a02778014 DL PF Scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7887
diff changeset
    40
#include <ns3/ff-mac-scheduler.h>
313a02778014 DL PF Scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7887
diff changeset
    41
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    42
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    43
NS_LOG_COMPONENT_DEFINE ("LteEnbNetDevice");
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    44
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    45
namespace ns3 {
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    46
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    47
NS_OBJECT_ENSURE_REGISTERED ( LteEnbNetDevice);
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    48
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    49
uint16_t LteEnbNetDevice::m_cellIdCounter = 0;
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    50
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    51
TypeId LteEnbNetDevice::GetTypeId (void)
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    52
{
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    53
  static TypeId
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    54
  tid =
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    55
    TypeId ("ns3::LteEnbNetDevice")
7901
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents: 7887
diff changeset
    56
    .SetParent<LteNetDevice> ()
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents: 7887
diff changeset
    57
    .AddConstructor<LteEnbNetDevice> ()
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents: 7887
diff changeset
    58
    .AddAttribute ("LteEnbRrc",
7921
0a504caf445d added more disposal stuff
Nicola Baldo <nbaldo@cttc.es>
parents: 7907
diff changeset
    59
                   "The RRC associated to this EnbNetDevice",               
7901
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents: 7887
diff changeset
    60
                   PointerValue (),
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents: 7887
diff changeset
    61
                   MakePointerAccessor (&LteEnbNetDevice::m_rrc),
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents: 7887
diff changeset
    62
                   MakePointerChecker <LteEnbRrc> ())
2451f71f1ce4 Added attributes to enable access to RLC instances in Enb
jnin
parents: 7887
diff changeset
    63
    ;
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    64
  return tid;
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    65
}
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    66
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    67
LteEnbNetDevice::LteEnbNetDevice (void)
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    68
{
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    69
  NS_LOG_FUNCTION (this);
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    70
  NS_FATAL_ERROR ("This constructor should not be called");
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    71
  InitLteEnbNetDevice ();
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    72
}
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    73
7906
d58de34e41d3 MAC, RRC and Scheduler created by LenaHelper
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7902
diff changeset
    74
LteEnbNetDevice::LteEnbNetDevice (Ptr<Node> node, Ptr<LteEnbPhy> phy, Ptr<LteEnbMac> mac, Ptr<FfMacScheduler> sched, Ptr<LteEnbRrc> rrc)
6705
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
  NS_LOG_FUNCTION (this);
7906
d58de34e41d3 MAC, RRC and Scheduler created by LenaHelper
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7902
diff changeset
    77
  m_phy = phy;
d58de34e41d3 MAC, RRC and Scheduler created by LenaHelper
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7902
diff changeset
    78
  m_mac = mac;
d58de34e41d3 MAC, RRC and Scheduler created by LenaHelper
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7902
diff changeset
    79
  m_scheduler = sched;
d58de34e41d3 MAC, RRC and Scheduler created by LenaHelper
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7902
diff changeset
    80
  m_rrc = rrc;
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    81
  InitLteEnbNetDevice ();
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    82
  SetNode (node);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    83
}
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
    84
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    85
LteEnbNetDevice::~LteEnbNetDevice (void)
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
  NS_LOG_FUNCTION (this);
6710
3cd651349cb6 lte examples now passing valgrind tests
Nicola Baldo <nbaldo@cttc.es>
parents: 6709
diff changeset
    88
}
3cd651349cb6 lte examples now passing valgrind tests
Nicola Baldo <nbaldo@cttc.es>
parents: 6709
diff changeset
    89
3cd651349cb6 lte examples now passing valgrind tests
Nicola Baldo <nbaldo@cttc.es>
parents: 6709
diff changeset
    90
void
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
    91
LteEnbNetDevice::DoDispose ()
6710
3cd651349cb6 lte examples now passing valgrind tests
Nicola Baldo <nbaldo@cttc.es>
parents: 6709
diff changeset
    92
{
3cd651349cb6 lte examples now passing valgrind tests
Nicola Baldo <nbaldo@cttc.es>
parents: 6709
diff changeset
    93
  NS_LOG_FUNCTION (this);
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
    94
7921
0a504caf445d added more disposal stuff
Nicola Baldo <nbaldo@cttc.es>
parents: 7907
diff changeset
    95
  m_mac->Dispose ();
0a504caf445d added more disposal stuff
Nicola Baldo <nbaldo@cttc.es>
parents: 7907
diff changeset
    96
  m_mac = 0;
0a504caf445d added more disposal stuff
Nicola Baldo <nbaldo@cttc.es>
parents: 7907
diff changeset
    97
0a504caf445d added more disposal stuff
Nicola Baldo <nbaldo@cttc.es>
parents: 7907
diff changeset
    98
  m_scheduler->Dispose ();
0a504caf445d added more disposal stuff
Nicola Baldo <nbaldo@cttc.es>
parents: 7907
diff changeset
    99
  m_scheduler = 0;
0a504caf445d added more disposal stuff
Nicola Baldo <nbaldo@cttc.es>
parents: 7907
diff changeset
   100
0a504caf445d added more disposal stuff
Nicola Baldo <nbaldo@cttc.es>
parents: 7907
diff changeset
   101
  m_rrc->Dispose ();
0a504caf445d added more disposal stuff
Nicola Baldo <nbaldo@cttc.es>
parents: 7907
diff changeset
   102
  m_rrc = 0;
0a504caf445d added more disposal stuff
Nicola Baldo <nbaldo@cttc.es>
parents: 7907
diff changeset
   103
0a504caf445d added more disposal stuff
Nicola Baldo <nbaldo@cttc.es>
parents: 7907
diff changeset
   104
  m_phy->Dispose ();
0a504caf445d added more disposal stuff
Nicola Baldo <nbaldo@cttc.es>
parents: 7907
diff changeset
   105
  m_phy = 0;
6710
3cd651349cb6 lte examples now passing valgrind tests
Nicola Baldo <nbaldo@cttc.es>
parents: 6709
diff changeset
   106
6709
4f3100141560 fixed some valgrind errors
Giuseppe Piro <g.piro@poliba.it>
parents: 6705
diff changeset
   107
  LteNetDevice::DoDispose ();
6705
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
6710
3cd651349cb6 lte examples now passing valgrind tests
Nicola Baldo <nbaldo@cttc.es>
parents: 6709
diff changeset
   110
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   111
void
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
   112
LteEnbNetDevice::InitLteEnbNetDevice (void)
6705
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
  NS_LOG_FUNCTION (this);
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   115
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   116
  SetNode (0);
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   117
  if (GetPhy () == 0)
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   118
    {
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   119
      NS_LOG_DEBUG (this << "PHY NULL");
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   120
    }
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   121
  else
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   122
    {
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   123
      NS_LOG_DEBUG (this << "PHY ! NULL");
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   124
    }
7907
ac6ff9dc0d06 polishment of comments
Marco Miozzo <marco.miozzo@cttc.es>
parents: 7906
diff changeset
   125
  
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   126
  m_rrc->SetLteEnbCmacSapProvider (m_mac->GetLteEnbCmacSapProvider ());
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   127
  m_mac->SetLteEnbCmacSapUser (m_rrc->GetLteEnbCmacSapUser ());
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   128
  m_rrc->SetLteMacSapProvider (m_mac->GetLteMacSapProvider ());
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   129
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   130
  m_mac->SetFfMacSchedSapProvider (m_scheduler->GetFfMacSchedSapProvider ());
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   131
  m_mac->SetFfMacCschedSapProvider (m_scheduler->GetFfMacCschedSapProvider ());
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   132
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   133
  m_scheduler->SetFfMacSchedSapUser (m_mac->GetFfMacSchedSapUser ());
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   134
  m_scheduler->SetFfMacCschedSapUser (m_mac->GetFfMacCschedSapUser ());
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   135
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
   136
  GetPhy ()->GetObject<LteEnbPhy> ()->SetLteEnbPhySapUser (m_mac->GetLteEnbPhySapUser ());
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
   137
  m_mac->SetLteEnbPhySapProvider (GetPhy ()->GetObject<LteEnbPhy> ()->GetLteEnbPhySapProvider ());
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   138
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   139
  m_rrc->ConfigureCell (25, 25);
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   140
  NS_ASSERT_MSG (m_cellIdCounter < 65535, "max num eNBs exceeded");
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   141
  m_cellId = ++m_cellIdCounter;
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   142
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   143
  // WILD HACK -  should use the PHY SAP instead. Probably should handle this through the RRC
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
   144
  GetPhy ()->GetObject<LteEnbPhy> ()->DoSetBandwidth (25,25);
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
   145
  GetPhy ()->GetObject<LteEnbPhy> ()->DoSetCellId (m_cellId);
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   146
  
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
   147
  Simulator::ScheduleNow (&LteEnbPhy::StartFrame, GetPhy ()->GetObject<LteEnbPhy> ());
6705
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
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   150
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   151
Ptr<LteEnbMac>
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
   152
LteEnbNetDevice::GetMac (void)
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   153
{
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   154
  NS_LOG_FUNCTION (this);
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   155
  return m_mac;
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   156
}
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   157
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   158
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
   159
Ptr<LteEnbPhy>
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
   160
LteEnbNetDevice::GetPhy (void) const
6705
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
  NS_LOG_FUNCTION (this);
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   163
  return m_phy;
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   164
}
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
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   167
bool
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
   168
LteEnbNetDevice::DoSend (Ptr<Packet> packet, const Mac48Address& source,
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   169
                      const Mac48Address& dest, uint16_t protocolNumber)
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
  NS_LOG_FUNCTION (this << source << dest << protocolNumber);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   172
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   173
  NS_FATAL_ERROR ("IP connectivity not implemented yet");
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   174
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   175
  /*
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   176
   * The classification of traffic in DL is done by the PGW (not
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   177
   * by the eNB).
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   178
   * Hovever, the core network is not implemented yet.
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   179
   * For now the classification is managed by the eNB.
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   180
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   181
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   182
  // if (protocolNumber == 2048)
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   183
  //   {
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   184
  //     // it is an IP packet
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   185
  //   }
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   186
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   187
  // if (protocolNumber != 2048 || bearer == 0)
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   188
  //   {
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   189
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   190
  //   }
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   191
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   192
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   193
  return true;
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   194
}
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   195
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   196
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   197
void
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
   198
LteEnbNetDevice::DoReceive (Ptr<Packet> p)
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   199
{
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   200
  NS_LOG_FUNCTION (this << p);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   201
  ForwardUp (p->Copy ());
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   202
}
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   203
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   204
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   205
void
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
   206
LteEnbNetDevice::SendIdealPdcchMessage (void)
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   207
{
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   208
  NS_LOG_FUNCTION (this);
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   209
  /*
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   210
   * Get both PDCCH ideal message for UL and DL and
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   211
   * set assigned resources to UEs using
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   212
   * SendAssignedDLResources and SendAssignedULResources
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   213
   */
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   214
}
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   215
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   216
Ptr<LteEnbRrc>
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
   217
LteEnbNetDevice::GetRrc ()
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   218
{
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   219
  return m_rrc;
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   220
}
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   221
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   222
uint16_t
7887
78911c978517 renamed several LTE files and classes
CTTC
parents: 7886
diff changeset
   223
LteEnbNetDevice::GetCellId ()
7886
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   224
{
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   225
  return m_cellId;
b65c16d4da83 LENA project first public release
CTTC
parents: 6852
diff changeset
   226
}
6705
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   227
422c67049471 LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
diff changeset
   228
} // namespace ns3