@@ -708,6 +708,8 @@ declare class HamLib extends EventEmitter {
708708 *
709709 * Enabled by default. Set NODE_HAMLIB_GLOBAL_LOCK=0, false, off, or no before
710710 * loading the package to start with the current no-lock behavior.
711+ * Async radio calls wait up to NODE_HAMLIB_GLOBAL_LOCK_TIMEOUT_MS (default 5000)
712+ * for this lock before rejecting with HAMLIB_GLOBAL_LOCK_TIMEOUT.
711713 *
712714 * Runtime changes only affect later lock checks; calls that have already
713715 * entered Hamlib are not interrupted.
@@ -911,7 +913,7 @@ declare class HamLib extends EventEmitter {
911913 * Get list of supported level types
912914 * @returns Array of supported level types
913915 */
914- getSupportedLevels ( ) : string [ ] ;
916+ getSupportedLevels ( ) : Promise < string [ ] > ;
915917
916918 // Function Controls
917919
@@ -933,7 +935,7 @@ declare class HamLib extends EventEmitter {
933935 * Get list of supported function types
934936 * @returns Array of supported function types
935937 */
936- getSupportedFunctions ( ) : string [ ] ;
938+ getSupportedFunctions ( ) : Promise < string [ ] > ;
937939
938940 /**
939941 * Get list of supported radio modes
@@ -942,7 +944,7 @@ declare class HamLib extends EventEmitter {
942944 * const modes = rig.getSupportedModes();
943945 * console.log('Supported modes:', modes); // ['USB', 'LSB', 'CW', 'FM', 'AM', ...]
944946 */
945- getSupportedModes ( ) : string [ ] ;
947+ getSupportedModes ( ) : Promise < string [ ] > ;
946948
947949 // Split Operations
948950
@@ -1126,12 +1128,12 @@ declare class HamLib extends EventEmitter {
11261128 * This can be queried before opening the connection and is suitable for
11271129 * driving dynamic configuration UIs.
11281130 */
1129- getConfigSchema ( ) : HamlibConfigFieldDescriptor [ ] ;
1131+ getConfigSchema ( ) : Promise < HamlibConfigFieldDescriptor [ ] > ;
11301132
11311133 /**
11321134 * Get backend port capabilities and effective connection defaults.
11331135 */
1134- getPortCaps ( ) : HamlibPortCaps ;
1136+ getPortCaps ( ) : Promise < HamlibPortCaps > ;
11351137
11361138 // Power Control
11371139
@@ -1629,130 +1631,130 @@ declare class HamLib extends EventEmitter {
16291631 */
16301632 getConf ( name : string ) : Promise < string > ;
16311633
1632- // ===== Passband / Resolution (sync ) =====
1634+ // ===== Passband / Resolution (async ) =====
16331635
16341636 /**
16351637 * Get normal passband width for a given mode
16361638 * @param mode Radio mode
16371639 * @returns Normal passband width in Hz
16381640 */
1639- getPassbandNormal ( mode : RadioMode ) : number ;
1641+ getPassbandNormal ( mode : RadioMode ) : Promise < number > ;
16401642
16411643 /**
16421644 * Get narrow passband width for a given mode
16431645 * @param mode Radio mode
16441646 * @returns Narrow passband width in Hz
16451647 */
1646- getPassbandNarrow ( mode : RadioMode ) : number ;
1648+ getPassbandNarrow ( mode : RadioMode ) : Promise < number > ;
16471649
16481650 /**
16491651 * Get wide passband width for a given mode
16501652 * @param mode Radio mode
16511653 * @returns Wide passband width in Hz
16521654 */
1653- getPassbandWide ( mode : RadioMode ) : number ;
1655+ getPassbandWide ( mode : RadioMode ) : Promise < number > ;
16541656
16551657 /**
16561658 * Get frequency resolution (step) for a given mode
16571659 * @param mode Radio mode
16581660 * @returns Resolution in Hz
16591661 */
1660- getResolution ( mode : RadioMode ) : number ;
1662+ getResolution ( mode : RadioMode ) : Promise < number > ;
16611663
1662- // ===== Capability queries (sync ) =====
1664+ // ===== Capability queries (async ) =====
16631665
16641666 /**
16651667 * Get list of supported parameter types
16661668 * @returns Array of supported parameter type names
16671669 */
1668- getSupportedParms ( ) : string [ ] ;
1670+ getSupportedParms ( ) : Promise < string [ ] > ;
16691671
16701672 /**
16711673 * Get list of supported VFO operations
16721674 * @returns Array of supported VFO operation types
16731675 */
1674- getSupportedVfoOps ( ) : VfoOperationType [ ] ;
1676+ getSupportedVfoOps ( ) : Promise < VfoOperationType [ ] > ;
16751677
16761678 /**
16771679 * Get list of supported scan types
16781680 * @returns Array of supported scan types
16791681 */
1680- getSupportedScanTypes ( ) : ScanType [ ] ;
1682+ getSupportedScanTypes ( ) : Promise < ScanType [ ] > ;
16811683
1682- // ===== Capability Queries - Batch 2 (sync ) =====
1684+ // ===== Capability Queries - Batch 2 (async ) =====
16831685
16841686 /**
16851687 * Get supported preamplifier values
16861688 * @returns Array of preamp dB values
16871689 */
1688- getPreampValues ( ) : number [ ] ;
1690+ getPreampValues ( ) : Promise < number [ ] > ;
16891691
16901692 /**
16911693 * Get supported attenuator values
16921694 * @returns Array of attenuator dB values
16931695 */
1694- getAttenuatorValues ( ) : number [ ] ;
1696+ getAttenuatorValues ( ) : Promise < number [ ] > ;
16951697
16961698 /**
16971699 * Get supported AGC mode values
16981700 * @returns Array of Hamlib AGC enum values
16991701 */
1700- getAgcLevels ( ) : number [ ] ;
1702+ getAgcLevels ( ) : Promise < number [ ] > ;
17011703
17021704 /**
17031705 * Get maximum RIT offset supported
17041706 * @returns Maximum RIT offset in Hz
17051707 */
1706- getMaxRit ( ) : number ;
1708+ getMaxRit ( ) : Promise < number > ;
17071709
17081710 /**
17091711 * Get maximum XIT offset supported
17101712 * @returns Maximum XIT offset in Hz
17111713 */
1712- getMaxXit ( ) : number ;
1714+ getMaxXit ( ) : Promise < number > ;
17131715
17141716 /**
17151717 * Get maximum IF shift supported
17161718 * @returns Maximum IF shift in Hz
17171719 */
1718- getMaxIfShift ( ) : number ;
1720+ getMaxIfShift ( ) : Promise < number > ;
17191721
17201722 /**
17211723 * Get list of available CTCSS tone frequencies
17221724 * @returns Array of CTCSS tones in Hz
17231725 */
1724- getAvailableCtcssTones ( ) : number [ ] ;
1726+ getAvailableCtcssTones ( ) : Promise < number [ ] > ;
17251727
17261728 /**
17271729 * Get list of available DCS codes
17281730 * @returns Array of DCS codes
17291731 */
1730- getAvailableDcsCodes ( ) : number [ ] ;
1732+ getAvailableDcsCodes ( ) : Promise < number [ ] > ;
17311733
17321734 /**
17331735 * Get supported frequency ranges for RX and TX
17341736 */
1735- getFrequencyRanges ( ) : { rx : FrequencyRange [ ] ; tx : FrequencyRange [ ] } ;
1737+ getFrequencyRanges ( ) : Promise < { rx : FrequencyRange [ ] ; tx : FrequencyRange [ ] } > ;
17361738
17371739 /**
17381740 * Get supported tuning steps per mode
17391741 */
1740- getTuningSteps ( ) : TuningStepInfo [ ] ;
1742+ getTuningSteps ( ) : Promise < TuningStepInfo [ ] > ;
17411743
17421744 /**
17431745 * Get supported filter widths per mode
17441746 */
1745- getFilterList ( ) : FilterInfo [ ] ;
1747+ getFilterList ( ) : Promise < FilterInfo [ ] > ;
17461748
17471749 /**
17481750 * Get granularity metadata for a level setting from Hamlib rig state.
17491751 */
1750- getLevelGranularity ( levelType : LevelType ) : LevelGranularityInfo | null ;
1752+ getLevelGranularity ( levelType : LevelType ) : Promise < LevelGranularityInfo | null > ;
17511753
17521754 /**
17531755 * Get a discrete RF power step table for the current rig, frequency, and mode.
17541756 */
1755- getRfPowerStepTable ( frequency : number , mode : RadioMode ) : RfPowerStepInfo [ ] | null ;
1757+ getRfPowerStepTable ( frequency : number , mode : RadioMode ) : Promise < RfPowerStepInfo [ ] | null > ;
17561758
17571759 // ===== Static: Copyright / License =====
17581760
0 commit comments