| 623 | }; |
| 624 | |
| 625 | void |
| 626 | usage (char ** argv) |
| 627 | { |
| 628 | std::cout << "usage: " << argv[0] << " [(<device_id> [-visualize | -imagemode <mode>] | [-depthmode <mode>] | [-depthformat <format>] | -l [<device_id>]| -h | --help)]\n"; |
| 629 | std::cout << argv[0] << " -h | --help : shows this help\n"; |
| 630 | std::cout << argv[0] << " -l : list all available devices\n"; |
| 631 | std::cout << argv[0] << " -buf X : use a buffer size of X frames (default: " << buff_size << ")\n"; |
| 632 | std::cout << argv[0] << " -visualize 0/1 : turn the visualization off/on (WARNING: when visualization is disabled, data writing is enabled by default!)\n"; |
| 633 | std::cout << argv[0] << " -l <device-id> : list all available modes for specified device\n"; |
| 634 | |
| 635 | std::cout << " device_id may be #1, #2, ... for the first, second etc device in the list" |
| 636 | #ifndef _WIN32 |
| 637 | << " or" << std::endl |
| 638 | << " bus@address for the device connected to a specific usb-bus / address combination or" << std::endl |
| 639 | << " <serial-number>" |
| 640 | #endif |
| 641 | << std::endl; |
| 642 | std::cout << std::endl; |
| 643 | std::cout << "examples:" << std::endl; |
| 644 | std::cout << argv[0] << " \"#1\"" << std::endl; |
| 645 | std::cout << " uses the first device." << std::endl; |
| 646 | std::cout << argv[0] << " -l" << std::endl; |
| 647 | std::cout << " lists all available devices." << std::endl; |
| 648 | std::cout << argv[0] << " -l \"#2\"" << std::endl; |
| 649 | std::cout << " lists all available modes for the second device" << std::endl; |
| 650 | #ifndef _WIN32 |
| 651 | std::cout << argv[0] << " A00361800903049A" << std::endl; |
| 652 | std::cout << " uses the device with the serial number \'A00361800903049A\'." << std::endl; |
| 653 | std::cout << argv[0] << " 1@16" << std::endl; |
| 654 | std::cout << " uses the device on address 16 at USB bus 1." << std::endl; |
| 655 | #endif |
| 656 | } |
| 657 | |
| 658 | ////////////////////////////////////////////////////////////////////////////////////////// |
| 659 | void |