Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When serializing, length field is always zero #11

Open
kastork opened this issue Mar 30, 2020 · 4 comments · May be fixed by #54
Open

When serializing, length field is always zero #11

kastork opened this issue Mar 30, 2020 · 4 comments · May be fixed by #54

Comments

@kastork
Copy link

kastork commented Mar 30, 2020

In the dis_sender.py, the emitted ESPDU has its length field set to zero.

The code in that example doesn't manipulate the length field.

This matters if you're using, say, open-dis java's PduFactory#getPdusFromBundle()`, which relies on this field's value.

@leif81
Copy link
Member

leif81 commented Apr 1, 2020

Thank-you for the report @kastork

Setting the length seems like something that should be done automatically by the library.

Can I interest you in submitting a pull request?

@kastork
Copy link
Author

kastork commented Apr 9, 2020

I doubt I'll have time to, I'm not really making a python application, was just kicking the tires and learning.

@leif81
Copy link
Member

leif81 commented Dec 21, 2020

Here's an example for how length is calculated in open-dis-java

https://github.com/open-dis/open-dis-java/blob/master/src/main/java/edu/nps/moves/dis/EntityStatePdu.java#L61

@VovaDev
Copy link

VovaDev commented Apr 3, 2024

Currently working on it. Will file PR within day or two.
PS: Also found some crtitcal typos (like when variable initialized as munitionExpendableID and used as munitionExpendibleID)

@VovaDev VovaDev linked a pull request Apr 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants