RINASim  October 2016
Documentation of framework for OMNeT++
InfectionSignals.h
Go to the documentation of this file.
1 //
2 // Copyright © 2014 - 2015 PRISTINE Consortium (http://ict-pristine.eu)
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Lesser General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public License
15 // along with this program. If not, see http://www.gnu.org/licenses/.
16 //
17 #pragma once
18 
19 #include <omnetpp.h>
20 #include "DataTransferPDU.h"
21 
22 using namespace std;
23 
24 class SendInfMsg : public cObject {
25 public:
26 
27  string src, dst;
28  int srcCepId;
29  string qos;
30 
31  SendInfMsg(string _src, string _dst, int _srcCepId, string _qos) :
32  src(_src), dst(_dst), srcCepId(_srcCepId), qos(_qos) {}
34 };
35 
36 class RecvInfMsg : public cObject {
37 public:
38 
39  string src, dst;
40  int src_cepID;
41  string qos;
42  unsigned int seqN;
43 
44  simtime_t h_delay, p_delay;
45  int pst_delay;
46 
47  RecvInfMsg(string _src, string _dst, int _cepID, string _qos,
48  unsigned int _seqN, simtime_t _h_delay, simtime_t _p_delay, int _pst_delay) :
49  src(_src), dst(_dst), src_cepID(_cepID), qos(_qos),
50  seqN(_seqN),
51  h_delay(_h_delay),
52  p_delay(_p_delay),
53  pst_delay(_pst_delay){}
55 };
56 
57 
59 public:
60  simtime_t sendT;
61  bool signaled;
62  int fcepID;
63  double pathDelay;
64  int pstDelay;
65 
66  InfectedDataTransferPDU(bool _signaled, int _fcepID, const char *name=NULL):
67  DataTransferPDU(name, 0),
68  signaled(_signaled),
69  fcepID(_fcepID),
70  pathDelay(0.0),
71  pstDelay(0)
72  {sendT = simTime();}
74  DataTransferPDU(other),
75  signaled(other.signaled),
76  fcepID(other.fcepID),
77  pathDelay(other.pathDelay),
78  pstDelay(other.pstDelay)
79  {sendT = other.sendT;}
81  DataTransferPDU(other),
82  pathDelay(0.0),
83  pstDelay(0)
84  {sendT = simTime(); fcepID = 0; signaled = false;}
85 
86  void addPSTdelay(int hd) {
87  pstDelay += hd;
88  }
89 
90  virtual InfectedDataTransferPDU *dup() const {return new InfectedDataTransferPDU(*this);}
91 };
unsigned int seqN
RecvInfMsg(string _src, string _dst, int _cepID, string _qos, unsigned int _seqN, simtime_t _h_delay, simtime_t _p_delay, int _pst_delay)
simtime_t p_delay
virtual InfectedDataTransferPDU * dup() const
SendInfMsg(string _src, string _dst, int _srcCepId, string _qos)
InfectedDataTransferPDU(const InfectedDataTransferPDU &other)
InfectedDataTransferPDU(bool _signaled, int _fcepID, const char *name=NULL)
InfectedDataTransferPDU(const DataTransferPDU &other)