get the current DCS code Retrieves the current Digitally-Coded *Squelch* code.
Definition at line 416 of file tones.c. References rig::caps, rig_state::current_vfo, rig_caps::get_dcs_sql, RIG_VFO_CURR, rig_caps::set_vfo, rig::state, and rig_caps::targetable_vfo. { const struct rig_caps *caps; int retcode; vfo_t curr_vfo; if (CHECK_RIG_ARG(rig) || !code) return -RIG_EINVAL; caps = rig->caps; if (caps->get_dcs_sql == NULL) return -RIG_ENAVAIL; if ((caps->targetable_vfo&RIG_TARGETABLE_PURE) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) return caps->get_dcs_sql(rig, vfo, code); if (!caps->set_vfo) return -RIG_ENTARGET; curr_vfo = rig->state.current_vfo; retcode = caps->set_vfo(rig, vfo); if (retcode != RIG_OK) return retcode; retcode = caps->get_dcs_sql(rig, vfo, code); caps->set_vfo(rig, curr_vfo); return retcode; }
|