2018-11-24 08:10:05 +00:00
|
|
|
#ifndef RIGIDENTITIES_H
|
|
|
|
#define RIGIDENTITIES_H
|
|
|
|
|
2021-02-10 17:32:56 +00:00
|
|
|
#include <QtNumeric>
|
|
|
|
#include <QString>
|
2021-02-19 08:14:40 +00:00
|
|
|
#include <QList>
|
2021-04-08 06:35:24 +00:00
|
|
|
#include <vector>
|
2023-04-19 13:51:23 +00:00
|
|
|
#include <QHash>
|
2021-02-10 17:32:56 +00:00
|
|
|
|
2021-05-22 06:46:15 +00:00
|
|
|
#include "freqmemory.h"
|
2022-01-29 22:50:58 +00:00
|
|
|
#include "packettypes.h"
|
2021-05-22 06:46:15 +00:00
|
|
|
|
2021-02-19 08:14:40 +00:00
|
|
|
// Credit for parts of CIV list:
|
2018-11-24 08:10:05 +00:00
|
|
|
// http://www.docksideradio.com/Icom%20Radio%20Hex%20Addresses.htm
|
|
|
|
|
|
|
|
// 7850 and 7851 have the same commands and are essentially identical
|
|
|
|
|
2022-04-22 10:11:21 +00:00
|
|
|
|
2018-11-24 08:10:05 +00:00
|
|
|
enum model_kind {
|
|
|
|
model7100 = 0x88,
|
|
|
|
model7200 = 0x76,
|
|
|
|
model7300 = 0x94,
|
2021-02-12 19:52:16 +00:00
|
|
|
modelR8600 = 0x96,
|
2018-11-24 08:10:05 +00:00
|
|
|
model7600 = 0x7A,
|
|
|
|
model7610 = 0x98,
|
|
|
|
model7700 = 0x74,
|
|
|
|
model7800 = 0x6A,
|
2021-05-15 02:04:47 +00:00
|
|
|
model7000 = 0x70,
|
2021-05-15 06:58:22 +00:00
|
|
|
model7410 = 0x80,
|
2018-11-24 08:10:05 +00:00
|
|
|
model7850 = 0x8E,
|
2021-02-10 17:32:56 +00:00
|
|
|
model9700 = 0xA2,
|
2022-11-24 00:59:10 +00:00
|
|
|
model703 = 0x68,
|
2021-02-10 17:32:56 +00:00
|
|
|
model705 = 0xA4,
|
2021-02-13 18:02:45 +00:00
|
|
|
model706 = 0x58,
|
2021-06-08 21:42:19 +00:00
|
|
|
model718 = 0x5E,
|
2021-08-17 21:00:37 +00:00
|
|
|
model736 = 0x40,
|
2022-11-24 00:59:10 +00:00
|
|
|
model737 = 0x3C,
|
|
|
|
model738 = 0x44,
|
2022-02-08 01:31:29 +00:00
|
|
|
model746 = 0x56,
|
2022-11-24 00:59:10 +00:00
|
|
|
model756 = 0x50,
|
2021-05-20 23:15:25 +00:00
|
|
|
model756pro = 0x5C,
|
2021-05-22 06:46:15 +00:00
|
|
|
model756proii = 0x64,
|
2021-05-20 23:15:25 +00:00
|
|
|
model756proiii = 0x6E,
|
2023-04-17 10:19:00 +00:00
|
|
|
model905 = 0xAC,
|
2021-05-08 20:45:52 +00:00
|
|
|
model910h = 0x60,
|
2021-08-17 16:35:40 +00:00
|
|
|
model9100 = 0x7C,
|
2018-11-24 08:10:05 +00:00
|
|
|
modelUnknown = 0xFF
|
|
|
|
};
|
|
|
|
|
2023-04-23 20:29:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
enum inputTypes{ inputMic=0,
|
|
|
|
inputACC=1,
|
|
|
|
inputMICACC=2,
|
|
|
|
inputUSB=3,
|
|
|
|
inputMICUSB=4,
|
|
|
|
inputLAN=5,
|
|
|
|
inputACCA=6,
|
|
|
|
inputACCB=7,
|
|
|
|
inputNone,
|
|
|
|
inputUnknown=0xff
|
|
|
|
};
|
|
|
|
|
|
|
|
struct rigInput {
|
|
|
|
rigInput() {}
|
|
|
|
rigInput(inputTypes type) : type(type) {}
|
|
|
|
rigInput(inputTypes type, QString name) : type(type), name(name) {}
|
|
|
|
inputTypes type = inputNone;
|
|
|
|
QString name = "";
|
2021-02-19 08:14:40 +00:00
|
|
|
};
|
2018-11-24 08:10:05 +00:00
|
|
|
|
2023-04-23 20:29:44 +00:00
|
|
|
|
|
|
|
|
2023-04-17 10:19:00 +00:00
|
|
|
enum availableBands {
|
|
|
|
band3cm = 0,
|
|
|
|
band6cm,
|
|
|
|
band9cm,
|
|
|
|
band13cm,
|
|
|
|
band23cm,
|
2021-04-27 01:24:28 +00:00
|
|
|
band70cm,
|
|
|
|
band2m,
|
|
|
|
bandAir,
|
|
|
|
bandWFM,
|
|
|
|
band4m,
|
|
|
|
band6m,
|
|
|
|
band10m,
|
|
|
|
band12m,
|
|
|
|
band15m,
|
|
|
|
band17m,
|
|
|
|
band20m,
|
|
|
|
band30m,
|
|
|
|
band40m,
|
|
|
|
band60m,
|
|
|
|
band80m,
|
|
|
|
band160m,
|
|
|
|
band630m,
|
|
|
|
band2200m,
|
|
|
|
bandGen
|
|
|
|
};
|
|
|
|
|
2021-06-19 05:45:12 +00:00
|
|
|
enum centerSpansType {
|
|
|
|
cs2p5k = 0,
|
|
|
|
cs5k = 1,
|
|
|
|
cs10k = 2,
|
|
|
|
cs25k = 3,
|
|
|
|
cs50k = 4,
|
|
|
|
cs100k = 5,
|
|
|
|
cs250k = 6,
|
|
|
|
cs500k = 7,
|
|
|
|
cs1M = 8,
|
2023-04-17 10:19:00 +00:00
|
|
|
cs2p5M = 9,
|
|
|
|
cs5M = 10,
|
|
|
|
cs10M = 11,
|
|
|
|
cs25M = 12,
|
2021-06-19 05:45:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct centerSpanData {
|
2023-04-23 20:29:44 +00:00
|
|
|
centerSpanData() {}
|
|
|
|
centerSpanData(centerSpansType cstype, QString name, unsigned int freq) :
|
|
|
|
cstype(cstype), name(name), freq(freq) {}
|
2021-06-19 05:45:12 +00:00
|
|
|
centerSpansType cstype;
|
|
|
|
QString name;
|
2023-04-23 20:29:44 +00:00
|
|
|
unsigned int freq;
|
2021-06-19 05:45:12 +00:00
|
|
|
};
|
|
|
|
|
2022-10-29 14:12:30 +00:00
|
|
|
struct bandType {
|
|
|
|
bandType() {}
|
2023-04-23 20:29:44 +00:00
|
|
|
bandType(availableBands band, quint64 lowFreq, quint64 highFreq, double range) :
|
|
|
|
band(band), lowFreq(lowFreq), highFreq(highFreq), range(range) {}
|
2022-10-29 14:12:30 +00:00
|
|
|
|
|
|
|
availableBands band;
|
2023-04-17 10:19:00 +00:00
|
|
|
quint64 lowFreq;
|
|
|
|
quint64 highFreq;
|
2022-10-29 14:12:30 +00:00
|
|
|
mode_kind defaultMode;
|
2023-04-23 20:29:44 +00:00
|
|
|
double range;
|
2022-10-29 14:12:30 +00:00
|
|
|
};
|
|
|
|
|
2023-04-24 10:06:33 +00:00
|
|
|
struct filterType {
|
|
|
|
filterType() {}
|
|
|
|
filterType(unsigned char num, QString name, unsigned int modes) :
|
|
|
|
num(num), name(name), modes(modes) {}
|
|
|
|
|
|
|
|
unsigned char num;
|
|
|
|
QString name;
|
|
|
|
unsigned int modes;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-24 08:10:05 +00:00
|
|
|
model_kind determineRadioModel(unsigned char rigID);
|
|
|
|
|
2021-02-10 17:32:56 +00:00
|
|
|
struct rigCapabilities {
|
|
|
|
model_kind model;
|
|
|
|
quint8 civ;
|
2023-04-23 20:29:44 +00:00
|
|
|
quint8 modelID = 0;
|
|
|
|
QString filename;
|
2021-08-07 17:34:34 +00:00
|
|
|
int rigctlModel;
|
2021-02-10 17:32:56 +00:00
|
|
|
QString modelName;
|
|
|
|
|
|
|
|
bool hasLan; // OEM ethernet or wifi connection
|
|
|
|
bool hasEthernet;
|
|
|
|
bool hasWiFi;
|
2021-06-18 19:41:56 +00:00
|
|
|
bool hasFDcomms;
|
2021-02-10 17:32:56 +00:00
|
|
|
|
2021-02-19 08:14:40 +00:00
|
|
|
QVector<rigInput> inputs;
|
|
|
|
|
2022-09-29 16:17:51 +00:00
|
|
|
bool hasSpectrum=true;
|
2021-02-10 17:32:56 +00:00
|
|
|
quint8 spectSeqMax;
|
|
|
|
quint16 spectAmpMax;
|
|
|
|
quint16 spectLenMax;
|
|
|
|
|
2023-03-28 20:58:46 +00:00
|
|
|
bool hasNB = false;
|
|
|
|
QByteArray nbCommand;
|
|
|
|
|
2021-02-11 17:09:45 +00:00
|
|
|
bool hasDD;
|
|
|
|
bool hasDV;
|
2021-02-13 06:42:34 +00:00
|
|
|
bool hasATU;
|
2021-02-11 17:09:45 +00:00
|
|
|
|
2021-04-05 06:33:56 +00:00
|
|
|
bool hasCTCSS;
|
|
|
|
bool hasDTCS;
|
2023-01-28 05:42:57 +00:00
|
|
|
bool hasRepeaterModes = false;
|
2021-04-05 06:33:56 +00:00
|
|
|
|
2021-02-12 19:52:16 +00:00
|
|
|
bool hasTransmit;
|
2021-06-20 20:34:32 +00:00
|
|
|
bool hasPTTCommand;
|
2021-11-06 06:21:36 +00:00
|
|
|
bool useRTSforPTT;
|
2021-04-08 06:35:24 +00:00
|
|
|
bool hasAttenuator;
|
2021-04-09 22:57:16 +00:00
|
|
|
bool hasPreamp;
|
|
|
|
bool hasAntennaSel;
|
2021-06-20 20:34:32 +00:00
|
|
|
bool hasDataModes;
|
2021-11-05 17:09:31 +00:00
|
|
|
bool hasIFShift;
|
|
|
|
bool hasTBPF;
|
2021-04-27 01:24:28 +00:00
|
|
|
|
2021-07-16 16:08:55 +00:00
|
|
|
bool hasRXAntenna;
|
|
|
|
|
2023-01-27 20:44:23 +00:00
|
|
|
bool hasSpecifyMainSubCmd = false; // 0x29
|
|
|
|
bool hasVFOMS = false;
|
|
|
|
bool hasVFOAB = true; // 0x07 [00||01]
|
|
|
|
|
2023-02-01 02:00:12 +00:00
|
|
|
bool hasAdvancedRptrToneCmds = false;
|
2023-02-01 17:21:17 +00:00
|
|
|
bool hasQuickSplitCommand = false;
|
|
|
|
QByteArray quickSplitCommand;
|
2023-04-23 20:29:44 +00:00
|
|
|
QHash<funcs,funcType> commands;
|
|
|
|
QHash<QByteArray,funcs> commandsReverse;
|
2023-02-01 02:00:12 +00:00
|
|
|
|
2021-04-08 06:35:24 +00:00
|
|
|
std::vector <unsigned char> attenuators;
|
2021-04-08 07:05:40 +00:00
|
|
|
std::vector <unsigned char> preamps;
|
2021-04-09 22:57:16 +00:00
|
|
|
std::vector <unsigned char> antennas;
|
2023-04-24 10:06:33 +00:00
|
|
|
std::vector <filterType> filters;
|
2021-06-19 05:45:12 +00:00
|
|
|
std::vector <centerSpanData> scopeCenterSpans;
|
2021-04-27 01:24:28 +00:00
|
|
|
std::vector <bandType> bands;
|
2023-04-23 20:29:44 +00:00
|
|
|
std::vector <spanType> spans;
|
2023-04-17 10:19:00 +00:00
|
|
|
unsigned char bsr[24] = {0};
|
2021-05-22 06:46:15 +00:00
|
|
|
|
|
|
|
std::vector <mode_info> modes;
|
2021-08-28 23:16:31 +00:00
|
|
|
|
|
|
|
QByteArray transceiveCommand;
|
2022-01-29 22:50:58 +00:00
|
|
|
quint8 guid[GUIDLEN] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
|
2022-01-26 09:49:52 +00:00
|
|
|
quint32 baudRate;
|
2021-02-10 17:32:56 +00:00
|
|
|
};
|
2018-11-24 08:10:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif // RIGIDENTITIES_H
|