@springfield/ham-radio-api 0.14.0 → 0.16.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/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from './license/class.js';
2
- export * from './radio/channel-reference.js';
3
2
  export * from './radio/channel.js';
4
3
  export * from './radio/connection.js';
5
4
  export * from './radio/driver.js';
@@ -10,6 +9,8 @@ export * from './radio/module.js';
10
9
  export * from './radio/program.js';
11
10
  export * from './radio/programmed-channel.js';
12
11
  export * from './radio/progress-indicator.js';
12
+ export * from './radio/settings.js';
13
+ export * from './radio/radio.js';
13
14
  export * from './radio/tone.js';
14
15
  export * from './spectrum/band.js';
15
16
  export * from './spectrum/channel.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AAEnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,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,iBAAiB,CAAC;AAEhC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AAEnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,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,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,CAAA"}
package/dist/index.js CHANGED
@@ -15,7 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./license/class.js"), exports);
18
- __exportStar(require("./radio/channel-reference.js"), exports);
19
18
  __exportStar(require("./radio/channel.js"), exports);
20
19
  __exportStar(require("./radio/connection.js"), exports);
21
20
  __exportStar(require("./radio/driver.js"), exports);
@@ -26,6 +25,8 @@ __exportStar(require("./radio/module.js"), exports);
26
25
  __exportStar(require("./radio/program.js"), exports);
27
26
  __exportStar(require("./radio/programmed-channel.js"), exports);
28
27
  __exportStar(require("./radio/progress-indicator.js"), exports);
28
+ __exportStar(require("./radio/settings.js"), exports);
29
+ __exportStar(require("./radio/radio.js"), exports);
29
30
  __exportStar(require("./radio/tone.js"), exports);
30
31
  __exportStar(require("./spectrum/band.js"), exports);
31
32
  __exportStar(require("./spectrum/channel.js"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AAEnC,+DAA6C;AAC7C,qDAAmC;AACnC,wDAAsC;AACtC,oDAAkC;AAClC,0DAAwC;AACxC,oDAAkC;AAClC,mDAAiC;AACjC,oDAAkC;AAClC,qDAAmC;AACnC,gEAA8C;AAC9C,gEAA8C;AAC9C,kDAAgC;AAEhC,qDAAmC;AACnC,wDAAsC;AACtC,qDAAmC;AACnC,0DAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AAEnC,qDAAmC;AACnC,wDAAsC;AACtC,oDAAkC;AAClC,0DAAwC;AACxC,oDAAkC;AAClC,mDAAiC;AACjC,oDAAkC;AAClC,qDAAmC;AACnC,gEAA8C;AAC9C,gEAA8C;AAC9C,sDAAoC;AACpC,mDAAiC;AACjC,kDAAgC;AAEhC,qDAAmC;AACnC,wDAAsC;AACtC,qDAAmC;AACnC,0DAAuC"}
@@ -1,6 +1,6 @@
1
1
  export interface RadioConnection {
2
2
  serialPortPath: string;
3
3
  manufacturerId: string;
4
- model: string;
4
+ modelId: string;
5
5
  }
6
6
  //# sourceMappingURL=connection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../src/radio/connection.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf"}
1
+ {"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../src/radio/connection.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -2,7 +2,7 @@ import { RadioMemory } from './memory.js';
2
2
  import { RadioProgram } from './program.js';
3
3
  import { RadioProgressIndicator } from './progress-indicator.js';
4
4
  export interface RadioDriver {
5
- readRadio(serialPortPath: string, progressIndicator: RadioProgressIndicator): Promise<RadioMemory>;
5
+ readRadio(serialPortPath: string, progressIndicator: RadioProgressIndicator): Promise<RadioMemory | undefined>;
6
6
  writeRadio(serialPortPath: string, memory: RadioMemory, progressIndicator: RadioProgressIndicator): Promise<void>;
7
7
  decodeMemory(memory: RadioMemory): RadioProgram;
8
8
  encodeProgram(program: RadioProgram, memory: RadioMemory): RadioMemory;
@@ -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,CAAC,CAAC;IACnG,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,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,5 +1,5 @@
1
1
  export interface RadioMemory {
2
- id: string;
2
+ radioId?: string;
3
3
  contents: any;
4
4
  }
5
5
  //# sourceMappingURL=memory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/radio/memory.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,GAAG,CAAC;CACf"}
1
+ {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/radio/memory.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,GAAG,CAAC;CACf"}
@@ -2,6 +2,7 @@ export interface RadioModel {
2
2
  id: string;
3
3
  moduleId: string;
4
4
  name: string;
5
- schema: any;
5
+ settingsSchema: any;
6
+ channelSchema: any;
6
7
  }
7
8
  //# sourceMappingURL=model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/radio/model.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,GAAG,CAAC;CACb"}
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/radio/model.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,GAAG,CAAC;IACpB,aAAa,EAAE,GAAG,CAAC;CACpB"}
@@ -4,6 +4,6 @@ import { RadioModel } from './model';
4
4
  export interface RadioModule {
5
5
  getManufacturer(): RadioManufacturer;
6
6
  getModels(filter?: string[]): Promise<RadioModel[]>;
7
- getDriver(modelName: string): RadioDriver;
7
+ getDriver(modelId: string): RadioDriver;
8
8
  }
9
9
  //# sourceMappingURL=module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/radio/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,WAAW,WAAW;IAC1B,eAAe,IAAI,iBAAiB,CAAC;IACrC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IACpD,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,CAAC;CAC3C"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/radio/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,WAAW,WAAW;IAC1B,eAAe,IAAI,iBAAiB,CAAC;IACrC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IACpD,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAAC;CACzC"}
@@ -1,6 +1,7 @@
1
1
  import { RadioProgrammedChannel } from './programmed-channel.js';
2
2
  import { RadioSettings } from './settings.js';
3
3
  export interface RadioProgram {
4
+ radioId?: string;
4
5
  settings: RadioSettings;
5
6
  channels: RadioProgrammedChannel[];
6
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../../src/radio/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,aAAa,CAAC;IACxB,QAAQ,EAAE,sBAAsB,EAAE,CAAC;CACpC"}
1
+ {"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../../src/radio/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,aAAa,CAAC;IACxB,QAAQ,EAAE,sBAAsB,EAAE,CAAC;CACpC"}
@@ -1,13 +1,8 @@
1
- import { RadioChannelReference } from './channel-reference.js';
2
1
  import { RadioChannel } from './channel.js';
3
- export interface RadioSpecificChannelSettings {
4
- [setting: string]: number | string | boolean;
5
- }
2
+ import { RadioSettings } from './settings.js';
6
3
  export interface RadioProgrammedChannel {
7
- id?: string;
8
- radioModelId: string;
9
4
  channelNumber: number;
10
- radioChannel: RadioChannel | RadioChannelReference;
11
- settings?: RadioSpecificChannelSettings;
5
+ radioChannel: RadioChannel | string;
6
+ settings?: RadioSettings;
12
7
  }
13
8
  //# sourceMappingURL=programmed-channel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"programmed-channel.d.ts","sourceRoot":"","sources":["../../src/radio/programmed-channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,WAAW,4BAA4B;IAC3C,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAC9C;AAED,MAAM,WAAW,sBAAsB;IACrC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,YAAY,GAAG,qBAAqB,CAAC;IACnD,QAAQ,CAAC,EAAE,4BAA4B,CAAC;CACzC"}
1
+ {"version":3,"file":"programmed-channel.d.ts","sourceRoot":"","sources":["../../src/radio/programmed-channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,YAAY,GAAG,MAAM,CAAC;IACpC,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B"}
@@ -0,0 +1,6 @@
1
+ export interface Radio {
2
+ id: string;
3
+ name: string;
4
+ modelId: string;
5
+ }
6
+ //# sourceMappingURL=radio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../src/radio/radio.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=radio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio.js","sourceRoot":"","sources":["../../src/radio/radio.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@springfield/ham-radio-api",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "author": "Bryan Hunt",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,6 +13,6 @@
13
13
  },
14
14
  "packageManager": "yarn@3.5.0",
15
15
  "devDependencies": {
16
- "typescript": "4.9.5"
16
+ "typescript": "5.0.2"
17
17
  }
18
18
  }
package/src/index.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  export * from './license/class.js';
2
2
 
3
- export * from './radio/channel-reference.js';
4
3
  export * from './radio/channel.js';
5
4
  export * from './radio/connection.js';
6
5
  export * from './radio/driver.js';
@@ -11,6 +10,8 @@ export * from './radio/module.js';
11
10
  export * from './radio/program.js';
12
11
  export * from './radio/programmed-channel.js';
13
12
  export * from './radio/progress-indicator.js';
13
+ export * from './radio/settings.js';
14
+ export * from './radio/radio.js';
14
15
  export * from './radio/tone.js';
15
16
 
16
17
  export * from './spectrum/band.js';
@@ -1,5 +1,5 @@
1
1
  export interface RadioConnection {
2
2
  serialPortPath: string;
3
3
  manufacturerId: string;
4
- model: string;
4
+ modelId: string;
5
5
  }
@@ -3,7 +3,7 @@ import { RadioProgram } from './program.js';
3
3
  import { RadioProgressIndicator } from './progress-indicator.js';
4
4
 
5
5
  export interface RadioDriver {
6
- readRadio(serialPortPath: string, progressIndicator: RadioProgressIndicator): Promise<RadioMemory>;
6
+ readRadio(serialPortPath: string, progressIndicator: RadioProgressIndicator): Promise<RadioMemory | undefined>;
7
7
  writeRadio(serialPortPath: string, memory: RadioMemory, progressIndicator: RadioProgressIndicator): Promise<void>;
8
8
 
9
9
  decodeMemory(memory: RadioMemory): RadioProgram;
@@ -1,4 +1,4 @@
1
1
  export interface RadioMemory {
2
- id: string;
2
+ radioId?: string;
3
3
  contents: any;
4
4
  }
@@ -2,5 +2,6 @@ export interface RadioModel {
2
2
  id: string;
3
3
  moduleId: string;
4
4
  name: string;
5
- schema: any;
5
+ settingsSchema: any;
6
+ channelSchema: any;
6
7
  }
@@ -5,5 +5,5 @@ import { RadioModel } from './model';
5
5
  export interface RadioModule {
6
6
  getManufacturer(): RadioManufacturer;
7
7
  getModels(filter?: string[]): Promise<RadioModel[]>;
8
- getDriver(modelName: string): RadioDriver;
8
+ getDriver(modelId: string): RadioDriver;
9
9
  }
@@ -2,6 +2,7 @@ import { RadioProgrammedChannel } from './programmed-channel.js';
2
2
  import { RadioSettings } from './settings.js';
3
3
 
4
4
  export interface RadioProgram {
5
+ radioId?: string;
5
6
  settings: RadioSettings;
6
7
  channels: RadioProgrammedChannel[];
7
8
  }
@@ -1,14 +1,8 @@
1
- import { RadioChannelReference } from './channel-reference.js';
2
1
  import { RadioChannel } from './channel.js';
3
-
4
- export interface RadioSpecificChannelSettings {
5
- [setting: string]: number | string | boolean;
6
- }
2
+ import { RadioSettings } from './settings.js';
7
3
 
8
4
  export interface RadioProgrammedChannel {
9
- id?: string;
10
- radioModelId: string;
11
5
  channelNumber: number;
12
- radioChannel: RadioChannel | RadioChannelReference;
13
- settings?: RadioSpecificChannelSettings;
6
+ radioChannel: RadioChannel | string;
7
+ settings?: RadioSettings;
14
8
  }
@@ -0,0 +1,5 @@
1
+ export interface Radio {
2
+ id: string;
3
+ name: string;
4
+ modelId: string;
5
+ }
@@ -1,3 +0,0 @@
1
- export interface RadioChannelReference {
2
- id: string;
3
- }