ADD: configurable pollPeriod
| | |
| | | int RunCollect=0; |
| | | std::unique_ptr<UdpTransmitSocket> transmitSocket; |
| | | bool use_text = false; |
| | | int pollPeriod = 8; |
| | | |
| | | |
| | | void* Collect(REND_STRUCT* prs){ |
| | |
| | | } |
| | | transmitSocket->Send( p.Data(), p.Size() ); |
| | | } |
| | | usleep(15000); |
| | | usleep(pollPeriod*1000); |
| | | // usleep(8000); |
| | | } |
| | | |
| | |
| | | option("-t", "--text").set(use_text).doc("send strings in osc messages instead of a float bundle"), |
| | | value("c4g configuration file", cfgFile), |
| | | value("osc sink address", oscSinkAddr), |
| | | integer("osc sink port", oscSinkPort) |
| | | integer("osc sink port", oscSinkPort), |
| | | integer("polling period in ms (imprecise). You realistically won't need less than 8 ms.", pollPeriod) |
| | | ); |
| | | |
| | | if(!parse(argc, argv, cli)) { |
| | | if(!parse(argc, argv, cli) || pollPeriod <= 0) { |
| | | cout << make_man_page(cli, argv[0]); |
| | | return 1; |
| | | } |