@springfield/ham-radio-api 16.3.3 → 17.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/README.md +14 -2
- package/dist/branded-types/frequency.d.ts +2 -2
- package/dist/branded-types/frequency.js +1 -1
- package/dist/branded-types/license-class-id.d.ts +2 -2
- package/dist/branded-types/license-class-id.js +1 -1
- package/dist/branded-types/radio-channel-id.d.ts +2 -2
- package/dist/branded-types/radio-channel-id.js +1 -1
- package/dist/branded-types/radio-model-id.d.ts +2 -2
- package/dist/branded-types/radio-model-id.js +1 -1
- package/dist/branded-types/radio-module-id.d.ts +2 -2
- package/dist/branded-types/radio-module-id.js +1 -1
- package/dist/branded-types/spectrum-band-id.d.ts +2 -2
- package/dist/branded-types/spectrum-band-id.js +1 -1
- package/dist/branded-types/spectrum-mode-id.d.ts +2 -2
- package/dist/branded-types/spectrum-mode-id.js +1 -1
- package/dist/branded-types/spectrum-privilege-id.d.ts +2 -2
- package/dist/branded-types/spectrum-privilege-id.js +1 -1
- package/dist/branded-types/wavelength.d.ts +2 -2
- package/dist/branded-types/wavelength.js +1 -1
- package/dist/index.d.ts +38 -38
- package/dist/index.js +38 -38
- package/dist/license/class.d.ts +1 -1
- package/dist/radio/channel.d.ts +3 -3
- package/dist/radio/codec-factory.d.ts +3 -3
- package/dist/radio/codec.d.ts +2 -2
- package/dist/radio/connection.d.ts +1 -1
- package/dist/radio/driver-provider.d.ts +3 -3
- package/dist/radio/driver.d.ts +2 -2
- package/dist/radio/id.d.ts +1 -1
- package/dist/radio/memory-config.d.ts +2 -2
- package/dist/radio/memory-segment.d.ts +1 -0
- package/dist/radio/memory-segment.d.ts.map +1 -1
- package/dist/radio/memory.d.ts +1 -1
- package/dist/radio/module.d.ts +2 -2
- package/dist/radio/program.d.ts +2 -2
- package/dist/radio/programmed-channel.d.ts +2 -2
- package/dist/radio/protocol.d.ts +60 -71
- package/dist/radio/protocol.d.ts.map +1 -1
- package/dist/radio/radio.d.ts +5 -5
- package/dist/radio/schema.d.ts +1 -1
- package/dist/radio/serial-config.d.ts +1 -1
- package/dist/radio/shared-components.d.ts +1 -1
- package/dist/radio/tone.d.ts +2 -2
- package/dist/spectrum/band.d.ts +5 -5
- package/dist/spectrum/channel.d.ts +1 -1
- package/dist/spectrum/mode.d.ts +1 -1
- package/dist/spectrum/privilege.d.ts +5 -5
- package/package.json +38 -29
- package/src/branded-types/frequency.ts +2 -2
- package/src/branded-types/license-class-id.ts +2 -2
- package/src/branded-types/radio-channel-id.ts +2 -2
- package/src/branded-types/radio-model-id.ts +2 -2
- package/src/branded-types/radio-module-id.ts +2 -2
- package/src/branded-types/spectrum-band-id.ts +2 -2
- package/src/branded-types/spectrum-mode-id.ts +2 -2
- package/src/branded-types/spectrum-privilege-id.ts +2 -2
- package/src/branded-types/wavelength.ts +2 -2
- package/src/index.ts +38 -38
- package/src/license/class.ts +1 -1
- package/src/radio/channel.ts +3 -3
- package/src/radio/codec-factory.ts +3 -3
- package/src/radio/codec.ts +2 -2
- package/src/radio/connection.ts +1 -1
- package/src/radio/driver-provider.ts +3 -3
- package/src/radio/driver.ts +2 -2
- package/src/radio/id.ts +1 -1
- package/src/radio/memory-config.ts +2 -2
- package/src/radio/memory-segment.ts +1 -0
- package/src/radio/memory.ts +1 -1
- package/src/radio/module.ts +2 -2
- package/src/radio/program.ts +2 -2
- package/src/radio/programmed-channel.ts +2 -2
- package/src/radio/protocol.ts +62 -70
- package/src/radio/radio.ts +5 -5
- package/src/radio/schema.ts +1 -1
- package/src/radio/serial-config.ts +1 -1
- package/src/radio/shared-components.ts +1 -1
- package/src/radio/tone.ts +2 -2
- package/src/spectrum/band.ts +5 -5
- package/src/spectrum/channel.ts +1 -1
- package/src/spectrum/mode.ts +1 -1
- package/src/spectrum/privilege.ts +5 -5
- package/CHANGELOG.md +0 -279
package/dist/radio/protocol.d.ts
CHANGED
|
@@ -1,79 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A byte in a send or expect array.
|
|
3
|
+
*
|
|
4
|
+
* - number 0–255: literal byte
|
|
5
|
+
* - hex string such as `"0x50"`: literal byte
|
|
6
|
+
* - single-character string such as `"S"`: ASCII opcode
|
|
7
|
+
* - placeholder: `"$address"`, `"$chunkSize"`, `"$length"`, `"$data"`
|
|
8
|
+
*/
|
|
9
|
+
export type RadioByteToken = number | string;
|
|
10
|
+
/**
|
|
11
|
+
* Receive any content of a fixed length, such as a radio identifier.
|
|
12
|
+
*/
|
|
13
|
+
export interface RadioExpectBytes {
|
|
14
|
+
bytes: number;
|
|
5
15
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
export interface RadioReceiveStep {
|
|
38
|
-
receive: {
|
|
39
|
-
type: 'exact' | 'variable' | 'pattern' | 'any';
|
|
40
|
-
value?: number;
|
|
41
|
-
length: number;
|
|
42
|
-
pattern?: (string | number | {
|
|
43
|
-
field: string;
|
|
44
|
-
size: number;
|
|
45
|
-
})[];
|
|
46
|
-
description?: string;
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
export interface RadioReadSegmentStep {
|
|
50
|
-
readSegment: {
|
|
16
|
+
/**
|
|
17
|
+
* Expected serial reply for an exchange.
|
|
18
|
+
*
|
|
19
|
+
* - token: exact 1-byte match (ACK)
|
|
20
|
+
* - token array: exact multi-byte match, or a framed reply with `$` placeholders
|
|
21
|
+
* - `{ bytes: N }`: any N bytes
|
|
22
|
+
*/
|
|
23
|
+
export type RadioExpect = RadioByteToken | RadioByteToken[] | RadioExpectBytes;
|
|
24
|
+
/**
|
|
25
|
+
* One serial exchange: send bytes and/or wait for a reply.
|
|
26
|
+
* At least one of `send` or `expect` must be present.
|
|
27
|
+
*/
|
|
28
|
+
export type RadioExchange = {
|
|
29
|
+
description?: string;
|
|
30
|
+
send: RadioByteToken[];
|
|
31
|
+
expect?: RadioExpect;
|
|
32
|
+
timeout?: number;
|
|
33
|
+
} | {
|
|
34
|
+
description?: string;
|
|
35
|
+
send?: RadioByteToken[];
|
|
36
|
+
expect: RadioExpect;
|
|
37
|
+
timeout?: number;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Chunked memory read: repeat an exchange across named segments.
|
|
41
|
+
* `$data` in `expect` is captured into the memory buffer.
|
|
42
|
+
* Optional `ack` is a second exchange after each chunk (for example an ACK).
|
|
43
|
+
*/
|
|
44
|
+
export interface RadioReadStep {
|
|
45
|
+
description?: string;
|
|
46
|
+
read: {
|
|
51
47
|
segments: string[];
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
endChunk: {
|
|
57
|
-
send: (string | number)[];
|
|
58
|
-
receive: RadioReceivePattern;
|
|
59
|
-
};
|
|
60
|
-
description?: string;
|
|
48
|
+
send: RadioByteToken[];
|
|
49
|
+
expect: RadioExpect;
|
|
50
|
+
ack?: RadioExchange;
|
|
51
|
+
timeout?: number;
|
|
61
52
|
};
|
|
62
53
|
}
|
|
63
|
-
|
|
64
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Chunked memory write: repeat an exchange across named segments.
|
|
56
|
+
* `$data` in `send` emits the current chunk from the memory buffer.
|
|
57
|
+
*/
|
|
58
|
+
export interface RadioWriteStep {
|
|
59
|
+
description?: string;
|
|
60
|
+
write: {
|
|
65
61
|
segments: string[];
|
|
66
|
-
send:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
description?: string;
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
export interface RadioSetVariableStep {
|
|
73
|
-
setVariable: {
|
|
74
|
-
name: string;
|
|
75
|
-
value: string | number;
|
|
62
|
+
send: RadioByteToken[];
|
|
63
|
+
expect: RadioExpect;
|
|
64
|
+
timeout?: number;
|
|
76
65
|
};
|
|
77
66
|
}
|
|
78
|
-
export type RadioProtocolStep =
|
|
67
|
+
export type RadioProtocolStep = RadioExchange | RadioReadStep | RadioWriteStep;
|
|
79
68
|
//# sourceMappingURL=protocol.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/radio/protocol.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/radio/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG,cAAc,EAAE,GAAG,gBAAgB,CAAC;AAE/E;;;GAGG;AACH,MAAM,MAAM,aAAa,GACrB;IACE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GACD;IACE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,cAAc,EAAE,CAAC;IACxB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEN;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE;QACJ,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,IAAI,EAAE,cAAc,EAAE,CAAC;QACvB,MAAM,EAAE,WAAW,CAAC;QACpB,GAAG,CAAC,EAAE,aAAa,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE;QACL,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,IAAI,EAAE,cAAc,EAAE,CAAC;QACvB,MAAM,EAAE,WAAW,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,aAAa,GAAG,cAAc,CAAC"}
|
package/dist/radio/radio.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { RadioId } from
|
|
2
|
-
import type { RadioMemoryConfig } from
|
|
3
|
-
import type { RadioProtocolStep } from
|
|
4
|
-
import type { RadioSchema } from
|
|
5
|
-
import type { RadioSerialConfig } from
|
|
1
|
+
import type { RadioId } from "./id.js";
|
|
2
|
+
import type { RadioMemoryConfig } from "./memory-config.js";
|
|
3
|
+
import type { RadioProtocolStep } from "./protocol.js";
|
|
4
|
+
import type { RadioSchema } from "./schema.js";
|
|
5
|
+
import type { RadioSerialConfig } from "./serial-config.js";
|
|
6
6
|
export interface Radio {
|
|
7
7
|
id: RadioId;
|
|
8
8
|
version: string;
|
package/dist/radio/schema.d.ts
CHANGED
package/dist/radio/tone.d.ts
CHANGED
package/dist/spectrum/band.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Frequency } from
|
|
2
|
-
import type { LicenseClassId } from
|
|
3
|
-
import type { SpectrumBandId } from
|
|
4
|
-
import type { SpectrumChannel } from
|
|
5
|
-
import type { Wavelength } from
|
|
1
|
+
import type { Frequency } from "../branded-types/frequency.js";
|
|
2
|
+
import type { LicenseClassId } from "../branded-types/license-class-id.js";
|
|
3
|
+
import type { SpectrumBandId } from "../branded-types/spectrum-band-id.js";
|
|
4
|
+
import type { SpectrumChannel } from "./channel.js";
|
|
5
|
+
import type { Wavelength } from "../branded-types/wavelength.js";
|
|
6
6
|
export interface SpectrumBand {
|
|
7
7
|
id: SpectrumBandId;
|
|
8
8
|
name: string;
|
package/dist/spectrum/mode.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Frequency } from
|
|
2
|
-
import type { LicenseClassId } from
|
|
3
|
-
import type { SpectrumBandId } from
|
|
4
|
-
import type { SpectrumModeId } from
|
|
5
|
-
import type { SpectrumPrivilegeId } from
|
|
1
|
+
import type { Frequency } from "../branded-types/frequency.js";
|
|
2
|
+
import type { LicenseClassId } from "../branded-types/license-class-id.js";
|
|
3
|
+
import type { SpectrumBandId } from "../branded-types/spectrum-band-id.js";
|
|
4
|
+
import type { SpectrumModeId } from "../branded-types/spectrum-mode-id.js";
|
|
5
|
+
import type { SpectrumPrivilegeId } from "../branded-types/spectrum-privilege-id.js";
|
|
6
6
|
export interface SpectrumPrivilege {
|
|
7
7
|
id: SpectrumPrivilegeId;
|
|
8
8
|
licenseClassId: LicenseClassId;
|
package/package.json
CHANGED
|
@@ -1,23 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@springfield/ham-radio-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"author": "Bryan Hunt",
|
|
5
|
-
"packageManager": "yarn@4.12.0",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"types": "dist/index.d.ts",
|
|
9
5
|
"files": [
|
|
10
|
-
"
|
|
11
|
-
"
|
|
6
|
+
"dist/",
|
|
7
|
+
"src/"
|
|
12
8
|
],
|
|
9
|
+
"type": "module",
|
|
10
|
+
"main": "dist/index.js",
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/springfield-ham-radio/ham-radio-api.git"
|
|
15
|
+
},
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
13
19
|
"scripts": {
|
|
14
20
|
"build": "tsc",
|
|
15
21
|
"commitlint": "commitlint --edit",
|
|
22
|
+
"format": "oxfmt",
|
|
16
23
|
"lint": "oxlint",
|
|
17
24
|
"lint:fix": "oxlint --fix --fix-suggestions",
|
|
18
25
|
"release": "semantic-release",
|
|
19
26
|
"prepare": "husky"
|
|
20
27
|
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"loglayer": "^8.5.0",
|
|
30
|
+
"ts-brand": "^0.2.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@commitlint/cli": "21.2.2",
|
|
34
|
+
"@commitlint/config-conventional": "21.2.2",
|
|
35
|
+
"@semantic-release/changelog": "7.0.0",
|
|
36
|
+
"@semantic-release/git": "11.0.1",
|
|
37
|
+
"@semantic-release/github": "12.0.2",
|
|
38
|
+
"@semantic-release/npm": "13.1.5",
|
|
39
|
+
"husky": "9.1.7",
|
|
40
|
+
"oxfmt": "^0.64.0",
|
|
41
|
+
"oxlint": "1.79.0",
|
|
42
|
+
"semantic-release": "25.0.9",
|
|
43
|
+
"typescript": "7.0.2"
|
|
44
|
+
},
|
|
45
|
+
"resolutions": {
|
|
46
|
+
"conventional-changelog-conventionalcommits": "9.3.1"
|
|
47
|
+
},
|
|
21
48
|
"release": {
|
|
22
49
|
"branches": [
|
|
23
50
|
"main",
|
|
@@ -40,28 +67,10 @@
|
|
|
40
67
|
}
|
|
41
68
|
],
|
|
42
69
|
"@semantic-release/changelog",
|
|
43
|
-
"semantic-release
|
|
44
|
-
"@semantic-release/
|
|
70
|
+
"@semantic-release/npm",
|
|
71
|
+
"@semantic-release/github",
|
|
45
72
|
"@semantic-release/git"
|
|
46
73
|
]
|
|
47
74
|
},
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
"devDependencies": {
|
|
52
|
-
"@commitlint/cli": "20.2.0",
|
|
53
|
-
"@commitlint/config-conventional": "20.2.0",
|
|
54
|
-
"@semantic-release/changelog": "6.0.3",
|
|
55
|
-
"@semantic-release/git": "10.0.1",
|
|
56
|
-
"@semantic-release/gitlab": "13.2.9",
|
|
57
|
-
"husky": "9.1.7",
|
|
58
|
-
"oxlint": "1.33.0",
|
|
59
|
-
"semantic-release": "25.0.2",
|
|
60
|
-
"semantic-release-yarn": "3.0.2",
|
|
61
|
-
"typescript": "5.9.3"
|
|
62
|
-
},
|
|
63
|
-
"dependencies": {
|
|
64
|
-
"loglayer": "^8.2.0",
|
|
65
|
-
"ts-brand": "^0.2.0"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
75
|
+
"packageManager": "yarn@4.18.0"
|
|
76
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Brand, make } from
|
|
1
|
+
import { type Brand, make } from "ts-brand";
|
|
2
2
|
|
|
3
|
-
export type LicenseClassId = Brand<string,
|
|
3
|
+
export type LicenseClassId = Brand<string, "license-class-id">;
|
|
4
4
|
export const LicenseClassId = make<LicenseClassId>();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Brand, make } from
|
|
1
|
+
import { type Brand, make } from "ts-brand";
|
|
2
2
|
|
|
3
|
-
export type RadioChannelId = Brand<string,
|
|
3
|
+
export type RadioChannelId = Brand<string, "radio-channel-id">;
|
|
4
4
|
export const RadioChannelId = make<RadioChannelId>();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Brand, make } from
|
|
1
|
+
import { type Brand, make } from "ts-brand";
|
|
2
2
|
|
|
3
|
-
export type RadioModuleId = Brand<string,
|
|
3
|
+
export type RadioModuleId = Brand<string, "radio-module-id">;
|
|
4
4
|
export const RadioModuleId = make<RadioModuleId>();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Brand, make } from
|
|
1
|
+
import { type Brand, make } from "ts-brand";
|
|
2
2
|
|
|
3
|
-
export type SpectrumBandId = Brand<string,
|
|
3
|
+
export type SpectrumBandId = Brand<string, "spectrum-band-id">;
|
|
4
4
|
export const SpectrumBandId = make<SpectrumBandId>();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Brand, make } from
|
|
1
|
+
import { type Brand, make } from "ts-brand";
|
|
2
2
|
|
|
3
|
-
export type SpectrumModeId = Brand<string,
|
|
3
|
+
export type SpectrumModeId = Brand<string, "spectrum-mode-id">;
|
|
4
4
|
export const SpectrumModeId = make<SpectrumModeId>();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Brand, make } from
|
|
1
|
+
import { type Brand, make } from "ts-brand";
|
|
2
2
|
|
|
3
|
-
export type SpectrumPrivilegeId = Brand<string,
|
|
3
|
+
export type SpectrumPrivilegeId = Brand<string, "spectrum-privilege-id">;
|
|
4
4
|
export const SpectrumPrivilegeId = make<SpectrumPrivilegeId>();
|
package/src/index.ts
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
1
|
+
export * from "./branded-types/frequency.js";
|
|
2
|
+
export * from "./branded-types/license-class-id.js";
|
|
3
|
+
export * from "./branded-types/radio-channel-id.js";
|
|
4
|
+
export * from "./branded-types/radio-model-id.js";
|
|
5
|
+
export * from "./branded-types/radio-module-id.js";
|
|
6
|
+
export * from "./branded-types/spectrum-band-id.js";
|
|
7
|
+
export * from "./branded-types/spectrum-mode-id.js";
|
|
8
|
+
export * from "./branded-types/spectrum-privilege-id.js";
|
|
9
|
+
export * from "./branded-types/wavelength.js";
|
|
10
10
|
|
|
11
|
-
export * from
|
|
11
|
+
export * from "./license/class.js";
|
|
12
12
|
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
29
|
-
export * from
|
|
30
|
-
export * from
|
|
31
|
-
export * from
|
|
32
|
-
export * from
|
|
33
|
-
export * from
|
|
34
|
-
export * from
|
|
35
|
-
export * from
|
|
36
|
-
export * from
|
|
13
|
+
export * from "./radio/channel.js";
|
|
14
|
+
export * from "./radio/codec.js";
|
|
15
|
+
export * from "./radio/codec-factory.js";
|
|
16
|
+
export * from "./radio/connection.js";
|
|
17
|
+
export * from "./radio/ctcss.js";
|
|
18
|
+
export * from "./radio/dcs.js";
|
|
19
|
+
export * from "./radio/driver.js";
|
|
20
|
+
export * from "./radio/driver-provider.js";
|
|
21
|
+
export * from "./radio/id.js";
|
|
22
|
+
export * from "./radio/memory-config.js";
|
|
23
|
+
export * from "./radio/memory-segment.js";
|
|
24
|
+
export * from "./radio/memory.js";
|
|
25
|
+
export * from "./radio/module.js";
|
|
26
|
+
export * from "./radio/program.js";
|
|
27
|
+
export * from "./radio/programmed-channel.js";
|
|
28
|
+
export * from "./radio/progress-indicator.js";
|
|
29
|
+
export * from "./radio/protocol.js";
|
|
30
|
+
export * from "./radio/radio.js";
|
|
31
|
+
export * from "./radio/schema.js";
|
|
32
|
+
export * from "./radio/serial-config.js";
|
|
33
|
+
export * from "./radio/shared-components.js";
|
|
34
|
+
export * from "./radio/settings.js";
|
|
35
|
+
export * from "./radio/tone.js";
|
|
36
|
+
export * from "./radio/validation.js";
|
|
37
37
|
|
|
38
|
-
export * from
|
|
39
|
-
export * from
|
|
40
|
-
export * from
|
|
41
|
-
export * from
|
|
38
|
+
export * from "./spectrum/band.js";
|
|
39
|
+
export * from "./spectrum/channel.js";
|
|
40
|
+
export * from "./spectrum/mode.js";
|
|
41
|
+
export * from "./spectrum/privilege.js";
|
package/src/license/class.ts
CHANGED
package/src/radio/channel.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Frequency } from
|
|
2
|
-
import type { RadioChannelId } from
|
|
3
|
-
import type { RadioTone } from
|
|
1
|
+
import type { Frequency } from "../branded-types/frequency.js";
|
|
2
|
+
import type { RadioChannelId } from "../branded-types/radio-channel-id.js";
|
|
3
|
+
import type { RadioTone } from "./tone.js";
|
|
4
4
|
|
|
5
5
|
export interface RadioChannel {
|
|
6
6
|
id?: RadioChannelId;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// oxlint-disable consistent-indexed-object-style
|
|
2
|
-
import type { ILogLayer } from
|
|
3
|
-
import type { RadioCodec } from
|
|
4
|
-
import type { RadioModelId } from
|
|
2
|
+
import type { ILogLayer } from "loglayer";
|
|
3
|
+
import type { RadioCodec } from "./codec.js";
|
|
4
|
+
import type { RadioModelId } from "../branded-types/radio-model-id.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Factory interface for creating radio codecs
|
package/src/radio/codec.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RadioMemory } from
|
|
2
|
-
import type { RadioProgram } from
|
|
1
|
+
import type { RadioMemory } from "./memory.js";
|
|
2
|
+
import type { RadioProgram } from "./program.js";
|
|
3
3
|
|
|
4
4
|
export interface RadioCodec {
|
|
5
5
|
decode(memory: RadioMemory): RadioProgram;
|
package/src/radio/connection.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RadioDriver } from
|
|
2
|
-
import type { RadioModelId } from
|
|
3
|
-
import type { RadioModuleId } from
|
|
1
|
+
import type { RadioDriver } from "./driver.js";
|
|
2
|
+
import type { RadioModelId } from "../branded-types/radio-model-id.js";
|
|
3
|
+
import type { RadioModuleId } from "../branded-types/radio-module-id.js";
|
|
4
4
|
|
|
5
5
|
export interface RadioDriverProvider {
|
|
6
6
|
getId(): RadioModuleId;
|
package/src/radio/driver.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RadioMemory } from
|
|
2
|
-
import type { RadioProgressIndicator } from
|
|
1
|
+
import type { RadioMemory } from "./memory.js";
|
|
2
|
+
import type { RadioProgressIndicator } from "./progress-indicator.js";
|
|
3
3
|
|
|
4
4
|
export interface RadioDriver {
|
|
5
5
|
readRadio(serialPortPath: string, progressIndicator: RadioProgressIndicator): Promise<RadioMemory>;
|
package/src/radio/id.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { RadioMemorySegment } from
|
|
1
|
+
import type { RadioMemorySegment } from "./memory-segment.js";
|
|
2
2
|
|
|
3
3
|
export interface RadioMemoryConfig {
|
|
4
4
|
chunkSize: number;
|
|
5
5
|
addressSize: number;
|
|
6
|
-
addressEndianness:
|
|
6
|
+
addressEndianness: "big" | "little";
|
|
7
7
|
segments: {
|
|
8
8
|
[segmentName: string]: RadioMemorySegment;
|
|
9
9
|
};
|
package/src/radio/memory.ts
CHANGED
package/src/radio/module.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Radio } from
|
|
2
|
-
import type { RadioModuleId } from
|
|
1
|
+
import type { Radio } from "./radio.js";
|
|
2
|
+
import type { RadioModuleId } from "../branded-types/radio-module-id.js";
|
|
3
3
|
|
|
4
4
|
export interface RadioModule {
|
|
5
5
|
getId(): RadioModuleId;
|
package/src/radio/program.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RadioProgrammedChannel } from
|
|
2
|
-
import type { RadioSettings } from
|
|
1
|
+
import type { RadioProgrammedChannel } from "./programmed-channel.js";
|
|
2
|
+
import type { RadioSettings } from "./settings.js";
|
|
3
3
|
|
|
4
4
|
export interface RadioProgram {
|
|
5
5
|
settings: RadioSettings;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RadioChannel } from
|
|
2
|
-
import type { RadioSettings } from
|
|
1
|
+
import type { RadioChannel } from "./channel.js";
|
|
2
|
+
import type { RadioSettings } from "./settings.js";
|
|
3
3
|
|
|
4
4
|
export interface RadioProgrammedChannel {
|
|
5
5
|
channelNumber: number;
|