Comments (5)
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.
@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.
@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.
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.
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)
- Recalibration and testing HOT 2
- enum values with leading zeros
- TransmitterPdu has double extraction of RadioID HOT 2
- Missing padding field in marshalling and unmarshalling ElectronicEmitter HOT 2
- Unmarshaling causes NPE when enumerations not found HOT 1
- Java doesn't have unsigned shorts, bitmasks occur instead HOT 1
- hashCode() methods for Java equals
- Status of project? HOT 2
- SISO-REF-010-v30-DRAFT-20220129-d11 enumerations HOT 2
- Project rename as opendis7-source-generator HOT 1
- IFFPdu improvements HOT 4
- build.xml copy-generated-source-to-opendis7-java target adds to scr-generated folder files that are not generated by JavaGenerator HOT 1
- Unsafe equalsImpl for object list attributes HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opendis7-source-generator.