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

Function main

simulators/simic7200.c:800–841  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

798}
799
800int main(int argc, char **argv)
801{
802 unsigned char buf[BUFSIZE];
803 int fd = openPort(argv[1]);
804
805 printf("%s: %s\n", argv[0], rig_version());
806 printf("x25/x26 command rejected\n");
807#if defined(WIN32) || defined(_WIN32)
808
809 if (argc != 2)
810 {
811 printf("Missing comport argument\n");
812 printf("%s [comport]\n", argv[0]);
813 exit(1);
814 }
815
816#endif
817
818 while (1)
819 {
820 int len = frameGet(fd, buf);
821
822 if (len <= 0)
823 {
824 close(fd);
825 fd = openPort(argv[1]);
826 }
827
828 if (powerstat)
829 {
830 frameParse(fd, buf, len);
831 }
832 else
833 {
834 hl_usleep(1000 * 1000);
835 }
836
837 rigStatus();
838 }
839
840 return 0;
841}

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