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

Function main

tests/rigctlcom.c:210–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208
209
210int main(int argc, char *argv[])
211{
212 rig_model_t my_model = RIG_MODEL_DUMMY;
213
214 int retcode; /* generic return code from functions */
215
216 int show_conf = 0;
217 int dump_caps_opt = 0;
218 const char *rig_file = NULL, *rig_file2 = NULL, *ptt_file = NULL,
219 *dcd_file = NULL;
220 ptt_type_t ptt_type = RIG_PTT_NONE;
221 dcd_type_t dcd_type = RIG_DCD_NONE;
222 int serial_rate = 0;
223 int serial_rate2 = 115200; /* virtual com port default speed */
224 char *civaddr = NULL; /* NULL means no need to set conf */
225 char conf_parms[MAXCONFLEN] = "";
226 int status;
227
228 printf("rigctlcom Version 1.6\n");
229
230 rig_set_debug(verbose);
231 while (1)
232 {
233 int c;
234 int option_index = 0;
235 char dummy[2];
236
237 c = getopt_long(argc,
238 argv,
239 SHORT_OPTIONS,
240 long_options,
241 &option_index);
242
243 if (c == -1)
244 {
245 break;
246 }
247
248 switch (c)
249 {
250 case 'h':
251 usage(stdout);
252 exit(0);
253
254 case 'V':
255 rig_version();
256 exit(0);
257
258 case 'B':
259 mapa2b = 1;
260 break;
261
262 case 'm':
263 my_model = atoi(optarg);
264 break;
265
266 case 'r':
267 rig_file = optarg;

Callers

nothing calls this directly

Calls 15

rig_set_debugFunction · 0.85
getopt_longFunction · 0.85
rig_versionFunction · 0.85
rig_set_debug_time_stampFunction · 0.85
rig_debugFunction · 0.85
rigerrorFunction · 0.85
rig_set_confFunction · 0.85
rig_token_lookupFunction · 0.85
rig_token_foreachFunction · 0.85
dumpcapsFunction · 0.85
rig_cleanupFunction · 0.85
rig_openFunction · 0.85

Tested by

no test coverage detected