mirror of
https://github.com/Hamlib/Hamlib.git
synced 2024-09-21 10:27:18 +00:00
Add macro_name to caps structures for rig, rot, and amp devices
This commit is contained in:
parent
30a8a690ca
commit
d0f114b178
@ -62,10 +62,10 @@ struct kpa_priv_data *kpa1500_priv;
|
||||
|
||||
const struct amp_caps kpa1500_amp_caps =
|
||||
{
|
||||
.amp_model = AMP_MODEL_ELECRAFT_KPA1500,
|
||||
AMP_MODEL(AMP_MODEL_ELECRAFT_KPA1500),
|
||||
.model_name = "KPA1500",
|
||||
.mfg_name = "Elecraft",
|
||||
.version = "2020-01-12",
|
||||
.version = "20200112",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_ALPHA,
|
||||
.amp_type = AMP_TYPE_OTHER,
|
||||
|
@ -334,7 +334,7 @@ static int dummy_amp_get_ext_level(AMP *amp, token_t token, value_t *val)
|
||||
|
||||
const struct amp_caps dummy_amp_caps =
|
||||
{
|
||||
.amp_model = AMP_MODEL_DUMMY,
|
||||
AMP_MODEL(AMP_MODEL_DUMMY),
|
||||
.model_name = "Dummy",
|
||||
.mfg_name = "Hamlib",
|
||||
.version = "0.1",
|
||||
|
@ -195,7 +195,7 @@ static const char *netampctl_get_info(AMP *amp)
|
||||
|
||||
const struct amp_caps netampctl_caps =
|
||||
{
|
||||
.amp_model = AMP_MODEL_NETAMPCTL,
|
||||
AMP_MODEL(AMP_MODEL_NETAMPCTL),
|
||||
.model_name = "NET ampctl",
|
||||
.mfg_name = "Hamlib",
|
||||
.version = "0.1",
|
||||
|
@ -325,7 +325,7 @@ static const char *netrotctl_get_info(ROT *rot)
|
||||
|
||||
const struct rot_caps netrotctl_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_NETROTCTL,
|
||||
ROT_MODEL(ROT_MODEL_NETROTCTL),
|
||||
.model_name = "NET rotctl",
|
||||
.mfg_name = "Hamlib",
|
||||
.version = "0.3",
|
||||
|
@ -272,7 +272,7 @@ static const char *dummy_rot_get_info(ROT *rot)
|
||||
|
||||
const struct rot_caps dummy_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_DUMMY,
|
||||
ROT_MODEL(ROT_MODEL_DUMMY),
|
||||
.model_name = "Dummy",
|
||||
.mfg_name = "Hamlib",
|
||||
.version = "0.2",
|
||||
|
@ -148,11 +148,12 @@ enum amp_level_e
|
||||
* n.b.: Don't move fields around, as the backends depend on it when
|
||||
* initializing their caps.
|
||||
*/
|
||||
#define AMP_MODEL(arg) .amp_model=arg,.amp_model_macro_name=#arg
|
||||
#define AMP_MODEL(arg) .amp_model=arg,.macro_name=#arg
|
||||
struct amp_caps
|
||||
{
|
||||
amp_model_t amp_model; /*!< Amplifier model. */
|
||||
const char *model_name; /*!< Model name. */
|
||||
const char *macro_name; /*!< Macro name. */
|
||||
const char *mfg_name; /*!< Manufacturer. */
|
||||
const char *version; /*!< Driver version. */
|
||||
const char *copyright; /*!< Copyright info. */
|
||||
|
@ -1385,10 +1385,10 @@ typedef int (* confval_cb_t)(RIG *,
|
||||
* mdblack: Don't move fields around without bumping the version numbers
|
||||
* DLL or shared library replacement would break the interface
|
||||
*/
|
||||
#define RIG_MODEL(arg) .rig_model=arg,.rig_model_macro_name=#arg
|
||||
#define RIG_MODEL(arg) .rig_model=arg,.macro_name=#arg
|
||||
struct rig_caps {
|
||||
rig_model_t rig_model; /*!< Rig model. */
|
||||
const char *rig_model_macro_name; /*!< Rig model macro name */
|
||||
const char *macro_name; /*!< Rig model macro name */
|
||||
const char *model_name; /*!< Model name. */
|
||||
const char *mfg_name; /*!< Manufacturer. */
|
||||
const char *version; /*!< Driver version. */
|
||||
|
@ -213,13 +213,14 @@ typedef enum {
|
||||
* sharing the struct rot_caps of the backend, while keeping their own
|
||||
* customized data.
|
||||
*
|
||||
* n.b.: Don't move fields around, as the backends depend on it when
|
||||
* initializing their caps.
|
||||
* mdblack: Careful movinf fields around, as the backends depend on it when
|
||||
* initializing their caps in shared libraries and dlls.
|
||||
*/
|
||||
#define ROT_MODEL(arg) .rot_model=arg,.rot_model_macro_name=#arg
|
||||
#define ROT_MODEL(arg) .rot_model=arg,.macro_name=#arg
|
||||
struct rot_caps {
|
||||
rot_model_t rot_model; /*!< Rotator model. */
|
||||
const char *model_name; /*!< Model name. */
|
||||
const char *macro_name; /*!< Macro name. */
|
||||
const char *mfg_name; /*!< Manufacturer. */
|
||||
const char *version; /*!< Driver version. */
|
||||
const char *copyright; /*!< Copyright info. */
|
||||
|
@ -22,7 +22,7 @@
|
||||
#ifndef _IC10_H
|
||||
#define _IC10_H 1
|
||||
|
||||
#define IC10_VER "0.6.1"
|
||||
#define IC10_VER ".1"
|
||||
|
||||
int ic10_cmd_trim (char *data, int data_len);
|
||||
int ic10_transaction (RIG *rig, const char *cmd, int cmd_len, char *data, int *data_len);
|
||||
|
@ -62,7 +62,7 @@ const struct rig_caps r5000_caps =
|
||||
RIG_MODEL(RIG_MODEL_R5000),
|
||||
.model_name = "R-5000",
|
||||
.mfg_name = "Kenwood",
|
||||
.version = IC10_VER,
|
||||
.version = BACKEND_VER IC10_VER,
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_ALPHA,
|
||||
.rig_type = RIG_TYPE_RECEIVER,
|
||||
|
@ -64,7 +64,7 @@ const struct rig_caps ts440_caps =
|
||||
RIG_MODEL(RIG_MODEL_TS440),
|
||||
.model_name = "TS-440",
|
||||
.mfg_name = "Kenwood",
|
||||
.version = BACKEND_VER "." IC10_VER,
|
||||
.version = BACKEND_VER IC10_VER,
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_ALPHA,
|
||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||
|
@ -113,7 +113,7 @@ pcrotor_move(ROT *rot, int direction, int speed)
|
||||
*/
|
||||
const struct rot_caps pcrotor_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_PCROTOR,
|
||||
ROT_MODEL(ROT_MODEL_PCROTOR),
|
||||
.model_name = "PcRotor",
|
||||
.mfg_name = "WA6UFQ",
|
||||
.version = "0.1",
|
||||
|
@ -151,7 +151,7 @@ const struct rig_caps ft920_caps =
|
||||
RIG_MODEL(RIG_MODEL_FT920),
|
||||
.model_name = "FT-920",
|
||||
.mfg_name = "Yaesu",
|
||||
.version = "2010-08-23", /* YYYY-MM-DD */
|
||||
.version = "20100823", /* YYYYMMDD */
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_STABLE,
|
||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||
|
@ -102,7 +102,7 @@ if100_set_position(ROT *rot, azimuth_t az, elevation_t el)
|
||||
*/
|
||||
const struct rot_caps if100_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_IF100,
|
||||
ROT_MODEL(ROT_MODEL_IF100),
|
||||
.model_name = "IF-100",
|
||||
.mfg_name = "AMSAT",
|
||||
.version = "0.1",
|
||||
|
@ -711,7 +711,7 @@ ars_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
|
||||
*/
|
||||
const struct rot_caps rci_azel_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_RCI_AZEL,
|
||||
ROT_MODEL(ROT_MODEL_RCI_AZEL),
|
||||
.model_name = "ARS RCI AZ&EL",
|
||||
.mfg_name = "EA4TX",
|
||||
.version = "0.2",
|
||||
@ -745,7 +745,7 @@ const struct rot_caps rci_azel_rot_caps =
|
||||
*/
|
||||
const struct rot_caps rci_az_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_RCI_AZ,
|
||||
ROT_MODEL(ROT_MODEL_RCI_AZ),
|
||||
.model_name = "ARS RCI AZ",
|
||||
.mfg_name = "EA4TX",
|
||||
.version = "0.1",
|
||||
|
@ -227,7 +227,7 @@ celestron_get_info(ROT *rot)
|
||||
|
||||
const struct rot_caps nexstar_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_NEXSTAR,
|
||||
ROT_MODEL(ROT_MODEL_NEXSTAR),
|
||||
.model_name = "NexStar", // Any Celestron starting with version 1.2
|
||||
.mfg_name = "Celestron",
|
||||
.version = "0.1",
|
||||
|
@ -59,7 +59,7 @@ cnctrk_set_position(ROT *rot, azimuth_t az, elevation_t el)
|
||||
it assumes there is a LinuxCNC running with the Axis GUI */
|
||||
const struct rot_caps cnctrk_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_CNCTRK,
|
||||
ROT_MODEL(ROT_MODEL_CNCTRK),
|
||||
.model_name = "CNCTRK",
|
||||
.mfg_name = "CNCTRK",
|
||||
.version = "0.1",
|
||||
|
@ -442,7 +442,7 @@ static int easycomm_rot_set_conf(ROT *rot, token_t token, const char *val)
|
||||
*/
|
||||
const struct rot_caps easycomm1_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_EASYCOMM1,
|
||||
ROT_MODEL(ROT_MODEL_EASYCOMM1),
|
||||
.model_name = "EasycommI",
|
||||
.mfg_name = "Hamlib",
|
||||
.version = "0.4",
|
||||
@ -478,7 +478,7 @@ const struct rot_caps easycomm1_rot_caps =
|
||||
*/
|
||||
const struct rot_caps easycomm2_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_EASYCOMM2,
|
||||
ROT_MODEL(ROT_MODEL_EASYCOMM2),
|
||||
.model_name = "EasycommII",
|
||||
.mfg_name = "Hamlib",
|
||||
.version = "0.4",
|
||||
@ -524,7 +524,7 @@ const struct rot_caps easycomm2_rot_caps =
|
||||
*/
|
||||
const struct rot_caps easycomm3_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_EASYCOMM3,
|
||||
ROT_MODEL(ROT_MODEL_EASYCOMM3),
|
||||
.model_name = "EasycommIII",
|
||||
.mfg_name = "Hamlib",
|
||||
.version = "0.4",
|
||||
|
@ -306,7 +306,7 @@ static const char *ether_rot_get_info(ROT *rot)
|
||||
|
||||
const struct rot_caps ether6_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_ETHER6,
|
||||
ROT_MODEL(ROT_MODEL_ETHER6),
|
||||
.model_name = "Ether6 (via ethernet)",
|
||||
.mfg_name = "DG9OAA",
|
||||
.version = "0.1",
|
||||
|
@ -138,7 +138,7 @@ fodtrack_set_position(ROT *rot, azimuth_t az, elevation_t el)
|
||||
*/
|
||||
const struct rot_caps fodtrack_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_FODTRACK,
|
||||
ROT_MODEL(ROT_MODEL_FODTRACK),
|
||||
.model_name = "Fodtrack",
|
||||
.mfg_name = "XQ2FOD",
|
||||
.version = "0.2",
|
||||
|
@ -241,7 +241,7 @@ gs232_rot_stop(ROT *rot)
|
||||
|
||||
const struct rot_caps gs232_generic_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_GS232_GENERIC,
|
||||
ROT_MODEL(ROT_MODEL_GS232_GENERIC),
|
||||
.model_name = "GS-232 Generic",
|
||||
.mfg_name = "Various",
|
||||
.version = "0.3",
|
||||
@ -277,7 +277,7 @@ const struct rot_caps gs232_generic_rot_caps =
|
||||
|
||||
const struct rot_caps amsat_lvb_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_LVB,
|
||||
ROT_MODEL(ROT_MODEL_LVB),
|
||||
.model_name = "LVB Tracker",
|
||||
.mfg_name = "AMSAT",
|
||||
.version = "0.1",
|
||||
@ -314,7 +314,7 @@ const struct rot_caps amsat_lvb_rot_caps =
|
||||
|
||||
const struct rot_caps st2_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_ST2,
|
||||
ROT_MODEL(ROT_MODEL_ST2),
|
||||
.model_name = "GS232/ST2",
|
||||
.mfg_name = "FoxDelta",
|
||||
.version = "0.1",
|
||||
@ -352,7 +352,7 @@ const struct rot_caps st2_rot_caps =
|
||||
|
||||
const struct rot_caps f1tetracker_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_F1TETRACKER,
|
||||
ROT_MODEL(ROT_MODEL_F1TETRACKER),
|
||||
.model_name = "GS232/F1TE Tracker",
|
||||
.mfg_name = "F1TE",
|
||||
.version = "0.1",
|
||||
|
@ -291,7 +291,7 @@ gs232a_rot_move(ROT *rot, int direction, int speed)
|
||||
|
||||
const struct rot_caps gs23_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_GS23,
|
||||
ROT_MODEL(ROT_MODEL_GS23),
|
||||
.model_name = "GS-23",
|
||||
.mfg_name = "Yaesu/Kenpro",
|
||||
.version = "0.2",
|
||||
@ -327,7 +327,7 @@ const struct rot_caps gs23_rot_caps =
|
||||
|
||||
const struct rot_caps gs232_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_GS232,
|
||||
ROT_MODEL(ROT_MODEL_GS232),
|
||||
.model_name = "GS-232",
|
||||
.mfg_name = "Yaesu/Kenpro",
|
||||
.version = "0.1",
|
||||
@ -363,7 +363,7 @@ const struct rot_caps gs232_rot_caps =
|
||||
|
||||
const struct rot_caps gs232a_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_GS232A,
|
||||
ROT_MODEL(ROT_MODEL_GS232A),
|
||||
.model_name = "GS-232A",
|
||||
.mfg_name = "Yaesu",
|
||||
.version = "0.5",
|
||||
|
@ -310,7 +310,7 @@ gs232b_rot_move(ROT *rot, int direction, int speed)
|
||||
|
||||
const struct rot_caps gs232b_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_GS232B,
|
||||
ROT_MODEL(ROT_MODEL_GS232B),
|
||||
.model_name = "GS-232B",
|
||||
.mfg_name = "Yaesu",
|
||||
.version = "0.5",
|
||||
|
@ -64,7 +64,7 @@ static int hd1780_send_priv_cmd(ROT *rot, const char *cmd);
|
||||
|
||||
const struct rot_caps hd1780_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_HD1780,
|
||||
ROT_MODEL(ROT_MODEL_HD1780),
|
||||
.model_name = "HD 1780 Intellirotor",
|
||||
.mfg_name = "Heathkit",
|
||||
.version = "0.1",
|
||||
|
@ -303,7 +303,7 @@ ioptron_get_info(ROT *rot)
|
||||
|
||||
const struct rot_caps ioptron_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_IOPTRON,
|
||||
ROT_MODEL(ROT_MODEL_IOPTRON),
|
||||
.model_name = "iOptron",
|
||||
.mfg_name = "iOptron",
|
||||
.version = "0.1",
|
||||
|
@ -362,7 +362,7 @@ rc2800_rot_stop(ROT *rot)
|
||||
|
||||
const struct rot_caps rc2800_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_RC2800,
|
||||
ROT_MODEL(ROT_MODEL_RC2800),
|
||||
.model_name = "RC2800",
|
||||
.mfg_name = "M2",
|
||||
.version = "0.1.1",
|
||||
|
@ -448,7 +448,7 @@ static const char *meade_get_info(ROT *rot)
|
||||
|
||||
const struct rot_caps meade_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_MEADE,
|
||||
ROT_MODEL(ROT_MODEL_MEADE),
|
||||
.model_name = "LX200/Autostar",
|
||||
.mfg_name = "Meade",
|
||||
.version = "0.2",
|
||||
|
@ -256,7 +256,7 @@ static int prosistel_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
|
||||
|
||||
const struct rot_caps prosistel_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_PROSISTEL,
|
||||
ROT_MODEL(ROT_MODEL_PROSISTEL),
|
||||
.model_name = "Prosistel D",
|
||||
.mfg_name = "Prosistel",
|
||||
.version = "0.5",
|
||||
|
@ -131,7 +131,7 @@ static const struct confparams rotorez_cfg_params[] =
|
||||
|
||||
const struct rot_caps rotorez_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_ROTOREZ,
|
||||
ROT_MODEL(ROT_MODEL_ROTOREZ),
|
||||
.model_name = "Rotor-EZ",
|
||||
.mfg_name = "Idiom Press",
|
||||
.version = "2010-02-14",
|
||||
@ -176,7 +176,7 @@ const struct rot_caps rotorez_rot_caps =
|
||||
|
||||
const struct rot_caps rotorcard_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_ROTORCARD,
|
||||
ROT_MODEL(ROT_MODEL_ROTORCARD),
|
||||
.model_name = "RotorCard",
|
||||
.mfg_name = "Idiom Press",
|
||||
.version = "2010-02-14",
|
||||
@ -220,7 +220,7 @@ const struct rot_caps rotorcard_rot_caps =
|
||||
|
||||
const struct rot_caps dcu_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_DCU,
|
||||
ROT_MODEL(ROT_MODEL_DCU),
|
||||
.model_name = "DCU-1/DCU-1X",
|
||||
.mfg_name = "Hy-Gain",
|
||||
.version = "2010-08-23",
|
||||
@ -264,7 +264,7 @@ const struct rot_caps dcu_rot_caps =
|
||||
|
||||
const struct rot_caps erc_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_ERC,
|
||||
ROT_MODEL(ROT_MODEL_ERC),
|
||||
.model_name = "ERC",
|
||||
.mfg_name = "DF9GR",
|
||||
.version = "2010-08-23b", /* second revision on 23 Aug 2010 */
|
||||
@ -306,7 +306,7 @@ const struct rot_caps erc_rot_caps =
|
||||
|
||||
const struct rot_caps rt21_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_RT21,
|
||||
ROT_MODEL(ROT_MODEL_RT21),
|
||||
.model_name = "RT-21",
|
||||
.mfg_name = "Green Heron",
|
||||
.version = "2014-09-14",
|
||||
|
@ -53,7 +53,7 @@
|
||||
|
||||
const struct rot_caps sartek_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_SARTEK1,
|
||||
ROT_MODEL(ROT_MODEL_SARTEK1),
|
||||
.model_name = "SARtek-1",
|
||||
.mfg_name = "SARtek",
|
||||
.version = "0.2",
|
||||
|
@ -450,7 +450,7 @@ const struct confparams spid_cfg_params[] =
|
||||
|
||||
const struct rot_caps spid_rot1prog_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_SPID_ROT1PROG,
|
||||
ROT_MODEL(ROT_MODEL_SPID_ROT1PROG),
|
||||
.model_name = "Rot1Prog",
|
||||
.mfg_name = "SPID",
|
||||
.version = "1.0",
|
||||
@ -487,7 +487,7 @@ const struct rot_caps spid_rot1prog_rot_caps =
|
||||
|
||||
const struct rot_caps spid_rot2prog_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_SPID_ROT2PROG,
|
||||
ROT_MODEL(ROT_MODEL_SPID_ROT2PROG),
|
||||
.model_name = "Rot2Prog",
|
||||
.mfg_name = "SPID",
|
||||
.version = "1.0",
|
||||
@ -524,7 +524,7 @@ const struct rot_caps spid_rot2prog_rot_caps =
|
||||
|
||||
const struct rot_caps spid_md01_rot2prog_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_SPID_MD01_ROT2PROG,
|
||||
ROT_MODEL(ROT_MODEL_SPID_MD01_ROT2PROG),
|
||||
.model_name = "MD-01/02 (ROT2 mode)",
|
||||
.mfg_name = "SPID",
|
||||
.version = "1.0",
|
||||
|
@ -272,7 +272,7 @@ static const char *ts7400_rot_get_info(ROT *rot)
|
||||
|
||||
const struct rot_caps ts7400_rot_caps =
|
||||
{
|
||||
.rot_model = ROT_MODEL_TS7400,
|
||||
ROT_MODEL(ROT_MODEL_TS7400),
|
||||
.model_name = "ts7400",
|
||||
.mfg_name = "LA7LKA",
|
||||
.version = "0.1",
|
||||
|
@ -214,6 +214,7 @@ struct mod_lst
|
||||
char model_name[32]; /* caps->model_name */
|
||||
char version[32]; /* caps->version */
|
||||
char status[32]; /* caps->status */
|
||||
char macro_name[32]; /* caps->macro_name */
|
||||
UT_hash_handle hh; /* makes this structure hashable */
|
||||
};
|
||||
|
||||
@ -226,7 +227,8 @@ void hash_add_model(int id,
|
||||
const char *mfg_name,
|
||||
const char *model_name,
|
||||
const char *version,
|
||||
const char *status)
|
||||
const char *status,
|
||||
const char *macro_name)
|
||||
{
|
||||
struct mod_lst *s;
|
||||
|
||||
@ -237,6 +239,7 @@ void hash_add_model(int id,
|
||||
snprintf(s->model_name, sizeof(s->model_name), "%s", model_name);
|
||||
snprintf(s->version, sizeof(s->version), "%s", version);
|
||||
snprintf(s->status, sizeof(s->status), "%s", status);
|
||||
snprintf(s->macro_name, sizeof(s->macro_name), "%s", macro_name);
|
||||
|
||||
HASH_ADD_INT(models, id, s); /* id: name of key field */
|
||||
}
|
||||
@ -1540,7 +1543,8 @@ static int hash_model_list(const struct amp_caps *caps, void *data)
|
||||
caps->mfg_name,
|
||||
caps->model_name,
|
||||
caps->version,
|
||||
rig_strstatus(caps->status));
|
||||
rig_strstatus(caps->status),
|
||||
caps->macro_name);
|
||||
|
||||
return 1; /* !=0, we want them all ! */
|
||||
}
|
||||
@ -1551,12 +1555,13 @@ void print_model_list()
|
||||
|
||||
for (s = models; s != NULL; s = (struct mod_lst *)(s->hh.next))
|
||||
{
|
||||
printf("%6u %-23s%-24s%-16s%s\n",
|
||||
printf("%6u %-23s%-24s%-16s%-14s%s\n",
|
||||
s->id,
|
||||
s->mfg_name,
|
||||
s->model_name,
|
||||
s->version,
|
||||
s->status);
|
||||
s->status,
|
||||
s->macro_name);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1567,7 +1572,7 @@ void list_models()
|
||||
|
||||
amp_load_all_backends();
|
||||
|
||||
printf(" Amp # Mfg Model Version Status\n");
|
||||
printf(" Amp # Mfg Model Version Status Macro\n");
|
||||
status = amp_list_foreach(hash_model_list, NULL);
|
||||
|
||||
if (status != RIG_OK)
|
||||
|
@ -29,57 +29,57 @@
|
||||
|
||||
int print_caps_sum(const struct rig_caps *caps, void *data)
|
||||
{
|
||||
|
||||
printf("%d\t%-10s\t%-14s\t%-8s\t",
|
||||
char *fmt1 = "%-13s";
|
||||
printf("%6d \t%-22s \t%-23s\t%-8s \t",
|
||||
caps->rig_model,
|
||||
caps->mfg_name,
|
||||
caps->model_name,
|
||||
caps->version);
|
||||
|
||||
printf("%.10s\t", rig_strstatus(caps->status));
|
||||
printf("%-8s \t", rig_strstatus(caps->status));
|
||||
|
||||
switch (caps->rig_type & RIG_TYPE_MASK)
|
||||
{
|
||||
case RIG_TYPE_TRANSCEIVER:
|
||||
printf("%.16s\t","Transceiver");
|
||||
printf(fmt1,"Transceiver");
|
||||
break;
|
||||
|
||||
case RIG_TYPE_HANDHELD:
|
||||
printf("%.16s\t","Handheld");
|
||||
printf(fmt1,"Handheld");
|
||||
break;
|
||||
|
||||
case RIG_TYPE_MOBILE:
|
||||
printf("%.16s\t","Mobile");
|
||||
printf(fmt1,"Mobile");
|
||||
break;
|
||||
|
||||
case RIG_TYPE_RECEIVER:
|
||||
printf("%.16s\t","Receiver");
|
||||
printf(fmt1,"Receiver");
|
||||
break;
|
||||
|
||||
case RIG_TYPE_PCRECEIVER:
|
||||
printf("%.16s\t","PC Receiver");
|
||||
printf(fmt1,"PC Receiver");
|
||||
break;
|
||||
|
||||
case RIG_TYPE_SCANNER:
|
||||
printf("%.16s\t","Scanner");
|
||||
printf(fmt1,"Scanner");
|
||||
break;
|
||||
|
||||
case RIG_TYPE_TRUNKSCANNER:
|
||||
printf("%.16s\t","Trunking scanner");
|
||||
printf(fmt1,"Trunk scanner");
|
||||
break;
|
||||
|
||||
case RIG_TYPE_COMPUTER:
|
||||
printf("%.16s\t","Computer");
|
||||
printf(fmt1,"Computer");
|
||||
break;
|
||||
|
||||
case RIG_TYPE_OTHER:
|
||||
printf("%.16s\t","Other");
|
||||
printf(fmt1,"Other");
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("%.16s\t","Unknown");
|
||||
printf(fmt1,"Unknown");
|
||||
}
|
||||
printf("%s\n",caps->rig_model_macro_name==NULL?"Unknown":caps->rig_model_macro_name);
|
||||
printf("\t%s\n",caps->macro_name==NULL?"Unknown":caps->macro_name);
|
||||
return -1; /* !=0, we want them all ! */
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
rig_load_all_backends();
|
||||
|
||||
printf("Rig#\tMfg \tModel \tVers. \tStatus \tType \tMacro\n");
|
||||
printf(" Rig# \tMfg \tModel \tVersion \tStatus \tType \tMacro\n");
|
||||
|
||||
status = rig_list_foreach(print_caps_sum, NULL);
|
||||
|
||||
|
@ -348,6 +348,7 @@ struct mod_lst
|
||||
char model_name[32]; /* caps->model_name */
|
||||
char version[32]; /* caps->version */
|
||||
char status[32]; /* caps->status */
|
||||
char macro_name[32]; /* caps->status */
|
||||
UT_hash_handle hh; /* makes this structure hashable */
|
||||
};
|
||||
|
||||
@ -361,7 +362,8 @@ void hash_add_model(int id,
|
||||
const char *mfg_name,
|
||||
const char *model_name,
|
||||
const char *version,
|
||||
const char *status)
|
||||
const char *status,
|
||||
const char *macro_name)
|
||||
{
|
||||
struct mod_lst *s;
|
||||
|
||||
@ -372,6 +374,7 @@ void hash_add_model(int id,
|
||||
snprintf(s->model_name, sizeof(s->model_name), "%s", model_name);
|
||||
snprintf(s->version, sizeof(s->version), "%s", version);
|
||||
snprintf(s->status, sizeof(s->status), "%s", status);
|
||||
snprintf(s->macro_name, sizeof(s->macro_name), "%s", macro_name);
|
||||
|
||||
HASH_ADD_INT(models, id, s); /* id: name of key field */
|
||||
}
|
||||
@ -1771,6 +1774,7 @@ static int hash_model_list(const struct rig_caps *caps, void *data)
|
||||
caps->mfg_name,
|
||||
caps->model_name,
|
||||
caps->version,
|
||||
caps->macro_name,
|
||||
rig_strstatus(caps->status));
|
||||
|
||||
return 1; /* !=0, we want them all ! */
|
||||
@ -1783,11 +1787,12 @@ void print_model_list()
|
||||
|
||||
for (s = models; s != NULL; s = (struct mod_lst *)(s->hh.next))
|
||||
{
|
||||
printf("%6d %-23s%-24s%-16s%s\n",
|
||||
printf("%6d %-23s%-24s%-16s%-12s%s\n",
|
||||
s->id,
|
||||
s->mfg_name,
|
||||
s->model_name,
|
||||
s->version,
|
||||
s->macro_name,
|
||||
s->status);
|
||||
}
|
||||
}
|
||||
@ -1799,7 +1804,7 @@ void list_models()
|
||||
|
||||
rig_load_all_backends();
|
||||
|
||||
printf(" Rig # Mfg Model Version Status\n");
|
||||
printf(" Rig # Mfg Model Version Status Macro\n");
|
||||
status = rig_list_foreach(hash_model_list, NULL);
|
||||
|
||||
if (status != RIG_OK)
|
||||
|
@ -258,6 +258,7 @@ struct mod_lst
|
||||
char model_name[32]; /* caps->model_name */
|
||||
char version[32]; /* caps->version */
|
||||
char status[32]; /* caps->status */
|
||||
char macro_name[32]; /* caps->macro_name */
|
||||
UT_hash_handle hh; /* makes this structure hashable */
|
||||
};
|
||||
|
||||
@ -270,7 +271,8 @@ void hash_add_model(int id,
|
||||
const char *mfg_name,
|
||||
const char *model_name,
|
||||
const char *version,
|
||||
const char *status)
|
||||
const char *status,
|
||||
const char *macro_name)
|
||||
{
|
||||
struct mod_lst *s;
|
||||
|
||||
@ -281,6 +283,7 @@ void hash_add_model(int id,
|
||||
snprintf(s->model_name, sizeof(s->model_name), "%s", model_name);
|
||||
snprintf(s->version, sizeof(s->version), "%s", version);
|
||||
snprintf(s->status, sizeof(s->status), "%s", status);
|
||||
snprintf(s->macro_name, sizeof(s->macro_name), "%s", macro_name);
|
||||
|
||||
HASH_ADD_INT(models, id, s); /* id: name of key field */
|
||||
}
|
||||
@ -1589,7 +1592,8 @@ static int hash_model_list(const struct rot_caps *caps, void *data)
|
||||
caps->mfg_name,
|
||||
caps->model_name,
|
||||
caps->version,
|
||||
rig_strstatus(caps->status));
|
||||
rig_strstatus(caps->status),
|
||||
caps->macro_name);
|
||||
|
||||
return 1; /* !=0, we want them all ! */
|
||||
}
|
||||
@ -1600,12 +1604,13 @@ void print_model_list()
|
||||
|
||||
for (s = models; s != NULL; s = (struct mod_lst *)(s->hh.next))
|
||||
{
|
||||
printf("%6d %-23s%-24s%-16s%s\n",
|
||||
printf("%6d %-23s%-24s%-16s%-14s%s\n",
|
||||
s->id,
|
||||
s->mfg_name,
|
||||
s->model_name,
|
||||
s->version,
|
||||
s->status);
|
||||
s->status,
|
||||
s->macro_name);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1616,7 +1621,7 @@ void list_models()
|
||||
|
||||
rot_load_all_backends();
|
||||
|
||||
printf(" Rot # Mfg Model Version Status\n");
|
||||
printf(" Rot # Mfg Model Version Status Macro\n");
|
||||
status = rot_list_foreach(hash_model_list, NULL);
|
||||
|
||||
if (status != RIG_OK)
|
||||
|
Loading…
Reference in New Issue
Block a user