OpenDisNet is an independent .NET design. Other DIS implementations are used as cross-checks, not as API templates or source ports.
IDisPduand the DIS v7 PDU classes are the protocol model.DisSerializeris the stable datagram API for parsing and serialization.PduFactorycreates correctly initialized protocol-version-7 PDUs.- Length, count, and bit-length fields are synchronized by the writer rather than requiring callers to maintain duplicate wire metadata.
- Open-ended, system-specific records retain their raw octets so applications can support vendor extensions without losing data.
DisBinaryReader and DisBinaryWriter use bounds-checked spans and explicit
network byte order. Codecs do not depend on reflection, runtime code generation,
or platform endianness. Parsing validates the common header before dispatch and
never reads beyond the declared PDU boundary.
The repository-owned schema is reviewed input to a C# source generator. It eliminates repetitive field code; it does not dictate the public design. Corrections and .NET naming are maintained locally when upstream descriptions are ambiguous, inaccurate, or shaped around another language. CI verifies that all generated output is deterministic and that the catalog contains exactly the 72 DIS v7 PDU type identifiers.
Every PDU must pass construction and binary round-trip tests. Variable and conditional layouts additionally require populated vectors, malformed-input tests, and an independent implementation or packet-decoder comparison before the corresponding family is marked semantically conformant.
The checked-in protocol implementation is intentionally visible:
src/OpenDisNet/Pdus/Families/Records.cscontains reusable DIS records.src/OpenDisNet/Pdus/Families/*Pdus.cscontains the PDU classes grouped by the 12 protocol families.src/OpenDisNet/Pdus/PduFactory.cslists construction routes for PDU types 1 through 72.src/OpenDisNet/Internal/PduCodec.cslists four complete 1-through-72 dispatch tables: read, prepare/validate, write, and encoded-size measurement.src/OpenDisNet/Binarycontains the bounds-checked big-endian primitive byte reader and writer.
The protocol source tool rewrites these ordinary .cs files deterministically
from the reviewed repository schema. There are no monolithic .g.cs protocol
sources in the package project.