|
29 |
#include "ns3/trace-source-accessor.h" |
29 |
#include "ns3/trace-source-accessor.h" |
30 |
#include "aloha-noack-mac-header.h" |
30 |
#include "aloha-noack-mac-header.h" |
31 |
#include "aloha-noack-net-device.h" |
31 |
#include "aloha-noack-net-device.h" |
|
|
32 |
#include "spectrum-phy.h" |
32 |
#include "ns3/llc-snap-header.h" |
33 |
#include "ns3/llc-snap-header.h" |
33 |
|
34 |
|
34 |
NS_LOG_COMPONENT_DEFINE ("AlohaNoackNetDevice"); |
35 |
NS_LOG_COMPONENT_DEFINE ("AlohaNoackNetDevice"); |
|
82 |
PointerValue (), |
83 |
PointerValue (), |
83 |
MakePointerAccessor (&AlohaNoackNetDevice::GetPhy, |
84 |
MakePointerAccessor (&AlohaNoackNetDevice::GetPhy, |
84 |
&AlohaNoackNetDevice::SetPhy), |
85 |
&AlohaNoackNetDevice::SetPhy), |
85 |
MakePointerChecker<Object> ()) |
86 |
MakePointerChecker<SpectrumPhy> ()) |
86 |
.AddTraceSource ("MacTx", |
87 |
.AddTraceSource ("MacTx", |
87 |
"Trace source indicating a packet has arrived for transmission by this device", |
88 |
"Trace source indicating a packet has arrived for transmission by this device", |
88 |
MakeTraceSourceAccessor (&AlohaNoackNetDevice::m_macTxTrace)) |
89 |
MakeTraceSourceAccessor (&AlohaNoackNetDevice::m_macTxTrace)) |
|
248 |
} |
249 |
} |
249 |
|
250 |
|
250 |
void |
251 |
void |
251 |
AlohaNoackNetDevice::SetPhy (Ptr<Object> phy) |
252 |
AlohaNoackNetDevice::SetPhy (Ptr<SpectrumPhy> phy) |
252 |
{ |
253 |
{ |
253 |
NS_LOG_FUNCTION (this << phy); |
254 |
NS_LOG_FUNCTION (this << phy); |
254 |
m_phy = phy; |
255 |
m_phy = phy; |
255 |
} |
256 |
} |
256 |
|
257 |
|
257 |
|
258 |
|
258 |
Ptr<Object> |
259 |
Ptr<SpectrumPhy> |
259 |
AlohaNoackNetDevice::GetPhy () const |
260 |
AlohaNoackNetDevice::GetPhy () const |
260 |
{ |
261 |
{ |
261 |
NS_LOG_FUNCTION (this); |
262 |
NS_LOG_FUNCTION (this); |