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

Function rig_parse_mode

src/misc.c:522–539  ·  view source on GitHub ↗

* \brief Convert alpha string to enum RIG_MODE * \param s input alpha string * \return enum RIG_MODE_?? * * \sa rmode_t */

Source from the content-addressed store, hash-verified

520 * \sa rmode_t
521 */
522rmode_t HAMLIB_API rig_parse_mode(const char *s)
523{
524 int i;
525
526 rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
527
528 for (i = 0 ; (s != NULL) && (mode_str[i].str[0] != '\0'); i++)
529 {
530 if (!strcmp(s, mode_str[i].str))
531 {
532 return mode_str[i].mode;
533 }
534 }
535
536 rig_debug(RIG_DEBUG_WARN, "%s: mode '%s' not found...returning RIG_MODE_NONE\n",
537 __func__, s);
538 return RIG_MODE_NONE;
539}
540
541
542/**

Callers 10

quisk_get_modeFunction · 0.85
quisk_get_split_modeFunction · 0.85
netrigctl_get_modeFunction · 0.85
netrigctl_get_split_modeFunction · 0.85
ek89x_get_modeFunction · 0.85
rs_get_modeFunction · 0.85
gp2000_get_modeFunction · 0.85
set_chanFunction · 0.85
set_channel_dataFunction · 0.85
rigctl_parse.cFile · 0.85

Calls 1

rig_debugFunction · 0.85

Tested by

no test coverage detected