Bug 2899 - Inconsistent type for variable cellForWhichToReportCGI
Inconsistent type for variable cellForWhichToReportCGI
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: lte
ns-3-dev
All All
: P3 normal
Assigned To: Manuel Requena
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-03-07 20:31 UTC by Robert Ammon
Modified: 2018-03-08 06:57 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Ammon 2018-03-07 20:31:17 UTC
In file src/lte/model/lte-rrc-sap.h, variable cellForWhichToReportCGI is declared as  auint8_t as follows:
 
uint8_t cellForWhichToReportCGI; ///< cell for which to report CGI

In file src/lte/model/lte-rrc-header.cc the value of this variable is serialized with a range of 0 to 503 in function RrcAsn1Header::SerializeMeasConfig as follows:

SerializeInteger (it->measObjectEutra.cellForWhichToReportCGI,0,503);

and in file RrcAsn1Header::DeserializeMeasConfig it is deserialized using the following code:

bIterator = DeserializeInteger (&n, 0, 503, bIterator);
elem.measObjectEutra.cellForWhichToReportCGI = n;

either the value range of 0 to 503 is incorrect or the variable cellForWhichToReportCGI should be declared as a uint16_t.
Comment 1 Manuel Requena 2018-03-08 06:57:36 UTC
Fixed in changeset:   13401:4f52e96c26c0