Bug 2624 - Inconsistent coding
Inconsistent coding
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: lte
pre-release
All All
: P3 normal
Assigned To: Biljana Bojović
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-18 22:42 UTC by Robert Ammon
Modified: 2017-01-21 09:10 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.