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

UDP application. More...

#include <UdpBasicBurst.h>

Inheritance diagram for inet::UdpBasicBurst:
inet::ApplicationBase inet::UdpSocket::ICallback inet::OperationalBase inet::OperationalMixin< cSimpleModule > inet::ILifecycle

Public Types

enum  ChooseDestAddrMode { ONCE = 1, PER_BURST, PER_SEND }
 

Public Member Functions

 UdpBasicBurst ()
 
 ~UdpBasicBurst ()
 
- Public Member Functions inherited from inet::ApplicationBase
 ApplicationBase ()
 
- Public Member Functions inherited from inet::OperationalMixin< cSimpleModule >
virtual ~OperationalMixin ()
 }@ More...
 
- Public Member Functions inherited from inet::ILifecycle
virtual ~ILifecycle ()
 
- Public Member Functions inherited from inet::UdpSocket::ICallback
virtual ~ICallback ()
 

Protected Types

enum  SelfMsgKinds { START = 1, SEND, STOP }
 
typedef std::map< int, int > SourceSequence
 
- Protected Types inherited from inet::OperationalMixin< cSimpleModule >
enum  State
 

Protected Member Functions

virtual L3Address chooseDestAddr ()
 
virtual PacketcreatePacket ()
 
virtual void processPacket (Packet *msg)
 
virtual void generateBurst ()
 
virtual int numInitStages () const override
 
virtual void initialize (int stage) override
 
virtual void handleMessageWhenUp (cMessage *msg) override
 
virtual void finish () override
 
virtual void refreshDisplay () const override
 
virtual void processStart ()
 
virtual void processSend ()
 
virtual void processStop ()
 
virtual void handleStartOperation (LifecycleOperation *operation) override
 
virtual void handleStopOperation (LifecycleOperation *operation) override
 
virtual void handleCrashOperation (LifecycleOperation *operation) override
 
virtual void socketDataArrived (UdpSocket *socket, Packet *packet) override
 Notifies about data arrival, packet ownership is transferred to the callee. More...
 
virtual void socketErrorArrived (UdpSocket *socket, Indication *indication) override
 Notifies about error indication arrival, indication ownership is transferred to the callee. More...
 
virtual void socketClosed (UdpSocket *socket) override
 Notifies about socket closed, indication ownership is transferred to the callee. More...
 
- Protected Member Functions inherited from inet::ApplicationBase
virtual bool isInitializeStage (int stage) const override
 
virtual bool isModuleStartStage (int stage) const override
 
virtual bool isModuleStopStage (int stage) const override
 
- Protected Member Functions inherited from inet::OperationalMixin< cSimpleModule >
virtual int numInitStages () const override
 
virtual void refreshDisplay () const override
 
virtual void handleMessage (cMessage *msg) override
 
virtual void handleMessageWhenDown (cMessage *msg)
 
virtual bool handleOperationStage (LifecycleOperation *operation, IDoneCallback *doneCallback) override
 Perform one stage of a lifecycle operation. More...
 
virtual State getInitialOperationalState () const
 Returns initial operational state: OPERATING or NOT_OPERATING. More...
 
virtual void handleActiveOperationTimeout (cMessage *message)
 
virtual bool isUp () const
 utility functions More...
 
virtual bool isDown () const
 
virtual void setOperationalState (State newState)
 
virtual void scheduleOperationTimeout (simtime_t timeout)
 
virtual void setupActiveOperation (LifecycleOperation *operation, IDoneCallback *doneCallback, State)
 
virtual void delayActiveOperationFinish (simtime_t timeout)
 
virtual void startActiveOperationExtraTime (simtime_t delay=SIMTIME_ZERO)
 
virtual void startActiveOperationExtraTimeOrFinish (simtime_t extraTime)
 
virtual void finishActiveOperation ()
 

Protected Attributes

std::vector< L3AddressdestAddresses
 
ChooseDestAddrMode chooseDestAddrMode = static_cast<ChooseDestAddrMode>(0)
 
simtime_t delayLimit
 
simtime_t startTime
 
simtime_t stopTime
 
int localPort = -1
 
int destPort = -1
 
int destAddrRNG = -1
 
cPar * messageLengthPar = nullptr
 
cPar * burstDurationPar = nullptr
 
cPar * sleepDurationPar = nullptr
 
cPar * sendIntervalPar = nullptr
 
UdpSocket socket
 
L3Address destAddr
 
SourceSequence sourceSequence
 
cMessage * timerNext = nullptr
 
simtime_t nextPkt
 
simtime_t nextBurst
 
simtime_t nextSleep
 
bool isSource = false
 
bool activeBurst = false
 
bool haveSleepDuration = false
 
bool dontFragment = false
 
int numSent = 0
 
int numReceived = 0
 
int numDeleted = 0
 
int numDuplicated = 0
 
- Protected Attributes inherited from inet::OperationalMixin< cSimpleModule >
State operationalState
 
simtime_t lastChange
 
Operation activeOperation
 
cMessage * activeOperationTimeout
 
cMessage * activeOperationExtraTimer
 

Static Protected Attributes

static int counter
 
static simsignal_t outOfOrderPkSignal = registerSignal("outOfOrderPk")
 

Detailed Description

UDP application.

See NED for more info.

Member Typedef Documentation

◆ SourceSequence

typedef std::map<int, int> inet::UdpBasicBurst::SourceSequence
protected

Member Enumeration Documentation

◆ ChooseDestAddrMode

Enumerator
ONCE 
PER_BURST 
PER_SEND 
25  {
26  ONCE = 1, PER_BURST, PER_SEND
27  };

◆ SelfMsgKinds

Enumerator
START 
SEND 
STOP 
30 { START = 1, SEND, STOP };

Constructor & Destructor Documentation

◆ UdpBasicBurst()

inet::UdpBasicBurst::UdpBasicBurst ( )
inline
97 {}

◆ ~UdpBasicBurst()

inet::UdpBasicBurst::~UdpBasicBurst ( )
38 {
39  cancelAndDelete(timerNext);
40 }

Member Function Documentation

◆ chooseDestAddr()

L3Address inet::UdpBasicBurst::chooseDestAddr ( )
protectedvirtual
88 {
89  if (destAddresses.size() == 1)
90  return destAddresses[0];
91 
92  int k = getRNG(destAddrRNG)->intRand(destAddresses.size());
93  return destAddresses[k];
94 }

Referenced by generateBurst(), and processStart().

◆ createPacket()

Packet * inet::UdpBasicBurst::createPacket ( )
protectedvirtual
97 {
98  char msgName[32];
99  sprintf(msgName, "UDPBasicAppData-%d", counter++);
100  long msgByteLength = *messageLengthPar;
101  Packet *pk = new Packet(msgName);
102  const auto& payload = makeShared<ApplicationPacket>();
103  payload->setChunkLength(B(msgByteLength));
104  payload->setSequenceNumber(numSent);
105  payload->addTag<CreationTimeTag>()->setCreationTime(simTime());
106  pk->insertAtBack(payload);
107  pk->addPar("sourceId") = getId();
108  pk->addPar("msgId") = numSent;
109 
110  return pk;
111 }

Referenced by generateBurst().

◆ finish()

void inet::UdpBasicBurst::finish ( )
overrideprotectedvirtual
332 {
333  recordScalar("Total sent", numSent);
334  recordScalar("Total received", numReceived);
335  recordScalar("Total deleted", numDeleted);
336  ApplicationBase::finish();
337 }

◆ generateBurst()

void inet::UdpBasicBurst::generateBurst ( )
protectedvirtual
279 {
280  simtime_t now = simTime();
281 
282  if (nextPkt < now)
283  nextPkt = now;
284 
285  double sendInterval = *sendIntervalPar;
286  if (sendInterval <= 0.0)
287  throw cRuntimeError("The sendInterval parameter must be bigger than 0");
288  nextPkt += sendInterval;
289 
290  if (activeBurst && nextBurst <= now) { // new burst
291  double burstDuration = *burstDurationPar;
292  if (burstDuration < 0.0)
293  throw cRuntimeError("The burstDuration parameter mustn't be smaller than 0");
294  double sleepDuration = *sleepDurationPar;
295 
296  if (burstDuration == 0.0)
297  activeBurst = false;
298  else {
299  if (sleepDuration < 0.0)
300  throw cRuntimeError("The sleepDuration parameter mustn't be smaller than 0");
301  nextSleep = now + burstDuration;
302  nextBurst = nextSleep + sleepDuration;
303  }
304 
307  }
308 
311 
312  Packet *payload = createPacket();
313  if (dontFragment)
314  payload->addTag<FragmentationReq>()->setDontFragment(true);
315  payload->setTimestamp();
316  emit(packetSentSignal, payload);
317  socket.sendTo(payload, destAddr, destPort);
318  numSent++;
319 
320  // Next timer
321  if (activeBurst && nextPkt >= nextSleep)
322  nextPkt = nextBurst;
323 
324  if (stopTime >= SIMTIME_ZERO && nextPkt >= stopTime) {
325  timerNext->setKind(STOP);
326  nextPkt = stopTime;
327  }
328  scheduleAt(nextPkt, timerNext);
329 }

Referenced by processSend().

◆ handleCrashOperation()

void inet::UdpBasicBurst::handleCrashOperation ( LifecycleOperation operation)
overrideprotectedvirtual

Implements inet::OperationalMixin< cSimpleModule >.

359 {
360  if (timerNext)
361  cancelEvent(timerNext);
362  activeBurst = false;
363  if (operation->getRootModule() != getContainingNode(this)) // closes socket when the application crashed only
364  socket.destroy(); // TODO in real operating systems, program crash detected by OS and OS closes sockets of crashed programs.
365 }

◆ handleMessageWhenUp()

void inet::UdpBasicBurst::handleMessageWhenUp ( cMessage *  msg)
overrideprotectedvirtual

Implements inet::OperationalMixin< cSimpleModule >.

182 {
183  if (msg->isSelfMessage()) {
184  switch (msg->getKind()) {
185  case START:
186  processStart();
187  break;
188 
189  case SEND:
190  processSend();
191  break;
192 
193  case STOP:
194  processStop();
195  break;
196 
197  default:
198  throw cRuntimeError("Invalid kind %d in self message", (int)msg->getKind());
199  }
200  }
201  else
202  socket.processMessage(msg);
203 }

◆ handleStartOperation()

void inet::UdpBasicBurst::handleStartOperation ( LifecycleOperation operation)
overrideprotectedvirtual

Implements inet::OperationalMixin< cSimpleModule >.

340 {
341  simtime_t start = std::max(startTime, simTime());
342 
343  if ((stopTime < SIMTIME_ZERO) || (start < stopTime) || (start == stopTime && startTime == stopTime)) {
344  timerNext->setKind(START);
345  scheduleAt(start, timerNext);
346  }
347 }

◆ handleStopOperation()

void inet::UdpBasicBurst::handleStopOperation ( LifecycleOperation operation)
overrideprotectedvirtual

Implements inet::OperationalMixin< cSimpleModule >.

350 {
351  if (timerNext)
352  cancelEvent(timerNext);
353  activeBurst = false;
354  socket.close();
355  delayActiveOperationFinish(par("stopOperationTimeout"));
356 }

◆ initialize()

void inet::UdpBasicBurst::initialize ( int  stage)
overrideprotectedvirtual

Reimplemented from inet::OperationalMixin< cSimpleModule >.

43 {
45 
46  if (stage == INITSTAGE_LOCAL) {
47  counter = 0;
48  numSent = 0;
49  numReceived = 0;
50  numDeleted = 0;
51  numDuplicated = 0;
52 
53  delayLimit = par("delayLimit");
54  startTime = par("startTime");
55  stopTime = par("stopTime");
56  if (stopTime >= SIMTIME_ZERO && stopTime <= startTime)
57  throw cRuntimeError("Invalid startTime/stopTime parameters");
58 
59  messageLengthPar = &par("messageLength");
60  burstDurationPar = &par("burstDuration");
61  sleepDurationPar = &par("sleepDuration");
62  sendIntervalPar = &par("sendInterval");
66  dontFragment = par("dontFragment");
67 
68  destAddrRNG = par("destAddrRNG");
69  const char *addrModeStr = par("chooseDestAddrMode");
70  int addrMode = cEnum::get("inet::ChooseDestAddrMode")->lookup(addrModeStr);
71  if (addrMode == -1)
72  throw cRuntimeError("Invalid chooseDestAddrMode: '%s'", addrModeStr);
73  chooseDestAddrMode = static_cast<ChooseDestAddrMode>(addrMode);
74 
75  WATCH(numSent);
76  WATCH(numReceived);
77  WATCH(numDeleted);
78  WATCH(numDuplicated);
79 
80  localPort = par("localPort");
81  destPort = par("destPort");
82 
83  timerNext = new cMessage("UDPBasicBurstTimer");
84  }
85 }

◆ numInitStages()

virtual int inet::UdpBasicBurst::numInitStages ( ) const
inlineoverrideprotectedvirtual
78 { return NUM_INIT_STAGES; }

◆ processPacket()

void inet::UdpBasicBurst::processPacket ( Packet msg)
protectedvirtual
233 {
234  if (pk->getKind() == UDP_I_ERROR) {
235  EV_WARN << "UDP error received\n";
236  delete pk;
237  return;
238  }
239 
240  if (pk->hasPar("sourceId") && pk->hasPar("msgId")) {
241  // duplicate control
242  int moduleId = pk->par("sourceId");
243  int msgId = pk->par("msgId");
244  auto it = sourceSequence.find(moduleId);
245  if (it != sourceSequence.end()) {
246  if (it->second >= msgId) {
247  EV_DEBUG << "Out of order packet: " << UdpSocket::getReceivedPacketInfo(pk) << endl;
248  emit(outOfOrderPkSignal, pk);
249  delete pk;
250  numDuplicated++;
251  return;
252  }
253  else
254  it->second = msgId;
255  }
256  else
257  sourceSequence[moduleId] = msgId;
258  }
259 
260  if (delayLimit > 0) {
261  if (simTime() - pk->getTimestamp() > delayLimit) {
262  EV_DEBUG << "Old packet: " << UdpSocket::getReceivedPacketInfo(pk) << endl;
263  PacketDropDetails details;
264  details.setReason(CONGESTION);
265  emit(packetDroppedSignal, pk, &details);
266  delete pk;
267  numDeleted++;
268  return;
269  }
270  }
271 
272  EV_INFO << "Received packet: " << UdpSocket::getReceivedPacketInfo(pk) << endl;
273  emit(packetReceivedSignal, pk);
274  numReceived++;
275  delete pk;
276 }

Referenced by socketDataArrived().

◆ processSend()

void inet::UdpBasicBurst::processSend ( )
protectedvirtual
167 {
168  if (stopTime < SIMTIME_ZERO || simTime() < stopTime) {
169  // send and reschedule next sending
170  if (isSource) // if the node is a sink, don't generate messages
171  generateBurst();
172  }
173 }

Referenced by handleMessageWhenUp(), and processStart().

◆ processStart()

void inet::UdpBasicBurst::processStart ( )
protectedvirtual
114 {
115  socket.setOutputGate(gate("socketOut"));
116  socket.setCallback(this);
118 
119  int timeToLive = par("timeToLive");
120  if (timeToLive != -1)
121  socket.setTimeToLive(timeToLive);
122 
123  int dscp = par("dscp");
124  if (dscp != -1)
125  socket.setDscp(dscp);
126 
127  int tos = par("tos");
128  if (tos != -1)
129  socket.setTos(tos);
130 
131  const char *destAddrs = par("destAddresses");
132  cStringTokenizer tokenizer(destAddrs);
133  const char *token;
134  bool excludeLocalDestAddresses = par("excludeLocalDestAddresses");
135 
136  IInterfaceTable *ift = getModuleFromPar<IInterfaceTable>(par("interfaceTableModule"), this);
137 
138  while ((token = tokenizer.nextToken()) != nullptr) {
139  if (strstr(token, "Broadcast") != nullptr)
141  else {
142  L3Address addr = L3AddressResolver().resolve(token);
143  if (excludeLocalDestAddresses && ift && ift->isLocalAddress(addr))
144  continue;
145  destAddresses.push_back(addr);
146  }
147  }
148 
149  nextSleep = simTime();
150  nextBurst = simTime();
151  nextPkt = simTime();
152  activeBurst = false;
153 
154  isSource = !destAddresses.empty();
155 
156  if (isSource) {
157  if (chooseDestAddrMode == ONCE)
159 
160  activeBurst = true;
161  }
162  timerNext->setKind(SEND);
163  processSend();
164 }

Referenced by handleMessageWhenUp().

◆ processStop()

void inet::UdpBasicBurst::processStop ( )
protectedvirtual
176 {
177  socket.close();
178  socket.setCallback(nullptr);
179 }

Referenced by handleMessageWhenUp().

◆ refreshDisplay()

void inet::UdpBasicBurst::refreshDisplay ( ) const
overrideprotectedvirtual
224 {
226 
227  char buf[100];
228  sprintf(buf, "rcvd: %d pks\nsent: %d pks", numReceived, numSent);
229  getDisplayString().setTagArg("t", 0, buf);
230 }

◆ socketClosed()

void inet::UdpBasicBurst::socketClosed ( UdpSocket socket)
overrideprotectedvirtual

Notifies about socket closed, indication ownership is transferred to the callee.

Implements inet::UdpSocket::ICallback.

218 {
219  if (operationalState == State::STOPPING_OPERATION)
220  startActiveOperationExtraTimeOrFinish(par("stopOperationExtraTime"));
221 }

◆ socketDataArrived()

void inet::UdpBasicBurst::socketDataArrived ( UdpSocket socket,
Packet packet 
)
overrideprotectedvirtual

Notifies about data arrival, packet ownership is transferred to the callee.

Implements inet::UdpSocket::ICallback.

206 {
207  // process incoming packet
208  processPacket(packet);
209 }

◆ socketErrorArrived()

void inet::UdpBasicBurst::socketErrorArrived ( UdpSocket socket,
Indication indication 
)
overrideprotectedvirtual

Notifies about error indication arrival, indication ownership is transferred to the callee.

Implements inet::UdpSocket::ICallback.

212 {
213  EV_WARN << "Ignoring UDP error report " << indication->getName() << endl;
214  delete indication;
215 }

Member Data Documentation

◆ activeBurst

bool inet::UdpBasicBurst::activeBurst = false
protected

◆ burstDurationPar

cPar* inet::UdpBasicBurst::burstDurationPar = nullptr
protected

Referenced by generateBurst(), and initialize().

◆ chooseDestAddrMode

ChooseDestAddrMode inet::UdpBasicBurst::chooseDestAddrMode = static_cast<ChooseDestAddrMode>(0)
protected

◆ counter

int inet::UdpBasicBurst::counter
staticprotected

Referenced by createPacket(), and initialize().

◆ delayLimit

simtime_t inet::UdpBasicBurst::delayLimit
protected

Referenced by initialize(), and processPacket().

◆ destAddr

L3Address inet::UdpBasicBurst::destAddr
protected

Referenced by generateBurst(), and processStart().

◆ destAddresses

std::vector<L3Address> inet::UdpBasicBurst::destAddresses
protected

Referenced by chooseDestAddr(), and processStart().

◆ destAddrRNG

int inet::UdpBasicBurst::destAddrRNG = -1
protected

Referenced by chooseDestAddr(), and initialize().

◆ destPort

int inet::UdpBasicBurst::destPort = -1
protected

Referenced by generateBurst(), and initialize().

◆ dontFragment

bool inet::UdpBasicBurst::dontFragment = false
protected

Referenced by generateBurst(), and initialize().

◆ haveSleepDuration

bool inet::UdpBasicBurst::haveSleepDuration = false
protected

◆ isSource

bool inet::UdpBasicBurst::isSource = false
protected

Referenced by processSend(), and processStart().

◆ localPort

int inet::UdpBasicBurst::localPort = -1
protected

Referenced by initialize(), and processStart().

◆ messageLengthPar

cPar* inet::UdpBasicBurst::messageLengthPar = nullptr
protected

Referenced by createPacket(), and initialize().

◆ nextBurst

simtime_t inet::UdpBasicBurst::nextBurst
protected

◆ nextPkt

simtime_t inet::UdpBasicBurst::nextPkt
protected

◆ nextSleep

simtime_t inet::UdpBasicBurst::nextSleep
protected

◆ numDeleted

int inet::UdpBasicBurst::numDeleted = 0
protected

Referenced by finish(), initialize(), and processPacket().

◆ numDuplicated

int inet::UdpBasicBurst::numDuplicated = 0
protected

Referenced by initialize(), and processPacket().

◆ numReceived

int inet::UdpBasicBurst::numReceived = 0
protected

◆ numSent

int inet::UdpBasicBurst::numSent = 0
protected

◆ outOfOrderPkSignal

simsignal_t inet::UdpBasicBurst::outOfOrderPkSignal = registerSignal("outOfOrderPk")
staticprotected

Referenced by processPacket().

◆ sendIntervalPar

cPar* inet::UdpBasicBurst::sendIntervalPar = nullptr
protected

Referenced by generateBurst(), and initialize().

◆ sleepDurationPar

cPar* inet::UdpBasicBurst::sleepDurationPar = nullptr
protected

Referenced by generateBurst(), and initialize().

◆ socket

◆ sourceSequence

SourceSequence inet::UdpBasicBurst::sourceSequence
protected

Referenced by processPacket().

◆ startTime

simtime_t inet::UdpBasicBurst::startTime
protected

Referenced by handleStartOperation(), and initialize().

◆ stopTime

simtime_t inet::UdpBasicBurst::stopTime
protected

◆ timerNext

cMessage* inet::UdpBasicBurst::timerNext = nullptr
protected

The documentation for this class was generated from the following files:
inet::UdpSocket::setOutputGate
void setOutputGate(cGate *toUdp)
Sets the gate on which to send to UDP.
Definition: UdpSocket.h:117
inet::UdpBasicBurst::chooseDestAddr
virtual L3Address chooseDestAddr()
Definition: UdpBasicBurst.cc:87
inet::UdpSocket::setDscp
void setDscp(short dscp)
Sets the Ipv4 / Ipv6 dscp fields of packets sent from the UDP socket.
Definition: UdpSocket.cc:121
inet::UdpSocket::setTimeToLive
void setTimeToLive(int ttl)
Set the TTL (Ipv6: Hop Limit) field on sent packets.
Definition: UdpSocket.cc:112
inet::UdpBasicBurst::sourceSequence
SourceSequence sourceSequence
Definition: UdpBasicBurst.h:51
inet::OperationalMixin< cSimpleModule >::operationalState
State operationalState
Definition: OperationalMixin.h:23
inet::UdpSocket::bind
void bind(int localPort)
Bind the socket to a local port number.
Definition: UdpSocket.cc:34
inet::UdpBasicBurst::dontFragment
bool dontFragment
Definition: UdpBasicBurst.h:59
inet::UdpBasicBurst::PER_SEND
@ PER_SEND
Definition: UdpBasicBurst.h:26
inet::UdpSocket::sendTo
void sendTo(Packet *msg, L3Address destAddr, int destPort)
Sends a data packet to the given address and port.
Definition: UdpSocket.cc:69
inet::UdpSocket::getReceivedPacketInfo
static std::string getReceivedPacketInfo(Packet *pk)
Utility function: returns a line of information about a packet received via UDP.
Definition: UdpSocket.cc:315
inet::UdpBasicBurst::burstDurationPar
cPar * burstDurationPar
Definition: UdpBasicBurst.h:44
inet::UdpBasicBurst::destPort
int destPort
Definition: UdpBasicBurst.h:39
inet::UdpBasicBurst::stopTime
simtime_t stopTime
Definition: UdpBasicBurst.h:38
inet::UdpBasicBurst::messageLengthPar
cPar * messageLengthPar
Definition: UdpBasicBurst.h:43
inet::UdpBasicBurst::numDeleted
int numDeleted
Definition: UdpBasicBurst.h:66
inet::UdpBasicBurst::counter
static int counter
Definition: UdpBasicBurst.h:62
inet::getContainingNode
cModule * getContainingNode(const cModule *from)
Find the node containing the given module.
Definition: ModuleAccess.cc:40
inet::OperationalMixin< cSimpleModule >::initialize
virtual void initialize(int stage) override
Definition: OperationalMixinImpl.h:26
inet::UdpBasicBurst::processPacket
virtual void processPacket(Packet *msg)
Definition: UdpBasicBurst.cc:232
inet::UdpSocket::destroy
virtual void destroy() override
Notify the protocol that the owner of ISocket has destroyed the socket.
Definition: UdpSocket.cc:98
inet::UdpBasicBurst::delayLimit
simtime_t delayLimit
Definition: UdpBasicBurst.h:36
inet::UdpBasicBurst::ONCE
@ ONCE
Definition: UdpBasicBurst.h:26
inet::UdpBasicBurst::nextBurst
simtime_t nextBurst
Definition: UdpBasicBurst.h:54
inet::UdpBasicBurst::outOfOrderPkSignal
static simsignal_t outOfOrderPkSignal
Definition: UdpBasicBurst.h:69
inet::packetSentSignal
simsignal_t packetSentSignal
Definition: Simsignals.cc:96
inet::UdpBasicBurst::destAddr
L3Address destAddr
Definition: UdpBasicBurst.h:50
inet::UdpBasicBurst::activeBurst
bool activeBurst
Definition: UdpBasicBurst.h:57
inet::UdpSocket::setCallback
void setCallback(ICallback *cb)
Sets a callback object, to be used with processMessage().
Definition: UdpSocket.cc:338
inet::UdpBasicBurst::isSource
bool isSource
Definition: UdpBasicBurst.h:56
inet::packetDroppedSignal
simsignal_t packetDroppedSignal
Definition: Simsignals.cc:85
inet::UdpBasicBurst::destAddresses
std::vector< L3Address > destAddresses
Definition: UdpBasicBurst.h:34
inet::UdpBasicBurst::processStart
virtual void processStart()
Definition: UdpBasicBurst.cc:113
inet::Ipv4Address::ALLONES_ADDRESS
static const Ipv4Address ALLONES_ADDRESS
255.255.255.255
Definition: Ipv4Address.h:94
inet::UdpBasicBurst::sendIntervalPar
cPar * sendIntervalPar
Definition: UdpBasicBurst.h:46
inet::UdpBasicBurst::PER_BURST
@ PER_BURST
Definition: UdpBasicBurst.h:26
inet::UdpBasicBurst::START
@ START
Definition: UdpBasicBurst.h:30
inet::units::units::B
intscale< b, 1, 8 > B
Definition: Units.h:1168
inet::UdpBasicBurst::numDuplicated
int numDuplicated
Definition: UdpBasicBurst.h:67
inet::packetReceivedSignal
simsignal_t packetReceivedSignal
Definition: Simsignals.cc:97
inet::UdpSocket::processMessage
virtual void processMessage(cMessage *msg) override
Examines the message, takes ownership, and updates socket state.
Definition: UdpSocket.cc:343
inet::UdpBasicBurst::chooseDestAddrMode
ChooseDestAddrMode chooseDestAddrMode
Definition: UdpBasicBurst.h:35
inet::UdpBasicBurst::numSent
int numSent
Definition: UdpBasicBurst.h:64
inet::UdpBasicBurst::ChooseDestAddrMode
ChooseDestAddrMode
Definition: UdpBasicBurst.h:25
inet::UdpBasicBurst::nextPkt
simtime_t nextPkt
Definition: UdpBasicBurst.h:53
inet::INITSTAGE_LOCAL
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
inet::UdpBasicBurst::socket
UdpSocket socket
Definition: UdpBasicBurst.h:49
inet::UdpSocket::close
virtual void close() override
Unbinds the socket.
Definition: UdpSocket.cc:87
inet::UdpBasicBurst::sleepDurationPar
cPar * sleepDurationPar
Definition: UdpBasicBurst.h:45
NUM_INIT_STAGES
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
inet::UdpBasicBurst::processSend
virtual void processSend()
Definition: UdpBasicBurst.cc:166
inet::UdpBasicBurst::processStop
virtual void processStop()
Definition: UdpBasicBurst.cc:175
inet::sctp::max
double max(const double a, const double b)
Returns the maximum of a and b.
Definition: SctpAssociation.h:266
inet::physicallayer::k
const double k
Definition: Qam1024Modulation.cc:14
inet::UdpBasicBurst::STOP
@ STOP
Definition: UdpBasicBurst.h:30
inet::UdpBasicBurst::startTime
simtime_t startTime
Definition: UdpBasicBurst.h:37
inet::UdpBasicBurst::nextSleep
simtime_t nextSleep
Definition: UdpBasicBurst.h:55
inet::UdpBasicBurst::generateBurst
virtual void generateBurst()
Definition: UdpBasicBurst.cc:278
inet::OperationalMixin< cSimpleModule >::delayActiveOperationFinish
virtual void delayActiveOperationFinish(simtime_t timeout)
Definition: OperationalMixinImpl.h:161
inet::UdpBasicBurst::numReceived
int numReceived
Definition: UdpBasicBurst.h:65
inet::UdpBasicBurst::createPacket
virtual Packet * createPacket()
Definition: UdpBasicBurst.cc:96
inet::OperationalMixin< cSimpleModule >::startActiveOperationExtraTimeOrFinish
virtual void startActiveOperationExtraTimeOrFinish(simtime_t extraTime)
Definition: OperationalMixinImpl.h:179
inet::CONGESTION
@ CONGESTION
Definition: Simsignals_m.h:80
inet::UdpBasicBurst::destAddrRNG
int destAddrRNG
Definition: UdpBasicBurst.h:40
inet::UdpSocket::setTos
void setTos(short tos)
Sets the Ipv4 Type of Service / Ipv6 Traffic Class fields of packets sent from the UDP socket.
Definition: UdpSocket.cc:130
inet::UdpBasicBurst::timerNext
cMessage * timerNext
Definition: UdpBasicBurst.h:52
inet::UdpBasicBurst::SEND
@ SEND
Definition: UdpBasicBurst.h:30
inet::OperationalMixin< cSimpleModule >::refreshDisplay
virtual void refreshDisplay() const override
Definition: OperationalMixinImpl.h:200
inet::UDP_I_ERROR
@ UDP_I_ERROR
Definition: UdpControlInfo_m.h:158
inet::UdpBasicBurst::localPort
int localPort
Definition: UdpBasicBurst.h:39