import type { HamlibConfig } from './radio.schema.js'; /** * Radios known to support `rig_set_powerstat(RIG_POWER_ON)` via Hamlib. * Matching happens on mfgName + modelName (case-insensitive, substring/regex). * * Because node-hamlib does not expose `rig_get_caps`, we cannot introspect * per-model powerstat support at runtime. Instead we maintain a conservative * allow-list of radios for which powerstat is verified to work; UI only * surfaces the "power on" button for these models. The server still falls * back to the actual Hamlib return value — an unsupported model receives a * user-friendly error if the allow-list is bypassed. * * To add a new model: add an entry with the mfgName returned by * `HamLib.getSupportedRigs()` and a pattern that matches its modelName. */ export interface PowerCapableRigEntry { mfg: string | RegExp; model: string | RegExp; /** * Physical powerstat targets that are safe to expose while CAT is connected. * `on` is represented by canPowerOn and is not part of this connected-state list. */ supportedStates?: ReadonlyArray<'operate' | 'standby' | 'off'>; } export declare const POWER_CAPABLE_RIGS: ReadonlyArray; export declare function findPowerCapableRigEntry(mfgName: string, modelName: string): PowerCapableRigEntry | undefined; export declare function isRigModelPowerCapable(mfgName: string, modelName: string): boolean; export type PowerSupportReason = 'model-unsupported' | 'network-mode-no-wake' | 'none-mode'; export interface PowerSupportDecision { /** Whether the UI should surface a "power on" control. */ canPowerOn: boolean; /** Whether the UI should surface a "power off" control. */ canPowerOff: boolean; /** Connected-state physical power targets the UI may offer. */ supportedStates: Array<'operate' | 'standby' | 'off'>; /** Machine-readable reason when `canPowerOn` is false. */ reason?: PowerSupportReason; } /** * Decide whether power control should be surfaced for a given Profile radio config. * * For serial mode, the caller must provide the rig's mfgName/modelName * (resolved via `HamLib.getSupportedRigs()` server-side). For network mode * the rig model is not known ahead of time (rigctld proxies any radio) — * `power on` is never offered because a remote rigctld running on the radio * is unreachable when the radio is powered off. `power off` is still offered * in case the rigctld process runs on a separate host. */ export declare function decidePowerSupport(config: HamlibConfig, rigInfo?: { mfgName: string; modelName: string; }): PowerSupportDecision; //# sourceMappingURL=radio-power-support.d.ts.map