Skip to content

extractUShort returns negative value

Hello.

I use JTango 9.6.6 for TANGO Client. There is DevUShort attribute on server. When it has small value everything works normally but when its value is greater than 32767 this code returns negative value (I suppose because of overflow):

int samples = deviceProxy.read_attribute("Samples").extractUShort();

For example I get -32736, but on server attribute value is 32800. Jive returns correct value but it works on JTango 9.0.7.

What am I doing wrong or this is a JTango bug? Other methods just throws exception because they work for another data types.

Thanks.