Skip to content

Conversation

@ngjunsiang
Copy link
Contributor

@ngjunsiang ngjunsiang commented Oct 7, 2025

Chipping away at #14. As a bonus, DirectedEnergyFirePdu and EntityDamageStatusPdu are now fixed.

Changelog

This PR adds damage description records used by the warfare protocol family PDUs:

  • DirectedEnergyDamage
  • DirectedEnergyAreaAimpoint (fixed existing code)
  • DirectedEnergyPrecisionAimpoint
  • DirectedEnergyTargetEnergyDeposition

Also added is a symbolic_names.py file containing names and constant/variable values, from Table 25. These are not used yet, but may be required later when implementing the logic required for parsing or serializing some classes. Prep work for #58

A few record types that the above were dependent on were also migrated to the record namespace, as part of a larger migration.

QoL improvements

  • Base classes defined: Record (fixed length), VariableRecord (variable length), StandardVariableRecord (variable length with a recordType and recordLength, following 6.2.83)
  • getStandardVariableRecord() and parseStandardVariableRecord() helper functions
    • getStandardVariableRecord() takes a recordType and returns the appropriate record class
  • parseStandardVariableRecord() takes a DataInputStream and a recordType, and returns a fully parsed SV Record
  • record namespace organized into sub-namespaces following protocol families. Classes are organized alphabetically by chapter number following IEEE1278.1-2012 for ease of lookup, with any base classes defined first.

…terface

This helps to enforce a consistent interface across all Record subclasses
with the help of a static checker
…ableRecord classes

The mapping from recordType enum values to VariableRecord classes is defined in [UID 66].
Instead of scattering information about this mapping throughout the codebase or dis7.py,
it would be more readable to concentrate it in this getter function.
Standard Variable (SV) records have recordType and recordLength properties
subclasses must call superclass serialize() and parse() methods
@leif81
Copy link
Member

leif81 commented Nov 15, 2025

Thank-you @ngjunsiang

I overlooked this earlier. I'll take a look.

@leif81 leif81 self-requested a review November 15, 2025 18:50
@leif81
Copy link
Member

leif81 commented Nov 25, 2025

@ngjunsiang Thank-you for this significant change

Notable to also mention EntityID is changing to EntityIdentifier here.

Let merge.

@leif81 leif81 merged commit cf7250c into open-dis:master Nov 25, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants