37 #include <yarp/os/Log.h>
38 #include <yarp/os/LogStream.h>
64 rateofthread = txrate;
65 yDebug() <<
"EthSender is a PeriodicThread with txrate =" << rateofthread <<
"ms";
68 #ifdef NETWORK_PERFORMANCE_BENCHMARK
73 double txrate_sec=(double)txrate/1000;
74 m_perEvtVerifier.init(txrate_sec, 5*txrate_sec/100, 0.0, txrate_sec+0.002, 0.0001, 1,
"Sender");
86 send_socket = pSocket;
87 ethManager = _ethManager;
94 yTrace() <<
"Do some initialization here if needed";
102 struct sched_param thread_param;
103 thread_param.sched_priority = sched_get_priority_max(SCHED_FIFO)/2 - 1;
104 pthread_setschedparam(pthread_self(), SCHED_FIFO, &thread_param);
112 void EthSender::run()
119 #ifdef NETWORK_PERFORMANCE_BENCHMARK
120 m_perEvtVerifier.tick(yarp::os::Time::now());
bool config(ACE_SOCK_Dgram *pSocket, TheEthManager *_ethManager)