A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
lte-simple-net-device.cc
Go to the documentation of this file.
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
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: Manuel Requena <manuel.requena@cttc.es>
19
*/
20
21
#include "ns3/simulator.h"
22
#include "ns3/pointer.h"
23
#include "ns3/log.h"
24
#include "
lte-simple-net-device.h
"
25
26
namespace
ns3
{
27
28
NS_LOG_COMPONENT_DEFINE
(
"LteSimpleNetDevice"
);
29
30
NS_OBJECT_ENSURE_REGISTERED
(LteSimpleNetDevice);
31
32
33
TypeId
LteSimpleNetDevice::GetTypeId
(
void
)
34
{
35
static
TypeId
36
tid =
37
TypeId
(
"ns3::LteSimpleNetDevice"
)
38
.
SetParent
<
SimpleNetDevice
> ()
39
.AddConstructor<LteSimpleNetDevice> ()
40
;
41
42
return
tid;
43
}
44
45
46
LteSimpleNetDevice::LteSimpleNetDevice
(
void
)
47
{
48
NS_LOG_FUNCTION
(
this
);
49
}
50
51
52
LteSimpleNetDevice::LteSimpleNetDevice
(
Ptr<Node>
node)
53
{
54
NS_LOG_FUNCTION
(
this
);
55
SetNode
(node);
56
}
57
58
LteSimpleNetDevice::~LteSimpleNetDevice
(
void
)
59
{
60
NS_LOG_FUNCTION
(
this
);
61
}
62
63
void
64
LteSimpleNetDevice::DoDispose
(
void
)
65
{
66
NS_LOG_FUNCTION
(
this
);
67
SimpleNetDevice::DoDispose
();
68
}
69
70
71
void
72
LteSimpleNetDevice::DoInitialize
(
void
)
73
{
74
NS_LOG_FUNCTION
(
this
);
75
}
76
77
bool
78
LteSimpleNetDevice::Send
(
Ptr<Packet>
packet,
const
Address
& dest, uint16_t protocolNumber)
79
{
80
NS_LOG_FUNCTION
(
this
<< dest << protocolNumber);
81
return
SimpleNetDevice::Send
(packet, dest, protocolNumber);
82
}
83
84
85
}
// namespace ns3
ns3::SimpleNetDevice::Send
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
Definition:
simple-net-device.cc:420
ns3::Ptr< Node >
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
Definition:
log-macros-enabled.h:213
ns3::LteSimpleNetDevice::~LteSimpleNetDevice
virtual ~LteSimpleNetDevice(void)
Definition:
lte-simple-net-device.cc:58
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition:
object-base.h:44
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition:
log.h:201
lte-simple-net-device.h
ns3::Address
a polymophic address class
Definition:
address.h:90
ns3::SimpleNetDevice::SetNode
virtual void SetNode(Ptr< Node > node)
Definition:
simple-net-device.cc:511
ns3::LteSimpleNetDevice::DoInitialize
virtual void DoInitialize(void)
Initialize() implementation.
Definition:
lte-simple-net-device.cc:72
ns3::SimpleNetDevice
This device assumes 48-bit mac addressing; there is also the possibility to add an ErrorModel if you ...
Definition:
simple-net-device.h:55
ns3::LteSimpleNetDevice::LteSimpleNetDevice
LteSimpleNetDevice(void)
Definition:
lte-simple-net-device.cc:46
ns3::LteSimpleNetDevice::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition:
lte-simple-net-device.cc:64
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::LteSimpleNetDevice::Send
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
Definition:
lte-simple-net-device.cc:78
ns3::SimpleNetDevice::DoDispose
virtual void DoDispose(void)
Destructor implementation.
Definition:
simple-net-device.cc:534
ns3::LteSimpleNetDevice::GetTypeId
static TypeId GetTypeId(void)
Definition:
lte-simple-net-device.cc:33
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:57
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Definition:
type-id.cc:638
src
lte
test
lte-simple-net-device.cc
Generated on Wed May 13 2015 14:59:24 for ns-3 by
1.8.9.1