@its-c10/dis-codec 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,8 @@ export declare class BinaryWriter {
7
7
  getOffset(): number;
8
8
  /** Returns a copy of written bytes as ArrayBuffer. */
9
9
  toArrayBuffer(): ArrayBuffer;
10
+ /** Overwrite a uint8 at the given offset (does not advance write position). Used to patch data length fields. */
11
+ patchUint8(offset: number, value: number): void;
10
12
  /** Overwrite a uint16 at the given offset (does not advance write position). Used to patch PDU length. */
11
13
  patchUint16(offset: number, value: number): void;
12
14
  private ensureWritable;
@@ -14,6 +14,13 @@ export class BinaryWriter {
14
14
  new Uint8Array(out).set(this.buf.subarray(0, this.offset));
15
15
  return out;
16
16
  }
17
+ /** Overwrite a uint8 at the given offset (does not advance write position). Used to patch data length fields. */
18
+ patchUint8(offset, value) {
19
+ if (offset < 0 || offset + 1 > this.offset) {
20
+ throw new RangeError(`BinaryWriter.patchUint8: offset ${offset} out of range [0, ${this.offset - 1}]`);
21
+ }
22
+ this.view.setUint8(offset, value);
23
+ }
17
24
  /** Overwrite a uint16 at the given offset (does not advance write position). Used to patch PDU length. */
18
25
  patchUint16(offset, value) {
19
26
  if (offset < 0 || offset + 2 > this.offset) {
@@ -12,3 +12,5 @@ export interface EntityId {
12
12
  }
13
13
  export declare function decodeEntityId(reader: BinaryReader): EntityId;
14
14
  export declare function encodeEntityId(writer: BinaryWriter, value: EntityId): void;
15
+ export declare function decodeSimulationAddress(reader: BinaryReader): SimulationAddress;
16
+ export declare function encodeSimulationAddress(writer: BinaryWriter, value: SimulationAddress): void;
@@ -12,3 +12,13 @@ export function encodeEntityId(writer, value) {
12
12
  writer.writeUint16(value.simulationAddress.application);
13
13
  writer.writeUint16(value.entity);
14
14
  }
15
+ export function decodeSimulationAddress(reader) {
16
+ return {
17
+ site: reader.readUint16(),
18
+ application: reader.readUint16(),
19
+ };
20
+ }
21
+ export function encodeSimulationAddress(writer, value) {
22
+ writer.writeUint16(value.site);
23
+ writer.writeUint16(value.application);
24
+ }
@@ -21,8 +21,12 @@ export declare const PDU_TYPE_STOP_FREEZE = 14;
21
21
  export declare const PDU_TYPE_ELECTROMAGNETIC_EMISSION = 23;
22
22
  /** PDU type: Transmitter. */
23
23
  export declare const PDU_TYPE_TRANSMITTER = 25;
24
+ /** PDU type: Point Object State. */
25
+ export declare const PDU_TYPE_POINT_OBJECT_STATE = 43;
24
26
  /** Electromagnetic Emission protocol family. */
25
27
  export declare const PROTOCOL_FAMILY_ELECTROMAGNETIC_EMISSION = 6;
28
+ /** Distributed Emissions Regeneration protocol family. */
29
+ export declare const PROTOCOL_FAMILY_DISTRIBUTED_EMISSIONS_REGENERATION = 9;
26
30
  /** Radio Communications protocol family. */
27
31
  export declare const PROTOCOL_FAMILY_RADIO_COMMUNICATIONS = 4;
28
32
  /** Start/Resume PDU total length on wire (bytes). */
@@ -39,3 +43,5 @@ export declare const ENTITY_STATE_PDU_FIXED_LENGTH = 144;
39
43
  export declare const ENTITY_STATE_VARIABLE_PARAMETER_RECORD_LENGTH = 16;
40
44
  /** Transmitter PDU fixed portion in bytes (104). Total = 104 + M + A + sum of variable record sizes. */
41
45
  export declare const TRANSMITTER_PDU_FIXED_LENGTH = 104;
46
+ /** Point Object State PDU total length on wire (bytes). */
47
+ export declare const POINT_OBJECT_STATE_PDU_LENGTH = 88;
@@ -21,8 +21,12 @@ export const PDU_TYPE_STOP_FREEZE = 14;
21
21
  export const PDU_TYPE_ELECTROMAGNETIC_EMISSION = 23;
22
22
  /** PDU type: Transmitter. */
23
23
  export const PDU_TYPE_TRANSMITTER = 25;
24
+ /** PDU type: Point Object State. */
25
+ export const PDU_TYPE_POINT_OBJECT_STATE = 43;
24
26
  /** Electromagnetic Emission protocol family. */
25
27
  export const PROTOCOL_FAMILY_ELECTROMAGNETIC_EMISSION = 6;
28
+ /** Distributed Emissions Regeneration protocol family. */
29
+ export const PROTOCOL_FAMILY_DISTRIBUTED_EMISSIONS_REGENERATION = 9;
26
30
  /** Radio Communications protocol family. */
27
31
  export const PROTOCOL_FAMILY_RADIO_COMMUNICATIONS = 4;
28
32
  /** Start/Resume PDU total length on wire (bytes). */
@@ -39,3 +43,5 @@ export const ENTITY_STATE_PDU_FIXED_LENGTH = 144;
39
43
  export const ENTITY_STATE_VARIABLE_PARAMETER_RECORD_LENGTH = 16;
40
44
  /** Transmitter PDU fixed portion in bytes (104). Total = 104 + M + A + sum of variable record sizes. */
41
45
  export const TRANSMITTER_PDU_FIXED_LENGTH = 104;
46
+ /** Point Object State PDU total length on wire (bytes). */
47
+ export const POINT_OBJECT_STATE_PDU_LENGTH = 88;
@@ -21,7 +21,8 @@ export interface BeamDataGroup {
21
21
  }
22
22
  /** Beam data record (repeats M_i times per emitter system). */
23
23
  export interface BeamData {
24
- beamDataLength: number;
24
+ /** Length in octets of beam data (beamNumber through beamStatus). Set automatically during encode. */
25
+ beamDataLength?: number;
25
26
  beamNumber: number;
26
27
  beamParameterIndex: number;
27
28
  fundamentalParameterData: FundamentalParameterData;
@@ -45,7 +46,8 @@ export interface Location {
45
46
  }
46
47
  /** One emitter system: fixed fields plus M beams. */
47
48
  export interface EmitterSystemData {
48
- systemDataLength: number;
49
+ /** Length in octets of emitter system data (numberOfBeams through beams). Set automatically during encode. */
50
+ systemDataLength?: number;
49
51
  numberOfBeams: number;
50
52
  padding: number;
51
53
  emitterSystem: EmitterSystemRecord;
@@ -47,7 +47,8 @@ function decodeBeamData(reader) {
47
47
  };
48
48
  }
49
49
  function encodeBeamData(writer, beam) {
50
- writer.writeUint8(beam.beamDataLength);
50
+ const lengthOffset = writer.getOffset();
51
+ writer.writeUint8(0); // placeholder; patched below
51
52
  writer.writeUint8(beam.beamNumber);
52
53
  writer.writeUint16(beam.beamParameterIndex);
53
54
  encodeFundamentalParameterData(writer, beam.fundamentalParameterData);
@@ -56,6 +57,7 @@ function encodeBeamData(writer, beam) {
56
57
  writer.writeUint8(beam.numberOfTargets);
57
58
  writer.writeUint8(beam.highDensityTrackJam);
58
59
  writer.writeUint8(beam.beamStatus);
60
+ writer.patchUint8(lengthOffset, writer.getOffset() - lengthOffset - 1);
59
61
  }
60
62
  function decodeEmitterSystemData(reader) {
61
63
  const systemDataLength = reader.readUint8();
@@ -85,7 +87,8 @@ function decodeEmitterSystemData(reader) {
85
87
  };
86
88
  }
87
89
  function encodeEmitterSystemData(writer, sys) {
88
- writer.writeUint8(sys.systemDataLength);
90
+ const lengthOffset = writer.getOffset();
91
+ writer.writeUint8(0); // placeholder; patched below
89
92
  writer.writeUint8(sys.numberOfBeams);
90
93
  writer.writeUint16(sys.padding);
91
94
  writer.writeUint16(sys.emitterSystem.emitterName);
@@ -97,6 +100,7 @@ function encodeEmitterSystemData(writer, sys) {
97
100
  for (const beam of sys.beams) {
98
101
  encodeBeamData(writer, beam);
99
102
  }
103
+ writer.patchUint8(lengthOffset, writer.getOffset() - lengthOffset - 1);
100
104
  }
101
105
  export function decodeElectromagneticEmissionPdu(reader) {
102
106
  const header = decodePduHeader(reader);
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * DIS 7 codecs and constants. Version is in the path; names stay clean for dis8/ etc.
3
3
  */
4
- export { PROTOCOL_VERSION, PROTOCOL_FAMILY_ENTITY_INFORMATION, PROTOCOL_FAMILY_SIMULATION_MANAGEMENT, PROTOCOL_FAMILY_ELECTROMAGNETIC_EMISSION, PDU_TYPE_ENTITY_STATE, PDU_TYPE_CREATE_ENTITY, PDU_TYPE_REMOVE_ENTITY, PDU_TYPE_START_RESUME, PDU_TYPE_STOP_FREEZE, PDU_TYPE_ELECTROMAGNETIC_EMISSION, PDU_TYPE_TRANSMITTER, PROTOCOL_FAMILY_RADIO_COMMUNICATIONS, START_RESUME_PDU_LENGTH, STOP_FREEZE_PDU_LENGTH, CREATE_ENTITY_PDU_LENGTH, REMOVE_ENTITY_PDU_LENGTH, ENTITY_STATE_PDU_FIXED_LENGTH, ENTITY_STATE_VARIABLE_PARAMETER_RECORD_LENGTH, TRANSMITTER_PDU_FIXED_LENGTH, } from "./constants.js";
4
+ export { PROTOCOL_VERSION, PROTOCOL_FAMILY_ENTITY_INFORMATION, PROTOCOL_FAMILY_SIMULATION_MANAGEMENT, PROTOCOL_FAMILY_ELECTROMAGNETIC_EMISSION, PDU_TYPE_ENTITY_STATE, PDU_TYPE_CREATE_ENTITY, PDU_TYPE_REMOVE_ENTITY, PDU_TYPE_START_RESUME, PDU_TYPE_STOP_FREEZE, PDU_TYPE_ELECTROMAGNETIC_EMISSION, PDU_TYPE_TRANSMITTER, PDU_TYPE_POINT_OBJECT_STATE, PROTOCOL_FAMILY_RADIO_COMMUNICATIONS, PROTOCOL_FAMILY_DISTRIBUTED_EMISSIONS_REGENERATION, START_RESUME_PDU_LENGTH, STOP_FREEZE_PDU_LENGTH, CREATE_ENTITY_PDU_LENGTH, REMOVE_ENTITY_PDU_LENGTH, ENTITY_STATE_PDU_FIXED_LENGTH, ENTITY_STATE_VARIABLE_PARAMETER_RECORD_LENGTH, TRANSMITTER_PDU_FIXED_LENGTH, POINT_OBJECT_STATE_PDU_LENGTH, } from "./constants.js";
5
5
  export { type PduHeader, decodePduHeader, encodePduHeader, } from "./pduHeader.js";
6
6
  export { type EntityStatePdu, type EntityType, type Vector3Float, type Vector3Double, type Orientation, type DeadReckoningParameters, type EntityMarking, type VariableParameter, decodeEntityStatePdu, encodeEntityStatePdu, } from "./entityStatePdu.js";
7
7
  export { type CreateEntityPdu, decodeCreateEntityPdu, encodeCreateEntityPdu, } from "./createEntityPdu.js";
@@ -10,3 +10,4 @@ export { type StartResumePdu, decodeStartResumePdu, encodeStartResumePdu, } from
10
10
  export { type StopFreezePdu, decodeStopFreezePdu, encodeStopFreezePdu, } from "./stopFreezePdu.js";
11
11
  export { type ElectromagneticEmissionPdu, type EmitterSystemData, type BeamData, type FundamentalParameterData, type BeamDataGroup, type EmitterSystemRecord, type Location, decodeElectromagneticEmissionPdu, encodeElectromagneticEmissionPdu, } from "./electromagneticEmissionPdu.js";
12
12
  export { type TransmitterPdu, type RadioType, type ModulationType, type BeamAntennaPattern, type VariableTransmitterParameter, BEAM_ANTENNA_PATTERN_LENGTH, decodeTransmitterPdu, encodeTransmitterPdu, } from "./transmitterPdu.js";
13
+ export { type PointObjectStatePdu, type PointObjectType, decodePointObjectStatePdu, encodePointObjectStatePdu, } from "./pointObjectStatePdu.js";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * DIS 7 codecs and constants. Version is in the path; names stay clean for dis8/ etc.
3
3
  */
4
- export { PROTOCOL_VERSION, PROTOCOL_FAMILY_ENTITY_INFORMATION, PROTOCOL_FAMILY_SIMULATION_MANAGEMENT, PROTOCOL_FAMILY_ELECTROMAGNETIC_EMISSION, PDU_TYPE_ENTITY_STATE, PDU_TYPE_CREATE_ENTITY, PDU_TYPE_REMOVE_ENTITY, PDU_TYPE_START_RESUME, PDU_TYPE_STOP_FREEZE, PDU_TYPE_ELECTROMAGNETIC_EMISSION, PDU_TYPE_TRANSMITTER, PROTOCOL_FAMILY_RADIO_COMMUNICATIONS, START_RESUME_PDU_LENGTH, STOP_FREEZE_PDU_LENGTH, CREATE_ENTITY_PDU_LENGTH, REMOVE_ENTITY_PDU_LENGTH, ENTITY_STATE_PDU_FIXED_LENGTH, ENTITY_STATE_VARIABLE_PARAMETER_RECORD_LENGTH, TRANSMITTER_PDU_FIXED_LENGTH, } from "./constants.js";
4
+ export { PROTOCOL_VERSION, PROTOCOL_FAMILY_ENTITY_INFORMATION, PROTOCOL_FAMILY_SIMULATION_MANAGEMENT, PROTOCOL_FAMILY_ELECTROMAGNETIC_EMISSION, PDU_TYPE_ENTITY_STATE, PDU_TYPE_CREATE_ENTITY, PDU_TYPE_REMOVE_ENTITY, PDU_TYPE_START_RESUME, PDU_TYPE_STOP_FREEZE, PDU_TYPE_ELECTROMAGNETIC_EMISSION, PDU_TYPE_TRANSMITTER, PDU_TYPE_POINT_OBJECT_STATE, PROTOCOL_FAMILY_RADIO_COMMUNICATIONS, PROTOCOL_FAMILY_DISTRIBUTED_EMISSIONS_REGENERATION, START_RESUME_PDU_LENGTH, STOP_FREEZE_PDU_LENGTH, CREATE_ENTITY_PDU_LENGTH, REMOVE_ENTITY_PDU_LENGTH, ENTITY_STATE_PDU_FIXED_LENGTH, ENTITY_STATE_VARIABLE_PARAMETER_RECORD_LENGTH, TRANSMITTER_PDU_FIXED_LENGTH, POINT_OBJECT_STATE_PDU_LENGTH, } from "./constants.js";
5
5
  export { decodePduHeader, encodePduHeader, } from "./pduHeader.js";
6
6
  export { decodeEntityStatePdu, encodeEntityStatePdu, } from "./entityStatePdu.js";
7
7
  export { decodeCreateEntityPdu, encodeCreateEntityPdu, } from "./createEntityPdu.js";
@@ -10,3 +10,4 @@ export { decodeStartResumePdu, encodeStartResumePdu, } from "./startResumePdu.js
10
10
  export { decodeStopFreezePdu, encodeStopFreezePdu, } from "./stopFreezePdu.js";
11
11
  export { decodeElectromagneticEmissionPdu, encodeElectromagneticEmissionPdu, } from "./electromagneticEmissionPdu.js";
12
12
  export { BEAM_ANTENNA_PATTERN_LENGTH, decodeTransmitterPdu, encodeTransmitterPdu, } from "./transmitterPdu.js";
13
+ export { decodePointObjectStatePdu, encodePointObjectStatePdu, } from "./pointObjectStatePdu.js";
@@ -0,0 +1,48 @@
1
+ import type { BinaryReader } from "../binary/BinaryReader.js";
2
+ import type { BinaryWriter } from "../binary/BinaryWriter.js";
3
+ import type { EntityId } from "../core/entityId.js";
4
+ import type { SimulationAddress } from "../core/entityId.js";
5
+ import type { PduHeader } from "./pduHeader.js";
6
+ import type { Vector3Double, Orientation } from "./entityStatePdu.js";
7
+ /** Object type (32 bits): domain, objectKind, category, subcategory. */
8
+ export interface PointObjectType {
9
+ /** 8-bit enumeration. */
10
+ domain: number;
11
+ /** 8-bit enumeration. */
12
+ objectKind: number;
13
+ /** 8-bit enumeration. */
14
+ category: number;
15
+ /** 8-bit enumeration. */
16
+ subcategory: number;
17
+ }
18
+ /**
19
+ * Point Object State PDU (704 bits). Tables 192–193.
20
+ * PDU Type = 43, Protocol Family = 9.
21
+ */
22
+ export interface PointObjectStatePdu {
23
+ header: PduHeader;
24
+ /** Object ID (same layout as EntityId; entity field holds object number). */
25
+ objectId: EntityId;
26
+ /** Referenced Object ID. */
27
+ referencedObjectId: EntityId;
28
+ updateNumber: number;
29
+ /** 8-bit enumeration. */
30
+ forceId: number;
31
+ /** 8-bit enumeration. */
32
+ modifications: number;
33
+ objectType: PointObjectType;
34
+ objectLocation: Vector3Double;
35
+ objectOrientation: Orientation;
36
+ /** 32-bit record. */
37
+ specificObjectAppearance: number;
38
+ /** 16-bit record. */
39
+ generalObjectAppearance: number;
40
+ /** 16-bit padding. */
41
+ padding: number;
42
+ requesterSimulationId: SimulationAddress;
43
+ receivingSimulationId: SimulationAddress;
44
+ /** 32-bit padding. */
45
+ padding2: number;
46
+ }
47
+ export declare function decodePointObjectStatePdu(reader: BinaryReader): PointObjectStatePdu;
48
+ export declare function encodePointObjectStatePdu(writer: BinaryWriter, pdu: PointObjectStatePdu): void;
@@ -0,0 +1,92 @@
1
+ import { decodeEntityId, encodeEntityId, decodeSimulationAddress, encodeSimulationAddress, } from "../core/entityId.js";
2
+ import { decodePduHeader, encodePduHeader } from "./pduHeader.js";
3
+ function decodeVector3Double(reader) {
4
+ return {
5
+ x: reader.readFloat64(),
6
+ y: reader.readFloat64(),
7
+ z: reader.readFloat64(),
8
+ };
9
+ }
10
+ function encodeVector3Double(writer, v) {
11
+ writer.writeFloat64(v.x);
12
+ writer.writeFloat64(v.y);
13
+ writer.writeFloat64(v.z);
14
+ }
15
+ function decodeOrientation(reader) {
16
+ return {
17
+ psi: reader.readFloat32(),
18
+ theta: reader.readFloat32(),
19
+ phi: reader.readFloat32(),
20
+ };
21
+ }
22
+ function encodeOrientation(writer, o) {
23
+ writer.writeFloat32(o.psi);
24
+ writer.writeFloat32(o.theta);
25
+ writer.writeFloat32(o.phi);
26
+ }
27
+ function decodePointObjectType(reader) {
28
+ return {
29
+ domain: reader.readUint8(),
30
+ objectKind: reader.readUint8(),
31
+ category: reader.readUint8(),
32
+ subcategory: reader.readUint8(),
33
+ };
34
+ }
35
+ function encodePointObjectType(writer, t) {
36
+ writer.writeUint8(t.domain);
37
+ writer.writeUint8(t.objectKind);
38
+ writer.writeUint8(t.category);
39
+ writer.writeUint8(t.subcategory);
40
+ }
41
+ export function decodePointObjectStatePdu(reader) {
42
+ const header = decodePduHeader(reader);
43
+ const objectId = decodeEntityId(reader);
44
+ const referencedObjectId = decodeEntityId(reader);
45
+ const updateNumber = reader.readUint16();
46
+ const forceId = reader.readUint8();
47
+ const modifications = reader.readUint8();
48
+ const objectType = decodePointObjectType(reader);
49
+ const objectLocation = decodeVector3Double(reader);
50
+ const objectOrientation = decodeOrientation(reader);
51
+ const specificObjectAppearance = reader.readUint32();
52
+ const generalObjectAppearance = reader.readUint16();
53
+ const padding = reader.readUint16();
54
+ const requesterSimulationId = decodeSimulationAddress(reader);
55
+ const receivingSimulationId = decodeSimulationAddress(reader);
56
+ const padding2 = reader.readUint32();
57
+ return {
58
+ header,
59
+ objectId,
60
+ referencedObjectId,
61
+ updateNumber,
62
+ forceId,
63
+ modifications,
64
+ objectType,
65
+ objectLocation,
66
+ objectOrientation,
67
+ specificObjectAppearance,
68
+ generalObjectAppearance,
69
+ padding,
70
+ requesterSimulationId,
71
+ receivingSimulationId,
72
+ padding2,
73
+ };
74
+ }
75
+ export function encodePointObjectStatePdu(writer, pdu) {
76
+ encodePduHeader(writer, pdu.header);
77
+ encodeEntityId(writer, pdu.objectId);
78
+ encodeEntityId(writer, pdu.referencedObjectId);
79
+ writer.writeUint16(pdu.updateNumber);
80
+ writer.writeUint8(pdu.forceId);
81
+ writer.writeUint8(pdu.modifications);
82
+ encodePointObjectType(writer, pdu.objectType);
83
+ encodeVector3Double(writer, pdu.objectLocation);
84
+ encodeOrientation(writer, pdu.objectOrientation);
85
+ writer.writeUint32(pdu.specificObjectAppearance);
86
+ writer.writeUint16(pdu.generalObjectAppearance);
87
+ writer.writeUint16(pdu.padding);
88
+ encodeSimulationAddress(writer, pdu.requesterSimulationId);
89
+ encodeSimulationAddress(writer, pdu.receivingSimulationId);
90
+ writer.writeUint32(pdu.padding2);
91
+ writer.patchUint16(8, writer.getOffset());
92
+ }
@@ -62,8 +62,8 @@ export interface BeamAntennaPattern {
62
62
  export interface VariableTransmitterParameter {
63
63
  /** 32-bit enumeration. */
64
64
  recordType: number;
65
- /** Record length in octets (6 + K + P). */
66
- recordLength: number;
65
+ /** Record length in octets (6 + data.length). Set automatically during encode. */
66
+ recordLength?: number;
67
67
  /** Record-specific fields + padding (recordLength - 6 octets). */
68
68
  data: Uint8Array;
69
69
  }
@@ -98,8 +98,8 @@ export interface TransmitterPdu {
98
98
  cryptoSystem: number;
99
99
  /** 16-bit record. */
100
100
  cryptoKeyId: number;
101
- /** Length of modulation parameters in octets (M). */
102
- lengthOfModulationParameters: number;
101
+ /** Length of modulation parameters in octets (M). Set automatically during encode. */
102
+ lengthOfModulationParameters?: number;
103
103
  /** Modulation parameters (M octets). */
104
104
  modulationParameters: Uint8Array;
105
105
  /** Antenna pattern (e.g. Beam Antenna Pattern, Table 31). */
@@ -111,8 +111,9 @@ function decodeVariableTransmitterParameter(reader) {
111
111
  };
112
112
  }
113
113
  function encodeVariableTransmitterParameter(writer, v) {
114
+ const recordLength = 6 + v.data.byteLength;
114
115
  writer.writeUint32(v.recordType);
115
- writer.writeUint16(v.recordLength);
116
+ writer.writeUint16(recordLength);
116
117
  if (v.data.length > 0) {
117
118
  writer.writeBytes(v.data);
118
119
  }
@@ -188,7 +189,7 @@ export function encodeTransmitterPdu(writer, pdu) {
188
189
  encodeModulationType(writer, pdu.modulationType);
189
190
  writer.writeUint16(pdu.cryptoSystem);
190
191
  writer.writeUint16(pdu.cryptoKeyId);
191
- writer.writeUint8(pdu.lengthOfModulationParameters);
192
+ writer.writeUint8(pdu.modulationParameters.byteLength);
192
193
  writer.writeUint8(0); // padding
193
194
  writer.writeUint16(0); // padding
194
195
  writer.writeBytes(pdu.modulationParameters);
package/package.json CHANGED
@@ -1,9 +1,17 @@
1
1
  {
2
2
  "name": "@its-c10/dis-codec",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Spec-accurate Distributed Interactive Simulation (DIS) encode/decode library in TypeScript",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/its-c10/dis-codec.git"
10
+ },
11
+ "homepage": "https://github.com/its-c10/dis-codec#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/its-c10/dis-codec/issues"
14
+ },
7
15
  "scripts": {
8
16
  "build": "tsc",
9
17
  "dev": "tsc -w",