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

Function main

tests/rigctlsync.c:199–592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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