pong
Transition between states
Transition code
if( --pingCount <= 0 )
{
if( pingCount == 0 ) // done pinging
{
RTTimespec::getclock ( endTime );
int time = diffInUsec ( startTime, endTime );
log.show("Number of PingPongs ");
log.show( NUM_MESSAGES );log.cr();
log.show( "Number of microseconds: " );
log.show( time );log.cr();
log.show("Mean time per round trip ");
log.show( RTInteger (time/NUM_MESSAGES) );
log.show( " microseconds\n\n" );
}
// go again:
log.show( "IPCSender: start ping counting\n" );
pingCount = (int) NUM_MESSAGES;
RTTimespec::getclock ( startTime );
}
// msg->reply( ping );
talkRemote.ping().send();
Triggers: