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

Function netrigctl_close

rigs/dummy/netrigctl.c:925–950  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

923}
924
925static int netrigctl_close(RIG *rig)
926{
927 const struct rig_state *rs = STATE(rig);
928 int ret;
929 char buf[BUF_MAX];
930
931 rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
932
933 if (rs->auto_power_off && rs->comm_state)
934 {
935 rig_set_powerstat(rig, 0);
936 }
937
938 ret = netrigctl_transaction(rig, "q\n", 2, buf);
939
940 if (ret != RIG_OK)
941 {
942 rig_debug(RIG_DEBUG_ERR, "%s: close error %s\n", __func__, rigerror(ret));
943 return ret;
944 }
945
946 rig_debug(RIG_DEBUG_ERR, "%s: done\n", __func__);
947 usleep(10 * 1000);
948
949 return RIG_OK;
950}
951
952static int netrigctl_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
953{

Callers

nothing calls this directly

Calls 5

rig_debugFunction · 0.85
rig_set_powerstatFunction · 0.85
netrigctl_transactionFunction · 0.85
rigerrorFunction · 0.85
usleepFunction · 0.50

Tested by

no test coverage detected