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

int HAMLIB_API rig_mem_count ( RIG rig )

get memory channel count

rigThe rig handle

Get the total memory channel count, computed from the rig caps

the memory count

Definition at line 1267 of file mem.c.

References rig_state::chan_list, chan_list::end, RIG_EINVAL, chan_list::start, and state.

      const chan_t *chan_list;
      int i, count;

      if (CHECK_RIG_ARG(rig))
            return -RIG_EINVAL;

      chan_list = rig->state.chan_list;
      count = 0;

      for (i=0; i<CHANLSTSIZ && !RIG_IS_CHAN_END(chan_list[i]); i++) {
            count += chan_list[i].end - chan_list[i].start + 1;

      return count;

Generated by  Doxygen 1.6.0   Back to index