DynamicData TCKind.TK_USHORT problem in java

3 posts / 0 new
Last post
Offline
Last seen: 8 years 2 months ago
Joined: 10/06/2014
Posts: 2
DynamicData TCKind.TK_USHORT problem in java

I'm develovping a java application which can monitor a topic using DynamicData class.

but i can't handle TCKind.TK_USHORT type.

I use get_int function but return value is always 0.

How can I use unsigned short variable with DynamicData class?

Is there any function like get_short or get_int....?

Please tell me how to handle TCKind.TK_USHORT data .

 

sara's picture
Offline
Last seen: 4 weeks 1 hour ago
Joined: 01/16/2013
Posts: 128

Hi tagug,

In standard OMG IDL to Java mapping, unsigned version for integer types is mapped to its signed version. You can find the IDL correspondence to Java types in the Table 3.7 of the RTI_CoreLibrariesAndUtilites_UserManual.pdf).

Since you are trying to use an unsigned short, in the Java API of the DynamicData you will need to call to get_short (more information here). Try that and let me know if it works.

Thanks,

Sara

Offline
Last seen: 8 years 2 months ago
Joined: 10/06/2014
Posts: 2

thank you for detailed explanation

It works very well.

I did a wrong method in nested structure .

I solved by get_complex_member() method. : )

Have a nice day~!!