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

Function netrigctl_set_func

rigs/dummy/netrigctl.c:1956–1981  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1954
1955
1956static int netrigctl_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
1957{
1958 int ret;
1959 char cmd[CMD_MAX];
1960 char buf[BUF_MAX];
1961 char vfostr[16] = "";
1962
1963 rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
1964
1965 ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), vfo);
1966
1967 if (ret != RIG_OK) { return ret; }
1968
1969 SNPRINTF(cmd, sizeof(cmd), "U%s %s %i\n", vfostr, rig_strfunc(func), status);
1970
1971 ret = netrigctl_transaction(rig, cmd, strlen(cmd), buf);
1972
1973 if (ret > 0)
1974 {
1975 return -RIG_EPROTO;
1976 }
1977 else
1978 {
1979 return ret;
1980 }
1981}
1982
1983
1984static int netrigctl_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)

Callers

nothing calls this directly

Calls 4

rig_debugFunction · 0.85
netrigctl_vfostrFunction · 0.85
rig_strfuncFunction · 0.85
netrigctl_transactionFunction · 0.85

Tested by

no test coverage detected