open-dis / open-dis-cpp

C++ implementation of the IEEE-1278.1 Distributed Interactive Simulation (DIS) application protocol v6 and v7
BSD 2-Clause "Simplified" License
91 stars 66 forks source link

Singal PDU dataLength should be in bits, not bytes (DIS 6) #85

Closed intothevoid closed 1 year ago

intothevoid commented 1 year ago

As per the spec, the data length is meant to be indicated in bits, not bytes. I've used the fix in the Java version of open-dis as a basis for this pull request. See https://github.com/open-dis/open-dis-java/commit/9b20d4d0f0992157dcd4a0ecf1e8ae62717e984e#diff-5d13a4f131b76879516bb03083caae46

Related issues here: https://github.com/open-dis/open-dis-cpp/issues/10 and here: https://github.com/open-dis/open-dis-cpp/issues/84

leif81 commented 1 year ago

Thank-you for the pull request @intothevoid !

I've reviewed it and have left two comments. Can you please take a look and respond when you can. Thanks

intothevoid commented 1 year ago

I've removed the formatting changes and pushed the changes to the PR. Let me know if you need more changes. Commit here: https://github.com/open-dis/open-dis-cpp/commit/b56567bc08d9a4cf614a5f8aa16a51bb76e536b4