Lines Matching refs:argv
445 int main(int argc, char *argv[]) in main() argument
453 if (argc < 3 && (argc < 2 || strcmp(argv[1], "download") != 0)) { in main()
454 printf("usage: %s <action> <sensor> <data> -d\n", argv[0]); in main()
465 … printf(" -d: if specified, %s will keep draining /dev/nanohub until cancelled.\n", argv[0]); in main()
466 printf("usage: %s <cmd> [app]\n", argv[0]); in main()
473 if (strcmp(argv[1], "config") == 0) { in main()
479 if(strcmp(argv[6], "-d") == 0) { in main()
485 if (strcmp(argv[3], "true") == 0) in main()
487 else if (strcmp(argv[3], "false") == 0) { in main()
490 printf("Unsupported data: %s For action: %s\n", argv[3], argv[1]); in main()
494 mConfigCmd.rate = SENSOR_HZ((float)atoi(argv[4])); in main()
495 mConfigCmd.latency = atoi(argv[5]) * 1000ull; in main()
496 if (setType(&mConfigCmd, argv[2])) { in main()
497 printf("Unsupported sensor: %s For action: %s\n", argv[2], argv[1]); in main()
500 } else if (strcmp(argv[1], "cfgdata") == 0) { in main()
505 if (setType(&mConfigCmd, argv[2])) { in main()
506 printf("Unsupported sensor: %s For action: %s\n", argv[2], argv[1]); in main()
521 mLedsCfg.led_num = atoi(argv[3]); in main()
522 mLedsCfg.value = atoi(argv[4]); in main()
526 printf("Unsupported sensor: %s For action: %s\n", argv[2], argv[1]); in main()
529 } else if (strcmp(argv[1], "calibrate") == 0) { in main()
538 if (setType(&mConfigCmd, argv[2])) { in main()
539 printf("Unsupported sensor: %s For action: %s\n", argv[2], argv[1]); in main()
542 } else if (strcmp(argv[1], "flush") == 0) { in main()
551 if (setType(&mConfigCmd, argv[2])) { in main()
552 printf("Unsupported sensor: %s For action: %s\n", argv[2], argv[1]); in main()
555 } else if (strcmp(argv[1], "load") == 0) { in main()
561 return halCmd(NANOHUB_HAL_EXT_APPS_ON, argv[2]); in main()
562 } else if (strcmp(argv[1], "unload") == 0) { in main()
568 return halCmd(NANOHUB_HAL_EXT_APPS_OFF, argv[2]); in main()
569 } else if (strcmp(argv[1], "delete") == 0) { in main()
575 return halCmd(NANOHUB_HAL_EXT_APP_DELETE, argv[2]); in main()
576 } else if (strcmp(argv[1], "download") == 0) { in main()
607 printf("Unsupported action: %s\n", argv[1]); in main()