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

Function main

simulators/simic9100.c:526–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

524}
525
526int main(int argc, char **argv)
527{
528 unsigned char buf[BUFSIZE];
529 int fd = openPort(argv[1]);
530
531 printf("%s: %s\n", argv[0], rig_version());
532#ifdef X25
533 printf("x25/x26 command recognized\n");
534#else
535 printf("x25/x26 command rejected\n");
536#endif
537#if defined(WIN32) || defined(_WIN32)
538
539 if (argc != 2)
540 {
541 printf("Missing comport argument\n");
542 printf("%s [comport]\n", argv[0]);
543 exit(1);
544 }
545
546#endif
547
548 while (1)
549 {
550 int len = frameGet(fd, buf);
551
552 if (len <= 0)
553 {
554 close(fd);
555 fd = openPort(argv[1]);
556 }
557
558 if (powerstat)
559 {
560 frameParse(fd, buf, len);
561 }
562 else
563 {
564 hl_usleep(1000 * 1000);
565 }
566
567 rigStatus();
568 }
569
570 return 0;
571}

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