Logo Search packages:      
Sourcecode: hamlib version File versions

int HAMLIB_API rig_get_chan_all_cb ( RIG rig,
chan_cb_t  chan_cb,
rig_ptr_t  arg 

get all channel data, by callback

rig The rig handle
chan_cb Pointer to a callback function to retrieve channel data
arg Arbitrary argument passed back to chan_cb
Retrieves the data associated with a all the memory channels.

chan_cb is called first with no data in chan (chan equals NULL). This means the application has to provide a struct where to store future data for channel channel_num. If channel_num == chan->channel_num, the application does not need to provide a new allocated structure.

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:
rig_get_chan_all(), rig_set_chan_all_cb()

Definition at line 680 of file mem.c.

References caps, rig_caps::get_chan_all_cb, and RIG_EINVAL.

Referenced by rig_get_mem_all_cb().

      struct rig_caps *rc;
      int retval;

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

      rc = rig->caps;

      if (rc->get_chan_all_cb)
            return rc->get_chan_all_cb(rig, chan_cb, arg);

      /* if not available, emulate it */
      retval = get_chan_all_cb_generic (rig, chan_cb, arg);

      return retval;

Generated by  Doxygen 1.6.0   Back to index