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

int HAMLIB_API rig_set_mem_all_cb ( RIG rig,
chan_cb_t  chan_cb,
confval_cb_t  parm_cb,
rig_ptr_t  arg 
)

set all channel and non-channel data by call-back

Parameters:
rigThe rig handle
chan_cbThe callback for channel data
parm_cbThe callback for non-channel(aka parm) data
argCookie passed to chan_cb and parm_cb

Writes the data associated with all the memory channels, and rigs memory parameters, by callback. 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_get_mem_all_cb(), rig_set_mem_all()
Todo:
finish coding and testing of mem_all functions

Definition at line 1017 of file mem.c.

References caps, RIG_EINVAL, RIG_ENIMPL, RIG_OK, and rig_set_chan_all_cb().

{
      struct rig_caps *rc;
      int retval;

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

      rc = rig->caps;

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


      /* if not available, emulate it */
      retval = rig_set_chan_all_cb (rig, chan_cb, arg);
      if (retval != RIG_OK)
            return retval;

#if 0
      retval = rig_set_parm_all_cb (rig, parm_cb, arg);
      if (retval != RIG_OK)
            return retval;
#else
      return -RIG_ENIMPL;
#endif

      return retval;
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index