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

Function netrigctl_get_split_vfo

rigs/dummy/netrigctl.c:1747–1786  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1745
1746
1747static int netrigctl_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split,
1748 vfo_t *tx_vfo)
1749{
1750 int ret;
1751 char cmd[CMD_MAX];
1752 char buf[BUF_MAX];
1753 char vfostr[16] = "";
1754
1755 rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
1756
1757 ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
1758
1759 if (ret != RIG_OK) { return ret; }
1760
1761 SNPRINTF(cmd, sizeof(cmd), "s%s\n", vfostr);
1762
1763 ret = netrigctl_transaction(rig, cmd, strlen(cmd), buf);
1764
1765 if (ret <= 0)
1766 {
1767 return (ret < 0) ? ret : -RIG_EPROTO;
1768 }
1769
1770 *split = atoi(buf);
1771
1772 ret = read_string(RIGPORT(rig), (unsigned char *) buf, BUF_MAX, "\n", 1,
1773 0, 1);
1774
1775 if (ret <= 0)
1776 {
1777 return (ret < 0) ? ret : -RIG_EPROTO;
1778 }
1779
1780
1781 if (buf[ret - 1] == '\n') { buf[ret - 1] = '\0'; } /* chomp */
1782
1783 *tx_vfo = rig_parse_vfo(buf);
1784
1785 return RIG_OK;
1786}
1787
1788static int netrigctl_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
1789{

Callers

nothing calls this directly

Calls 5

rig_debugFunction · 0.85
netrigctl_vfostrFunction · 0.85
netrigctl_transactionFunction · 0.85
read_stringFunction · 0.85
rig_parse_vfoFunction · 0.85

Tested by

no test coverage detected