A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
lte-enb-net-device.h
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Giuseppe Piro <g.piro@poliba.it>
19  * Author: Marco Miozzo <marco.miozzo@cttc.es> : Update to FF API Architecture
20  */
21 
22 #ifndef LTE_ENB_NET_DEVICE_H
23 #define LTE_ENB_NET_DEVICE_H
24 
25 #include "ns3/lte-net-device.h"
26 #include "ns3/event-id.h"
27 #include "ns3/mac48-address.h"
28 #include "ns3/traced-callback.h"
29 #include "ns3/nstime.h"
30 #include "ns3/lte-phy.h"
31 #include <vector>
32 
33 namespace ns3 {
34 
35 class Packet;
36 class PacketBurst;
37 class Node;
38 class LtePhy;
39 class LteEnbPhy;
40 class LteEnbMac;
41 class LteEnbRrc;
42 class FfMacScheduler;
43 
44 
51 {
52 public:
53  static TypeId GetTypeId (void);
54 
55  LteEnbNetDevice ();
56 
57  virtual ~LteEnbNetDevice (void);
58  virtual void DoDispose (void);
59 
60  // inherited from NetDevice
61  virtual bool Send (Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
62 
66  Ptr<LteEnbMac> GetMac (void) const;
67 
71  Ptr<LteEnbPhy> GetPhy (void) const;
72 
76  Ptr<LteEnbRrc> GetRrc () const;
77 
81  uint16_t GetCellId () const;
82 
86  uint8_t GetUlBandwidth () const;
87 
91  void SetUlBandwidth (uint8_t bw);
92 
96  uint8_t GetDlBandwidth () const;
97 
101  void SetDlBandwidth (uint8_t bw);
102 
106  uint16_t GetDlEarfcn () const;
107 
111  void SetDlEarfcn (uint16_t earfcn);
112 
116  uint16_t GetUlEarfcn () const;
117 
121  void SetUlEarfcn (uint16_t earfcn);
122 
123 
124 protected:
125  // inherited from Object
126  virtual void DoInitialize (void);
127 
128 
129 private:
130 
139  void UpdateConfig (void);
140 
141  Ptr<LteEnbMac> m_mac;
142 
143  Ptr<LteEnbPhy> m_phy;
144 
145  Ptr<LteEnbRrc> m_rrc;
146 
147  Ptr<FfMacScheduler> m_scheduler;
148 
149  uint16_t m_cellId;
151  uint8_t m_dlBandwidth;
152  uint8_t m_ulBandwidth;
154  uint16_t m_dlEarfcn;
155  uint16_t m_ulEarfcn;
157 };
158 
159 } // namespace ns3
160 
161 #endif /* LTE_ENB_NET_DEVICE_H */
uint16_t GetDlEarfcn() const
uint16_t GetCellId() const
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
uint8_t GetUlBandwidth() const
Ptr< LteEnbPhy > GetPhy(void) const
a polymophic address class
Definition: address.h:86
void SetUlBandwidth(uint8_t bw)
virtual void DoInitialize(void)
Ptr< LteEnbRrc > GetRrc() const
void SetDlBandwidth(uint8_t bw)
void SetDlEarfcn(uint16_t earfcn)
virtual void DoDispose(void)
uint16_t GetUlEarfcn() const
uint8_t GetDlBandwidth() const
void SetUlEarfcn(uint16_t earfcn)
a unique identifier for an interface.
Definition: type-id.h:44
Ptr< LteEnbMac > GetMac(void) const