Logo Search packages:      
Sourcecode: hamlib version File versions  Download package

int HAMLIB_API rig_set_conf ( RIG rig,
token_t  token,
const char *  val 

set a radio configuration parameter

rigThe rig handle
tokenThe parameter
valThe value to set the parameter to

Sets a configuration parameter.

RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:

Definition at line 560 of file conf.c.

References caps, IS_TOKEN_FRONTEND, confparams::name, rig_confparam_lookup(), rig_debug(), RIG_DEBUG_VERBOSE, RIG_EINVAL, RIG_ENAVAIL, and rig_need_debug().

      if (!rig || !rig->caps)
            return -RIG_EINVAL;

    if (rig_need_debug(RIG_DEBUG_VERBOSE)) {
          const struct confparams *cfp;
        char tokenstr[12];
        sprintf(tokenstr, "%ld", token);
        cfp = rig_confparam_lookup(rig, tokenstr);
        if (!cfp)
            return -RIG_EINVAL;
        rig_debug(RIG_DEBUG_VERBOSE, "%s: %s='%s'\n", __func__, cfp->name, val);

      if (IS_TOKEN_FRONTEND(token))
            return frontend_set_conf(rig, token, val);

      if (rig->caps->set_conf == NULL)
            return -RIG_ENAVAIL;

      return rig->caps->set_conf(rig, token, val);

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index