GithubHelp home page GithubHelp logo

Comments (5)

cruncher64 avatar cruncher64 commented on September 24, 2024

Even worse: for values > 5 (e.g. MunitionDomain.ANTI_PERSONNEL), you get a NullPointerException in createPdu in the receiver thread of the DisThreadedNetworkInterface, so one cannot fix the issue in its own code for these cases.

from opendis7-source-generator.

terry-norbraten avatar terry-norbraten commented on September 24, 2024

@cruncher64 I've done some recent work in the DisThreadedNetworkInterface where I was finding too much data was being transmitted/received. Can you test your code above to see if the NPE was fixed?

from opendis7-source-generator.

terry-norbraten avatar terry-norbraten commented on September 24, 2024

@cruncher64 I can certainly reproduce your issue stated above. What is happening is that when you create a new EntityType(), a default PlatformDomain.OTHER is instantiated as a default. We'll have to take a look and see if that's what is intended, or even a best practice, in the source generated code as a default behavior.

from opendis7-source-generator.

cruncher64 avatar cruncher64 commented on September 24, 2024

Yes in the unmarshal method of EntityType you have to do this:

    entityKind = EntityKind.unmarshalEnum(byteBuffer);
    if (entityKind.equals(EntityKind.MUNITION)) {
        domain = Domain.inst(MunitionDomain.OTHER);
    } else if (entityKind.equals(EntityKind.SUPPLY)) {
        domain = Domain.inst(SupplyDomain.NOT_USED);
    }

then it's fine.

from opendis7-source-generator.

brutzman avatar brutzman commented on September 24, 2024

SInce issue remains unresolved, for clarity have renamed this test class as edu.nps.moves.dis7.test.Issue09Unresolved.java

from opendis7-source-generator.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.