A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
uan-phy.cc
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
36 {
37 }
38 
39 void
41 {
42  Clear ();
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
57 {
58 }
59 
60 void
62 {
63  Clear ();
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",
76  .AddTraceSource ("PhyTxEnd",
77  "Trace source indicating a packet has been completely transmitted over the channel.",
79  .AddTraceSource ("PhyTxDrop",
80  "Trace source indicating a packet has been dropped by the device during transmission",
82  .AddTraceSource ("PhyRxBegin",
83  "Trace source indicating a packet has begun being received from the channel medium by the device",
85  .AddTraceSource ("PhyRxEnd",
86  "Trace source indicating a packet has been completely received from the channel medium by the device",
88  .AddTraceSource ("PhyRxDrop",
89  "Trace source indicating a packet has been dropped by the device during reception",
91  ;
92  return tid;
93 }
94 
95 
96 void
98 {
99  m_phyTxBeginTrace (packet);
100 }
101 
102 void
104 {
105  m_phyTxEndTrace (packet);
106 }
107 
108 void
110 {
111  m_phyTxDropTrace (packet);
112 }
113 
114 void
116 {
117  m_phyRxBeginTrace (packet);
118 }
119 
120 void
122 {
123  m_phyRxEndTrace (packet);
124 }
125 
126 void
128 {
129  m_phyRxDropTrace (packet);
130 }
131 
132 } // namespace ns3
TracedCallback< Ptr< const Packet > > m_phyTxBeginTrace
Definition: uan-phy.h:439
void NotifyRxDrop(Ptr< const Packet > packet)
Definition: uan-phy.cc:127
TracedCallback< Ptr< const Packet > > m_phyRxDropTrace
Definition: uan-phy.h:478
TracedCallback< Ptr< const Packet > > m_phyTxDropTrace
Definition: uan-phy.h:455
virtual void DoDispose(void)
Definition: uan-phy.cc:40
virtual void DoDispose(void)
Definition: object.cc:335
void NotifyTxDrop(Ptr< const Packet > packet)
Definition: uan-phy.cc:109
void NotifyRxEnd(Ptr< const Packet > packet)
Definition: uan-phy.cc:121
TracedCallback< Ptr< const Packet > > m_phyRxEndTrace
Definition: uan-phy.h:471
virtual void Clear(void)
Definition: uan-phy.cc:35
void NotifyTxBegin(Ptr< const Packet > packet)
Definition: uan-phy.cc:97
void NotifyRxBegin(Ptr< const Packet > packet)
Definition: uan-phy.cc:115
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
virtual void DoDispose(void)
Definition: uan-phy.cc:61
Base class for UAN Phy models.
Definition: uan-phy.h:166
TracedCallback< Ptr< const Packet > > m_phyTxEndTrace
Definition: uan-phy.h:447
virtual void Clear(void)
Definition: uan-phy.cc:56
a base class which provides memory management and object aggregation
Definition: object.h:63
a unique identifier for an interface.
Definition: type-id.h:44
TypeId SetParent(TypeId tid)
Definition: type-id.cc:471
void NotifyTxEnd(Ptr< const Packet > packet)
Definition: uan-phy.cc:103
TracedCallback< Ptr< const Packet > > m_phyRxBeginTrace
Definition: uan-phy.h:463