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
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
uan-phy.cc
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2009 University of Washington
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: Leonard Tracy <lentracy@gmail.com>
19
*/
20
21
#include "
uan-phy.h
"
22
23
namespace
ns3 {
24
25
NS_OBJECT_ENSURE_REGISTERED
(UanPhyCalcSinr);
26
27
TypeId
UanPhyCalcSinr::GetTypeId
(
void
)
28
{
29
static
TypeId
tid =
TypeId
(
"ns3::UanPhyCalcSinr"
)
30
.
SetParent
<
Object
> ();
31
return
tid;
32
}
33
34
void
35
UanPhyCalcSinr::Clear
()
36
{
37
}
38
39
void
40
UanPhyCalcSinr::DoDispose
()
41
{
42
Clear
();
43
Object::DoDispose
();
44
}
45
46
NS_OBJECT_ENSURE_REGISTERED
(
UanPhyPer
);
47
48
TypeId
UanPhyPer::GetTypeId
(
void
)
49
{
50
static
TypeId
tid =
TypeId
(
"ns3::UanPhyPer"
)
51
.
SetParent
<
Object
> ();
52
return
tid;
53
}
54
55
void
56
UanPhyPer::Clear
()
57
{
58
}
59
60
void
61
UanPhyPer::DoDispose
()
62
{
63
Clear
();
64
Object::DoDispose
();
65
}
66
67
NS_OBJECT_ENSURE_REGISTERED
(
UanPhy
);
68
69
TypeId
UanPhy::GetTypeId
(
void
)
70
{
71
static
TypeId
tid =
TypeId
(
"ns3::UanPhy"
)
72
.
SetParent
<
Object
> ()
73
.AddTraceSource (
"PhyTxBegin"
,
74
"Trace source indicating a packet has begun transmitting over the channel medium"
,
75
MakeTraceSourceAccessor
(&
UanPhy::m_phyTxBeginTrace
))
76
.AddTraceSource (
"PhyTxEnd"
,
77
"Trace source indicating a packet has been completely transmitted over the channel."
,
78
MakeTraceSourceAccessor
(&
UanPhy::m_phyTxEndTrace
))
79
.AddTraceSource (
"PhyTxDrop"
,
80
"Trace source indicating a packet has been dropped by the device during transmission"
,
81
MakeTraceSourceAccessor
(&
UanPhy::m_phyTxDropTrace
))
82
.AddTraceSource (
"PhyRxBegin"
,
83
"Trace source indicating a packet has begun being received from the channel medium by the device"
,
84
MakeTraceSourceAccessor
(&
UanPhy::m_phyRxBeginTrace
))
85
.AddTraceSource (
"PhyRxEnd"
,
86
"Trace source indicating a packet has been completely received from the channel medium by the device"
,
87
MakeTraceSourceAccessor
(&
UanPhy::m_phyRxEndTrace
))
88
.AddTraceSource (
"PhyRxDrop"
,
89
"Trace source indicating a packet has been dropped by the device during reception"
,
90
MakeTraceSourceAccessor
(&
UanPhy::m_phyRxDropTrace
))
91
;
92
return
tid;
93
}
94
95
96
void
97
UanPhy::NotifyTxBegin
(
Ptr<const Packet>
packet)
98
{
99
m_phyTxBeginTrace
(packet);
100
}
101
102
void
103
UanPhy::NotifyTxEnd
(
Ptr<const Packet>
packet)
104
{
105
m_phyTxEndTrace
(packet);
106
}
107
108
void
109
UanPhy::NotifyTxDrop
(
Ptr<const Packet>
packet)
110
{
111
m_phyTxDropTrace
(packet);
112
}
113
114
void
115
UanPhy::NotifyRxBegin
(
Ptr<const Packet>
packet)
116
{
117
m_phyRxBeginTrace
(packet);
118
}
119
120
void
121
UanPhy::NotifyRxEnd
(
Ptr<const Packet>
packet)
122
{
123
m_phyRxEndTrace
(packet);
124
}
125
126
void
127
UanPhy::NotifyRxDrop
(
Ptr<const Packet>
packet)
128
{
129
m_phyRxDropTrace
(packet);
130
}
131
132
}
// namespace ns3
ns3::UanPhy::m_phyTxBeginTrace
TracedCallback< Ptr< const Packet > > m_phyTxBeginTrace
Definition:
uan-phy.h:439
ns3::Ptr< const Packet >
ns3::UanPhy::NotifyRxDrop
void NotifyRxDrop(Ptr< const Packet > packet)
Definition:
uan-phy.cc:127
ns3::UanPhy::m_phyRxDropTrace
TracedCallback< Ptr< const Packet > > m_phyRxDropTrace
Definition:
uan-phy.h:478
ns3::UanPhy::m_phyTxDropTrace
TracedCallback< Ptr< const Packet > > m_phyTxDropTrace
Definition:
uan-phy.h:455
ns3::UanPhyCalcSinr::DoDispose
virtual void DoDispose(void)
Definition:
uan-phy.cc:40
ns3::Object::DoDispose
virtual void DoDispose(void)
Definition:
object.cc:335
ns3::UanPhy::NotifyTxDrop
void NotifyTxDrop(Ptr< const Packet > packet)
Definition:
uan-phy.cc:109
ns3::UanPhy::NotifyRxEnd
void NotifyRxEnd(Ptr< const Packet > packet)
Definition:
uan-phy.cc:121
ns3::UanPhy::m_phyRxEndTrace
TracedCallback< Ptr< const Packet > > m_phyRxEndTrace
Definition:
uan-phy.h:471
ns3::UanPhyCalcSinr::Clear
virtual void Clear(void)
Definition:
uan-phy.cc:35
ns3::UanPhyPer::GetTypeId
static TypeId GetTypeId(void)
Definition:
uan-phy.cc:48
ns3::NS_OBJECT_ENSURE_REGISTERED
NS_OBJECT_ENSURE_REGISTERED(AntennaModel)
ns3::UanPhyPer
Definition:
uan-phy.h:98
ns3::UanPhy::NotifyTxBegin
void NotifyTxBegin(Ptr< const Packet > packet)
Definition:
uan-phy.cc:97
ns3::UanPhy::NotifyRxBegin
void NotifyRxBegin(Ptr< const Packet > packet)
Definition:
uan-phy.cc:115
ns3::MakeTraceSourceAccessor
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Definition:
trace-source-accessor.h:135
ns3::UanPhy::GetTypeId
static TypeId GetTypeId(void)
Definition:
uan-phy.cc:69
ns3::UanPhyPer::DoDispose
virtual void DoDispose(void)
Definition:
uan-phy.cc:61
ns3::UanPhy
Base class for UAN Phy models.
Definition:
uan-phy.h:166
ns3::UanPhy::m_phyTxEndTrace
TracedCallback< Ptr< const Packet > > m_phyTxEndTrace
Definition:
uan-phy.h:447
ns3::UanPhyPer::Clear
virtual void Clear(void)
Definition:
uan-phy.cc:56
ns3::UanPhyCalcSinr::GetTypeId
static TypeId GetTypeId(void)
Definition:
uan-phy.cc:27
ns3::Object
a base class which provides memory management and object aggregation
Definition:
object.h:63
uan-phy.h
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:49
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Definition:
type-id.cc:610
ns3::UanPhy::NotifyTxEnd
void NotifyTxEnd(Ptr< const Packet > packet)
Definition:
uan-phy.cc:103
ns3::UanPhy::m_phyRxBeginTrace
TracedCallback< Ptr< const Packet > > m_phyRxBeginTrace
Definition:
uan-phy.h:463
src
uan
model
uan-phy.cc
Generated on Sat Nov 16 2013 16:17:53 for ns-3 by
1.8.5