Logo Search packages:      
Sourcecode: hamlib version File versions

int HAMLIB_API rig_set_vfo ( RIG rig,
vfo_t  vfo 

set the current VFO

rig The rig handle
vfo The VFO to set to
Sets the current VFO. The VFO can be RIG_VFO_A, RIG_VFO_B, RIG_VFO_C for VFOA, VFOB, VFOC respectively or RIG_VFO_MEM for Memory mode. Supported VFOs depends on rig capabilities.

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 1091 of file rig.c.

References caps, rig_state::current_vfo, RIG_EINVAL, RIG_ENAVAIL, RIG_OK, rig_caps::set_vfo, and state.

Referenced by rig_get_channel(), and rig_set_channel().

      const struct rig_caps *caps;
      int retcode;

      if (CHECK_RIG_ARG(rig))
            return -RIG_EINVAL;

      caps = rig->caps;

      if (caps->set_vfo == NULL)
            return -RIG_ENAVAIL;

      retcode= caps->set_vfo(rig, vfo);
      if (retcode == RIG_OK)
            rig->state.current_vfo = vfo;
      return retcode;

Generated by  Doxygen 1.6.0   Back to index