Logo Search packages:      
Sourcecode: hamlib version File versions

int HAMLIB_API rig_set_chan_all_cb ( RIG rig,
chan_cb_t  chan_cb,
rig_ptr_t  arg 
)

set all channel data, by callback

Parameters:
rig The rig handle
chan_cb Pointer to a callback function to provide channel data
arg Arbitrary argument passed back to chan_cb
Write the data associated with a all the memory channels. This is the prefered method to support clonable rigs.

Returns:
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_set_chan_all(), rig_get_chan_all_cb()

Definition at line 797 of file mem.c.

References caps, RIG_EINVAL, and rig_caps::set_chan_all_cb.

Referenced by rig_set_mem_all_cb().

{
      struct rig_caps *rc;
      int retval;

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

      rc = rig->caps;

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


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

      return retval;
}


Generated by  Doxygen 1.6.0   Back to index