| 1982 | |
| 1983 | |
| 1984 | static 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 | |
| 2014 | static int netrigctl_set_level(RIG *rig, vfo_t vfo, setting_t level, |
nothing calls this directly
no test coverage detected