Janis Streib
19.05.23 c3b1e1f0860b157fdd0e0fe54dd743687e4065ab
ADD: configurable pollPeriod
1 files modified
8 ■■■■■ changed files
src/G4Export.cpp 8 ●●●●● patch | view | raw | blame | history
src/G4Export.cpp
@@ -20,6 +20,7 @@
int RunCollect=0;
std::unique_ptr<UdpTransmitSocket> transmitSocket;
bool use_text = false;
int pollPeriod = 8;
void* Collect(REND_STRUCT* prs){
@@ -76,7 +77,7 @@
            }
            transmitSocket->Send( p.Data(), p.Size() );
        }
        usleep(15000);
        usleep(pollPeriod*1000);
        // usleep(8000);
    }
@@ -100,10 +101,11 @@
    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;
  }