virtual void onRead(TestData &datum) { if (count==nframes) return; double now=Time::now(); double origT=datum.get(); unsigned int pl=datum.getPayloadSize(); #ifdef USE_PARALLEL_PORT static ppEventDebugger pp(0x378); pp.set(); pp.reset(); #endif TestData &nd=outPort.prepare(); nd.set(origT); nd.resize(pl); outPort.write(true); if (wait<=0) { double dT=(now-origT)*1000; delay+=dT; delaySq+=(dT*dT); count++; latencies.push_back(Report(dT, pl)); } else wait--; }
void wakeUp(double t) { #if USE_PARALLEL_PORT pp.set(); #endif stamp=t; mutex.unlock(); }
void run() { // printf("Sending frame %d\n", k); TestData &datum=port.prepare(); datum.resize(payload); double time=Time::now(); datum.set(time); #ifdef USE_PARALLEL_PORT static ppEventDebugger pp(0x378); pp.set(); #endif port.write(true); #ifdef USE_PARALLEL_PORT pp.reset(); #endif }