feat: Support for Antenna Genius

This commit is contained in:
2026-06-21 20:15:30 +02:00
parent 8b7c42ec9b
commit b302d4d87b
14 changed files with 2315 additions and 6 deletions
+121
View File
@@ -65,6 +65,69 @@ export namespace adif {
}
export namespace antgenius {
export class Antenna {
index: number;
name: string;
static createFrom(source: any = {}) {
return new Antenna(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.index = source["index"];
this.name = source["name"];
}
}
export class Status {
connected: boolean;
host?: string;
last_error?: string;
port_a: number;
port_b: number;
tx_a: boolean;
tx_b: boolean;
antennas: Antenna[];
static createFrom(source: any = {}) {
return new Status(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.connected = source["connected"];
this.host = source["host"];
this.last_error = source["last_error"];
this.port_a = source["port_a"];
this.port_b = source["port_b"];
this.tx_a = source["tx_a"];
this.tx_b = source["tx_b"];
this.antennas = this.convertValues(source["antennas"], Antenna);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
}
export namespace audio {
export class Device {
@@ -541,6 +604,44 @@ export namespace cat {
return a;
}
}
export class IcomTXState {
available: boolean;
model?: string;
mode?: string;
af_gain: number;
rf_gain: number;
nb: boolean;
nb_level: number;
nr: boolean;
nr_level: number;
anf: boolean;
agc?: string;
preamp: number;
att: number;
filter: number;
static createFrom(source: any = {}) {
return new IcomTXState(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.available = source["available"];
this.model = source["model"];
this.mode = source["mode"];
this.af_gain = source["af_gain"];
this.rf_gain = source["rf_gain"];
this.nb = source["nb"];
this.nb_level = source["nb_level"];
this.nr = source["nr"];
this.nr_level = source["nr_level"];
this.anf = source["anf"];
this.agc = source["agc"];
this.preamp = source["preamp"];
this.att = source["att"];
this.filter = source["filter"];
}
}
export class RigState {
enabled: boolean;
connected: boolean;
@@ -857,6 +958,20 @@ export namespace lookup {
export namespace main {
export class AntGeniusSettings {
enabled: boolean;
host: string;
static createFrom(source: any = {}) {
return new AntGeniusSettings(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.enabled = source["enabled"];
this.host = source["host"];
}
}
export class AudioSettings {
from_radio: string;
to_radio: string;
@@ -1042,6 +1157,9 @@ export namespace main {
flex_host: string;
flex_port: number;
flex_spots: boolean;
icom_port: string;
icom_baud: number;
icom_addr: number;
poll_ms: number;
delay_ms: number;
digital_default: string;
@@ -1058,6 +1176,9 @@ export namespace main {
this.flex_host = source["flex_host"];
this.flex_port = source["flex_port"];
this.flex_spots = source["flex_spots"];
this.icom_port = source["icom_port"];
this.icom_baud = source["icom_baud"];
this.icom_addr = source["icom_addr"];
this.poll_ms = source["poll_ms"];
this.delay_ms = source["delay_ms"];
this.digital_default = source["digital_default"];