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

Function netrigctl_get_func

rigs/dummy/netrigctl.c:1984–2011  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1982
1983
1984static int netrigctl_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
1985{
1986 int ret;
1987 char cmd[CMD_MAX];
1988 char buf[BUF_MAX];
1989 char vfostr[16] = "";
1990
1991 rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
1992
1993 ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), vfo);
1994
1995 if (ret != RIG_OK) { return ret; }
1996
1997 if (strlen(rig_strfunc(func)) == 0) { return -RIG_ENAVAIL; }
1998
1999 SNPRINTF(cmd, sizeof(cmd), "u%s %s\n", vfostr, rig_strfunc(func));
2000
2001 ret = netrigctl_transaction(rig, cmd, strlen(cmd), buf);
2002
2003 if (ret <= 0)
2004 {
2005 return (ret < 0) ? ret : -RIG_EPROTO;
2006 }
2007
2008 *status = atoi(buf);
2009
2010 return RIG_OK;
2011}
2012
2013
2014static int netrigctl_set_level(RIG *rig, vfo_t vfo, setting_t level,

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