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

Function main

tests/rigtestmcast.c:6–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#define TEST
5#ifdef TEST
6int main(int argc, const char *argv[])
7{
8 RIG *rig;
9 rig_model_t myrig_model;
10 rig_set_debug_level(RIG_DEBUG_WARN);
11
12 if (argc > 1) { myrig_model = atoi(argv[1]); }
13 else
14 {
15 myrig_model = 1035;
16 }
17
18 rig = rig_init(myrig_model);
19
20 if (rig == NULL)
21 {
22 printf("Error in rig_init\n");
23 return 1;
24
25 }
26
27#ifdef _WIN32
28 strncpy(RIGPORT(rig)->pathname, "COM37", HAMLIB_FILPATHLEN - 1);
29#else
30 strncpy(RIGPORT(rig)->pathname, "/dev/ttyUSB0", HAMLIB_FILPATHLEN - 1);
31#endif
32 RIGPORT(rig)->parm.serial.rate = 38400;
33 rig_open(rig);
34 // disabled until we change this to the other multicast capability
35#if 0
36 multicast_init(rig, "224.0.0.1", 4532);
37 printf("threadid=%lld\n", (long long)STATE(rig)->multicast->threadid);
38 pthread_join(STATE(rig)->multicast->threadid, NULL);
39 pthread_exit(NULL);
40#endif
41 return 0;
42}
43#endif
44

Callers

nothing calls this directly

Calls 4

rig_openFunction · 0.85
multicast_initFunction · 0.85
pthread_joinFunction · 0.85
pthread_exitFunction · 0.85

Tested by

no test coverage detected