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

Function main

simulators/simic7100.c:472–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470}
471
472int main(int argc, char **argv)
473{
474 unsigned char buf[BUFSIZE];
475 int fd = openPort(argv[1]);
476
477 printf("%s: %s\n", argv[0], rig_version());
478 printf("x25/x26 command rejected\n");
479#if defined(WIN32) || defined(_WIN32)
480
481 if (argc != 2)
482 {
483 printf("Missing comport argument\n");
484 printf("%s [comport]\n", argv[0]);
485 exit(1);
486 }
487
488#endif
489
490 while (1)
491 {
492 int len = frameGet(fd, buf);
493
494 if (len <= 0)
495 {
496 close(fd);
497 fd = openPort(argv[1]);
498 }
499
500 if (powerstat)
501 {
502 frameParse(fd, buf, len);
503 }
504 else
505 {
506 hl_usleep(1000 * 1000);
507 }
508
509 rigStatus();
510 }
511
512 return 0;
513}

Callers

nothing calls this directly

Calls 6

openPortFunction · 0.85
rig_versionFunction · 0.85
hl_usleepFunction · 0.85
frameGetFunction · 0.70
frameParseFunction · 0.70
rigStatusFunction · 0.70

Tested by

no test coverage detected