A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
lte-simple-net-device.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Manuel Requena <manuel.requena@cttc.es>
18
*/
19
20
#include "
lte-simple-net-device.h
"
21
22
#include "ns3/log.h"
23
#include "ns3/pointer.h"
24
#include "ns3/queue.h"
25
#include "ns3/simulator.h"
26
27
namespace
ns3
28
{
29
30
NS_LOG_COMPONENT_DEFINE
(
"LteSimpleNetDevice"
);
31
32
NS_OBJECT_ENSURE_REGISTERED
(LteSimpleNetDevice);
33
34
TypeId
35
LteSimpleNetDevice::GetTypeId
()
36
{
37
static
TypeId
tid =
TypeId
(
"ns3::LteSimpleNetDevice"
)
38
.
SetParent
<
SimpleNetDevice
>()
39
.AddConstructor<LteSimpleNetDevice>();
40
41
return
tid;
42
}
43
44
LteSimpleNetDevice::LteSimpleNetDevice
()
45
{
46
NS_LOG_FUNCTION
(
this
);
47
}
48
49
LteSimpleNetDevice::LteSimpleNetDevice
(
Ptr<Node>
node)
50
{
51
NS_LOG_FUNCTION
(
this
);
52
SetNode
(node);
53
}
54
55
LteSimpleNetDevice::~LteSimpleNetDevice
()
56
{
57
NS_LOG_FUNCTION
(
this
);
58
}
59
60
void
61
LteSimpleNetDevice::DoDispose
()
62
{
63
NS_LOG_FUNCTION
(
this
);
64
SimpleNetDevice::DoDispose
();
65
}
66
67
void
68
LteSimpleNetDevice::DoInitialize
()
69
{
70
NS_LOG_FUNCTION
(
this
);
71
}
72
73
bool
74
LteSimpleNetDevice::Send
(
Ptr<Packet>
packet,
const
Address
& dest, uint16_t protocolNumber)
75
{
76
NS_LOG_FUNCTION
(
this
<< dest << protocolNumber);
77
return
SimpleNetDevice::Send
(packet, dest, protocolNumber);
78
}
79
80
}
// namespace ns3
ns3::Address
a polymophic address class
Definition:
address.h:101
ns3::LteSimpleNetDevice::Send
bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber) override
Definition:
lte-simple-net-device.cc:74
ns3::LteSimpleNetDevice::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
lte-simple-net-device.cc:35
ns3::LteSimpleNetDevice::DoDispose
void DoDispose() override
Destructor implementation.
Definition:
lte-simple-net-device.cc:61
ns3::LteSimpleNetDevice::LteSimpleNetDevice
LteSimpleNetDevice()
Definition:
lte-simple-net-device.cc:44
ns3::LteSimpleNetDevice::~LteSimpleNetDevice
~LteSimpleNetDevice() override
Definition:
lte-simple-net-device.cc:55
ns3::LteSimpleNetDevice::DoInitialize
void DoInitialize() override
Initialize() implementation.
Definition:
lte-simple-net-device.cc:68
ns3::Ptr< Node >
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::SimpleNetDevice::DoDispose
void DoDispose() override
Destructor implementation.
Definition:
simple-net-device.cc:540
ns3::SimpleNetDevice::Send
bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber) override
Definition:
simple-net-device.cc:422
ns3::SimpleNetDevice::SetNode
void SetNode(Ptr< Node > node) override
Definition:
simple-net-device.cc:519
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition:
type-id.cc:931
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition:
log.h:202
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:240
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition:
object-base.h:46
lte-simple-net-device.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lte
test
lte-simple-net-device.cc
Generated on Sun Mar 3 2024 17:11:03 for ns-3 by
1.9.1