Menu

#28 Incorrect marshal/unmarshal of datums in DataQueryPdu

v1.0_(example)
open
nobody
None
1
2015-08-18
2015-08-17
Anonymous
No

Per DIS 1995, a data query PDU can include fixed and variable datums, each of which consists of a 32-bit datum ID. But the marshaling/unmarshaling code in DataQueryPdu delegates marshaling/unmarshaling to the FixedDatum/VariableDatum classes, which marshal/unmarshal both an ID and a value. While fixed/variable datums in other PDUs normally include both and ID and a value, datums in a data query PDU are ID only, and should be processed as such.

Discussion

  • Don McGregor

    Don McGregor - 2015-08-18

    Yep, the underlying problem is that the XML file describes that as a list of ID/Value records, rather than just IDs. I think the easiest thing to do is to make a class in the XML file that wraps an unsigned int, and change the classRef in DataQueryPdu. I looked at going the other way, and having variable length lists handle primitive types, but that got out of hand pretty quick as changes kept rippling out.

     
  • Don McGregor

    Don McGregor - 2015-08-18

    OK, fixed in the Java subversion repo. Same fix needs to be applied to the other languages.