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

Function main

tests/rotctld.c:151–602  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149
150
151int main(int argc, char *argv[])
152{
153 ROT *my_rot; /* handle to rot (instance) */
154 rot_model_t my_model = ROT_MODEL_DUMMY;
155
156 int retcode; /* generic return code from functions */
157
158 int verbose = RIG_DEBUG_NONE;
159 int show_conf = 0;
160 int dump_caps_opt = 0;
161 const char *rot_file = NULL;
162 const char *rot_file2 = NULL;
163 int serial_rate = 0;
164 char conf_parms[MAXCONFLEN] = "";
165
166 struct addrinfo hints, *result, *saved_result;
167 int sock_listen;
168 int reuseaddr = 1;
169 char host[NI_MAXHOST];
170 char serv[NI_MAXSERV];
171
172 pthread_t thread;
173 pthread_attr_t attr;
174 struct handle_data *arg;
175
176 rig_set_debug(verbose);
177 while (1)
178 {
179 int c;
180 int option_index = 0;
181 char dummy[2];
182
183 c = getopt_long(argc, argv, SHORT_OPTIONS, long_options, &option_index);
184
185 if (c == -1)
186 {
187 break;
188 }
189
190 switch (c)
191 {
192 case 'h':
193 usage(stdout);
194 exit(0);
195
196 case 'V':
197 version();
198 exit(0);
199
200 case 'm':
201 my_model = atoi(optarg);
202 break;
203
204 case 'r':
205 rot_file = optarg;
206 break;
207
208 case 'R':

Callers

nothing calls this directly

Calls 15

rig_set_debugFunction · 0.85
getopt_longFunction · 0.85
rig_set_debug_time_stampFunction · 0.85
rig_debugFunction · 0.85
rot_token_lookupFunction · 0.85
rot_set_confFunction · 0.85
rigerrorFunction · 0.85
rot_token_foreachFunction · 0.85
dumpcaps_rotFunction · 0.85
rot_cleanupFunction · 0.85
rot_openFunction · 0.85
rig_strstatusFunction · 0.85

Tested by

no test coverage detected