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

Function main

simulators/simic2730.c:514–555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512}
513
514int main(int argc, char **argv)
515{
516 unsigned char buf[BUFSIZE];
517 int fd = openPort(argv[1]);
518
519 printf("%s: %s\n", argv[0], rig_version());
520 printf("x25/x26 command rejected\n");
521#if defined(WIN32) || defined(_WIN32)
522
523 if (argc != 2)
524 {
525 printf("Missing comport argument\n");
526 printf("%s [comport]\n", argv[0]);
527 exit(1);
528 }
529
530#endif
531
532 while (1)
533 {
534 int len = frameGet(fd, buf);
535
536 if (len <= 0)
537 {
538 close(fd);
539 fd = openPort(argv[1]);
540 }
541
542 if (powerstat)
543 {
544 frameParse(fd, buf, len);
545 }
546 else
547 {
548 hl_usleep(1000 * 1000);
549 }
550
551 rigStatus();
552 }
553
554 return 0;
555}

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