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

int HAMLIB_API rig_get_vfo ( RIG rig,
vfo_t vfo 

get the current VFO

rig The rig handle
vfo The location where to store the current VFO
Retrieves 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 1099 of file rig.c.

References rig::caps, rig_state::current_vfo, rig_caps::get_vfo, and rig::state.

Referenced by rig_open().

      const struct rig_caps *caps;
      int retcode;

      if (CHECK_RIG_ARG(rig) || !vfo)
            return -RIG_EINVAL;

      caps = rig->caps;

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

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

Generated by  Doxygen 1.6.0   Back to index