Skip to content

Conversation

@ngjunsiang
Copy link
Contributor

@ngjunsiang ngjunsiang commented Oct 1, 2025

Summary

TransmitterPdu relies on the above for a complete implementation. These three classes are a challenge because:

  • their contents depends on other PDU attributes, e.g. modulationType, antennaPatternType, recordType, ...
  • they read a variable number of bytes from the stream

This PR sets up a skeleton for handling such variable-size, variable-type records.

  • adds ModulationParametersRecord and AntennaPatternRecord base classes
  • adds placeholder implementation for VariableTransmitterParameters
  • adds UnknownRadio and UnknownAntennaPattern placeholder concrete classes that read the appropriate number of bytes into a placeholder attribute

These changes enable TransmitterPdu to finally read the stream completely.

Future work

  • add more concrete classes (radio records, antenna patterns, VTPs, ...) following this skeleton. The concrete classes extend the base classes to facilitate type annotation
  • organize the records namespace as more types of records are added
  • extend the TransmitterPdu tests

Issues

@leif81
Copy link
Member

leif81 commented Oct 1, 2025

@ngjunsiang need more time or ready to merge?

@ngjunsiang
Copy link
Contributor Author

@leif81 it's ready 👍 will add future changes in a separate PR to keep this one easy to review

@leif81 leif81 merged commit 876748f into open-dis:master Oct 2, 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.

TransmitterPDU data appears to be misinterpreted.

2 participants