icom-wlan-node 0.6.1 → 0.6.3
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 +51 -0
- package/dist/rig/IcomCivSpec.d.ts +84 -0
- package/dist/rig/IcomCivSpec.js +84 -0
- package/dist/rig/IcomControl.d.ts +158 -1
- package/dist/rig/IcomControl.js +757 -0
- package/dist/rig/IcomProfiles.d.ts +21 -2
- package/dist/rig/IcomProfiles.js +228 -0
- package/dist/rig/IcomRigCommands.d.ts +22 -0
- package/dist/rig/IcomRigCommands.js +67 -0
- package/dist/types.d.ts +19 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -122,6 +122,19 @@ await rig.setTunerEnabled(true);
|
|
|
122
122
|
const swr = await rig.readSWR();
|
|
123
123
|
const power = await rig.readPowerLevel();
|
|
124
124
|
console.log({ tuner, swr, watts: power?.watts, powerPercent: power?.percent });
|
|
125
|
+
|
|
126
|
+
// Hamlib A/B-level controls are profile-gated.
|
|
127
|
+
await rig.setFunction('NR', true);
|
|
128
|
+
await rig.setNoiseReductionEnabled(true);
|
|
129
|
+
await rig.setLevel('RF', 0.5);
|
|
130
|
+
await rig.setRitOffset(-120);
|
|
131
|
+
await rig.setSplitEnabled(true);
|
|
132
|
+
await rig.setSplitFrequency(7074000);
|
|
133
|
+
await rig.setTuningStep(100);
|
|
134
|
+
await rig.setToneFrequency(88.5);
|
|
135
|
+
await rig.setMode('CW');
|
|
136
|
+
await rig.sendMorse('CQ CQ DE N0CALL');
|
|
137
|
+
await rig.setSpectrumSpeed('slow');
|
|
125
138
|
```
|
|
126
139
|
|
|
127
140
|
Profile-specific behavior includes IC-905 6-byte frequency BCD above 5.85 GHz, model-specific scope fixed-edge ranges, and calibrated SWR/ALC/RF power/COMP/voltage/current meters. Private connector commands such as WLAN level or connector data mode are only enabled when the active profile declares the vendor extension; unsupported writes throw `UnsupportedCommandError`.
|
|
@@ -222,6 +235,11 @@ await rig.disableScope();
|
|
|
222
235
|
- **Rig Control**: `setFrequency()`, `setMode()`, `setConnectorDataMode()`, `setConnectorWLanLevel()`
|
|
223
236
|
- **Rig Query**: `readOperatingFrequency()`, `readOperatingMode()`, `readTransmitFrequency()`, `readPtt()`, `readTransceiverState()`, `readBandEdges()`
|
|
224
237
|
- **Antenna Tuner**: `readTunerStatus()`, `setTunerEnabled()`, `startManualTune()`
|
|
238
|
+
- **Functions**: `getFunction()`, `setFunction()`, plus wrappers for NB/NR/COMP/VOX/MON/ANF/MN/LOCK/BK-IN
|
|
239
|
+
- **Levels**: `getLevel()`, `setLevel()`, plus wrappers for RF gain, IF shift, PBT, CW pitch, key speed, monitor gain, VOX gain
|
|
240
|
+
- **CW Text**: `sendMorse()`, `sendCwText()`, `stopMorse()` — Hamlib-aligned CI-V `0x17` text handoff to the rig keyer
|
|
241
|
+
- **RIT/XIT + Split/VFO**: `getRitOffset()`, `setRitOffset()`, `getSplitEnabled()`, `setSplitFrequency()`, `getVfo()`, `setVfo()`, `vfoOperation()`
|
|
242
|
+
- **Tone/Tuning**: `getTuningStep()`, `setTuningStep()`, `getToneFrequency()`, `setToneFrequency()`, `getRepeaterShift()`, `setRepeaterOffset()`
|
|
225
243
|
- **Meters (RX)**: `readSquelchStatus()`, `readAudioSquelch()`, `readOvfStatus()`, `getLevelMeter()`
|
|
226
244
|
- **Meters (TX)**: `readSWR()`, `readALC()`, `readPowerLevel()`, `readCompLevel()`
|
|
227
245
|
- **Power Supply**: `readVoltage()`, `readCurrent()`
|
|
@@ -362,6 +380,36 @@ The library exposes common CI‑V operations as friendly methods. Addresses are
|
|
|
362
380
|
- `readTransceiverState(options?: QueryOptions) => Promise<'TX' | 'RX' | 'UNKNOWN' | null>`
|
|
363
381
|
- `readBandEdges(options?: QueryOptions) => Promise<Buffer|null>`
|
|
364
382
|
|
|
383
|
+
#### Hamlib A/B Functions, Levels, RIT/XIT, Split, and Tone
|
|
384
|
+
|
|
385
|
+
- `getFunction(name: IcomFunctionName, options?: QueryOptions) => Promise<boolean|null>` / `setFunction(name, enabled)` — Generic Hamlib function layer for supported profile functions such as `NB`, `NR`, `COMP`, `VOX`, `MON`, `ANF`, `MN`, `LOCK`, `RIT`, `XIT`, `TUNER`, `SCOPE`, `SPECTRUM`, `SPECTRUM_HOLD`, and model-specific extensions.
|
|
386
|
+
- Common function wrappers: `getNoiseBlankerEnabled()/setNoiseBlankerEnabled()`, `getNoiseReductionEnabled()/setNoiseReductionEnabled()`, `getCompressorEnabled()/setCompressorEnabled()`, `getVoxEnabled()/setVoxEnabled()`, `getMonitorEnabled()/setMonitorEnabled()`, `getAutoNotchEnabled()/setAutoNotchEnabled()`, `getManualNotchEnabled()/setManualNotchEnabled()`, `getDialLockEnabled()/setDialLockEnabled()`.
|
|
387
|
+
- `getBreakInMode() => Promise<'off'|'semi'|'full'|null>` / `setBreakInMode(mode)` — Hamlib-aligned BK-IN control using `0x16 0x47`, where raw `1` is semi and raw `2` is full.
|
|
388
|
+
- `getLevel(name: IcomLevelName, options?: QueryOptions) => Promise<number|null>` / `setLevel(name, value)` — Generic level layer for `AF`, `RF`, `SQL`, `IF`, `PBT_IN`, `PBT_OUT`, `CWPITCH`, `KEYSPD`, `NOTCHF_RAW`, `COMP`, `MONITOR_GAIN`, `VOXGAIN`, `ANTIVOX`, and profile ext levels.
|
|
389
|
+
- Common level wrappers: `getRFGain()/setRFGain()`, `getIFShift()/setIFShift()`, `getPbtIn()/setPbtIn()`, `getPbtOut()/setPbtOut()`, `getCwPitch()/setCwPitch()`, `getKeySpeed()/setKeySpeed()`, `getNotchRaw()/setNotchRaw()`, `getCompressionLevel()/setCompressionLevel()`, `getMonitorGain()/setMonitorGain()`, `getVoxGain()/setVoxGain()`, `getAntiVox()/setAntiVox()`.
|
|
390
|
+
- `sendMorse(text, options?)` / `sendCwText(text, options?)` — Send printable ASCII text through the rig's internal CW keyer using CI-V `0x17`; text is uppercased and split into 30-byte chunks by default.
|
|
391
|
+
- `stopMorse(options?)` — Stop the rig CW keyer by sending CI-V `0x17 0xff` and waiting for ACK.
|
|
392
|
+
- `getRitOffset()/setRitOffset()` and `getXitOffset()/setXitOffset()` — RIT/XIT delta register using Hamlib `0x21 0x00`; `getRitEnabled()/setRitEnabled()` and `getXitEnabled()/setXitEnabled()` use `0x21 0x01/0x02`.
|
|
393
|
+
- `getSplitEnabled()/setSplitEnabled()`, `getSplitFrequency()/setSplitFrequency()`, `getSplitMode()/setSplitMode()` — Modern profiles use targetable TX VFO `0x25/0x26` with VFO number `1`.
|
|
394
|
+
- `getVfo()/setVfo()` and `vfoOperation('copy'|'exchange'|'from-vfo'|'to-vfo'|'memory-clear'|'tune')` — Safe Hamlib VFO operation subset.
|
|
395
|
+
- `getTuningStep()/setTuningStep(hz)` — Profile-specific Hamlib tuning step tables.
|
|
396
|
+
- `getToneFrequency()/setToneFrequency(hz)` and `getToneSquelchFrequency()/setToneSquelchFrequency(hz)` — CTCSS values use public Hz, encoded as tenth-Hz BCD BE.
|
|
397
|
+
- `getRepeaterShift()/setRepeaterShift('none'|'minus'|'plus')` and `getRepeaterOffset()/setRepeaterOffset(hz)` — Repeater offset uses public Hz, encoded as 100 Hz units.
|
|
398
|
+
|
|
399
|
+
#### CW Text Sending
|
|
400
|
+
|
|
401
|
+
```ts
|
|
402
|
+
await rig.setMode('CW');
|
|
403
|
+
rig.setBreakInMode('semi');
|
|
404
|
+
rig.setKeySpeed(20);
|
|
405
|
+
|
|
406
|
+
// Sends printable ASCII text to the radio's built-in CW keyer via CI-V 0x17.
|
|
407
|
+
await rig.sendMorse('CQ CQ DE N0CALL', { timeout: 3000 });
|
|
408
|
+
await rig.stopMorse();
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
`sendMorse()` does not synthesize local Morse audio and does not automatically change mode, PTT, power, or break-in settings. By default it first verifies that the radio reports `CW` or `CW_R`; pass `{ checkMode: false }` only when your application already controls that state. CI-V ACK/NAK replies do not include request IDs, so avoid mixing raw `sendCiv()` write commands that also expect ACKs while a CW text send is in progress.
|
|
412
|
+
|
|
365
413
|
#### Scope / Spectrum
|
|
366
414
|
|
|
367
415
|
- `scope: IcomScopeService` — Standalone scope service object that can be reused with other CI‑V transport paths in the future
|
|
@@ -379,6 +427,7 @@ The library exposes common CI‑V operations as friendly methods. Addresses are
|
|
|
379
427
|
- `getSpectrumMode()/setSpectrumMode()` / `getSpectrumSpan()/setSpectrumSpan()` / `getSpectrumEdgeSlot()/setSpectrumEdgeSlot()` / `getSpectrumFixedEdges()/setSpectrumFixedEdges()` — Hamlib-like convenience aliases over the scope-specific methods
|
|
380
428
|
- `getSpectrumDisplayState(options?: QueryOptions & { receiver?: 0 | 1 }) => Promise<IcomSpectrumDisplayState>` — Read a Hamlib-like normalized display state
|
|
381
429
|
- `configureSpectrumDisplay(config?: IcomSpectrumDisplayConfig) => Promise<IcomSpectrumDisplayState>` — Apply a normalized display config covering center/fixed modes
|
|
430
|
+
- `getSpectrumDataOutput()/setSpectrumDataOutput()`, `getSpectrumHold()/setSpectrumHold()`, `getSpectrumSpeed()/setSpectrumSpeed()`, `getSpectrumRef()/setSpectrumRef()`, `getSpectrumAverage()/setSpectrumAverage()`, `getSpectrumVbw()/setSpectrumVbw()`, `getSpectrumRbw()/setSpectrumRbw()`, `getSpectrumDuringTx()/setSpectrumDuringTx()`, `getSpectrumCenterType()/setSpectrumCenterType()` — Advanced Hamlib spectrum controls where the active profile supports them
|
|
382
431
|
- `waitForScopeFrame(options?: QueryOptions) => Promise<IcomScopeFrame | null>` — Wait for the next complete scope frame
|
|
383
432
|
|
|
384
433
|
`IcomScopeFrame` shape:
|
|
@@ -433,6 +482,8 @@ Current implementation notes:
|
|
|
433
482
|
|
|
434
483
|
**Audio Configuration**:
|
|
435
484
|
- `getUsbAfLevel(options?: QueryOptions) => Promise<{ raw: number; percent: number } | null>` / `setUsbAfLevel(level: number)` — Hamlib-aligned USB AF level when the active profile declares it
|
|
485
|
+
- `getAudioIfMode(options?: QueryOptions) => Promise<'default'|'wlan'|'lan'|'acc'|null>` / `setAudioIfMode(source)` — Hamlib AF/IF audio routing for profile-supported WLAN/LAN/ACC parameters
|
|
486
|
+
- `getParameter(name, options?)` / `setParameter(name, value)` — Generic profile ext-param API for `BEEP`, `BACKLIGHT`, `SCREENSAVER`, `TIME`, `KEYERTYPE`, and `AFIF*`
|
|
436
487
|
- `getConnectorWLanLevel(options?: QueryOptions) => Promise<{ raw: number; percent: number } | null>` / `setConnectorWLanLevel(level: number)` — Private `icom-wlan-node` WLAN level extension; returns `null` or throws `UnsupportedCommandError` when the active profile does not declare it
|
|
437
488
|
|
|
438
489
|
#### Connector Settings
|
|
@@ -10,29 +10,102 @@ export declare const CIV: {
|
|
|
10
10
|
readonly C_RD_MODE: 4;
|
|
11
11
|
readonly C_SET_FREQ: 5;
|
|
12
12
|
readonly C_SET_MODE: 6;
|
|
13
|
+
readonly C_SET_VFO: 7;
|
|
14
|
+
readonly C_WR_MEM: 9;
|
|
15
|
+
readonly C_MEM2VFO: 10;
|
|
16
|
+
readonly C_CLR_MEM: 11;
|
|
17
|
+
readonly C_RD_OFFS: 12;
|
|
18
|
+
readonly C_SET_OFFS: 13;
|
|
19
|
+
readonly C_CTL_SCAN: 14;
|
|
20
|
+
readonly C_CTL_SPLT: 15;
|
|
21
|
+
readonly C_SET_TS: 16;
|
|
22
|
+
readonly C_CTL_ATT: 17;
|
|
23
|
+
readonly C_CTL_ANT: 18;
|
|
24
|
+
readonly C_CTL_ANN: 19;
|
|
13
25
|
readonly C_CTL_LVL: 20;
|
|
14
26
|
readonly C_RD_SQSM: 21;
|
|
15
27
|
readonly C_CTL_FUNC: 22;
|
|
28
|
+
readonly C_SND_CW: 23;
|
|
29
|
+
readonly C_SET_TONE: 27;
|
|
16
30
|
readonly C_CTL_MEM: 26;
|
|
17
31
|
readonly C_CTL_PTT: 28;
|
|
32
|
+
readonly C_CTL_RIT: 33;
|
|
18
33
|
readonly C_SEND_SEL_FREQ: 37;
|
|
19
34
|
readonly C_SEND_SEL_MODE: 38;
|
|
20
35
|
readonly C_CTL_SCP: 39;
|
|
36
|
+
readonly S_VFOA: 0;
|
|
37
|
+
readonly S_VFOB: 1;
|
|
38
|
+
readonly S_BTOA: 160;
|
|
39
|
+
readonly S_XCHNG: 176;
|
|
40
|
+
readonly S_SUBTOMAIN: 177;
|
|
41
|
+
readonly S_DUAL_OFF: 192;
|
|
42
|
+
readonly S_DUAL_ON: 193;
|
|
43
|
+
readonly S_DUAL: 194;
|
|
44
|
+
readonly S_MAIN: 208;
|
|
45
|
+
readonly S_SUB: 209;
|
|
46
|
+
readonly S_BAND_SEL: 210;
|
|
47
|
+
readonly S_SPLT_OFF: 0;
|
|
48
|
+
readonly S_SPLT_ON: 1;
|
|
49
|
+
readonly S_DUP_OFF: 16;
|
|
50
|
+
readonly S_DUP_M: 17;
|
|
51
|
+
readonly S_DUP_P: 18;
|
|
21
52
|
readonly S_PTT: 0;
|
|
22
53
|
readonly S_ANT_TUN: 1;
|
|
23
54
|
readonly S_RD_TX_FREQ: 3;
|
|
55
|
+
readonly S_RIT_FREQ: 0;
|
|
56
|
+
readonly S_RIT: 1;
|
|
57
|
+
readonly S_XIT: 2;
|
|
24
58
|
readonly S_MEM_PARM: 5;
|
|
25
59
|
readonly S_MEM_DATA_MODE: 6;
|
|
60
|
+
readonly S_MEM_DUALMODE: 89;
|
|
61
|
+
readonly S_MEM_SATMODE: 90;
|
|
26
62
|
readonly S_LVL_AF: 1;
|
|
27
63
|
readonly S_LVL_RF: 2;
|
|
28
64
|
readonly S_LVL_SQL: 3;
|
|
65
|
+
readonly S_LVL_IF: 4;
|
|
66
|
+
readonly S_LVL_APF: 5;
|
|
29
67
|
readonly S_LVL_NR: 6;
|
|
68
|
+
readonly S_LVL_PBTIN: 7;
|
|
69
|
+
readonly S_LVL_PBTOUT: 8;
|
|
70
|
+
readonly S_LVL_CWPITCH: 9;
|
|
30
71
|
readonly S_LVL_RFPOWER: 10;
|
|
31
72
|
readonly S_LVL_MICGAIN: 11;
|
|
73
|
+
readonly S_LVL_KEYSPD: 12;
|
|
74
|
+
readonly S_LVL_NOTCHF: 13;
|
|
32
75
|
readonly S_LVL_COMP: 14;
|
|
33
76
|
readonly S_LVL_BKINDL: 15;
|
|
77
|
+
readonly S_LVL_BALANCE: 16;
|
|
78
|
+
readonly S_LVL_AGC: 17;
|
|
34
79
|
readonly S_LVL_NB: 18;
|
|
35
80
|
readonly S_LVL_DIGI: 19;
|
|
81
|
+
readonly S_LVL_DRIVE: 20;
|
|
82
|
+
readonly S_LVL_MON: 21;
|
|
83
|
+
readonly S_LVL_VOXGAIN: 22;
|
|
84
|
+
readonly S_LVL_ANTIVOX: 23;
|
|
85
|
+
readonly S_FUNC_PAMP: 2;
|
|
86
|
+
readonly S_FUNC_AGC: 18;
|
|
87
|
+
readonly S_FUNC_NB: 34;
|
|
88
|
+
readonly S_FUNC_APF: 50;
|
|
89
|
+
readonly S_FUNC_NR: 64;
|
|
90
|
+
readonly S_FUNC_ANF: 65;
|
|
91
|
+
readonly S_FUNC_TONE: 66;
|
|
92
|
+
readonly S_FUNC_TSQL: 67;
|
|
93
|
+
readonly S_FUNC_COMP: 68;
|
|
94
|
+
readonly S_FUNC_MON: 69;
|
|
95
|
+
readonly S_FUNC_VOX: 70;
|
|
96
|
+
readonly S_FUNC_BKIN: 71;
|
|
97
|
+
readonly S_FUNC_MN: 72;
|
|
98
|
+
readonly S_FUNC_RF: 73;
|
|
99
|
+
readonly S_FUNC_AFC: 74;
|
|
100
|
+
readonly S_FUNC_VSC: 76;
|
|
101
|
+
readonly S_FUNC_DIGISEL: 78;
|
|
102
|
+
readonly S_FUNC_DIAL_LK: 80;
|
|
103
|
+
readonly S_FUNC_SATM: 90;
|
|
104
|
+
readonly S_FUNC_IPP: 101;
|
|
105
|
+
readonly S_FUNC_TX_INHIBIT: 102;
|
|
106
|
+
readonly S_FUNC_DPP: 103;
|
|
107
|
+
readonly S_TONE_RPTR: 0;
|
|
108
|
+
readonly S_TONE_SQL: 1;
|
|
36
109
|
readonly S_SQL: 1;
|
|
37
110
|
readonly S_SML: 2;
|
|
38
111
|
readonly S_CSQL: 5;
|
|
@@ -46,9 +119,20 @@ export declare const CIV: {
|
|
|
46
119
|
readonly S_SCP_DAT: 0;
|
|
47
120
|
readonly S_SCP_STS: 16;
|
|
48
121
|
readonly S_SCP_DOP: 17;
|
|
122
|
+
readonly S_SCP_MSS: 18;
|
|
123
|
+
readonly S_SCP_SDS: 19;
|
|
49
124
|
readonly S_SCP_MOD: 20;
|
|
50
125
|
readonly S_SCP_SPN: 21;
|
|
51
126
|
readonly S_SCP_EDG: 22;
|
|
127
|
+
readonly S_SCP_HLD: 23;
|
|
128
|
+
readonly S_SCP_ATT: 24;
|
|
129
|
+
readonly S_SCP_REF: 25;
|
|
130
|
+
readonly S_SCP_SWP: 26;
|
|
131
|
+
readonly S_SCP_STX: 27;
|
|
132
|
+
readonly S_SCP_CFQ: 28;
|
|
133
|
+
readonly S_SCP_VBW: 29;
|
|
52
134
|
readonly S_SCP_FEF: 30;
|
|
135
|
+
readonly S_SCP_RBW: 31;
|
|
136
|
+
readonly S_SCP_MKP: 32;
|
|
53
137
|
};
|
|
54
138
|
export declare const ICOM_MODE_FILTER_DEFAULT: 1;
|
package/dist/rig/IcomCivSpec.js
CHANGED
|
@@ -13,29 +13,102 @@ exports.CIV = {
|
|
|
13
13
|
C_RD_MODE: 0x04,
|
|
14
14
|
C_SET_FREQ: 0x05,
|
|
15
15
|
C_SET_MODE: 0x06,
|
|
16
|
+
C_SET_VFO: 0x07,
|
|
17
|
+
C_WR_MEM: 0x09,
|
|
18
|
+
C_MEM2VFO: 0x0a,
|
|
19
|
+
C_CLR_MEM: 0x0b,
|
|
20
|
+
C_RD_OFFS: 0x0c,
|
|
21
|
+
C_SET_OFFS: 0x0d,
|
|
22
|
+
C_CTL_SCAN: 0x0e,
|
|
23
|
+
C_CTL_SPLT: 0x0f,
|
|
24
|
+
C_SET_TS: 0x10,
|
|
25
|
+
C_CTL_ATT: 0x11,
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
|
|
103
|
+
S_FUNC_VSC: 0x4c,
|
|
104
|
+
S_FUNC_DIGISEL: 0x4e,
|
|
105
|
+
S_FUNC_DIAL_LK: 0x50,
|
|
106
|
+
S_FUNC_SATM: 0x5a,
|
|
107
|
+
S_FUNC_IPP: 0x65,
|
|
108
|
+
S_FUNC_TX_INHIBIT: 0x66,
|
|
109
|
+
S_FUNC_DPP: 0x67,
|
|
110
|
+
S_TONE_RPTR: 0x00,
|
|
111
|
+
S_TONE_SQL: 0x01,
|
|
39
112
|
S_SQL: 0x01,
|
|
40
113
|
S_SML: 0x02,
|
|
41
114
|
S_CSQL: 0x05,
|
|
@@ -49,9 +122,20 @@ exports.CIV = {
|
|
|
49
122
|
S_SCP_DAT: 0x00,
|
|
50
123
|
S_SCP_STS: 0x10,
|
|
51
124
|
S_SCP_DOP: 0x11,
|
|
125
|
+
S_SCP_MSS: 0x12,
|
|
126
|
+
S_SCP_SDS: 0x13,
|
|
52
127
|
S_SCP_MOD: 0x14,
|
|
53
128
|
S_SCP_SPN: 0x15,
|
|
54
129
|
S_SCP_EDG: 0x16,
|
|
130
|
+
S_SCP_HLD: 0x17,
|
|
131
|
+
S_SCP_ATT: 0x18,
|
|
132
|
+
S_SCP_REF: 0x19,
|
|
133
|
+
S_SCP_SWP: 0x1a,
|
|
134
|
+
S_SCP_STX: 0x1b,
|
|
135
|
+
S_SCP_CFQ: 0x1c,
|
|
136
|
+
S_SCP_VBW: 0x1d,
|
|
55
137
|
S_SCP_FEF: 0x1e,
|
|
138
|
+
S_SCP_RBW: 0x1f,
|
|
139
|
+
S_SCP_MKP: 0x20,
|
|
56
140
|
};
|
|
57
141
|
exports.ICOM_MODE_FILTER_DEFAULT = 1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IcomRigOptions, RigEventEmitter, IcomMode, ConnectorDataMode, SetModeOptions, QueryOptions, SwrReading, AlcReading, WlanLevelReading, LevelMeterReading, SquelchStatusReading, AudioSquelchReading, OvfStatusReading, PowerLevelReading, CompLevelReading, VoltageReading, CurrentReading, ConnectionState, ConnectionMonitorConfig, ConnectionPhase, ConnectionMetrics, DisconnectReason, DisconnectOptions, TunerStatusReading, LevelReading, IcomScopeSpanInfo, IcomScopeMode, IcomScopeModeInfo, IcomScopeEdgeInfo, IcomScopeFixedEdgeInfo, IcomSpectrumDisplayState, IcomSpectrumDisplayConfig } from '../types';
|
|
1
|
+
import { IcomRigOptions, RigEventEmitter, IcomMode, ConnectorDataMode, SetModeOptions, SendMorseOptions, QueryOptions, SwrReading, AlcReading, WlanLevelReading, LevelMeterReading, SquelchStatusReading, AudioSquelchReading, OvfStatusReading, PowerLevelReading, CompLevelReading, VoltageReading, CurrentReading, ConnectionState, ConnectionMonitorConfig, ConnectionPhase, ConnectionMetrics, DisconnectReason, DisconnectOptions, TunerStatusReading, LevelReading, IcomScopeSpanInfo, IcomScopeMode, IcomScopeModeInfo, IcomScopeEdgeInfo, IcomScopeFixedEdgeInfo, IcomSpectrumDisplayState, IcomSpectrumDisplayConfig, IcomFunctionName, IcomLevelName, IcomParameterName, IcomVfoName, IcomVfoOperation, IcomRepeaterShift, IcomSpectrumSpeed, IcomSpectrumCenterType, IcomAudioIfSource } from '../types';
|
|
2
2
|
import { IcomCiv } from './IcomCiv';
|
|
3
3
|
import { IcomAudio } from './IcomAudio';
|
|
4
4
|
import { IcomScopeService } from '../scope/IcomScopeService';
|
|
@@ -20,6 +20,8 @@ export declare class IcomControl {
|
|
|
20
20
|
private meterTimer?;
|
|
21
21
|
private activeProfile;
|
|
22
22
|
private lastFilter;
|
|
23
|
+
private cwQueue;
|
|
24
|
+
private cwGeneration;
|
|
23
25
|
private connectionSession;
|
|
24
26
|
private nextSessionId;
|
|
25
27
|
private abortHandlers;
|
|
@@ -397,6 +399,159 @@ export declare class IcomControl {
|
|
|
397
399
|
* }
|
|
398
400
|
*/
|
|
399
401
|
readCurrent(options?: QueryOptions): Promise<CurrentReading | null>;
|
|
402
|
+
getFunction(name: IcomFunctionName, options?: QueryOptions): Promise<boolean | null>;
|
|
403
|
+
setFunction(name: IcomFunctionName, enabled: boolean): void;
|
|
404
|
+
getLevel(name: IcomLevelName, options?: QueryOptions): Promise<number | null>;
|
|
405
|
+
setLevel(name: IcomLevelName, value: number): void;
|
|
406
|
+
getParameter(name: IcomParameterName, options?: QueryOptions): Promise<number | boolean | null>;
|
|
407
|
+
setParameter(name: IcomParameterName, value: number | boolean): void;
|
|
408
|
+
getNoiseBlankerEnabled(options?: QueryOptions): Promise<boolean | null>;
|
|
409
|
+
setNoiseBlankerEnabled(enabled: boolean): void;
|
|
410
|
+
getNoiseReductionEnabled(options?: QueryOptions): Promise<boolean | null>;
|
|
411
|
+
setNoiseReductionEnabled(enabled: boolean): void;
|
|
412
|
+
getCompressorEnabled(options?: QueryOptions): Promise<boolean | null>;
|
|
413
|
+
setCompressorEnabled(enabled: boolean): void;
|
|
414
|
+
getVoxEnabled(options?: QueryOptions): Promise<boolean | null>;
|
|
415
|
+
setVoxEnabled(enabled: boolean): void;
|
|
416
|
+
getMonitorEnabled(options?: QueryOptions): Promise<boolean | null>;
|
|
417
|
+
setMonitorEnabled(enabled: boolean): void;
|
|
418
|
+
getAutoNotchEnabled(options?: QueryOptions): Promise<boolean | null>;
|
|
419
|
+
setAutoNotchEnabled(enabled: boolean): void;
|
|
420
|
+
getManualNotchEnabled(options?: QueryOptions): Promise<boolean | null>;
|
|
421
|
+
setManualNotchEnabled(enabled: boolean): void;
|
|
422
|
+
getDialLockEnabled(options?: QueryOptions): Promise<boolean | null>;
|
|
423
|
+
setDialLockEnabled(enabled: boolean): void;
|
|
424
|
+
getBreakInMode(options?: QueryOptions): Promise<'off' | 'semi' | 'full' | null>;
|
|
425
|
+
setBreakInMode(mode: 'off' | 'semi' | 'full'): void;
|
|
426
|
+
getRFGain(options?: QueryOptions): Promise<number | null>;
|
|
427
|
+
setRFGain(value: number): void;
|
|
428
|
+
getIFShift(options?: QueryOptions): Promise<number | null>;
|
|
429
|
+
setIFShift(value: number): void;
|
|
430
|
+
getPbtIn(options?: QueryOptions): Promise<number | null>;
|
|
431
|
+
setPbtIn(value: number): void;
|
|
432
|
+
getPbtOut(options?: QueryOptions): Promise<number | null>;
|
|
433
|
+
setPbtOut(value: number): void;
|
|
434
|
+
getCwPitch(options?: QueryOptions): Promise<number | null>;
|
|
435
|
+
setCwPitch(hz: number): void;
|
|
436
|
+
getKeySpeed(options?: QueryOptions): Promise<number | null>;
|
|
437
|
+
setKeySpeed(wpm: number): void;
|
|
438
|
+
sendMorse(text: string, options?: SendMorseOptions): Promise<void>;
|
|
439
|
+
sendCwText(text: string, options?: SendMorseOptions): Promise<void>;
|
|
440
|
+
stopMorse(options?: {
|
|
441
|
+
timeout?: number;
|
|
442
|
+
}): Promise<void>;
|
|
443
|
+
getNotchRaw(options?: QueryOptions): Promise<number | null>;
|
|
444
|
+
setNotchRaw(value: number): void;
|
|
445
|
+
getCompressionLevel(options?: QueryOptions): Promise<number | null>;
|
|
446
|
+
setCompressionLevel(value: number): void;
|
|
447
|
+
getMonitorGain(options?: QueryOptions): Promise<number | null>;
|
|
448
|
+
setMonitorGain(value: number): void;
|
|
449
|
+
getVoxGain(options?: QueryOptions): Promise<number | null>;
|
|
450
|
+
setVoxGain(value: number): void;
|
|
451
|
+
getAntiVox(options?: QueryOptions): Promise<number | null>;
|
|
452
|
+
setAntiVox(value: number): void;
|
|
453
|
+
getRitOffset(options?: QueryOptions): Promise<number | null>;
|
|
454
|
+
setRitOffset(offsetHz: number): void;
|
|
455
|
+
getXitOffset(options?: QueryOptions): Promise<number | null>;
|
|
456
|
+
setXitOffset(offsetHz: number): void;
|
|
457
|
+
getRitEnabled(options?: QueryOptions): Promise<boolean | null>;
|
|
458
|
+
setRitEnabled(enabled: boolean): void;
|
|
459
|
+
getXitEnabled(options?: QueryOptions): Promise<boolean | null>;
|
|
460
|
+
setXitEnabled(enabled: boolean): void;
|
|
461
|
+
getVfo(options?: QueryOptions): Promise<IcomVfoName | null>;
|
|
462
|
+
setVfo(vfo: IcomVfoName): void;
|
|
463
|
+
vfoOperation(op: IcomVfoOperation): void;
|
|
464
|
+
getSplitEnabled(options?: QueryOptions): Promise<boolean | null>;
|
|
465
|
+
setSplitEnabled(enabled: boolean): void;
|
|
466
|
+
getSplitFrequency(options?: QueryOptions): Promise<number | null>;
|
|
467
|
+
setSplitFrequency(hz: number): void;
|
|
468
|
+
getSplitMode(options?: QueryOptions): Promise<{
|
|
469
|
+
mode: number;
|
|
470
|
+
filter?: number;
|
|
471
|
+
modeName?: string;
|
|
472
|
+
filterName?: string;
|
|
473
|
+
dataMode?: boolean;
|
|
474
|
+
} | null>;
|
|
475
|
+
setSplitMode(mode: IcomMode | number, options?: SetModeOptions): void;
|
|
476
|
+
getTuningStep(options?: QueryOptions): Promise<number | null>;
|
|
477
|
+
setTuningStep(hz: number): void;
|
|
478
|
+
getRepeaterShift(options?: QueryOptions): Promise<IcomRepeaterShift | null>;
|
|
479
|
+
setRepeaterShift(shift: IcomRepeaterShift): void;
|
|
480
|
+
getRepeaterOffset(options?: QueryOptions): Promise<number | null>;
|
|
481
|
+
setRepeaterOffset(offsetHz: number): void;
|
|
482
|
+
getToneFrequency(options?: QueryOptions): Promise<number | null>;
|
|
483
|
+
setToneFrequency(hz: number): void;
|
|
484
|
+
getToneSquelchFrequency(options?: QueryOptions): Promise<number | null>;
|
|
485
|
+
setToneSquelchFrequency(hz: number): void;
|
|
486
|
+
getBeepEnabled(options?: QueryOptions): Promise<boolean | null>;
|
|
487
|
+
setBeepEnabled(enabled: boolean): void;
|
|
488
|
+
getBacklight(options?: QueryOptions): Promise<number | null>;
|
|
489
|
+
setBacklight(value: number): void;
|
|
490
|
+
getScreenSaver(options?: QueryOptions): Promise<number | null>;
|
|
491
|
+
setScreenSaver(value: number): void;
|
|
492
|
+
getKeyerType(options?: QueryOptions): Promise<number | null>;
|
|
493
|
+
setKeyerType(value: number): void;
|
|
494
|
+
getAudioIfMode(options?: QueryOptions): Promise<IcomAudioIfSource | null>;
|
|
495
|
+
setAudioIfMode(source: IcomAudioIfSource): void;
|
|
496
|
+
getSpectrumDataOutput(options?: QueryOptions): Promise<boolean | null>;
|
|
497
|
+
setSpectrumDataOutput(enabled: boolean): void;
|
|
498
|
+
getSpectrumHold(options?: QueryOptions & {
|
|
499
|
+
receiver?: 0 | 1;
|
|
500
|
+
}): Promise<boolean | null>;
|
|
501
|
+
setSpectrumHold(enabled: boolean, options?: {
|
|
502
|
+
receiver?: 0 | 1;
|
|
503
|
+
}): void;
|
|
504
|
+
getSpectrumSpeed(options?: QueryOptions & {
|
|
505
|
+
receiver?: 0 | 1;
|
|
506
|
+
}): Promise<IcomSpectrumSpeed | null>;
|
|
507
|
+
setSpectrumSpeed(speed: IcomSpectrumSpeed, options?: {
|
|
508
|
+
receiver?: 0 | 1;
|
|
509
|
+
}): void;
|
|
510
|
+
getSpectrumRef(options?: QueryOptions & {
|
|
511
|
+
receiver?: 0 | 1;
|
|
512
|
+
}): Promise<number | null>;
|
|
513
|
+
setSpectrumRef(db: number, options?: {
|
|
514
|
+
receiver?: 0 | 1;
|
|
515
|
+
}): void;
|
|
516
|
+
getSpectrumAverage(options?: QueryOptions): Promise<number | null>;
|
|
517
|
+
setSpectrumAverage(value: number): void;
|
|
518
|
+
getSpectrumVbw(options?: QueryOptions & {
|
|
519
|
+
receiver?: 0 | 1;
|
|
520
|
+
}): Promise<number | null>;
|
|
521
|
+
setSpectrumVbw(value: number, options?: {
|
|
522
|
+
receiver?: 0 | 1;
|
|
523
|
+
}): void;
|
|
524
|
+
getSpectrumRbw(options?: QueryOptions & {
|
|
525
|
+
receiver?: 0 | 1;
|
|
526
|
+
}): Promise<number | null>;
|
|
527
|
+
setSpectrumRbw(value: number, options?: {
|
|
528
|
+
receiver?: 0 | 1;
|
|
529
|
+
}): void;
|
|
530
|
+
getSpectrumDuringTx(options?: QueryOptions): Promise<boolean | null>;
|
|
531
|
+
setSpectrumDuringTx(enabled: boolean): void;
|
|
532
|
+
getSpectrumCenterType(options?: QueryOptions): Promise<IcomSpectrumCenterType | null>;
|
|
533
|
+
setSpectrumCenterType(type: IcomSpectrumCenterType): void;
|
|
534
|
+
private unsupported;
|
|
535
|
+
private enqueueCw;
|
|
536
|
+
private sendCwFrameAndWaitForAck;
|
|
537
|
+
private readFunctionRaw;
|
|
538
|
+
private writeFunctionRaw;
|
|
539
|
+
private readLevelRaw;
|
|
540
|
+
private writeLevelRaw;
|
|
541
|
+
private readExtParamValue;
|
|
542
|
+
private writeExtParamValue;
|
|
543
|
+
private static encodeDataValue;
|
|
544
|
+
private static decodeDataValue;
|
|
545
|
+
private readRitOffset;
|
|
546
|
+
private writeRitOffset;
|
|
547
|
+
private vfoToSubcmd;
|
|
548
|
+
private readSplitRaw;
|
|
549
|
+
private readTone;
|
|
550
|
+
private writeTone;
|
|
551
|
+
private audioIfSourceToParameter;
|
|
552
|
+
private getScopeBoolean;
|
|
553
|
+
private getScopeByte;
|
|
554
|
+
private writeScopeSimple;
|
|
400
555
|
private static isReplyOf;
|
|
401
556
|
/**
|
|
402
557
|
* Extract meter data from CI-V response frame
|
|
@@ -408,6 +563,8 @@ export declare class IcomControl {
|
|
|
408
563
|
private static extractTrailingBcd;
|
|
409
564
|
private static matchCommand;
|
|
410
565
|
private static matchCommandFrame;
|
|
566
|
+
private static matchAckNakFrame;
|
|
567
|
+
private static normalizeMorseText;
|
|
411
568
|
private waitForCiv;
|
|
412
569
|
static parseFrequencyReply(frame: Buffer, payloadOffsetAfterCommand: number, byteLength?: number): number | null;
|
|
413
570
|
static parseIcomFreqFromReply(frame: Buffer): number | null;
|