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

int HAMLIB_API rig_get_chan_all ( RIG rig,
channel_t  chans[] 
)

get all channel data

Parameters:
rig The rig handle
chans The location where to store all the channel data
Retrieves the data associated with all the memory channels.

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_chan_all_cb(), rig_set_chan_all()

Definition at line 907 of file mem.c.

References caps, rig_caps::get_chan_all_cb, and RIG_EINVAL.

Referenced by rig_get_mem_all().

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

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

      rc = rig->caps;
      map_arg.chans = chans;

      if (rc->get_chan_all_cb)
            return rc->get_chan_all_cb(rig, map_chan, (rig_ptr_t)&map_arg);

      /*
       * if not available, emulate it
       *
       * TODO: save_current_state, restore_current_state
       */
      retval = get_chan_all_cb_generic (rig, map_chan, (rig_ptr_t)&map_arg);

      return retval;
}


Generated by  Doxygen 1.6.0   Back to index