@springfield/ham-radio-api 14.0.0 → 15.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 +16 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/radio/id.d.ts +0 -2
- package/dist/radio/id.d.ts.map +1 -1
- package/dist/radio/memory-config.d.ts +3 -1
- package/dist/radio/memory-config.d.ts.map +1 -1
- package/dist/radio/protocol.d.ts +74 -0
- package/dist/radio/protocol.d.ts.map +1 -0
- package/dist/radio/protocol.js +2 -0
- package/dist/radio/protocol.js.map +1 -0
- package/dist/radio/radio.d.ts +8 -7
- package/dist/radio/radio.d.ts.map +1 -1
- package/dist/radio/serial-config.d.ts +7 -0
- package/dist/radio/serial-config.d.ts.map +1 -0
- package/dist/radio/serial-config.js +2 -0
- package/dist/radio/serial-config.js.map +1 -0
- package/package.json +3 -3
- package/src/index.ts +3 -1
- package/src/radio/id.ts +0 -2
- package/src/radio/memory-config.ts +3 -1
- package/src/radio/protocol.ts +81 -0
- package/src/radio/radio.ts +8 -7
- package/src/radio/serial-config.ts +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [15.0.0](https://gitlab.com/springfield-ham-radio/app/ham-radio-api/compare/v14.0.0...v15.0.0) (2025-06-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### ⚠ BREAKING CHANGES
|
|
5
|
+
|
|
6
|
+
* enhance radio interfaces and add new protocol and serial configuration
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* enhance radio interfaces and add new protocol and serial configuration ([ffffac8](https://gitlab.com/springfield-ham-radio/app/ham-radio-api/commit/ffffac87ece50731fc603b2848e4959aa835c561))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* update import path for Radio type in module.ts ([96ac2d3](https://gitlab.com/springfield-ham-radio/app/ham-radio-api/commit/96ac2d38e41855640f01c3e184b7a2cd6de2100c))
|
|
16
|
+
|
|
1
17
|
## [14.0.0](https://gitlab.com/springfield-ham-radio/app/ham-radio-api/compare/v13.0.0...v14.0.0) (2025-06-14)
|
|
2
18
|
|
|
3
19
|
|
package/dist/index.d.ts
CHANGED
|
@@ -19,12 +19,14 @@ export * from './radio/id.js';
|
|
|
19
19
|
export * from './radio/memory-config.js';
|
|
20
20
|
export * from './radio/memory-segment.js';
|
|
21
21
|
export * from './radio/memory.js';
|
|
22
|
-
export * from './radio/radio.js';
|
|
23
22
|
export * from './radio/module.js';
|
|
24
23
|
export * from './radio/program.js';
|
|
25
24
|
export * from './radio/programmed-channel.js';
|
|
26
25
|
export * from './radio/progress-indicator.js';
|
|
26
|
+
export * from './radio/protocol.js';
|
|
27
|
+
export * from './radio/radio.js';
|
|
27
28
|
export * from './radio/schema.js';
|
|
29
|
+
export * from './radio/serial-config.js';
|
|
28
30
|
export * from './radio/settings.js';
|
|
29
31
|
export * from './radio/tone.js';
|
|
30
32
|
export * from './spectrum/band.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0CAA0C,CAAC;AACzD,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,gBAAg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@@ export * from './radio/id.js';
|
|
|
19
19
|
export * from './radio/memory-config.js';
|
|
20
20
|
export * from './radio/memory-segment.js';
|
|
21
21
|
export * from './radio/memory.js';
|
|
22
|
-
export * from './radio/radio.js';
|
|
23
22
|
export * from './radio/module.js';
|
|
24
23
|
export * from './radio/program.js';
|
|
25
24
|
export * from './radio/programmed-channel.js';
|
|
26
25
|
export * from './radio/progress-indicator.js';
|
|
26
|
+
export * from './radio/protocol.js';
|
|
27
|
+
export * from './radio/radio.js';
|
|
27
28
|
export * from './radio/schema.js';
|
|
29
|
+
export * from './radio/serial-config.js';
|
|
28
30
|
export * from './radio/settings.js';
|
|
29
31
|
export * from './radio/tone.js';
|
|
30
32
|
export * from './spectrum/band.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,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0CAA0C,CAAC;AACzD,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,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,
|
|
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,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0CAA0C,CAAC;AACzD,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,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,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,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,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/radio/id.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { RadioModelId } from '../branded-types/radio-model-id.js';
|
|
2
|
-
import type { RadioModuleId } from '../branded-types/radio-module-id.js';
|
|
3
2
|
/**
|
|
4
3
|
* A unique identifier for a radio.
|
|
5
4
|
*
|
|
@@ -7,7 +6,6 @@ import type { RadioModuleId } from '../branded-types/radio-module-id.js';
|
|
|
7
6
|
* It must be serializable to JSON.
|
|
8
7
|
*/
|
|
9
8
|
export interface RadioId {
|
|
10
|
-
module: RadioModuleId;
|
|
11
9
|
model: RadioModelId;
|
|
12
10
|
name: string;
|
|
13
11
|
manufacturer: string;
|
package/dist/radio/id.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../src/radio/id.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../src/radio/id.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,YAAY,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { RadioMemorySegment } from './memory-segment.js';
|
|
2
2
|
export interface RadioMemoryConfig {
|
|
3
3
|
chunkSize: number;
|
|
4
|
-
segments:
|
|
4
|
+
segments: {
|
|
5
|
+
[segmentName: string]: RadioMemorySegment;
|
|
6
|
+
};
|
|
5
7
|
}
|
|
6
8
|
//# sourceMappingURL=memory-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-config.d.ts","sourceRoot":"","sources":["../../src/radio/memory-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"memory-config.d.ts","sourceRoot":"","sources":["../../src/radio/memory-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE;QACR,CAAC,WAAW,EAAE,MAAM,GAAG,kBAAkB,CAAC;KAC3C,CAAC;CACH"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export interface RadioExactReceivePattern {
|
|
2
|
+
type: 'exact';
|
|
3
|
+
value: number;
|
|
4
|
+
length: number;
|
|
5
|
+
}
|
|
6
|
+
export interface RadioVariableReceivePattern {
|
|
7
|
+
type: 'variable';
|
|
8
|
+
length: number;
|
|
9
|
+
}
|
|
10
|
+
export interface RadioPatternReceivePattern {
|
|
11
|
+
type: 'pattern';
|
|
12
|
+
pattern: (string | number | {
|
|
13
|
+
field: string;
|
|
14
|
+
size: number;
|
|
15
|
+
})[];
|
|
16
|
+
dataLength?: number | string;
|
|
17
|
+
}
|
|
18
|
+
export interface RadioAnyReceivePattern {
|
|
19
|
+
type: 'any';
|
|
20
|
+
length: number;
|
|
21
|
+
}
|
|
22
|
+
export type RadioReceivePattern = RadioExactReceivePattern | RadioVariableReceivePattern | RadioPatternReceivePattern | RadioAnyReceivePattern;
|
|
23
|
+
export interface RadioSendReceiveStep {
|
|
24
|
+
sendReceive: {
|
|
25
|
+
send: (string | number)[];
|
|
26
|
+
receive: RadioReceivePattern;
|
|
27
|
+
timeout?: number;
|
|
28
|
+
description?: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export interface RadioSendStep {
|
|
32
|
+
send: {
|
|
33
|
+
data: (string | number)[];
|
|
34
|
+
description?: string;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export interface RadioReceiveStep {
|
|
38
|
+
receive: {
|
|
39
|
+
type: string;
|
|
40
|
+
length: number;
|
|
41
|
+
description?: string;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export interface RadioReadSegmentStep {
|
|
45
|
+
readSegment: {
|
|
46
|
+
segments: string[];
|
|
47
|
+
startChunk: {
|
|
48
|
+
send: (string | number)[];
|
|
49
|
+
receive: RadioReceivePattern;
|
|
50
|
+
};
|
|
51
|
+
endChunk: {
|
|
52
|
+
send: (string | number)[];
|
|
53
|
+
receive: RadioReceivePattern;
|
|
54
|
+
};
|
|
55
|
+
description?: string;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export interface RadioWriteSegmentStep {
|
|
59
|
+
writeSegment: {
|
|
60
|
+
segments: string[];
|
|
61
|
+
send: (string | number)[];
|
|
62
|
+
data: string;
|
|
63
|
+
receive: RadioReceivePattern;
|
|
64
|
+
description?: string;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export interface RadioSetVariableStep {
|
|
68
|
+
setVariable: {
|
|
69
|
+
name: string;
|
|
70
|
+
value: string | number;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export type RadioProtocolStep = RadioSendReceiveStep | RadioSendStep | RadioReceiveStep | RadioReadSegmentStep | RadioWriteSegmentStep | RadioSetVariableStep;
|
|
74
|
+
//# sourceMappingURL=protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/radio/protocol.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;IAC/D,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE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,OAAO,EAAE,mBAAmB,CAAC;QAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;KACxB,CAAC;CACH;AAED,MAAM,MAAM,iBAAiB,GAAG,oBAAoB,GAAG,aAAa,GAAG,gBAAgB,GAAG,oBAAoB,GAAG,qBAAqB,GAAG,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/radio/protocol.ts"],"names":[],"mappings":""}
|
package/dist/radio/radio.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { RadioId } from './id.js';
|
|
2
|
-
import type { RadioMemory } from './memory.js';
|
|
3
2
|
import type { RadioMemoryConfig } from './memory-config.js';
|
|
4
|
-
import type {
|
|
3
|
+
import type { RadioProtocolStep } from './protocol.js';
|
|
5
4
|
import type { RadioSchema } from './schema.js';
|
|
5
|
+
import type { RadioSerialConfig } from './serial-config.js';
|
|
6
6
|
export interface Radio {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
id: RadioId;
|
|
8
|
+
settingsSchema: RadioSchema;
|
|
9
|
+
memoryConfig: RadioMemoryConfig;
|
|
10
|
+
serialConfig: RadioSerialConfig;
|
|
11
|
+
readMemory: RadioProtocolStep[];
|
|
12
|
+
writeMemory: RadioProtocolStep[];
|
|
12
13
|
}
|
|
13
14
|
//# sourceMappingURL=radio.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../src/radio/radio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../src/radio/radio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,OAAO,CAAC;IACZ,cAAc,EAAE,WAAW,CAAC;IAC5B,YAAY,EAAE,iBAAiB,CAAC;IAChC,YAAY,EAAE,iBAAiB,CAAC;IAChC,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,WAAW,EAAE,iBAAiB,EAAE,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serial-config.d.ts","sourceRoot":"","sources":["../../src/radio/serial-config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serial-config.js","sourceRoot":"","sources":["../../src/radio/serial-config.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@springfield/ham-radio-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0",
|
|
4
4
|
"author": "Bryan Hunt",
|
|
5
5
|
"packageManager": "yarn@4.9.2",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"@commitlint/config-conventional": "19.8.1",
|
|
54
54
|
"@semantic-release/changelog": "6.0.3",
|
|
55
55
|
"@semantic-release/git": "10.0.1",
|
|
56
|
-
"@semantic-release/gitlab": "13.2.
|
|
56
|
+
"@semantic-release/gitlab": "13.2.6",
|
|
57
57
|
"husky": "9.1.7",
|
|
58
|
-
"oxlint": "^1.
|
|
58
|
+
"oxlint": "^1.2.0",
|
|
59
59
|
"semantic-release": "23.1.1",
|
|
60
60
|
"semantic-release-yarn": "3.0.2",
|
|
61
61
|
"typescript": "5.8.3"
|
package/src/index.ts
CHANGED
|
@@ -21,12 +21,14 @@ export * from './radio/id.js';
|
|
|
21
21
|
export * from './radio/memory-config.js';
|
|
22
22
|
export * from './radio/memory-segment.js';
|
|
23
23
|
export * from './radio/memory.js';
|
|
24
|
-
export * from './radio/radio.js';
|
|
25
24
|
export * from './radio/module.js';
|
|
26
25
|
export * from './radio/program.js';
|
|
27
26
|
export * from './radio/programmed-channel.js';
|
|
28
27
|
export * from './radio/progress-indicator.js';
|
|
28
|
+
export * from './radio/protocol.js';
|
|
29
|
+
export * from './radio/radio.js';
|
|
29
30
|
export * from './radio/schema.js';
|
|
31
|
+
export * from './radio/serial-config.js';
|
|
30
32
|
export * from './radio/settings.js';
|
|
31
33
|
export * from './radio/tone.js';
|
|
32
34
|
|
package/src/radio/id.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { RadioModelId } from '../branded-types/radio-model-id.js';
|
|
2
|
-
import type { RadioModuleId } from '../branded-types/radio-module-id.js';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* A unique identifier for a radio.
|
|
@@ -8,7 +7,6 @@ import type { RadioModuleId } from '../branded-types/radio-module-id.js';
|
|
|
8
7
|
* It must be serializable to JSON.
|
|
9
8
|
*/
|
|
10
9
|
export interface RadioId {
|
|
11
|
-
module: RadioModuleId;
|
|
12
10
|
model: RadioModelId;
|
|
13
11
|
name: string;
|
|
14
12
|
manufacturer: string;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export interface RadioExactReceivePattern {
|
|
2
|
+
type: 'exact';
|
|
3
|
+
value: number;
|
|
4
|
+
length: number;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface RadioVariableReceivePattern {
|
|
8
|
+
type: 'variable';
|
|
9
|
+
length: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface RadioPatternReceivePattern {
|
|
13
|
+
type: 'pattern';
|
|
14
|
+
pattern: (string | number | { field: string; size: number })[];
|
|
15
|
+
dataLength?: number | string; // Optional - actual length determined by segment configuration
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface RadioAnyReceivePattern {
|
|
19
|
+
type: 'any';
|
|
20
|
+
length: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type RadioReceivePattern = RadioExactReceivePattern | RadioVariableReceivePattern | RadioPatternReceivePattern | RadioAnyReceivePattern;
|
|
24
|
+
|
|
25
|
+
export interface RadioSendReceiveStep {
|
|
26
|
+
sendReceive: {
|
|
27
|
+
send: (string | number)[];
|
|
28
|
+
receive: RadioReceivePattern;
|
|
29
|
+
timeout?: number;
|
|
30
|
+
description?: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface RadioSendStep {
|
|
35
|
+
send: {
|
|
36
|
+
data: (string | number)[];
|
|
37
|
+
description?: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface RadioReceiveStep {
|
|
42
|
+
receive: {
|
|
43
|
+
type: string;
|
|
44
|
+
length: number;
|
|
45
|
+
description?: string;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface RadioReadSegmentStep {
|
|
50
|
+
readSegment: {
|
|
51
|
+
segments: string[];
|
|
52
|
+
startChunk: {
|
|
53
|
+
send: (string | number)[];
|
|
54
|
+
receive: RadioReceivePattern;
|
|
55
|
+
};
|
|
56
|
+
endChunk: {
|
|
57
|
+
send: (string | number)[];
|
|
58
|
+
receive: RadioReceivePattern;
|
|
59
|
+
};
|
|
60
|
+
description?: string;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface RadioWriteSegmentStep {
|
|
65
|
+
writeSegment: {
|
|
66
|
+
segments: string[];
|
|
67
|
+
send: (string | number)[];
|
|
68
|
+
data: string;
|
|
69
|
+
receive: RadioReceivePattern;
|
|
70
|
+
description?: string;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface RadioSetVariableStep {
|
|
75
|
+
setVariable: {
|
|
76
|
+
name: string;
|
|
77
|
+
value: string | number;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type RadioProtocolStep = RadioSendReceiveStep | RadioSendStep | RadioReceiveStep | RadioReadSegmentStep | RadioWriteSegmentStep | RadioSetVariableStep;
|
package/src/radio/radio.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { RadioId } from './id.js';
|
|
2
|
-
import type { RadioMemory } from './memory.js';
|
|
3
2
|
import type { RadioMemoryConfig } from './memory-config.js';
|
|
4
|
-
import type {
|
|
3
|
+
import type { RadioProtocolStep } from './protocol.js';
|
|
5
4
|
import type { RadioSchema } from './schema.js';
|
|
5
|
+
import type { RadioSerialConfig } from './serial-config.js';
|
|
6
6
|
|
|
7
7
|
export interface Radio {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
id: RadioId;
|
|
9
|
+
settingsSchema: RadioSchema;
|
|
10
|
+
memoryConfig: RadioMemoryConfig;
|
|
11
|
+
serialConfig: RadioSerialConfig;
|
|
12
|
+
readMemory: RadioProtocolStep[];
|
|
13
|
+
writeMemory: RadioProtocolStep[];
|
|
13
14
|
}
|