RINASim  October 2016
Documentation of framework for OMNeT++
Infection.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <omnetpp.h>
4 
5 #include <string.h>
6 
7 #include "DataTransferPDU.h"
8 
9 using namespace std;
10 
11 namespace Infection {
12 
13  class Infection;
14 
15  struct pduT {
16  PDU * pdu;
17  double wT;
18  };
19 
20  class Flow {
21  public :
22  Flow(string DIF, string SRC, string DST, string QoS, double rate, int avgPDU, int varPDU, int nParts, int nRec);
23 
24  pduT getPDU(bool record);
25  string QoS;
26 
27  private :
29  Address srcAddr, dstAddr;
30  static unsigned int cepID;
31 
32  double avgWT;
33  int minS, maxS;
34  int current, parts, rec;
35  unsigned int fcepID, secNum;
36 
37  };
38 
39  class commMsg : public cMessage {
40  public:
41  Flow * f;
42 
43  commMsg(Flow * _f);
44  };
45 
46  class Infection : public cSimpleModule{
47  public:
48  void finish();
49 
50  protected:
51  virtual void initialize();
52  virtual void handleMessage(cMessage *msg);
53 
54  vector<Flow *> flows;
55  cModule * mod, * rmt;
56 
58  simsignal_t signal;
59 
60  double markIniT, markFinT, finTime;
61  };
62 }
simsignal_t signal
Definition: Infection.h:58
Connection identifier as defined in specifications.
Definition: ConnectionId.h:42
Definition: PDU.h:42
static unsigned int cepID
Definition: Infection.h:30
vector< Flow * > flows
Definition: Infection.h:54
double avgWT
Definition: Infection.h:32
Address srcAddr
Definition: Infection.h:29
ConnectionId connID
Definition: Infection.h:28
unsigned int secNum
Definition: Infection.h:35
Address class holds IPC Process identification.
Definition: Address.h:42