RINASim  October 2016
Documentation of framework for OMNeT++
EFCP.h
Go to the documentation of this file.
1 // The MIT License (MIT)
2 //
3 // Copyright (c) 2014-2016 Brno University of Technology, PRISTINE project
4 //
5 // Permission is hereby granted, free of charge, to any person obtaining a copy
6 // of this software and associated documentation files (the "Software"), to deal
7 // in the Software without restriction, including without limitation the rights
8 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 // copies of the Software, and to permit persons to whom the Software is
10 // furnished to do so, subject to the following conditions:
11 //
12 // The above copyright notice and this permission notice shall be included in
13 // all copies or substantial portions of the Software.
14 //
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 // THE SOFTWARE.
22 /*
23  * @file EFCP.h
24  * @author Marcel Marek
25  * @date Apr 28, 2014
26  * @brief
27  * @detail
28  */
29 
30 #ifndef EFCP_H_
31 #define EFCP_H_
32 
33 /*
34  *
35  */
36 #include <omnetpp.h>
37 
38 #include "Flow.h"
39 #include "EFCPTable.h"
40 #include "ExternConsts.h"
41 #include "EFCP_defs.h"
42 #include "RA.h"
43 #include "EFCPListeners.h"
44 //#include "EFCPInstance.h"
45 //#include "Delimiting.h"
46 
47 
48 //class EFCPInstance;
49 //class EFCPTableEntry;
50 //class EFCPTable;
51 
52 
53 
54 class EFCP : public cSimpleModule {
55 private:
56 // bool dtcpPresent; /*!<a Boolean that indicates whether this connection is using DTCP. */
57 // bool winBased; /*!< a Boolean that indicates whether window-based flow control is in use.*/
58 // bool rateBased; /*!<a Boolean indicates whether rate-based flow control is in use.*/
59 // int maxClosedWinQueLen; /*!<an Integer that the number PDUs that can be put on the ClosedWindowQueue before something must be done.*/
60 // bool flowCont; /*!<a Boolean that indicates whether Flow Control is in use. The equivalent of the relation (Window-based OR Rate-based).*/
61 // bool rexmsnPresent; /*!<a Boolean that indicates whether Retransmission Control (potentially with gaps) is in use*/
62 // int dataRexmsnMax; /*!<an Integer that indicates the number of times the retransmission of a PDU will be attempted before some other action must be taken.*/
63 //
64 // int sendRate; /*!<an Integer that indicates the number of PDUs that may be sent in a TimePeriod. Used with rate-based flow control.*/
65 // int timePeriod; /*!<an Integer that indicates the length of time in microseconds for pacing rate-based flow control.*/
66 //
67 // int initCredit; /*!<an Integer added to the initial sequence number to get right window edge.*/
68 // int seqNumRollOverThresh; /*!<Integer. When the sequence number is increasing beyond this value, the sequence number space is close to rolling over, a new
69 // connection should be instantiated and bound to the same port-ids, so that new PDUs can
70 // be sent on the new connection.*/
71 // int initATimer; /*!<an integer assigned per flow that indicates the maximum time that a
72 // receiver will wait before sending an Ack. Some DIFs may wish to set a maximum value for the DIF. */
73 // int initSenderInactivTimer;/*!<an Integer that should be approximately 2Δt. This must be bounded. A DIF specification may want to specify a maximum value. */
74 //
75 // int initRcvrInactivTimer; /*!<an Integer that should be approximately 3Δt. This must be bounded. A DIF specification may want to specify a maximum value.*/
76 // int sendBytesFree; //The number of bytes that this flow can assume it currently has available for Writes
77 // int sendBytesPercentFree; //The percent of bytes that is free for Writes
78 // int sendBytesThresh; //The number of free bytes below which flow control should slow or block the user from doing any more Writes.
79 // int sendBytesPercentThresh; //The percent of free bytes below, which flow control should slow or block the user from doing any more Writes.
80 // int sendBuffFree; //The number of buffers of MaxSDU size that this flow can assume it currently has available for Writes.
81 // int sendBuffPercentFree; //The percent of buffers of MaxSDU size that are free for Writes.
82 // int sendBuffThresh; //The number of free buffers below which flow control should slow or block the user from doing any more Writes.
83 // int sendBuffPercentThresh; //The percent of free buffers below which flow control should not advance or decreases the amount the Right Window Edge is moved.
84 
85 
88 
89  /* Listeners */
90 
93 
94  Delimiting* createDelimiting(cModule* efcpi, int portId);
95  DTCP* createDTCP(cModule* efcpi, const EFCPPolicySet* efcpPolicySet, const QoSCube* qosCube);
96  cModule* createPolicyModule(const char* prefix, const char* name, const char* policy, cModule* parent, int verticalIndex = 1);
97 
98 
99 
100 // DTP dtp; //required part of the EFCP
101 // DTStateVector dtStateV; //data-transfer state vector
102 // DTCP* dtcp; //optional part of the EFCP
103 
104 // int portId; //FAI-identifier
105 
106 // std::map<unsigned int, DTP*> dtpMap; //list of currently existing DTP instances
107 
108 
109 protected:
110  virtual void initialize(int step);
111 // virtual int numInitStages() const {return 4;};
112 
113 public:
114  EFCP();
115  virtual ~EFCP();
116 
117 
118  EFCPInstance* createEFCPI(const Flow* flow, int cepId, int portId);
119  bool deleteEFCPI(Flow *flow);
120 
121 
122 };
123 
124 #endif /* EFCP_H_ */
Class representing flow object with attributes from specs.
Definition: Flow.h:45
Delimiting * createDelimiting(cModule *efcpi, int portId)
Definition: EFCP.cc:340
virtual void initialize(int step)
Definition: EFCP.cc:111
EFCP()
Definition: EFCP.cc:103
DTCP * createDTCP(cModule *efcpi, const EFCPPolicySet *efcpPolicySet, const QoSCube *qosCube)
Definition: EFCP.cc:261
cModule * createPolicyModule(const char *prefix, const char *name, const char *policy, cModule *parent, int verticalIndex=1)
Definition: EFCP.cc:318
EFCPInstance * createEFCPI(const Flow *flow, int cepId, int portId)
Definition: EFCP.cc:128
Definition: DTCP.h:63
LisEFCPCongestFromRA * lisEFCPCongestFromRA
Definition: EFCP.h:91
Monitoring and adjustment of IPC process operations .
Definition: EFCP.h:54
EFCPTable * efcpTable
Definition: EFCP.h:86
RA * resourceAllocator
Definition: EFCP.h:87
Definition: RA.h:61
Class representing QoSCube with all its properties that is primarily used by FA, RMT and RA Specifica...
Definition: QoSCube.h:57
bool deleteEFCPI(Flow *flow)
Definition: EFCP.cc:360
virtual ~EFCP()
Definition: EFCP.cc:107
LisEFCPQueueInfoFromAE * lisEFCPQueueInfoFromAE
Definition: EFCP.h:92