open-dis-cpp icon indicating copy to clipboard operation
open-dis-cpp copied to clipboard

Issues following dis6 versus dis7

Open kurtsansom opened this issue 5 years ago • 3 comments

I am trying to better understand the dis6 and dis7 implementations, but there appears to be a lot of overlap or duplication or things missing from one to the other.

My original thought was to create a common directory that would hold all the classes that are common to both versions, but have hit some roadblocks.

An an example would be the PDU header. the main difference i see is a variable that is padding in dis6 (uint16), but the same amount of bits is split into two variables in dis7 ( 2 x unint8). someone implemented a superclass in dis7 which PduHeader inherits and fills in the changed parameters, and the correct change in the dis6 code would be to have it inherit the same superclass and only add the padding. This is the direction that seemed to make sense until I hit places where the names have been changed. There appears to be classes that exist in dis6, and not in dis7 and vice versa, some appear to be name changes. e.g. Orientation versus EulerAngles. (although not sure about that one being a naming or duplication issue)

The problem that I have run into is that the reference document I am looking at to compare the versions is incomplete. siso document v6 vd v7

I thought this might be an issue with the underlying xml specification that generated the original code? I tried to decipher it, but I am not sure which tool generated this c++ code?

Any help or direction is appreciated.

kurtsansom avatar Jan 19 '21 15:01 kurtsansom

DISCLAIMER: I haven't looked at the XML specification, I've only worked on the generated C++

However, I believe the C++ Code was generated with XMLPG (XML Multi-Language Protocol Generator), from the DISDescription repo.

I doubt it was generated by the https://github.com/open-dis/open-dis7-source-generator repo as the initial commit was on Jul 20, 2019, which seems too recent to generate the C++ Code.

rodneyp290 avatar Jan 19 '21 23:01 rodneyp290

based on an issue here: https://github.com/open-dis/xmlpg/issues/21 it looks like the xmlpg/DIS2012.xml and the one over in DISDescription/DIS7.xml differ. But at what point they diverged, and at what state of those files when they were used to generate the code I don't know.

kurtsansom avatar Jan 21 '21 18:01 kurtsansom

@rodneyp290 is right it was generated with xmlpg. I've lost track of which input file it used and at which version. But it's been years since it was last run. I supppse running xmlpg now and doing a diff against here would give indication but so many changes have been made directly to the source here that it would be a big job to review and sort out.

leif81 avatar Apr 15 '21 11:04 leif81