Bug 2624

Summary: Inconsistent coding
Product: ns-3 Reporter: Robert Ammon <ammo6818>
Component: lteAssignee: Biljana Bojović <bbojovic>
Status: RESOLVED FIXED    
Severity: normal CC: ns-bugs
Priority: P3    
Version: pre-release   
Hardware: All   
OS: All   

Description Robert Ammon 2017-01-18 22:42:33 UTC
In the following code found in file lte/model/lte-spectrum-value-helper.cc, the parameter in the constructor for earfcn (f) is defined as uint16_t while the corresponding member variable it is saved to is defined as uint32_t.


struct LteSpectrumModelId
{
  LteSpectrumModelId (uint16_t f, uint8_t b);
  uint32_t earfcn;
  uint8_t  bandwidth;
};

LteSpectrumModelId::LteSpectrumModelId (uint16_t f, uint8_t b)
  : earfcn (f), 
    bandwidth (b)
{
}
Comment 1 Biljana Bojović 2017-01-19 04:49:44 UTC
Thank you Robert for reporting this. This will be fixed probably during today, once I commit following changesets that are part of the carrier aggregation code. I will post here once the changeset in on ns-3-dev.

Thanks!
Comment 2 Robert Ammon 2017-01-19 12:55:21 UTC
The following line found in lte-ue-phy.h also has an inconsistent variable name for the parameter (ul vs dl)

  void DoSetDlBandwidth (uint8_t ulBandwidth);
Comment 3 Biljana Bojović 2017-01-19 13:21:40 UTC
Great, thanks, I will also fix that and update here the changeset.
Comment 4 Biljana Bojović 2017-01-21 09:10:14 UTC
Pushed to changeset 12553:e10270e72f3a.