GetDevice() should be const.
This commit is contained in:
@@ -194,7 +194,7 @@ LrWpanPhy::DoDispose (void)
|
||||
}
|
||||
|
||||
Ptr<NetDevice>
|
||||
LrWpanPhy::GetDevice (void)
|
||||
LrWpanPhy::GetDevice (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_device;
|
||||
|
||||
@@ -272,7 +272,7 @@ public:
|
||||
*/
|
||||
Ptr<SpectrumChannel> GetChannel (void);
|
||||
void SetDevice (Ptr<NetDevice> d);
|
||||
Ptr<NetDevice> GetDevice (void);
|
||||
Ptr<NetDevice> GetDevice (void) const;
|
||||
|
||||
/**
|
||||
* Set the attached antenna.
|
||||
|
||||
@@ -94,7 +94,7 @@ LtePhy::SetDevice (Ptr<LteNetDevice> d)
|
||||
|
||||
|
||||
Ptr<LteNetDevice>
|
||||
LtePhy::GetDevice ()
|
||||
LtePhy::GetDevice () const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_netDevice;
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
* \brief Get the device where the phy layer is attached
|
||||
* \return the pointer to the device
|
||||
*/
|
||||
Ptr<LteNetDevice> GetDevice ();
|
||||
Ptr<LteNetDevice> GetDevice () const;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -238,7 +238,7 @@ LteSpectrumPhy::GetTypeId (void)
|
||||
|
||||
|
||||
Ptr<NetDevice>
|
||||
LteSpectrumPhy::GetDevice ()
|
||||
LteSpectrumPhy::GetDevice () const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_device;
|
||||
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
void SetMobility (Ptr<MobilityModel> m);
|
||||
void SetDevice (Ptr<NetDevice> d);
|
||||
Ptr<MobilityModel> GetMobility ();
|
||||
Ptr<NetDevice> GetDevice ();
|
||||
Ptr<NetDevice> GetDevice () const;
|
||||
Ptr<const SpectrumModel> GetRxSpectrumModel () const;
|
||||
Ptr<AntennaModel> GetRxAntenna ();
|
||||
void StartRx (Ptr<SpectrumSignalParameters> params);
|
||||
|
||||
@@ -103,7 +103,7 @@ RemSpectrumPhy::GetMobility ()
|
||||
}
|
||||
|
||||
Ptr<NetDevice>
|
||||
RemSpectrumPhy::GetDevice ()
|
||||
RemSpectrumPhy::GetDevice () const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
void SetMobility (Ptr<MobilityModel> m);
|
||||
void SetDevice (Ptr<NetDevice> d);
|
||||
Ptr<MobilityModel> GetMobility ();
|
||||
Ptr<NetDevice> GetDevice ();
|
||||
Ptr<NetDevice> GetDevice () const;
|
||||
Ptr<const SpectrumModel> GetRxSpectrumModel () const;
|
||||
Ptr<AntennaModel> GetRxAntenna ();
|
||||
void StartRx (Ptr<SpectrumSignalParameters> params);
|
||||
|
||||
@@ -73,7 +73,7 @@ LteSimpleSpectrumPhy::GetTypeId (void)
|
||||
|
||||
|
||||
Ptr<NetDevice>
|
||||
LteSimpleSpectrumPhy::GetDevice ()
|
||||
LteSimpleSpectrumPhy::GetDevice () const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_device;
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
void SetMobility (Ptr<MobilityModel> m);
|
||||
void SetDevice (Ptr<NetDevice> d);
|
||||
Ptr<MobilityModel> GetMobility ();
|
||||
Ptr<NetDevice> GetDevice ();
|
||||
Ptr<NetDevice> GetDevice () const;
|
||||
Ptr<const SpectrumModel> GetRxSpectrumModel () const;
|
||||
Ptr<AntennaModel> GetRxAntenna ();
|
||||
void StartRx (Ptr<SpectrumSignalParameters> params);
|
||||
|
||||
@@ -135,7 +135,7 @@ HalfDuplexIdealPhy::GetTypeId (void)
|
||||
|
||||
|
||||
Ptr<NetDevice>
|
||||
HalfDuplexIdealPhy::GetDevice ()
|
||||
HalfDuplexIdealPhy::GetDevice () const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_netDevice;
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
void SetMobility (Ptr<MobilityModel> m);
|
||||
void SetDevice (Ptr<NetDevice> d);
|
||||
Ptr<MobilityModel> GetMobility ();
|
||||
Ptr<NetDevice> GetDevice ();
|
||||
Ptr<NetDevice> GetDevice () const;
|
||||
Ptr<const SpectrumModel> GetRxSpectrumModel () const;
|
||||
Ptr<AntennaModel> GetRxAntenna ();
|
||||
void StartRx (Ptr<SpectrumSignalParameters> params);
|
||||
|
||||
@@ -99,7 +99,7 @@ SpectrumAnalyzer::GetTypeId (void)
|
||||
|
||||
|
||||
Ptr<NetDevice>
|
||||
SpectrumAnalyzer::GetDevice ()
|
||||
SpectrumAnalyzer::GetDevice () const
|
||||
{
|
||||
return m_netDevice;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
void SetMobility (Ptr<MobilityModel> m);
|
||||
void SetDevice (Ptr<NetDevice> d);
|
||||
Ptr<MobilityModel> GetMobility ();
|
||||
Ptr<NetDevice> GetDevice ();
|
||||
Ptr<NetDevice> GetDevice () const;
|
||||
Ptr<const SpectrumModel> GetRxSpectrumModel () const;
|
||||
Ptr<AntennaModel> GetRxAntenna ();
|
||||
void StartRx (Ptr<SpectrumSignalParameters> params);
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
*
|
||||
* @return a Ptr to the associated NetDevice instance
|
||||
*/
|
||||
virtual Ptr<NetDevice> GetDevice () = 0;
|
||||
virtual Ptr<NetDevice> GetDevice () const = 0;
|
||||
|
||||
/**
|
||||
* Set the mobility model associated with this device.
|
||||
|
||||
@@ -151,7 +151,7 @@ TvSpectrumTransmitter::GetMobility ()
|
||||
}
|
||||
|
||||
Ptr<NetDevice>
|
||||
TvSpectrumTransmitter::GetDevice ()
|
||||
TvSpectrumTransmitter::GetDevice () const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_netDevice;
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
void SetMobility (Ptr<MobilityModel> m);
|
||||
void SetDevice (Ptr<NetDevice> d);
|
||||
Ptr<MobilityModel> GetMobility ();
|
||||
Ptr<NetDevice> GetDevice ();
|
||||
Ptr<NetDevice> GetDevice () const;
|
||||
// device does not use Rx but these pure virtual methods must be implemented
|
||||
Ptr<const SpectrumModel> GetRxSpectrumModel () const;
|
||||
Ptr<AntennaModel> GetRxAntenna ();
|
||||
|
||||
@@ -98,7 +98,7 @@ WaveformGenerator::GetTypeId (void)
|
||||
|
||||
|
||||
Ptr<NetDevice>
|
||||
WaveformGenerator::GetDevice ()
|
||||
WaveformGenerator::GetDevice () const
|
||||
{
|
||||
return m_netDevice;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
void SetMobility (Ptr<MobilityModel> m);
|
||||
void SetDevice (Ptr<NetDevice> d);
|
||||
Ptr<MobilityModel> GetMobility ();
|
||||
Ptr<NetDevice> GetDevice ();
|
||||
Ptr<NetDevice> GetDevice () const;
|
||||
Ptr<const SpectrumModel> GetRxSpectrumModel () const;
|
||||
Ptr<AntennaModel> GetRxAntenna ();
|
||||
void StartRx (Ptr<SpectrumSignalParameters> params);
|
||||
|
||||
@@ -498,7 +498,7 @@ UanPhyDual::GetChannel (void) const
|
||||
return m_phy1->GetChannel ();
|
||||
}
|
||||
Ptr<UanNetDevice>
|
||||
UanPhyDual::GetDevice (void)
|
||||
UanPhyDual::GetDevice (void) const
|
||||
{
|
||||
return m_phy1->GetDevice ();
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
virtual bool IsStateTx (void);
|
||||
virtual bool IsStateCcaBusy (void);
|
||||
virtual Ptr<UanChannel> GetChannel (void) const;
|
||||
virtual Ptr<UanNetDevice> GetDevice (void);
|
||||
virtual Ptr<UanNetDevice> GetDevice (void) const;
|
||||
virtual void SetChannel (Ptr<UanChannel> channel);
|
||||
virtual void SetDevice (Ptr<UanNetDevice> device);
|
||||
virtual void SetMac (Ptr<UanMac> mac);
|
||||
|
||||
@@ -809,7 +809,7 @@ UanPhyGen::GetChannel (void) const
|
||||
}
|
||||
|
||||
Ptr<UanNetDevice>
|
||||
UanPhyGen::GetDevice (void)
|
||||
UanPhyGen::GetDevice (void) const
|
||||
{
|
||||
return m_device;
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ public:
|
||||
virtual double GetRxThresholdDb (void);
|
||||
virtual double GetCcaThresholdDb (void);
|
||||
virtual Ptr<UanChannel> GetChannel (void) const;
|
||||
virtual Ptr<UanNetDevice> GetDevice (void);
|
||||
virtual Ptr<UanNetDevice> GetDevice (void) const;
|
||||
virtual Ptr<UanTransducer> GetTransducer (void);
|
||||
virtual void SetChannel (Ptr<UanChannel> channel);
|
||||
virtual void SetDevice (Ptr<UanNetDevice> device);
|
||||
|
||||
@@ -345,7 +345,7 @@ public:
|
||||
*
|
||||
* \return The net device.
|
||||
*/
|
||||
virtual Ptr<UanNetDevice> GetDevice (void) = 0;
|
||||
virtual Ptr<UanNetDevice> GetDevice (void) const = 0;
|
||||
|
||||
/**
|
||||
* Attach to a channel.
|
||||
|
||||
Reference in New Issue
Block a user