modelinggateway export negative value for "0x11990" attribute. Why?

Document ID : KB000016639
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

Customer modified the  .modelinggatewayresource to export also the "0x11990" attribute. Now in the xml output file he see for that attribute some negative values (eg. -1) 

Question:

Why running the modeliggateway export to extract also the port attribute "0x11990", in the xml output sometime that field contains a negative value?

Environment:
any
Answer:

The port attribute "0x11990" corresponds to the MonBandwidth that as you can see from OC conosole is defined as GAUGE field. 

The Gauge32 type represents a non-negative integer, which may increase or decrease, but shall never exceed a maximum value. The maximum value can not be greater than 2^32-1 (4294967295 decimal). 

When you run the modlinggateway export that attribute is extracted and displayed as an a signed integer value (range -2,147,483,648 to +2,147,483,647) for this reason any value > 2,147,483,647 will be represented in the exported file with a negative value. Now -1 corresponds to the unsigned 4294967295, -2 corresponds to 4294967294 etc... 

This does not create any issue when you import the exported data as -1 will be correctly shown as 4294967295.