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

int rig_set_mem_all ( RIG rig,
const channel_t  chans[],
const struct confparams  cfgps[],
const value_t  vals[] 
)

set all channel and non-channel data

Parameters:
rig The rig handle
chan_cb The callback for channel data
parm_cb The callback for non-channel(aka parm) data
arg Cookie passed to chan_cb and parm_cb
Writes the data associated with all the memory channels, and rigs memory parameters.

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(), rig_set_mem_all_cb()
Todo:
set all parm's
Todo:
finish coding and testing of mem_all functions

Definition at line 914 of file mem.c.

References rig::caps, rig_set_chan_all(), and rig_caps::set_mem_all_cb.

{
      struct rig_caps *rc;
      int retval;
      struct map_all_s mem_all_arg;

      if (CHECK_RIG_ARG(rig) || !chans || !cfgps || !vals)
            return -RIG_EINVAL;

      rc = rig->caps;
      mem_all_arg.chans = chans;
      mem_all_arg.cfgps = cfgps;
      mem_all_arg.vals = vals;

      if (rc->set_mem_all_cb)
            return rc->set_mem_all_cb(rig, map_chan, map_parm,
                        (rig_ptr_t)&mem_all_arg);

      /* if not available, emulate it */
      retval = rig_set_chan_all (rig, chans);
      if (retval != RIG_OK)
            return retval;

#if 0
      retval = rig_set_parm_all (rig, parms);
      if (retval != RIG_OK)
            return retval;
#else
      return -RIG_ENIMPL;
#endif

      return retval;
}


Generated by  Doxygen 1.6.0   Back to index