author | Nicola Baldo <nbaldo@cttc.es> |
Mon, 04 Feb 2013 18:47:25 +0100 | |
changeset 9653 | 382d27da8905 |
parent 9035 | e40974228d94 |
permissions | -rw-r--r-- |
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 | 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 |
* |
|
7886 | 18 |
* Author: Giuseppe Piro <g.piro@poliba.it> |
19 |
* Nicola Baldo <nbaldo@cttc.es> |
|
6705 | 20 |
*/ |
21 |
||
22 |
#ifndef LTE_NET_DEVICE_H |
|
23 |
#define LTE_NET_DEVICE_H |
|
24 |
||
7886 | 25 |
#include <ns3/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> |
|
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:
8660
diff
changeset
|
31 |
#include <ns3/lte-control-messages.h> |
6705 | 32 |
|
33 |
namespace ns3 { |
|
34 |
||
35 |
class Node; |
|
36 |
class Packet; |
|
37 |
||
38 |
/** |
|
7238
85a7e87bb4cc
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
6969
diff
changeset
|
39 |
* \defgroup lte LTE Models |
85a7e87bb4cc
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
6969
diff
changeset
|
40 |
* |
85a7e87bb4cc
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
6969
diff
changeset
|
41 |
*/ |
85a7e87bb4cc
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
6969
diff
changeset
|
42 |
|
85a7e87bb4cc
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
6969
diff
changeset
|
43 |
/** |
85a7e87bb4cc
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
6969
diff
changeset
|
44 |
* \ingroup lte |
85a7e87bb4cc
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
6969
diff
changeset
|
45 |
* |
6705 | 46 |
* LteNetDevice provides basic implementation for all LTE network devices |
47 |
*/ |
|
48 |
class LteNetDevice : public NetDevice |
|
49 |
{ |
|
50 |
public: |
|
51 |
static TypeId GetTypeId (void); |
|
52 |
||
53 |
LteNetDevice (void); |
|
54 |
virtual ~LteNetDevice (void); |
|
55 |
||
56 |
virtual void DoDispose (void); |
|
57 |
||
58 |
// inherited from NetDevice |
|
59 |
virtual void SetIfIndex (const uint32_t index); |
|
60 |
virtual uint32_t GetIfIndex (void) const; |
|
61 |
virtual Ptr<Channel> GetChannel (void) const; |
|
62 |
virtual bool SetMtu (const uint16_t mtu); |
|
63 |
virtual uint16_t GetMtu (void) const; |
|
64 |
virtual void SetAddress (Address address); |
|
65 |
virtual Address GetAddress (void) const; |
|
66 |
virtual bool IsLinkUp (void) const; |
|
67 |
virtual void AddLinkChangeCallback (Callback<void> callback); |
|
68 |
virtual bool IsBroadcast (void) const; |
|
69 |
virtual Address GetBroadcast (void) const; |
|
70 |
virtual bool IsMulticast (void) const; |
|
71 |
virtual bool IsPointToPoint (void) const; |
|
72 |
virtual bool IsBridge (void) const; |
|
73 |
virtual Ptr<Node> GetNode (void) const; |
|
74 |
virtual void SetNode (Ptr<Node> node); |
|
75 |
virtual bool NeedsArp (void) const; |
|
76 |
virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb); |
|
77 |
virtual Address GetMulticast (Ipv4Address addr) const; |
|
78 |
virtual Address GetMulticast (Ipv6Address addr) const; |
|
7886 | 79 |
virtual void SetPromiscReceiveCallback (PromiscReceiveCallback cb); |
6705 | 80 |
virtual bool SendFrom (Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber); |
81 |
virtual bool SupportsSendFrom (void) const; |
|
82 |
||
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
83 |
/** |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
84 |
* receive a packet from the lower layers in order to forward it to the upper layers |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
85 |
* |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
86 |
* \param p the packet |
6705 | 87 |
*/ |
88 |
void Receive (Ptr<Packet> p); |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
89 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
90 |
protected: |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
91 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
92 |
NetDevice::ReceiveCallback m_rxCallback; |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
93 |
|
6705 | 94 |
private: |
95 |
LteNetDevice (const LteNetDevice &); |
|
96 |
LteNetDevice & operator= (const LteNetDevice &); |
|
97 |
||
98 |
Ptr<Node> m_node; |
|
99 |
||
100 |
TracedCallback<> m_linkChangeCallbacks; |
|
101 |
||
102 |
uint32_t m_ifIndex; |
|
103 |
bool m_linkUp; |
|
104 |
mutable uint16_t m_mtu; |
|
105 |
||
106 |
Mac48Address m_address; |
|
107 |
}; |
|
108 |
||
109 |
||
110 |
} // namespace ns3 |
|
111 |
||
112 |
#endif /* LTE_NET_DEVICE_H */ |