@springfield/ham-radio-api 7.0.0 → 9.0.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ ## [9.0.0](https://gitlab.com/springfield-ham-radio/app/ham-radio-api/compare/v8.0.0...v9.0.0) (2025-04-20)
2
+
3
+
4
+ ### ⚠ BREAKING CHANGES
5
+
6
+ * update RadioModel interface to use properties instead of getter methods
7
+
8
+ ### Features
9
+
10
+ * update RadioModel interface to use properties instead of getter methods ([fe0c930](https://gitlab.com/springfield-ham-radio/app/ham-radio-api/commit/fe0c930ea6da1be01d0ead7bdc217546954fa04f))
11
+
12
+ ## [8.0.0](https://gitlab.com/springfield-ham-radio/app/ham-radio-api/compare/v7.0.0...v8.0.0) (2025-04-12)
13
+
14
+
15
+ ### ⚠ BREAKING CHANGES
16
+
17
+ * update radio interfaces and remove deprecated radio.ts file
18
+
19
+ ### Features
20
+
21
+ * update radio interfaces and remove deprecated radio.ts file ([9308ea5](https://gitlab.com/springfield-ham-radio/app/ham-radio-api/commit/9308ea59628363c65a240d9d657e7fc3a5325d33))
22
+
1
23
  ## [7.0.0](https://gitlab.com/springfield-ham-radio/app/ham-radio-api/compare/v6.0.0...v7.0.0) (2025-04-06)
2
24
 
3
25
 
package/dist/index.d.ts CHANGED
@@ -15,15 +15,15 @@ export * from './radio/connection.js';
15
15
  export * from './radio/ctcss.js';
16
16
  export * from './radio/dcs.js';
17
17
  export * from './radio/driver.js';
18
+ export * from './radio/driver-provider.js';
18
19
  export * from './radio/memory.js';
19
20
  export * from './radio/model.js';
20
- export * from './radio/module.js';
21
+ export * from './radio/model-provider.js';
21
22
  export * from './radio/program.js';
22
23
  export * from './radio/programmed-channel.js';
23
24
  export * from './radio/progress-indicator.js';
24
25
  export * from './radio/schema.js';
25
26
  export * from './radio/settings.js';
26
- export * from './radio/radio.js';
27
27
  export * from './radio/tone.js';
28
28
  export * from './spectrum/band.js';
29
29
  export * from './spectrum/channel.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+BAA+B,CAAC;AAE9C,cAAc,oBAAoB,CAAC;AAEnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+BAA+B,CAAC;AAE9C,cAAc,oBAAoB,CAAC;AAEnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC"}
package/dist/index.js CHANGED
@@ -15,15 +15,15 @@ export * from './radio/connection.js';
15
15
  export * from './radio/ctcss.js';
16
16
  export * from './radio/dcs.js';
17
17
  export * from './radio/driver.js';
18
+ export * from './radio/driver-provider.js';
18
19
  export * from './radio/memory.js';
19
20
  export * from './radio/model.js';
20
- export * from './radio/module.js';
21
+ export * from './radio/model-provider.js';
21
22
  export * from './radio/program.js';
22
23
  export * from './radio/programmed-channel.js';
23
24
  export * from './radio/progress-indicator.js';
24
25
  export * from './radio/schema.js';
25
26
  export * from './radio/settings.js';
26
- export * from './radio/radio.js';
27
27
  export * from './radio/tone.js';
28
28
  export * from './spectrum/band.js';
29
29
  export * from './spectrum/channel.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+BAA+B,CAAC;AAE9C,cAAc,oBAAoB,CAAC;AAEnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC","sourcesContent":["export * from './branded-types/frequency.js';\nexport * from './branded-types/license-class-id.js';\nexport * from './branded-types/radio-channel-id.js';\nexport * from './branded-types/radio-id.js';\nexport * from './branded-types/radio-model-id.js';\nexport * from './branded-types/radio-module-id.js';\nexport * from './branded-types/spectrum-band-id.js';\nexport * from './branded-types/spectrum-mode-id.js';\nexport * from './branded-types/spectrum-privlege-id.js';\nexport * from './branded-types/wavelength.js';\n\nexport * from './license/class.js';\n\nexport * from './radio/channel.js';\nexport * from './radio/codec.js';\nexport * from './radio/connection.js';\nexport * from './radio/ctcss.js';\nexport * from './radio/dcs.js';\nexport * from './radio/driver.js';\nexport * from './radio/memory.js';\nexport * from './radio/model.js';\nexport * from './radio/module.js';\nexport * from './radio/program.js';\nexport * from './radio/programmed-channel.js';\nexport * from './radio/progress-indicator.js';\nexport * from './radio/schema.js';\nexport * from './radio/settings.js';\nexport * from './radio/radio.js';\nexport * from './radio/tone.js';\n\nexport * from './spectrum/band.js';\nexport * from './spectrum/channel.js';\nexport * from './spectrum/mode.js';\nexport * from './spectrum/privilege.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+BAA+B,CAAC;AAE9C,cAAc,oBAAoB,CAAC;AAEnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC","sourcesContent":["export * from './branded-types/frequency.js';\nexport * from './branded-types/license-class-id.js';\nexport * from './branded-types/radio-channel-id.js';\nexport * from './branded-types/radio-id.js';\nexport * from './branded-types/radio-model-id.js';\nexport * from './branded-types/radio-module-id.js';\nexport * from './branded-types/spectrum-band-id.js';\nexport * from './branded-types/spectrum-mode-id.js';\nexport * from './branded-types/spectrum-privlege-id.js';\nexport * from './branded-types/wavelength.js';\n\nexport * from './license/class.js';\n\nexport * from './radio/channel.js';\nexport * from './radio/codec.js';\nexport * from './radio/connection.js';\nexport * from './radio/ctcss.js';\nexport * from './radio/dcs.js';\nexport * from './radio/driver.js';\nexport * from './radio/driver-provider.js';\nexport * from './radio/memory.js';\nexport * from './radio/model.js';\nexport * from './radio/model-provider.js';\nexport * from './radio/program.js';\nexport * from './radio/programmed-channel.js';\nexport * from './radio/progress-indicator.js';\nexport * from './radio/schema.js';\nexport * from './radio/settings.js';\nexport * from './radio/tone.js';\n\nexport * from './spectrum/band.js';\nexport * from './spectrum/channel.js';\nexport * from './spectrum/mode.js';\nexport * from './spectrum/privilege.js';\n"]}
@@ -0,0 +1,8 @@
1
+ import { RadioModelId } from '../branded-types/radio-model-id.js';
2
+ import { RadioModuleId } from '../branded-types/radio-module-id.js';
3
+ import { RadioDriver } from './driver.js';
4
+ export interface RadioDriverProvider {
5
+ getId(): RadioModuleId;
6
+ getDriver(model: RadioModelId): RadioDriver;
7
+ }
8
+ //# sourceMappingURL=driver-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"driver-provider.d.ts","sourceRoot":"","sources":["../../src/radio/driver-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,WAAW,mBAAmB;IAClC,KAAK,IAAI,aAAa,CAAC;IACvB,SAAS,CAAC,KAAK,EAAE,YAAY,GAAG,WAAW,CAAC;CAC7C"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=driver-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"driver-provider.js","sourceRoot":"","sources":["../../src/radio/driver-provider.ts"],"names":[],"mappings":"","sourcesContent":["import { RadioModelId } from '../branded-types/radio-model-id.js';\nimport { RadioModuleId } from '../branded-types/radio-module-id.js';\nimport { RadioDriver } from './driver.js';\n\nexport interface RadioDriverProvider {\n getId(): RadioModuleId;\n getDriver(model: RadioModelId): RadioDriver;\n}\n"]}
@@ -1,10 +1,7 @@
1
1
  import { RadioMemory } from './memory.js';
2
- import { RadioProgram } from './program.js';
3
2
  import { RadioProgressIndicator } from './progress-indicator.js';
4
3
  export interface RadioDriver {
5
4
  readRadio(serialPortPath: string, progressIndicator: RadioProgressIndicator): Promise<RadioMemory | undefined>;
6
5
  writeRadio(serialPortPath: string, memory: RadioMemory, progressIndicator: RadioProgressIndicator): Promise<void>;
7
- decodeMemory(memory: RadioMemory): RadioProgram;
8
- encodeProgram(program: RadioProgram, memory: RadioMemory): RadioMemory;
9
6
  }
10
7
  //# sourceMappingURL=driver.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../src/radio/driver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,cAAc,EAAE,MAAM,EAAE,iBAAiB,EAAE,sBAAsB,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC;IAC/G,UAAU,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAElH,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,YAAY,CAAC;IAChD,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,GAAG,WAAW,CAAC;CACxE"}
1
+ {"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../src/radio/driver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,cAAc,EAAE,MAAM,EAAE,iBAAiB,EAAE,sBAAsB,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC;IAC/G,UAAU,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnH"}
@@ -1 +1 @@
1
- {"version":3,"file":"driver.js","sourceRoot":"","sources":["../../src/radio/driver.ts"],"names":[],"mappings":"","sourcesContent":["import { RadioMemory } from './memory.js';\nimport { RadioProgram } from './program.js';\nimport { RadioProgressIndicator } from './progress-indicator.js';\n\nexport interface RadioDriver {\n readRadio(serialPortPath: string, progressIndicator: RadioProgressIndicator): Promise<RadioMemory | undefined>;\n writeRadio(serialPortPath: string, memory: RadioMemory, progressIndicator: RadioProgressIndicator): Promise<void>;\n\n decodeMemory(memory: RadioMemory): RadioProgram;\n encodeProgram(program: RadioProgram, memory: RadioMemory): RadioMemory;\n}\n"]}
1
+ {"version":3,"file":"driver.js","sourceRoot":"","sources":["../../src/radio/driver.ts"],"names":[],"mappings":"","sourcesContent":["import { RadioMemory } from './memory.js';\nimport { RadioProgressIndicator } from './progress-indicator.js';\n\nexport interface RadioDriver {\n readRadio(serialPortPath: string, progressIndicator: RadioProgressIndicator): Promise<RadioMemory | undefined>;\n writeRadio(serialPortPath: string, memory: RadioMemory, progressIndicator: RadioProgressIndicator): Promise<void>;\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import { RadioModuleId } from '../branded-types/radio-module-id.js';
2
+ import { RadioModel } from './model.js';
3
+ export interface RadioModelProvider {
4
+ getId(): RadioModuleId;
5
+ getModels(): RadioModel[];
6
+ }
7
+ //# sourceMappingURL=model-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-provider.d.ts","sourceRoot":"","sources":["../../src/radio/model-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,WAAW,kBAAkB;IACjC,KAAK,IAAI,aAAa,CAAC;IACvB,SAAS,IAAI,UAAU,EAAE,CAAC;CAC3B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=model-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-provider.js","sourceRoot":"","sources":["../../src/radio/model-provider.ts"],"names":[],"mappings":"","sourcesContent":["import { RadioModuleId } from '../branded-types/radio-module-id.js';\nimport { RadioModel } from './model.js';\n\nexport interface RadioModelProvider {\n getId(): RadioModuleId;\n getModels(): RadioModel[];\n}\n"]}
@@ -1,9 +1,15 @@
1
1
  import { RadioModelId } from '../branded-types/radio-model-id.js';
2
2
  import { RadioModuleId } from '../branded-types/radio-module-id.js';
3
+ import { RadioMemory } from './memory.js';
4
+ import { RadioProgram } from './program.js';
5
+ import { RadioSchema } from './schema.js';
3
6
  export interface RadioModel {
4
7
  id: RadioModelId;
5
8
  module: RadioModuleId;
6
9
  name: string;
7
10
  manufacturer: string;
11
+ getSchema(): Promise<RadioSchema>;
12
+ decodeMemory(memory: RadioMemory): RadioProgram;
13
+ encodeProgram(program: RadioProgram, memory: RadioMemory): RadioMemory;
8
14
  }
9
15
  //# sourceMappingURL=model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/radio/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,YAAY,CAAC;IACjB,MAAM,EAAE,aAAa,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;CACtB"}
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/radio/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,YAAY,CAAC;IACjB,MAAM,EAAE,aAAa,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IAClC,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,YAAY,CAAC;IAChD,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,GAAG,WAAW,CAAC;CACxE"}
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/radio/model.ts"],"names":[],"mappings":"","sourcesContent":["import { RadioModelId } from '../branded-types/radio-model-id.js';\nimport { RadioModuleId } from '../branded-types/radio-module-id.js';\n\nexport interface RadioModel {\n id: RadioModelId;\n module: RadioModuleId;\n name: string;\n manufacturer: string;\n}\n"]}
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/radio/model.ts"],"names":[],"mappings":"","sourcesContent":["import { RadioModelId } from '../branded-types/radio-model-id.js';\nimport { RadioModuleId } from '../branded-types/radio-module-id.js';\nimport { RadioMemory } from './memory.js';\nimport { RadioProgram } from './program.js';\nimport { RadioSchema } from './schema.js';\n\nexport interface RadioModel {\n id: RadioModelId;\n module: RadioModuleId;\n name: string;\n manufacturer: string;\n getSchema(): Promise<RadioSchema>;\n decodeMemory(memory: RadioMemory): RadioProgram;\n encodeProgram(program: RadioProgram, memory: RadioMemory): RadioMemory;\n}\n"]}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@springfield/ham-radio-api",
3
- "version": "7.0.0",
3
+ "version": "9.0.0",
4
4
  "author": "Bryan Hunt",
5
- "packageManager": "yarn@4.8.1",
5
+ "packageManager": "yarn@4.9.1",
6
6
  "main": "dist/index.js",
7
7
  "type": "module",
8
8
  "types": "dist/index.d.ts",
@@ -55,7 +55,7 @@
55
55
  "husky": "9.1.7",
56
56
  "semantic-release": "23.1.1",
57
57
  "semantic-release-yarn": "3.0.2",
58
- "typescript": "5.8.2"
58
+ "typescript": "5.8.3"
59
59
  },
60
60
  "dependencies": {
61
61
  "ts-brand": "^0.2.0"
package/src/index.ts CHANGED
@@ -17,15 +17,15 @@ export * from './radio/connection.js';
17
17
  export * from './radio/ctcss.js';
18
18
  export * from './radio/dcs.js';
19
19
  export * from './radio/driver.js';
20
+ export * from './radio/driver-provider.js';
20
21
  export * from './radio/memory.js';
21
22
  export * from './radio/model.js';
22
- export * from './radio/module.js';
23
+ export * from './radio/model-provider.js';
23
24
  export * from './radio/program.js';
24
25
  export * from './radio/programmed-channel.js';
25
26
  export * from './radio/progress-indicator.js';
26
27
  export * from './radio/schema.js';
27
28
  export * from './radio/settings.js';
28
- export * from './radio/radio.js';
29
29
  export * from './radio/tone.js';
30
30
 
31
31
  export * from './spectrum/band.js';
@@ -1,12 +1,8 @@
1
1
  import { RadioModelId } from '../branded-types/radio-model-id.js';
2
2
  import { RadioModuleId } from '../branded-types/radio-module-id.js';
3
3
  import { RadioDriver } from './driver.js';
4
- import { RadioModel } from './model.js';
5
- import { RadioSchema } from './schema.js';
6
4
 
7
- export interface RadioModule {
5
+ export interface RadioDriverProvider {
8
6
  getId(): RadioModuleId;
9
- getModels(): RadioModel[];
10
- getSchema(model: RadioModelId): Promise<RadioSchema>;
11
7
  getDriver(model: RadioModelId): RadioDriver;
12
8
  }
@@ -1,11 +1,7 @@
1
1
  import { RadioMemory } from './memory.js';
2
- import { RadioProgram } from './program.js';
3
2
  import { RadioProgressIndicator } from './progress-indicator.js';
4
3
 
5
4
  export interface RadioDriver {
6
5
  readRadio(serialPortPath: string, progressIndicator: RadioProgressIndicator): Promise<RadioMemory | undefined>;
7
6
  writeRadio(serialPortPath: string, memory: RadioMemory, progressIndicator: RadioProgressIndicator): Promise<void>;
8
-
9
- decodeMemory(memory: RadioMemory): RadioProgram;
10
- encodeProgram(program: RadioProgram, memory: RadioMemory): RadioMemory;
11
7
  }
@@ -0,0 +1,7 @@
1
+ import { RadioModuleId } from '../branded-types/radio-module-id.js';
2
+ import { RadioModel } from './model.js';
3
+
4
+ export interface RadioModelProvider {
5
+ getId(): RadioModuleId;
6
+ getModels(): RadioModel[];
7
+ }
@@ -1,9 +1,15 @@
1
1
  import { RadioModelId } from '../branded-types/radio-model-id.js';
2
2
  import { RadioModuleId } from '../branded-types/radio-module-id.js';
3
+ import { RadioMemory } from './memory.js';
4
+ import { RadioProgram } from './program.js';
5
+ import { RadioSchema } from './schema.js';
3
6
 
4
7
  export interface RadioModel {
5
8
  id: RadioModelId;
6
9
  module: RadioModuleId;
7
10
  name: string;
8
11
  manufacturer: string;
12
+ getSchema(): Promise<RadioSchema>;
13
+ decodeMemory(memory: RadioMemory): RadioProgram;
14
+ encodeProgram(program: RadioProgram, memory: RadioMemory): RadioMemory;
9
15
  }
@@ -1,8 +0,0 @@
1
- import { RadioId } from '../branded-types/radio-id.js';
2
- import { RadioModelId } from '../branded-types/radio-model-id.js';
3
-
4
- export interface Radio {
5
- id: RadioId;
6
- name: string;
7
- model: RadioModelId;
8
- }