Bug 1300

Summary: HalfDuplexIdalPhy does not tell SpectrumInterference when AbortRx happens
Product: ns-3 Reporter: Nicola Baldo <nicola>
Component: spectrumAssignee: Nicola Baldo <nicola>
Status: RESOLVED FIXED    
Severity: normal CC: andreev, ns-bugs
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: Proposed fix

Description Nicola Baldo 2011-11-21 12:25:17 UTC
On 11/18/2011 05:22 PM, Kirill And wrote:
> Hi all!
> 
> 
> I have observed the following:
> 
> HalfDuplexIdalPhy does not tell anything to SpectrumInterference when
> AbortRx happens.
> 
> After this the following may happen:
> 1. SpectrumInterference is still in RX state
> 2. The next time ConditionallyEvaluateChunk is invoked,
> m_allSignals, m_rxSignal are not meaningful, and the following line
> in SpectrumInterference::ConditionallyEvaluateChunk () method:
>         SpectrumValue sinr = (*m_rxSignal) / ((*m_allSignals) -
> (*m_rxSignal) + (*m_noise));
> may give a strange result.
> 
> Am I right?
> 
> Maybe add m_interference.AbortRx () each time we really abort receiving a
> signal?
>
Comment 1 Nicola Baldo 2011-11-21 12:41:14 UTC

Hi Kirill, 

I agree with your proposal of adding a SpectrumInterference::AbortRx () method. Could you please provide a patch?
Comment 2 Kirill Andreev 2011-11-21 15:12:20 UTC
Created attachment 1272 [details]
Proposed fix

Sorry that did not send with my first mail.
Comment 3 Nicola Baldo 2011-11-22 10:27:03 UTC
Thanks Kirill! I agree with the proposed patch. Feel free to push it at your earliest convenience.
Comment 4 Kirill Andreev 2011-11-23 11:11:57 UTC
Fixed. Changeset 967156fc3b7f