MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / rig_mem_count

Function rig_mem_count

src/mem.c:1651–1672  ·  view source on GitHub ↗

Not referenced anywhere * \brief get memory channel count * \param rig The rig handle * * Get the total memory channel count, computed from the rig caps * * \return the memory count */

Source from the content-addressed store, hash-verified

1649 * \return the memory count
1650 */
1651int HAMLIB_API rig_mem_count(RIG *rig)
1652{
1653 const chan_t *chan_list;
1654 int i, count;
1655
1656 rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
1657
1658 if (CHECK_RIG_ARG(rig))
1659 {
1660 return -RIG_EINVAL;
1661 }
1662
1663 chan_list = STATE(rig)->chan_list;
1664 count = 0;
1665
1666 for (i = 0; i < HAMLIB_CHANLSTSIZ && !RIG_IS_CHAN_END(chan_list[i]); i++)
1667 {
1668 count += chan_list[i].endc - chan_list[i].startc + 1;
1669 }
1670
1671 return count;
1672}
1673
1674/*! @} */

Callers 1

used_externallyFunction · 0.85

Calls 1

rig_debugFunction · 0.85

Tested by

no test coverage detected