renamed xet_ctcss to xet_ctcss_tone and xet_dcs to xet_dcs_code to make it less ambiguous in regards to the squelch functions

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@576 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.1.2
Stéphane Fillod, F8CFE 2001-07-01 11:46:17 +00:00
rodzic a00f34d5db
commit c9dc785aaa
17 zmienionych plików z 151 dodań i 151 usunięć

Wyświetl plik

@ -6,7 +6,7 @@
* via serial interface to a Kenwood radio.
*
*
* $Id: alinco.c,v 1.4 2001-06-27 17:32:47 f4cfe Exp $
* $Id: alinco.c,v 1.5 2001-07-01 11:46:17 f4cfe Exp $
*
*
*
@ -688,10 +688,10 @@ int alinco_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
}
/*
* alinco_set_ctcss
* alinco_set_ctcss_tone
* Assumes rig!=NULL, rig->caps->ctcss_list != NULL
*/
int alinco_set_ctcss(RIG *rig, vfo_t vfo, tone_t tone)
int alinco_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
{
const struct rig_caps *caps;
unsigned char tonebuf[16];

Wyświetl plik

@ -6,7 +6,7 @@
* via serial interface to a Alinco radio.
*
*
* $Id: alinco.h,v 1.4 2001-06-27 17:32:47 f4cfe Exp $
* $Id: alinco.h,v 1.5 2001-07-01 11:46:17 f4cfe Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -59,7 +59,7 @@ int alinco_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val);
int alinco_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val);
int alinco_set_parm(RIG *rig, vfo_t vfo, setting_t parm, value_t val);
int alinco_get_parm(RIG *rig, vfo_t vfo, setting_t parm, value_t *val);
int alinco_set_ctcss(RIG *rig, vfo_t vfo, tone_t tone);
int alinco_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone);
int alinco_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit);
int alinco_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt);
int alinco_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd);

Wyświetl plik

@ -6,7 +6,7 @@
* via serial interface to a Alinco radio.
*
*
* $Id: dx77.c,v 1.1 2001-06-03 17:39:59 f4cfe Exp $
* $Id: dx77.c,v 1.2 2001-07-01 11:46:17 f4cfe Exp $
*
*
*
@ -185,7 +185,7 @@ set_split: alinco_set_split,
get_split: alinco_get_split,
set_split_freq: alinco_set_split_freq,
get_split_freq: alinco_get_split_freq,
set_ctcss: alinco_set_ctcss,
set_ctcss_tone: alinco_set_ctcss_tone,
get_rit: alinco_get_rit,
get_ptt: alinco_get_ptt,
get_dcd: alinco_get_dcd,

Wyświetl plik

@ -7,7 +7,7 @@
* purpose mainly.
*
*
* $Id: dummy.c,v 1.13 2001-06-27 17:32:47 f4cfe Exp $
* $Id: dummy.c,v 1.14 2001-07-01 11:46:17 f4cfe Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -259,7 +259,7 @@ static int dummy_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs)
}
static int dummy_set_ctcss(RIG *rig, vfo_t vfo, unsigned int tone)
static int dummy_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
{
rig_debug(RIG_DEBUG_VERBOSE,__FUNCTION__ " called\n");
@ -267,7 +267,7 @@ static int dummy_set_ctcss(RIG *rig, vfo_t vfo, unsigned int tone)
}
static int dummy_get_ctcss(RIG *rig, vfo_t vfo, unsigned int *tone)
static int dummy_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
{
rig_debug(RIG_DEBUG_VERBOSE,__FUNCTION__ " called\n");
@ -275,7 +275,7 @@ static int dummy_get_ctcss(RIG *rig, vfo_t vfo, unsigned int *tone)
}
static int dummy_set_dcs(RIG *rig, vfo_t vfo, unsigned int code)
static int dummy_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code)
{
rig_debug(RIG_DEBUG_VERBOSE,__FUNCTION__ " called\n");
@ -283,7 +283,7 @@ static int dummy_set_dcs(RIG *rig, vfo_t vfo, unsigned int code)
}
static int dummy_get_dcs(RIG *rig, vfo_t vfo, unsigned int *code)
static int dummy_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code)
{
rig_debug(RIG_DEBUG_VERBOSE,__FUNCTION__ " called\n");
@ -291,7 +291,7 @@ static int dummy_get_dcs(RIG *rig, vfo_t vfo, unsigned int *code)
}
static int dummy_set_ctcss_sql(RIG *rig, vfo_t vfo, unsigned int tone)
static int dummy_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
{
rig_debug(RIG_DEBUG_VERBOSE,__FUNCTION__ " called\n");
@ -299,7 +299,7 @@ static int dummy_set_ctcss_sql(RIG *rig, vfo_t vfo, unsigned int tone)
}
static int dummy_get_ctcss_sql(RIG *rig, vfo_t vfo, unsigned int *tone)
static int dummy_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone)
{
rig_debug(RIG_DEBUG_VERBOSE,__FUNCTION__ " called\n");
@ -685,10 +685,10 @@ const struct rig_caps dummy_caps = {
get_rptr_shift: dummy_get_rptr_shift,
set_rptr_offs: dummy_set_rptr_offs,
get_rptr_offs: dummy_get_rptr_offs,
set_ctcss: dummy_set_ctcss,
get_ctcss: dummy_get_ctcss,
set_dcs: dummy_set_dcs,
get_dcs: dummy_get_dcs,
set_ctcss_tone: dummy_set_ctcss_tone,
get_ctcss_tone: dummy_get_ctcss_tone,
set_dcs_code: dummy_set_dcs_code,
get_dcs_code: dummy_get_dcs_code,
set_ctcss_sql: dummy_set_ctcss_sql,
get_ctcss_sql: dummy_get_ctcss_sql,
set_dcs_sql: dummy_set_dcs_sql,

Wyświetl plik

@ -7,7 +7,7 @@
* using the "CI-V" interface.
*
*
* $Id: icall.c,v 1.5 2001-06-03 19:54:05 f4cfe Exp $
* $Id: icall.c,v 1.6 2001-07-01 11:46:17 f4cfe Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -210,8 +210,8 @@ set_split_mode: icom_set_split_mode,
get_split_mode: icom_get_split_mode,
set_split: icom_set_split,
get_split: icom_get_split,
set_ctcss: icom_set_ctcss,
get_ctcss: icom_get_ctcss,
set_ctcss_tone: icom_set_ctcss_tone,
get_ctcss_tone: icom_get_ctcss_tone,
set_ctcss_sql: icom_set_ctcss_sql,
get_ctcss_sql: icom_get_ctcss_sql,
};

Wyświetl plik

@ -6,7 +6,7 @@
* via serial interface to an ICOM using the "CI-V" interface.
*
*
* $Id: icom.c,v 1.33 2001-06-27 17:32:47 f4cfe Exp $
* $Id: icom.c,v 1.34 2001-07-01 11:46:17 f4cfe Exp $
*
*
*
@ -1525,13 +1525,13 @@ int icom_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
}
/*
* icom_set_ctcss
* icom_set_ctcss_tone
* Assumes rig!=NULL, rig->state.priv!=NULL
*
* Warning! This is untested stuff! May work at least on 756PRO and IC746.
* Please owners report to me <f4cfe@users.sourceforge.net>, thanks. --SF
*/
int icom_set_ctcss(RIG *rig, vfo_t vfo, unsigned int tone)
int icom_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
{
const struct rig_caps *caps;
unsigned char tonebuf[16], ackbuf[16];
@ -1565,7 +1565,7 @@ int icom_set_ctcss(RIG *rig, vfo_t vfo, unsigned int tone)
return retval;
if (ack_len != 1 || ackbuf[0] != ACK) {
rig_debug(RIG_DEBUG_ERR,"icom_set_ctcss: ack NG (%#.2x), "
rig_debug(RIG_DEBUG_ERR,"icom_set_ctcss_tone: ack NG (%#.2x), "
"len=%d\n", ackbuf[0], ack_len);
return -RIG_ERJCTED;
}
@ -1574,10 +1574,10 @@ int icom_set_ctcss(RIG *rig, vfo_t vfo, unsigned int tone)
}
/*
* icom_get_ctcss
* icom_get_ctcss_tone
* Assumes rig!=NULL, rig->state.priv!=NULL
*/
int icom_get_ctcss(RIG *rig, vfo_t vfo, unsigned int *tone)
int icom_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
{
const struct rig_caps *caps;
unsigned char tonebuf[16];
@ -1596,7 +1596,7 @@ int icom_get_ctcss(RIG *rig, vfo_t vfo, unsigned int *tone)
return retval;
if (tone_len != 3) {
rig_debug(RIG_DEBUG_ERR,"icom_get_ctcss: ack NG (%#.2x), "
rig_debug(RIG_DEBUG_ERR,"icom_get_ctcss_tone: ack NG (%#.2x), "
"len=%d\n", tonebuf[0], tone_len);
return -RIG_ERJCTED;
}
@ -1607,7 +1607,7 @@ int icom_get_ctcss(RIG *rig, vfo_t vfo, unsigned int *tone)
/* check this tone exists. That's better than nothing. */
for (i = 0; i<=tone_idx; i++) {
if (caps->ctcss_list[i] == 0) {
rig_debug(RIG_DEBUG_ERR,"icom_get_ctcss: CTCSS NG "
rig_debug(RIG_DEBUG_ERR,"icom_get_ctcss_tone: CTCSS NG "
"(%#.2x)\n", tonebuf[2]);
return -RIG_EPROTO;
}

Wyświetl plik

@ -6,7 +6,7 @@
* via serial interface to an ICOM using the "CI-V" interface.
*
*
* $Id: icom.h,v 1.23 2001-06-27 17:32:47 f4cfe Exp $
* $Id: icom.h,v 1.24 2001-07-01 11:46:17 f4cfe Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -88,10 +88,10 @@ int icom_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts);
int icom_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt);
int icom_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt);
int icom_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd);
int icom_set_ctcss(RIG *rig, vfo_t vfo, unsigned int tone);
int icom_get_ctcss(RIG *rig, vfo_t vfo, unsigned int *tone);
int icom_set_ctcss_sql(RIG *rig, vfo_t vfo, unsigned int tone);
int icom_get_ctcss_sql(RIG *rig, vfo_t vfo, unsigned int *tone);
int icom_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone);
int icom_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone);
int icom_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone);
int icom_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone);
int icom_set_bank(RIG *rig, vfo_t vfo, int bank);
int icom_set_mem(RIG *rig, vfo_t vfo, int ch);
#ifdef WANT_OLD_VFO_TO_BE_REMOVED

Wyświetl plik

@ -5,7 +5,7 @@
* will be used for obtaining rig capabilities.
*
*
* $Id: rig.h,v 1.44 2001-06-30 23:11:00 f4cfe Exp $
* $Id: rig.h,v 1.45 2001-07-01 11:46:16 f4cfe Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -613,9 +613,9 @@ struct channel {
shortfreq_t xit;
setting_t funcs;
value_t levels[RIG_SETTING_MAX];
tone_t ctcss;
tone_t ctcss_tone;
tone_t ctcss_sql;
tone_t dcs;
tone_t dcs_code;
tone_t dcs_sql;
char channel_desc[MAXCHANDESC];
};
@ -788,10 +788,10 @@ struct rig_caps {
int (*set_ts)(RIG *rig, vfo_t vfo, shortfreq_t ts);
int (*get_ts)(RIG *rig, vfo_t vfo, shortfreq_t *ts);
int (*set_dcs)(RIG *rig, vfo_t vfo, tone_t code);
int (*get_dcs)(RIG *rig, vfo_t vfo, tone_t *code);
int (*set_ctcss)(RIG *rig, vfo_t vfo, tone_t tone);
int (*get_ctcss)(RIG *rig, vfo_t vfo, tone_t *tone);
int (*set_dcs_code)(RIG *rig, vfo_t vfo, tone_t code);
int (*get_dcs_code)(RIG *rig, vfo_t vfo, tone_t *code);
int (*set_ctcss_tone)(RIG *rig, vfo_t vfo, tone_t tone);
int (*get_ctcss_tone)(RIG *rig, vfo_t vfo, tone_t *tone);
int (*set_dcs_sql)(RIG *rig, vfo_t vfo, tone_t code);
int (*get_dcs_sql)(RIG *rig, vfo_t vfo, tone_t *code);
@ -1049,10 +1049,10 @@ extern HAMLIB_EXPORT(int) rig_get_rptr_shift HAMLIB_PARAMS((RIG *rig, vfo_t vfo,
extern HAMLIB_EXPORT(int) rig_set_rptr_offs HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t rptr_offs));
extern HAMLIB_EXPORT(int) rig_get_rptr_offs HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs));
extern HAMLIB_EXPORT(int) rig_set_ctcss HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t tone));
extern HAMLIB_EXPORT(int) rig_get_ctcss HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t *tone));
extern HAMLIB_EXPORT(int) rig_set_dcs HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t code));
extern HAMLIB_EXPORT(int) rig_get_dcs HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t *code));
extern HAMLIB_EXPORT(int) rig_set_ctcss_tone HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t tone));
extern HAMLIB_EXPORT(int) rig_get_ctcss_tone HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t *tone));
extern HAMLIB_EXPORT(int) rig_set_dcs_code HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t code));
extern HAMLIB_EXPORT(int) rig_get_dcs_code HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t *code));
extern HAMLIB_EXPORT(int) rig_set_ctcss_sql HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t tone));
extern HAMLIB_EXPORT(int) rig_get_ctcss_sql HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t *tone));

Wyświetl plik

@ -6,7 +6,7 @@
* via serial interface to a Kenwood radio.
*
*
* $Id: kenwood.c,v 1.12 2001-06-30 23:19:42 f4cfe Exp $
* $Id: kenwood.c,v 1.13 2001-07-01 11:46:17 f4cfe Exp $
*
*
*
@ -593,7 +593,7 @@ int kenwood_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
}
/*
* kenwood_set_ctcss
* kenwood_set_ctcss_tone
* Assumes rig!=NULL, rig->caps->ctcss_list != NULL
*
* Warning! This is untested stuff! May work at least on TS-870S
@ -601,7 +601,7 @@ int kenwood_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
* TODO: TS-2000 uses CN/CT
*/
int kenwood_set_ctcss(RIG *rig, vfo_t vfo, unsigned int tone)
int kenwood_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
{
const struct rig_caps *caps;
unsigned char tonebuf[16], ackbuf[16];
@ -625,10 +625,10 @@ int kenwood_set_ctcss(RIG *rig, vfo_t vfo, unsigned int tone)
}
/*
* kenwood_get_ctcss
* kenwood_get_ctcss_tone
* Assumes rig!=NULL, rig->state.priv!=NULL
*/
int kenwood_get_ctcss(RIG *rig, vfo_t vfo, unsigned int *tone)
int kenwood_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
{
const struct rig_caps *caps;
unsigned char tonebuf[16];
@ -644,23 +644,23 @@ int kenwood_get_ctcss(RIG *rig, vfo_t vfo, unsigned int *tone)
return retval;
if (tone_len != 10) {
rig_debug(RIG_DEBUG_ERR,"kenwood_get_ctcss: unexpected reply '%s', "
"len=%d\n", tonebuf, tone_len);
rig_debug(RIG_DEBUG_ERR,"kenwood_get_ctcss_tone: unexpected reply "
"'%s', len=%d\n", tonebuf, tone_len);
return -RIG_ERJCTED;
}
sscanf(tonebuf+5, "%u", (int*)&tone_idx);
if (tone_idx == 0) {
rig_debug(RIG_DEBUG_ERR,"kenwood_get_ctcss: Unexpected CTCSS no "
"(%04d)\n", tone_idx);
rig_debug(RIG_DEBUG_ERR,"kenwood_get_ctcss_tone: Unexpected CTCSS "
"no (%04d)\n", tone_idx);
return -RIG_EPROTO;
}
/* check this tone exists. That's better than nothing. */
for (i = 0; i<tone_idx; i++) {
if (caps->ctcss_list[i] == 0) {
rig_debug(RIG_DEBUG_ERR,"kenwood_get_ctcss: CTCSS NG "
rig_debug(RIG_DEBUG_ERR,"kenwood_get_ctcss_tone: CTCSS NG "
"(%04d)\n", tone_idx);
return -RIG_EPROTO;
}

Wyświetl plik

@ -6,7 +6,7 @@
* via serial interface to a Kenwood radio.
*
*
* $Id: kenwood.h,v 1.6 2001-06-30 23:19:42 f4cfe Exp $
* $Id: kenwood.h,v 1.7 2001-07-01 11:46:17 f4cfe Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -40,8 +40,8 @@ int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val);
int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val);
int kenwood_set_func(RIG *rig, vfo_t vfo, setting_t func, int status);
int kenwood_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status);
int kenwood_set_ctcss(RIG *rig, vfo_t vfo, unsigned int tone);
int kenwood_get_ctcss(RIG *rig, vfo_t vfo, unsigned int *tone);
int kenwood_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone);
int kenwood_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone);
int kenwood_set_powerstat(RIG *rig, powerstat_t status);
int kenwood_get_powerstat(RIG *rig, powerstat_t *status);
int kenwood_reset(RIG *rig, reset_t reset);

Wyświetl plik

@ -7,7 +7,7 @@
* using the serial interface.
*
*
* $Id: ts570.c,v 1.1 2001-06-30 23:12:58 f4cfe Exp $
* $Id: ts570.c,v 1.2 2001-07-01 11:46:17 f4cfe Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -188,8 +188,8 @@ set_mode: kenwood_set_mode,
get_mode: kenwood_get_mode,
set_vfo: kenwood_set_vfo,
get_vfo: kenwood_get_vfo,
set_ctcss: kenwood_set_ctcss,
get_ctcss: kenwood_get_ctcss,
set_ctcss_tone: kenwood_set_ctcss_tone,
get_ctcss_tone: kenwood_get_ctcss_tone,
set_ptt: kenwood_set_ptt,
get_dcd: kenwood_get_dcd,
get_level: kenwood_get_level,
@ -343,8 +343,8 @@ set_mode: kenwood_set_mode,
get_mode: kenwood_get_mode,
set_vfo: kenwood_set_vfo,
get_vfo: kenwood_get_vfo,
set_ctcss: kenwood_set_ctcss,
get_ctcss: kenwood_get_ctcss,
set_ctcss_tone: kenwood_set_ctcss_tone,
get_ctcss_tone: kenwood_get_ctcss_tone,
set_ptt: kenwood_set_ptt,
get_dcd: kenwood_get_dcd,
get_level: kenwood_get_level,

Wyświetl plik

@ -7,7 +7,7 @@
* using the serial interface.
*
*
* $Id: ts870s.c,v 1.14 2001-05-22 21:59:26 f4cfe Exp $
* $Id: ts870s.c,v 1.15 2001-07-01 11:46:17 f4cfe Exp $
*
*
*
@ -163,8 +163,8 @@ set_mode: kenwood_set_mode,
get_mode: kenwood_get_mode,
set_vfo: kenwood_set_vfo,
get_vfo: kenwood_get_vfo,
set_ctcss: kenwood_set_ctcss,
get_ctcss: kenwood_get_ctcss,
set_ctcss_tone: kenwood_set_ctcss_tone,
get_ctcss_tone: kenwood_get_ctcss_tone,
set_ptt: kenwood_set_ptt,
get_dcd: kenwood_get_dcd,
get_level: kenwood_get_level,

102
src/rig.c
Wyświetl plik

@ -12,7 +12,7 @@
* Hamlib Interface - main file
* Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton
*
* $Id: rig.c,v 1.39 2001-06-30 12:36:43 f4cfe Exp $
* $Id: rig.c,v 1.40 2001-07-01 11:46:17 f4cfe Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -2101,26 +2101,26 @@ shortfreq_t rig_get_resolution(RIG *rig, rmode_t mode)
}
/**
* \brief set CTCSS
* \brief set CTCSS sub-tone frequency
* \param rig The rig handle
* \param vfo The target VFO
* \param tone The tone to set to
*
* Sets the current Continuous Tone Controlled Squelch System (CTCSS)
* sub-audible tone.
* \note \a tone is NOT in Hz, but in tenth of Hz! This way,
* sub-audible tone frequency.
* \note the \a tone integer is NOT in Hz, but in tenth of Hz! This way,
* if you want to set a subaudible tone of 88.5 Hz for example,
* then pass 885 to this function.
* Also, to disable Tone squelch, set \a tone to 0 (FIXME: not clear in API).
* Also, to disable Tone encoding, set \a tone to 0 (FIXME: not clear in API).
*
* \return RIG_OK if the operation has been sucessful, otherwise
* a negative value if an error occured (in which case, cause is
* set appropriately).
*
* \sa rig_get_ctcss(), rig_set_dcs(), rig_get_dcs()
* \sa rig_get_ctcss_tone(), rig_set_ctcss_sql()
*/
int rig_set_ctcss(RIG *rig, vfo_t vfo, unsigned int tone)
int rig_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
{
const struct rig_caps *caps;
int retcode;
@ -2131,12 +2131,12 @@ int rig_set_ctcss(RIG *rig, vfo_t vfo, unsigned int tone)
caps = rig->caps;
if (caps->set_ctcss == NULL)
if (caps->set_ctcss_tone == NULL)
return -RIG_ENAVAIL;
if (caps->targetable_vfo || vfo == RIG_VFO_CURR ||
vfo == rig->state.current_vfo)
return caps->set_ctcss(rig, vfo, tone);
return caps->set_ctcss_tone(rig, vfo, tone);
if (!caps->set_vfo)
return -RIG_ENTARGET;
@ -2145,31 +2145,31 @@ int rig_set_ctcss(RIG *rig, vfo_t vfo, unsigned int tone)
if (retcode != RIG_OK)
return retcode;
retcode = caps->set_ctcss(rig, vfo, tone);
retcode = caps->set_ctcss_tone(rig, vfo, tone);
caps->set_vfo(rig, curr_vfo);
return retcode;
}
/**
* \brief get the current CTCSS
* \brief get the current CTCSS sub-tone frequency
* \param rig The rig handle
* \param vfo The target VFO
* \param tone The location where to store the current tone
*
* Retrieves the current Continuous Tone Controlled Squelch System (CTCSS)
* sub-audible tone.
* \note \a *tone is NOT in Hz, but in tenth of Hz! This way,
* if the function rig_get_ctcss() returns a subaudible tone of 885
* sub-audible tone frequency.
* \note the \a *tone integer is NOT in Hz, but in tenth of Hz! This way,
* if the function rig_get_ctcss_tone() returns a subaudible tone of 885
* for example, then the real tone is 88.5 Hz.
* Also, a value of 0 for \a *tone means the Tone squelch is disabled.
* Also, a value of 0 for \a *tone means the Tone encoding is disabled.
*
* \return RIG_OK if the operation has been sucessful, otherwise
* a negative value if an error occured (in which case, cause is
* set appropriately).
*
* \sa rig_set_ctcss(), rig_set_dcs(), rig_get_dcs()
* \sa rig_set_ctcss_tone(), rig_get_ctcss_sql()
*/
int rig_get_ctcss(RIG *rig, vfo_t vfo, unsigned int *tone)
int rig_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
{
const struct rig_caps *caps;
int retcode;
@ -2180,12 +2180,12 @@ int rig_get_ctcss(RIG *rig, vfo_t vfo, unsigned int *tone)
caps = rig->caps;
if (caps->get_ctcss == NULL)
if (caps->get_ctcss_tone == NULL)
return -RIG_ENAVAIL;
if (caps->targetable_vfo || vfo == RIG_VFO_CURR ||
vfo == rig->state.current_vfo)
return caps->get_ctcss(rig, vfo, tone);
return caps->get_ctcss_tone(rig, vfo, tone);
if (!caps->set_vfo)
return -RIG_ENTARGET;
@ -2194,27 +2194,27 @@ int rig_get_ctcss(RIG *rig, vfo_t vfo, unsigned int *tone)
if (retcode != RIG_OK)
return retcode;
retcode = caps->get_ctcss(rig, vfo, tone);
retcode = caps->get_ctcss_tone(rig, vfo, tone);
caps->set_vfo(rig, curr_vfo);
return retcode;
}
/**
* \brief set the current DCS
* \brief set the current encoding DCS code
* \param rig The rig handle
* \param vfo The target VFO
* \param code The tone to set to
*
* Sets the current Digitally-Coded Squelch code.
* Sets the current encoding Digitally-Coded Squelch code.
*
* \return RIG_OK if the operation has been sucessful, otherwise
* a negative value if an error occured (in which case, cause is
* set appropriately).
*
* \sa rig_get_dcs(), rig_set_ctcss(), rig_get_ctcss()
* \sa rig_get_dcs_code(), rig_set_dcs_sql()
*/
int rig_set_dcs(RIG *rig, vfo_t vfo, unsigned int code)
int rig_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code)
{
const struct rig_caps *caps;
int retcode;
@ -2225,12 +2225,12 @@ int rig_set_dcs(RIG *rig, vfo_t vfo, unsigned int code)
caps = rig->caps;
if (caps->set_dcs == NULL)
if (caps->set_dcs_code == NULL)
return -RIG_ENAVAIL;
if (caps->targetable_vfo || vfo == RIG_VFO_CURR ||
vfo == rig->state.current_vfo)
return caps->set_dcs(rig, vfo, code);
return caps->set_dcs_code(rig, vfo, code);
if (!caps->set_vfo)
return -RIG_ENTARGET;
@ -2239,26 +2239,26 @@ int rig_set_dcs(RIG *rig, vfo_t vfo, unsigned int code)
if (retcode != RIG_OK)
return retcode;
retcode = caps->set_dcs(rig, vfo, code);
retcode = caps->set_dcs_code(rig, vfo, code);
caps->set_vfo(rig, curr_vfo);
return retcode;
}
/**
* \brief get the current DCS code
* \brief get the current encoding DCS code
* \param rig The rig handle
* \param vfo The target VFO
* \param code The location where to store the current tone
*
* Retrieves the current Digitally-Coded Squelch code.
* Retrieves the current encoding Digitally-Coded Squelch code.
*
* \return RIG_OK if the operation has been sucessful, otherwise
* a negative value if an error occured (in which case, cause is
* set appropriately).
*
* \sa rig_get_dcs(), rig_set_ctcss(), rig_get_ctcss()
* \sa rig_set_dcs_code(), rig_get_dcs_sql()
*/
int rig_get_dcs(RIG *rig, vfo_t vfo, unsigned int *code)
int rig_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code)
{
const struct rig_caps *caps;
int retcode;
@ -2269,12 +2269,12 @@ int rig_get_dcs(RIG *rig, vfo_t vfo, unsigned int *code)
caps = rig->caps;
if (caps->get_dcs == NULL)
if (caps->get_dcs_code == NULL)
return -RIG_ENAVAIL;
if (caps->targetable_vfo || vfo == RIG_VFO_CURR ||
vfo == rig->state.current_vfo)
return caps->get_dcs(rig, vfo, code);
return caps->get_dcs_code(rig, vfo, code);
if (!caps->set_vfo)
return -RIG_ENTARGET;
@ -2283,7 +2283,7 @@ int rig_get_dcs(RIG *rig, vfo_t vfo, unsigned int *code)
if (retcode != RIG_OK)
return retcode;
retcode = caps->get_dcs(rig, vfo, code);
retcode = caps->get_dcs_code(rig, vfo, code);
caps->set_vfo(rig, curr_vfo);
return retcode;
}
@ -2295,9 +2295,9 @@ int rig_get_dcs(RIG *rig, vfo_t vfo, unsigned int *code)
* \param tone The PL tone to set the squelch to
*
* Sets the current Continuous Tone Controlled Squelch System (CTCSS)
* sub-audible squelch tone.
* sub-audible *squelch* tone.
* \note \a tone is NOT in Hz, but in tenth of Hz! This way,
* if you want to set subaudible tone of 88.5 Hz for example,
* if you want to set subaudible squelch tone of 88.5 Hz for example,
* then pass 885 to this function.
* Also, to disable Tone squelch, set \a tone to 0 (FIXME: not clear in API).
*
@ -2305,10 +2305,10 @@ int rig_get_dcs(RIG *rig, vfo_t vfo, unsigned int *code)
* a negative value if an error occured (in which case, cause is
* set appropriately).
*
* \sa rig_get_ctcss_sql(), rig_set_ctcss()
* \sa rig_get_ctcss_sql(), rig_set_ctcss_tone()
*/
int rig_set_ctcss_sql(RIG *rig, vfo_t vfo, unsigned int tone)
int rig_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
{
const struct rig_caps *caps;
int retcode;
@ -2345,7 +2345,7 @@ int rig_set_ctcss_sql(RIG *rig, vfo_t vfo, unsigned int tone)
* \param tone The location where to store the current tone
*
* Retrieves the current Continuous Tone Controlled Squelch System (CTCSS)
* sub-audible squelch tone.
* sub-audible *squelch* tone.
* \note \a *tone is NOT in Hz, but in tenth of Hz! This way,
* if the function rig_get_ctcss_sql() returns a subaudible tone of 885
* for example, then the real tone is 88.5 Hz.
@ -2355,9 +2355,9 @@ int rig_set_ctcss_sql(RIG *rig, vfo_t vfo, unsigned int tone)
* a negative value if an error occured (in which case, cause is
* set appropriately).
*
* \sa rig_set_ctcss_sql(), rig_get_ctcss()
* \sa rig_set_ctcss_sql(), rig_get_ctcss_tone()
*/
int rig_get_ctcss_sql(RIG *rig, vfo_t vfo, unsigned int *tone)
int rig_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone)
{
const struct rig_caps *caps;
int retcode;
@ -2393,16 +2393,16 @@ int rig_get_ctcss_sql(RIG *rig, vfo_t vfo, unsigned int *tone)
* \param vfo The target VFO
* \param code The tone to set to
*
* Sets the current Digitally-Coded Squelch code.
* Sets the current Digitally-Coded *Squelch* code.
*
* \return returns RIG_OK if the operation has been sucessful, ortherwise
* a negative value if an error occured (in which case, cause is set
* appropriately).
*
* \sa rig_get_dcs_sql(), rig_set_dcs()
* \sa rig_get_dcs_sql(), rig_set_dcs_code()
*/
int rig_set_dcs_sql(RIG *rig, vfo_t vfo, unsigned int code)
int rig_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code)
{
const struct rig_caps *caps;
int retcode;
@ -2438,15 +2438,15 @@ int rig_set_dcs_sql(RIG *rig, vfo_t vfo, unsigned int code)
* \param vfo The target VFO
* \param code The location where to store the current tone
*
* Retrieves the current Digitally-Coded Squelch code.
* Retrieves the current Digitally-Coded *Squelch* code.
*
* \return RIG_OK if the operation has been sucessful, ortherwise
* a negative value if an error occured (in which case, cause is
* set appropriately).
*
* \sa rig_get_dcs_sql(), rig_get_dcs()
* \sa rig_set_dcs_sql(), rig_get_dcs_code()
*/
int rig_get_dcs_sql(RIG *rig, vfo_t vfo, unsigned int *code)
int rig_get_dcs_sql(RIG *rig, vfo_t vfo, tone_t *code)
{
const struct rig_caps *caps;
int retcode;
@ -3495,9 +3495,9 @@ int rig_save_channel(RIG *rig, channel_t *chan)
chan->funcs |= fstatus? rig_idx2setting(i) : 0;
}
rig_get_ctcss(rig, RIG_VFO_CURR, &chan->ctcss);
rig_get_ctcss_tone(rig, RIG_VFO_CURR, &chan->ctcss_tone);
rig_get_ctcss_sql(rig, RIG_VFO_CURR, &chan->ctcss_sql);
rig_get_dcs(rig, RIG_VFO_CURR, &chan->dcs);
rig_get_dcs_code(rig, RIG_VFO_CURR, &chan->dcs_code);
rig_get_dcs_sql(rig, RIG_VFO_CURR, &chan->dcs_sql);
/* rig_get_mem_name(rig, RIG_VFO_CURR, chan->channel_desc); */
@ -3549,9 +3549,9 @@ int rig_restore_channel(RIG *rig, const channel_t *chan)
rig_set_func(rig, RIG_VFO_CURR, rig_idx2setting(i),
chan->funcs & rig_idx2setting(i));
rig_set_ctcss(rig, RIG_VFO_CURR, chan->ctcss);
rig_set_ctcss_tone(rig, RIG_VFO_CURR, chan->ctcss_tone);
rig_set_ctcss_sql(rig, RIG_VFO_CURR, chan->ctcss_sql);
rig_set_dcs(rig, RIG_VFO_CURR, chan->dcs);
rig_set_dcs_code(rig, RIG_VFO_CURR, chan->dcs_code);
rig_set_dcs_sql(rig, RIG_VFO_CURR, chan->dcs_sql);
/* rig_set_mem_name(rig, RIG_VFO_CURR, chan->channel_desc); */

Wyświetl plik

@ -3,7 +3,7 @@
* This programs dumps the capabilities of a backend rig.
*
*
* $Id: dumpcaps.c,v 1.26 2001-06-04 21:17:52 f4cfe Exp $
* $Id: dumpcaps.c,v 1.27 2001-07-01 11:46:17 f4cfe Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -477,10 +477,10 @@ int main (int argc, char *argv[])
printf("Can get RIT:\t%c\n",caps->get_rit!=NULL?'Y':'N');
printf("Can set XIT:\t%c\n",caps->set_xit!=NULL?'Y':'N');
printf("Can get XIT:\t%c\n",caps->get_xit!=NULL?'Y':'N');
printf("Can set CTCSS:\t%c\n",caps->set_ctcss!=NULL?'Y':'N');
printf("Can get CTCSS:\t%c\n",caps->get_ctcss!=NULL?'Y':'N');
printf("Can set DCS:\t%c\n",caps->set_dcs!=NULL?'Y':'N');
printf("Can get DCS:\t%c\n",caps->get_dcs!=NULL?'Y':'N');
printf("Can set CTCSS:\t%c\n",caps->set_ctcss_tone!=NULL?'Y':'N');
printf("Can get CTCSS:\t%c\n",caps->get_ctcss_tone!=NULL?'Y':'N');
printf("Can set DCS:\t%c\n",caps->set_dcs_code!=NULL?'Y':'N');
printf("Can get DCS:\t%c\n",caps->get_dcs_code!=NULL?'Y':'N');
printf("Can set CTCSS squelch:\t%c\n",caps->set_ctcss_sql!=NULL?'Y':'N');
printf("Can get CTCSS squelch:\t%c\n",caps->get_ctcss_sql!=NULL?'Y':'N');
printf("Can set DCS squelch:\t%c\n",caps->set_dcs_sql!=NULL?'Y':'N');

Wyświetl plik

@ -3,7 +3,7 @@
* This programs dumps the mmeory contents of a rig.
*
*
* $Id: dumpmem.c,v 1.3 2001-06-04 21:17:53 f4cfe Exp $
* $Id: dumpmem.c,v 1.4 2001-07-01 11:46:17 f4cfe Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -177,9 +177,9 @@ int dump_chan(RIG *rig, int chan_num)
freq_sprintf(freqbuf,chan.xit);
printf("XIT: %s%s\n", chan.xit>0?"+":"", freqbuf);
printf("CTCSS: %d.%dHz\n", chan.ctcss/10, chan.ctcss%10);
printf("CTCSS: %d.%dHz\n", chan.ctcss_tone/10, chan.ctcss_tone%10);
printf("CTCSSsql: %d.%dHz\n", chan.ctcss_sql/10, chan.ctcss_sql%10);
printf("DCS: %d.%d\n", chan.dcs/10, chan.dcs%10);
printf("DCS: %d.%d\n", chan.dcs_code/10, chan.dcs_code%10);
printf("DCSsql: %d.%d\n", chan.dcs_sql/10, chan.dcs_sql%10);
printf("Name: %s\n", chan.channel_desc);

Wyświetl plik

@ -7,7 +7,7 @@
* TODO: be more generic and add command line option to run
* in non-interactive mode
*
* $Id: rigctl.c,v 1.17 2001-06-27 17:32:47 f4cfe Exp $
* $Id: rigctl.c,v 1.18 2001-07-01 11:46:17 f4cfe Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -66,10 +66,10 @@ declare_proto_rig(set_rptr_shift);
declare_proto_rig(get_rptr_shift);
declare_proto_rig(set_rptr_offs);
declare_proto_rig(get_rptr_offs);
declare_proto_rig(set_ctcss);
declare_proto_rig(get_ctcss);
declare_proto_rig(set_dcs);
declare_proto_rig(get_dcs);
declare_proto_rig(set_ctcss_tone);
declare_proto_rig(get_ctcss_tone);
declare_proto_rig(set_dcs_code);
declare_proto_rig(get_dcs_code);
declare_proto_rig(set_split_freq);
declare_proto_rig(get_split_freq);
declare_proto_rig(set_split);
@ -115,10 +115,10 @@ struct test_table test_list[] = {
{ 'r', "get_rptr_shift", get_rptr_shift, "Rptr shift" },
{ 'O', "set_rptr_offs", set_rptr_offs, "Rptr offset" },
{ 'o', "get_rptr_offs", get_rptr_offs, "Rptr offset" },
{ 'C', "set_ctcss", set_ctcss, "CTCSS tone" },
{ 'c', "get_ctcss", get_ctcss, "CTCSS tone" },
{ 'D', "set_dcs", set_dcs, "DCS code" },
{ 'd', "get_dcs", get_dcs, "DCS code" },
{ 'C', "set_ctcss_tone", set_ctcss_tone, "CTCSS tone" },
{ 'c', "get_ctcss_tone", get_ctcss_tone, "CTCSS tone" },
{ 'D', "set_dcs_code", set_dcs_code, "DCS code" },
{ 'd', "get_dcs_code", get_dcs_code, "DCS code" },
{ 'I', "set_split_freq", set_split_freq, "Tx frequency" },
{ 'i', "get_split_freq", get_split_freq, "Tx frequency" },
{ 'S', "set_split", set_split, "Split mode" },
@ -467,21 +467,21 @@ declare_proto_rig(get_rptr_offs)
}
declare_proto_rig(set_ctcss)
declare_proto_rig(set_ctcss_tone)
{
unsigned int tone;
tone_t tone;
sscanf(arg1, "%d", &tone);
return rig_set_ctcss(rig, RIG_VFO_CURR, tone);
return rig_set_ctcss_tone(rig, RIG_VFO_CURR, tone);
}
declare_proto_rig(get_ctcss)
declare_proto_rig(get_ctcss_tone)
{
int status;
unsigned int tone;
tone_t tone;
status = rig_get_ctcss(rig, RIG_VFO_CURR, &tone);
status = rig_get_ctcss_tone(rig, RIG_VFO_CURR, &tone);
if (interactive)
printf("%s: ", cmd->name1);
printf("%d\n", tone);
@ -489,21 +489,21 @@ declare_proto_rig(get_ctcss)
}
declare_proto_rig(set_dcs)
declare_proto_rig(set_dcs_code)
{
unsigned int code;
tone_t code;
sscanf(arg1, "%d", &code);
return rig_set_dcs(rig, RIG_VFO_CURR, code);
return rig_set_dcs_code(rig, RIG_VFO_CURR, code);
}
declare_proto_rig(get_dcs)
declare_proto_rig(get_dcs_code)
{
int status;
unsigned int code;
tone_t code;
status = rig_get_dcs(rig, RIG_VFO_CURR, &code);
status = rig_get_dcs_code(rig, RIG_VFO_CURR, &code);
if (interactive)
printf("%s: ", cmd->name1);
printf("%d\n", code);

Wyświetl plik

@ -4,7 +4,7 @@
* The code is rather ugly since this is only a try out.
*
*
* $Id: rigmatrix.c,v 1.13 2001-06-04 21:17:53 f4cfe Exp $
* $Id: rigmatrix.c,v 1.14 2001-07-01 11:46:17 f4cfe Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -236,10 +236,10 @@ int print_caps_caps(const struct rig_caps *caps, void *data)
print_yn(caps->get_split);
print_yn(caps->set_ts);
print_yn(caps->get_ts);
print_yn(caps->set_ctcss);
print_yn(caps->get_ctcss);
print_yn(caps->set_dcs);
print_yn(caps->get_dcs);
print_yn(caps->set_ctcss_tone);
print_yn(caps->get_ctcss_tone);
print_yn(caps->set_dcs_code);
print_yn(caps->get_dcs_code);
print_yn(caps->set_powerstat);
print_yn(caps->get_powerstat);
print_yn(caps->set_trn);