INET Framework for OMNeT++/OMNEST
inet::PingApp Class Reference

Generates ping requests and calculates the packet loss and round trip parameters of the replies. More...

#include <PingApp.h>

Inheritance diagram for inet::PingApp:
inet::ILifecycle

Public Member Functions

 PingApp ()
 
virtual ~PingApp ()
 
- Public Member Functions inherited from inet::ILifecycle
virtual ~ILifecycle ()
 

Protected Member Functions

virtual void initialize (int stage) override
 
virtual int numInitStages () const override
 
virtual void handleMessage (cMessage *msg) override
 
virtual void finish () override
 
virtual void refreshDisplay () const override
 
virtual void parseDestAddressesPar ()
 
virtual void startSendingPingRequests ()
 
virtual void stopSendingPingRequests ()
 
virtual void scheduleNextPingRequest (simtime_t previous, bool withSleep)
 
virtual void cancelNextPingRequest ()
 
virtual bool isNodeUp ()
 
virtual bool isEnabled ()
 
virtual std::vector< L3AddressgetAllAddresses ()
 
virtual void sendPing ()
 
virtual void processPingResponse (PingPayload *msg)
 
virtual void countPingResponse (int bytes, long seqNo, simtime_t rtt)
 
virtual bool handleOperationStage (LifecycleOperation *operation, int stage, IDoneCallback *doneCallback) override
 Perform one stage of a lifecycle operation. More...
 

Protected Attributes

L3Address destAddr
 
L3Address srcAddr
 
std::vector< L3AddressdestAddresses
 
int packetSize = 0
 
cPar * sendIntervalPar = nullptr
 
cPar * sleepDurationPar = nullptr
 
int hopLimit = 0
 
int count = 0
 
int destAddrIdx = -1
 
simtime_t startTime
 
simtime_t stopTime
 
bool printPing = false
 
bool continuous = false
 
int pid = 0
 
cMessage * timer = nullptr
 
NodeStatusnodeStatus = nullptr
 
simtime_t lastStart
 
long sendSeqNo = 0
 
long expectedReplySeqNo = 0
 
simtime_t sendTimeHistory [PING_HISTORY_SIZE]
 
cStdDev rttStat
 
long sentCount = 0
 
long lossCount = 0
 
long outOfOrderArrivalCount = 0
 
long numPongs = 0
 

Static Protected Attributes

static simsignal_t rttSignal = registerSignal("rtt")
 
static simsignal_t numLostSignal = registerSignal("numLost")
 
static simsignal_t numOutOfOrderArrivalsSignal = registerSignal("numOutOfOrderArrivals")
 
static simsignal_t pingTxSeqSignal = registerSignal("pingTxSeq")
 
static simsignal_t pingRxSeqSignal = registerSignal("pingRxSeq")
 

Detailed Description

Generates ping requests and calculates the packet loss and round trip parameters of the replies.

See NED file for detailed description of operation.

Constructor & Destructor Documentation

inet::PingApp::PingApp ( )
61 {
62 }
inet::PingApp::~PingApp ( )
virtual
65 {
66  cancelAndDelete(timer);
67 }
cMessage * timer
Definition: PingApp.h:62

Member Function Documentation

void inet::PingApp::cancelNextPingRequest ( )
protectedvirtual

Referenced by stopSendingPingRequests().

256 {
257  cancelEvent(timer);
258 }
cMessage * timer
Definition: PingApp.h:62
void inet::PingApp::countPingResponse ( int  bytes,
long  seqNo,
simtime_t  rtt 
)
protectedvirtual

Referenced by processPingResponse().

305 {
306  EV_INFO << "Ping reply #" << seqNo << " arrived, rtt=" << rtt << "\n";
307  emit(pingRxSeqSignal, seqNo);
308 
309  numPongs++;
310 
311  // count only non 0 RTT values as 0s are invalid
312  if (rtt > 0) {
313  rttStat.collect(rtt);
314  emit(rttSignal, rtt);
315  }
316 
317  if (seqNo == expectedReplySeqNo) {
318  // expected ping reply arrived; expect next sequence number
320  }
321  else if (seqNo > expectedReplySeqNo) {
322  EV_DETAIL << "Jump in seq numbers, assuming pings since #" << expectedReplySeqNo << " got lost\n";
323 
324  // jump in the sequence: count pings in gap as lost for now
325  // (if they arrive later, we'll decrement back the loss counter)
326  long jump = seqNo - expectedReplySeqNo;
327  lossCount += jump;
328  emit(numLostSignal, lossCount);
329 
330  // expect sequence numbers to continue from here
331  expectedReplySeqNo = seqNo + 1;
332  }
333  else { // seqNo < expectedReplySeqNo
334  // ping reply arrived too late: count as out-of-order arrival (not loss after all)
335  EV_DETAIL << "Arrived out of order (too late)\n";
337  lossCount--;
339  emit(numLostSignal, lossCount);
340  }
341 }
static simsignal_t rttSignal
Definition: PingApp.h:71
static simsignal_t numOutOfOrderArrivalsSignal
Definition: PingApp.h:73
long expectedReplySeqNo
Definition: PingApp.h:66
long lossCount
Definition: PingApp.h:77
cStdDev rttStat
Definition: PingApp.h:70
long numPongs
Definition: PingApp.h:79
long outOfOrderArrivalCount
Definition: PingApp.h:78
static simsignal_t pingRxSeqSignal
Definition: PingApp.h:75
static simsignal_t numLostSignal
Definition: PingApp.h:72
void inet::PingApp::finish ( )
overrideprotectedvirtual
380 {
381  if (sendSeqNo == 0) {
382  if (printPing)
383  EV_DETAIL << getFullPath() << ": No pings sent, skipping recording statistics and printing results.\n";
384  return;
385  }
386 
388  // record statistics
389  recordScalar("Pings sent", sendSeqNo);
390  recordScalar("ping loss rate (%)", 100 * lossCount / (double)sendSeqNo);
391  recordScalar("ping out-of-order rate (%)", 100 * outOfOrderArrivalCount / (double)sendSeqNo);
392 
393  // print it to stdout as well
394  if (printPing) {
395  cout << "--------------------------------------------------------" << endl;
396  cout << "\t" << getFullPath() << endl;
397  cout << "--------------------------------------------------------" << endl;
398 
399  cout << "sent: " << sendSeqNo << " received: " << numPongs << " loss rate (%): " << (100 * lossCount / (double)sendSeqNo) << endl;
400  cout << "round-trip min/avg/max (ms): " << (rttStat.getMin() * 1000.0) << "/"
401  << (rttStat.getMean() * 1000.0) << "/" << (rttStat.getMax() * 1000.0) << endl;
402  cout << "stddev (ms): " << (rttStat.getStddev() * 1000.0) << " variance:" << rttStat.getVariance() << endl;
403  cout << "--------------------------------------------------------" << endl;
404  }
405 }
long expectedReplySeqNo
Definition: PingApp.h:66
long lossCount
Definition: PingApp.h:77
cStdDev rttStat
Definition: PingApp.h:70
long numPongs
Definition: PingApp.h:79
long outOfOrderArrivalCount
Definition: PingApp.h:78
bool printPing
Definition: PingApp.h:57
long sendSeqNo
Definition: PingApp.h:65
std::vector< L3Address > inet::PingApp::getAllAddresses ( )
protectedvirtual

Referenced by parseDestAddressesPar().

344 {
345  std::vector<L3Address> result;
346 
347  int lastId = getSimulation()->getLastComponentId();
348 
349  for (int i = 0; i <= lastId; i++)
350  {
351  IInterfaceTable *ift = dynamic_cast<IInterfaceTable *>(getSimulation()->getModule(i));
352  if (ift) {
353  for (int j = 0; j < ift->getNumInterfaces(); j++) {
354  InterfaceEntry *ie = ift->getInterface(j);
355  if (ie && !ie->isLoopback()) {
356 #ifdef WITH_IPv4
357  if (ie->ipv4Data()) {
358  IPv4Address address = ie->ipv4Data()->getIPAddress();
359  if (!address.isUnspecified())
360  result.push_back(L3Address(address));
361  }
362 #endif // ifdef WITH_IPv4
363 #ifdef WITH_IPv6
364  if (ie->ipv6Data()) {
365  for (int k = 0; k < ie->ipv6Data()->getNumAddresses(); k++) {
366  IPv6Address address = ie->ipv6Data()->getAddress(k);
367  if (!address.isUnspecified() && address.isGlobal())
368  result.push_back(L3Address(address));
369  }
370  }
371 #endif // ifdef WITH_IPv6
372  }
373  }
374  }
375  }
376  return result;
377 }
const double k
Definition: QAM16Modulation.cc:24
void inet::PingApp::handleMessage ( cMessage *  msg)
overrideprotectedvirtual
137 {
138  if (!isNodeUp()) {
139  if (msg->isSelfMessage())
140  throw cRuntimeError("Self message '%s' received when %s is down", msg->getName(), getComponentType()->getName());
141  else {
142  EV_WARN << "PingApp is down, dropping '" << msg->getName() << "' message\n";
143  delete msg;
144  return;
145  }
146  }
147  if (msg->isSelfMessage()) {
148  if (msg->getKind() == PING_FIRST_ADDR) {
149  srcAddr = L3AddressResolver().resolve(par("srcAddr"));
151  if (destAddresses.empty()) {
152  return;
153  }
154  destAddrIdx = 0;
155  msg->setKind(PING_CHANGE_ADDR);
156  }
157 
158  if (msg->getKind() == PING_CHANGE_ADDR) {
159  if (destAddrIdx >= (int)destAddresses.size())
160  return;
162  EV_INFO << "Starting up: dest=" << destAddr << " src=" << srcAddr << "seqNo=" << sendSeqNo << endl;
163  ASSERT(!destAddr.isUnspecified());
164  msg->setKind(PING_SEND);
165  }
166 
167  ASSERT2(msg->getKind() == PING_SEND, "Unknown kind in self message.");
168 
169  // send a ping
170  sendPing();
171 
172  if (count > 0 && sendSeqNo % count == 0) {
173  // choose next dest address
174  destAddrIdx++;
175  msg->setKind(PING_CHANGE_ADDR);
176  if (destAddrIdx >= (int)destAddresses.size()) {
177  if (continuous) {
179  }
180  }
181  }
182 
183  // then schedule next one if needed
184  scheduleNextPingRequest(simTime(), msg->getKind() == PING_CHANGE_ADDR);
185  }
186  else {
187  // process ping response
188  processPingResponse(check_and_cast<PingPayload *>(msg));
189  }
190 }
virtual void sendPing()
Definition: PingApp.cc:407
int destAddrIdx
Definition: PingApp.h:54
Definition: PingApp.cc:56
virtual void processPingResponse(PingPayload *msg)
Definition: PingApp.cc:270
bool continuous
Definition: PingApp.h:58
Definition: PingApp.cc:57
virtual void parseDestAddressesPar()
Definition: PingApp.cc:118
virtual bool isNodeUp()
Definition: PingApp.cc:260
int count
Definition: PingApp.h:53
bool isUnspecified() const
Definition: L3Address.cc:133
std::vector< L3Address > destAddresses
Definition: PingApp.h:48
Definition: PingApp.cc:55
L3Address srcAddr
Definition: PingApp.h:47
long sendSeqNo
Definition: PingApp.h:65
virtual void scheduleNextPingRequest(simtime_t previous, bool withSleep)
Definition: PingApp.cc:241
L3Address destAddr
Definition: PingApp.h:46
bool inet::PingApp::handleOperationStage ( LifecycleOperation operation,
int  stage,
IDoneCallback doneCallback 
)
overrideprotectedvirtual

Perform one stage of a lifecycle operation.

Processing may be done entirely within this method, or may be a longer process that involves nonzero simulation time or several events, and is triggered by this method call.

Return value: true = "done"; false = "not yet done, will invoke doneCallback when done"

Implements inet::ILifecycle.

200 {
201  Enter_Method_Silent();
202  if (dynamic_cast<NodeStartOperation *>(operation)) {
205  }
206  else if (dynamic_cast<NodeShutdownOperation *>(operation)) {
209  }
210  else if (dynamic_cast<NodeCrashOperation *>(operation)) {
213  }
214  else
215  throw cRuntimeError("Unsupported lifecycle operation '%s'", operation->getClassName());
216  return true;
217 }
virtual void startSendingPingRequests()
Definition: PingApp.cc:219
virtual void stopSendingPingRequests()
Definition: PingApp.cc:230
Stage
Definition: NodeOperations.h:71
Stage
Definition: NodeOperations.h:126
virtual bool isEnabled()
Definition: PingApp.cc:265
Stage
Definition: NodeOperations.h:46
Definition: NodeOperations.h:127
void inet::PingApp::initialize ( int  stage)
overrideprotectedvirtual
70 {
71  cSimpleModule::initialize(stage);
72 
73  if (stage == INITSTAGE_LOCAL) {
74  // read params
75  // (defer reading srcAddr/destAddr to when ping starts, maybe
76  // addresses will be assigned later by some protocol)
77  packetSize = par("packetSize");
78  sendIntervalPar = &par("sendInterval");
79  sleepDurationPar = &par("sleepDuration");
80  hopLimit = par("hopLimit");
81  count = par("count");
82 // if (count <= 0 && count != -1)
83 // throw cRuntimeError("Invalid count=%d parameter (should use -1 or a larger than zero value)", count);
84  startTime = par("startTime");
85  stopTime = par("stopTime");
86  if (stopTime >= SIMTIME_ZERO && stopTime < startTime)
87  throw cRuntimeError("Invalid startTime/stopTime parameters");
88  printPing = par("printPing").boolValue();
89  continuous = par("continuous").boolValue();
90 
91  // state
92  pid = -1;
93  lastStart = -1;
95  WATCH(sendSeqNo);
96  WATCH(expectedReplySeqNo);
97 
98  // statistics
99  rttStat.setName("pingRTT");
101  WATCH(lossCount);
102  WATCH(outOfOrderArrivalCount);
103  WATCH(numPongs);
104 
105  // references
106  timer = new cMessage("sendPing", PING_FIRST_ADDR);
107 
108 
109  }
110  else if (stage == INITSTAGE_APPLICATION_LAYER) {
111  // startup
112  nodeStatus = dynamic_cast<NodeStatus *>(findContainingNode(this)->getSubmodule("status"));
113  if (isEnabled() && isNodeUp())
115  }
116 }
simtime_t stopTime
Definition: PingApp.h:56
NodeStatus * nodeStatus
Definition: PingApp.h:63
long expectedReplySeqNo
Definition: PingApp.h:66
virtual void startSendingPingRequests()
Definition: PingApp.cc:219
simtime_t lastStart
Definition: PingApp.h:64
long lossCount
Definition: PingApp.h:77
bool continuous
Definition: PingApp.h:58
cStdDev rttStat
Definition: PingApp.h:70
virtual bool isNodeUp()
Definition: PingApp.cc:260
int count
Definition: PingApp.h:53
cPar * sleepDurationPar
Definition: PingApp.h:51
cModule * findContainingNode(const cModule *from)
Find the node containing the given module.
Definition: ModuleAccess.cc:56
Local initializations.
Definition: InitStages.h:35
cPar * sendIntervalPar
Definition: PingApp.h:50
Definition: PingApp.cc:55
long numPongs
Definition: PingApp.h:79
virtual bool isEnabled()
Definition: PingApp.cc:265
long outOfOrderArrivalCount
Definition: PingApp.h:78
int packetSize
Definition: PingApp.h:49
long sentCount
Definition: PingApp.h:76
cMessage * timer
Definition: PingApp.h:62
int hopLimit
Definition: PingApp.h:52
simtime_t startTime
Definition: PingApp.h:55
bool printPing
Definition: PingApp.h:57
long sendSeqNo
Definition: PingApp.h:65
int pid
Definition: PingApp.h:61
Initialization of applications.
Definition: InitStages.h:106
bool inet::PingApp::isEnabled ( )
protectedvirtual

Referenced by handleOperationStage(), and initialize().

266 {
267  return par("destAddr").stringValue()[0] && (count == -1 || sentCount < count);
268 }
int count
Definition: PingApp.h:53
long sentCount
Definition: PingApp.h:76
bool inet::PingApp::isNodeUp ( )
protectedvirtual

Referenced by handleMessage(), and initialize().

261 {
262  return !nodeStatus || nodeStatus->getState() == NodeStatus::UP;
263 }
NodeStatus * nodeStatus
Definition: PingApp.h:63
virtual State getState() const
Definition: NodeStatus.h:48
Definition: NodeStatus.h:40
virtual int inet::PingApp::numInitStages ( ) const
inlineoverrideprotectedvirtual
83 { return NUM_INIT_STAGES; }
The number of initialization stages.
Definition: InitStages.h:116
void inet::PingApp::parseDestAddressesPar ( )
protectedvirtual

Referenced by handleMessage().

119 {
120  srcAddr = L3AddressResolver().resolve(par("srcAddr"));
121  const char *destAddrs = par("destAddr");
122  if (!strcmp(destAddrs, "*")) {
124  }
125  else {
126  cStringTokenizer tokenizer(destAddrs);
127  const char *token;
128 
129  while ((token = tokenizer.nextToken()) != nullptr) {
130  L3Address addr = L3AddressResolver().resolve(token);
131  destAddresses.push_back(addr);
132  }
133  }
134 }
virtual std::vector< L3Address > getAllAddresses()
Definition: PingApp.cc:343
std::vector< L3Address > destAddresses
Definition: PingApp.h:48
L3Address srcAddr
Definition: PingApp.h:47
void inet::PingApp::processPingResponse ( PingPayload msg)
protectedvirtual

Referenced by handleMessage().

271 {
272  if (msg->getOriginatorId() != pid) {
273  EV_WARN << "Received response was not sent by this application, dropping packet\n";
274  delete msg;
275  return;
276  }
277 
278  // get src, hopCount etc from packet, and print them
279  INetworkProtocolControlInfo *ctrl = check_and_cast<INetworkProtocolControlInfo *>(msg->getControlInfo());
280  L3Address src = ctrl->getSourceAddress();
281  //L3Address dest = ctrl->getDestinationAddress();
282  int msgHopCount = ctrl->getHopLimit();
283 
284  // calculate the RTT time by looking up the the send time of the packet
285  // if the send time is no longer available (i.e. the packet is very old and the
286  // sendTime was overwritten in the circular buffer) then we just return a 0
287  // to signal that this value should not be used during the RTT statistics)
288  simtime_t rtt = sendSeqNo - msg->getSeqNo() > PING_HISTORY_SIZE ?
289  0 : simTime() - sendTimeHistory[msg->getSeqNo() % PING_HISTORY_SIZE];
290 
291  if (printPing) {
292  cout << getFullPath() << ": reply of " << std::dec << msg->getByteLength()
293  << " bytes from " << src
294  << " icmp_seq=" << msg->getSeqNo() << " ttl=" << msgHopCount
295  << " time=" << (rtt * 1000) << " msec"
296  << " (" << msg->getName() << ")" << endl;
297  }
298 
299  // update statistics
300  countPingResponse(msg->getByteLength(), msg->getSeqNo(), rtt);
301  delete msg;
302 }
virtual void countPingResponse(int bytes, long seqNo, simtime_t rtt)
Definition: PingApp.cc:304
simtime_t sendTimeHistory[PING_HISTORY_SIZE]
Definition: PingApp.h:67
#define PING_HISTORY_SIZE
Definition: PingApp.h:34
bool printPing
Definition: PingApp.h:57
long sendSeqNo
Definition: PingApp.h:65
int pid
Definition: PingApp.h:61
void inet::PingApp::refreshDisplay ( ) const
overrideprotectedvirtual
193 {
194  char buf[40];
195  sprintf(buf, "sent: %ld pks\nrcvd: %ld pks", sentCount, numPongs);
196  getDisplayString().setTagArg("t", 0, buf);
197 }
long numPongs
Definition: PingApp.h:79
long sentCount
Definition: PingApp.h:76
void inet::PingApp::scheduleNextPingRequest ( simtime_t  previous,
bool  withSleep 
)
protectedvirtual

Referenced by handleMessage(), and startSendingPingRequests().

242 {
243  simtime_t next;
244  if (previous < SIMTIME_ZERO)
245  next = simTime() <= startTime ? startTime : simTime();
246  else {
247  next = previous + sendIntervalPar->doubleValue();
248  if (withSleep)
249  next += sleepDurationPar->doubleValue();
250  }
251  if (stopTime < SIMTIME_ZERO || next < stopTime)
252  scheduleAt(next, timer);
253 }
simtime_t stopTime
Definition: PingApp.h:56
cPar * sleepDurationPar
Definition: PingApp.h:51
cPar * sendIntervalPar
Definition: PingApp.h:50
cMessage * timer
Definition: PingApp.h:62
simtime_t startTime
Definition: PingApp.h:55
void inet::PingApp::sendPing ( )
protectedvirtual

Referenced by handleMessage().

408 {
409  char name[32];
410  sprintf(name, "ping%ld", sendSeqNo);
411 
412  PingPayload *msg = new PingPayload(name);
413  ASSERT(pid != -1);
414  msg->setOriginatorId(pid);
415  msg->setSeqNo(sendSeqNo);
416  msg->setByteLength(packetSize + 4);
417 
418  // store the sending time in a circular buffer so we can compute RTT when the packet returns
420 
421  emit(pingTxSeqSignal, sendSeqNo);
422  sendSeqNo++;
423  sentCount++;
424  IL3AddressType *addressType = destAddr.getAddressType();
425  INetworkProtocolControlInfo *controlInfo = addressType->createNetworkProtocolControlInfo();
426  controlInfo->setSourceAddress(srcAddr);
427  controlInfo->setDestinationAddress(destAddr);
428  controlInfo->setHopLimit(hopLimit);
429  // TODO: remove
430  controlInfo->setTransportProtocol(1); // IP_PROT_ICMP);
431  msg->setControlInfo(dynamic_cast<cObject *>(controlInfo));
432  EV_INFO << "Sending ping request #" << msg->getSeqNo() << " to lower layer.\n";
433  send(msg, "pingOut");
434 }
simtime_t sendTimeHistory[PING_HISTORY_SIZE]
Definition: PingApp.h:67
IL3AddressType * getAddressType() const
Definition: L3Address.cc:60
int packetSize
Definition: PingApp.h:49
L3Address srcAddr
Definition: PingApp.h:47
#define PING_HISTORY_SIZE
Definition: PingApp.h:34
virtual void setSourceAddress(const L3Address &address)=0
long sentCount
Definition: PingApp.h:76
int hopLimit
Definition: PingApp.h:52
virtual INetworkProtocolControlInfo * createNetworkProtocolControlInfo() const =0
long sendSeqNo
Definition: PingApp.h:65
int pid
Definition: PingApp.h:61
static simsignal_t pingTxSeqSignal
Definition: PingApp.h:74
L3Address destAddr
Definition: PingApp.h:46
void inet::PingApp::startSendingPingRequests ( )
protectedvirtual

Referenced by handleOperationStage(), and initialize().

220 {
221  ASSERT(!timer->isScheduled());
222  pid = getSimulation()->getUniqueNumber();
223  lastStart = simTime();
224  timer->setKind(PING_FIRST_ADDR);
225  sentCount = 0;
226  sendSeqNo = 0;
227  scheduleNextPingRequest(-1, false);
228 }
simtime_t lastStart
Definition: PingApp.h:64
Definition: PingApp.cc:55
long sentCount
Definition: PingApp.h:76
cMessage * timer
Definition: PingApp.h:62
long sendSeqNo
Definition: PingApp.h:65
int pid
Definition: PingApp.h:61
virtual void scheduleNextPingRequest(simtime_t previous, bool withSleep)
Definition: PingApp.cc:241
void inet::PingApp::stopSendingPingRequests ( )
protectedvirtual

Referenced by handleOperationStage().

231 {
232  pid = -1;
233  lastStart = -1;
235  srcAddr = destAddr = L3Address();
236  destAddresses.clear();
237  destAddrIdx = -1;
239 }
int destAddrIdx
Definition: PingApp.h:54
long expectedReplySeqNo
Definition: PingApp.h:66
virtual void cancelNextPingRequest()
Definition: PingApp.cc:255
simtime_t lastStart
Definition: PingApp.h:64
std::vector< L3Address > destAddresses
Definition: PingApp.h:48
L3Address srcAddr
Definition: PingApp.h:47
long sendSeqNo
Definition: PingApp.h:65
int pid
Definition: PingApp.h:61
L3Address destAddr
Definition: PingApp.h:46

Member Data Documentation

bool inet::PingApp::continuous = false
protected

Referenced by handleMessage(), and initialize().

int inet::PingApp::count = 0
protected
L3Address inet::PingApp::destAddr
protected
std::vector<L3Address> inet::PingApp::destAddresses
protected
int inet::PingApp::destAddrIdx = -1
protected
long inet::PingApp::expectedReplySeqNo = 0
protected
int inet::PingApp::hopLimit = 0
protected

Referenced by initialize(), and sendPing().

simtime_t inet::PingApp::lastStart
protected
long inet::PingApp::lossCount = 0
protected
NodeStatus* inet::PingApp::nodeStatus = nullptr
protected

Referenced by initialize(), and isNodeUp().

simsignal_t inet::PingApp::numLostSignal = registerSignal("numLost")
staticprotected

Referenced by countPingResponse().

simsignal_t inet::PingApp::numOutOfOrderArrivalsSignal = registerSignal("numOutOfOrderArrivals")
staticprotected

Referenced by countPingResponse().

long inet::PingApp::numPongs = 0
protected
long inet::PingApp::outOfOrderArrivalCount = 0
protected
int inet::PingApp::packetSize = 0
protected

Referenced by initialize(), and sendPing().

int inet::PingApp::pid = 0
protected
simsignal_t inet::PingApp::pingRxSeqSignal = registerSignal("pingRxSeq")
staticprotected

Referenced by countPingResponse().

simsignal_t inet::PingApp::pingTxSeqSignal = registerSignal("pingTxSeq")
staticprotected

Referenced by sendPing().

bool inet::PingApp::printPing = false
protected
simsignal_t inet::PingApp::rttSignal = registerSignal("rtt")
staticprotected

Referenced by countPingResponse().

cStdDev inet::PingApp::rttStat
protected
cPar* inet::PingApp::sendIntervalPar = nullptr
protected
simtime_t inet::PingApp::sendTimeHistory[PING_HISTORY_SIZE]
protected

Referenced by processPingResponse(), and sendPing().

long inet::PingApp::sentCount = 0
protected
cPar* inet::PingApp::sleepDurationPar = nullptr
protected
L3Address inet::PingApp::srcAddr
protected
simtime_t inet::PingApp::startTime
protected
simtime_t inet::PingApp::stopTime
protected
cMessage* inet::PingApp::timer = nullptr
protected

The documentation for this class was generated from the following files: