Bug 2899

Summary: Inconsistent type for variable cellForWhichToReportCGI
Product: ns-3 Reporter: Robert Ammon <ammo6818>
Component: lteAssignee: Manuel Requena <manuel.requena>
Status: RESOLVED FIXED    
Severity: normal CC: manuel.requena, ns-bugs
Priority: P3    
Version: ns-3-dev   
Hardware: All   
OS: All   

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