diff -r cef1e8c17560 src/spectrum/model/aloha-noack-net-device.cc --- a/src/spectrum/model/aloha-noack-net-device.cc Fri Oct 21 15:35:22 2011 +0200 +++ b/src/spectrum/model/aloha-noack-net-device.cc Fri Oct 21 07:22:50 2011 -0700 @@ -29,6 +29,7 @@ #include "ns3/trace-source-accessor.h" #include "aloha-noack-mac-header.h" #include "aloha-noack-net-device.h" +#include "spectrum-phy.h" #include "ns3/llc-snap-header.h" NS_LOG_COMPONENT_DEFINE ("AlohaNoackNetDevice"); @@ -82,7 +83,7 @@ PointerValue (), MakePointerAccessor (&AlohaNoackNetDevice::GetPhy, &AlohaNoackNetDevice::SetPhy), - MakePointerChecker ()) + MakePointerChecker ()) .AddTraceSource ("MacTx", "Trace source indicating a packet has arrived for transmission by this device", MakeTraceSourceAccessor (&AlohaNoackNetDevice::m_macTxTrace)) @@ -248,14 +249,14 @@ } void -AlohaNoackNetDevice::SetPhy (Ptr phy) +AlohaNoackNetDevice::SetPhy (Ptr phy) { NS_LOG_FUNCTION (this << phy); m_phy = phy; } -Ptr +Ptr AlohaNoackNetDevice::GetPhy () const { NS_LOG_FUNCTION (this); diff -r cef1e8c17560 src/spectrum/model/aloha-noack-net-device.h --- a/src/spectrum/model/aloha-noack-net-device.h Fri Oct 21 15:35:22 2011 +0200 +++ b/src/spectrum/model/aloha-noack-net-device.h Fri Oct 21 07:22:50 2011 -0700 @@ -40,6 +40,7 @@ class Channel; class SpectrumErrorModel; class Queue; +class SpectrumPhy; @@ -131,18 +132,14 @@ * This object is needed so that we can set/get attributes and * connect to trace sources of the PHY from the net device. * - * @param phy the Phy object attached to the device. Note that the - * API between the PHY and the above (this NetDevice which also - * implements the MAC) is implemented entirely by - * callbacks, so we do not require that the PHY inherits by any - * specific class. + * @param phy the Phy object attached to the device. */ - void SetPhy (Ptr phy); + void SetPhy (Ptr phy); /** * @return a reference to the PHY object embedded in this NetDevice. */ - Ptr GetPhy () const; + Ptr GetPhy () const; @@ -221,7 +218,7 @@ Ptr m_currentPkt; - Ptr m_phy; + Ptr m_phy; }; diff -r cef1e8c17560 src/spectrum/model/non-communicating-net-device.cc --- a/src/spectrum/model/non-communicating-net-device.cc Fri Oct 21 15:35:22 2011 +0200 +++ b/src/spectrum/model/non-communicating-net-device.cc Fri Oct 21 07:22:50 2011 -0700 @@ -27,6 +27,7 @@ #include "ns3/pointer.h" #include "ns3/channel.h" #include "non-communicating-net-device.h" +#include "spectrum-phy.h" NS_LOG_COMPONENT_DEFINE ("NonCommunicatingNetDevice"); @@ -48,7 +49,7 @@ PointerValue (), MakePointerAccessor (&NonCommunicatingNetDevice::GetPhy, &NonCommunicatingNetDevice::SetPhy), - MakePointerChecker ()) + MakePointerChecker ()) ; return tid; } @@ -181,14 +182,14 @@ } void -NonCommunicatingNetDevice::SetPhy (Ptr phy) +NonCommunicatingNetDevice::SetPhy (Ptr phy) { NS_LOG_FUNCTION (this << phy); m_phy = phy; } -Ptr +Ptr NonCommunicatingNetDevice::GetPhy () const { NS_LOG_FUNCTION (this); diff -r cef1e8c17560 src/spectrum/model/non-communicating-net-device.h --- a/src/spectrum/model/non-communicating-net-device.h Fri Oct 21 15:35:22 2011 +0200 +++ b/src/spectrum/model/non-communicating-net-device.h Fri Oct 21 07:22:50 2011 -0700 @@ -37,6 +37,7 @@ class Channel; class SpectrumErrorModel; class Queue; +class SpectrumPhy; @@ -79,12 +80,12 @@ * * @param phy the Phy object embedded within this device. */ - void SetPhy (Ptr phy); + void SetPhy (Ptr phy); /** * @return a reference to the PHY object embedded in this NetDevice. */ - Ptr GetPhy () const; + Ptr GetPhy () const; @@ -128,7 +129,7 @@ uint32_t m_ifIndex; - Ptr m_phy; + Ptr m_phy; };