RINASim  October 2016
Documentation of framework for OMNeT++
Delimiting.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.
30 #ifndef DELIMITING_H_
31 #define DELIMITING_H_
32 
33 #include <omnetpp.h>
34 #include "SDUData_m.h"
35 #include "UserDataField.h"
36 #include "Utils.h"
37 #include "ExternConsts.h"
38 #include "DelimitingTimers_m.h"
39 
40 #define DELIMITING_MODULE_NAME "delimiting"
41 
42 #define GATE_DELIMIT_NORTHIO "northIo"
43 #define GATE_DELIMIT_SOUTHIO "southIo"
44 
45 class Delimiting : public cSimpleModule
46 {
47  private:
48 
49  cGate* northI;
50  cGate* northO;
51  cGate* southI;
52  cGate* southO;
53 
54  /* Timers */
56 
57  /* Queues for data passing from EFCPI (down) to FAI (up) */
58  std::vector<UserDataField*> userDataFieldQIn;
59  std::vector<Data*> dataQIn;
60  std::vector<SDUData*> sduDataQIn;
61 
62 
63  /* Queues for data passing from FAI (up) to EFCPI (down) */
64  std::vector<PDUData*> pduDataQOut;
65 
66 
67 
68  unsigned int sduSeqNum;
69  unsigned int maxFlowSDUSize;
70  unsigned int maxFlowPDUSize;
71  double delimitDelay;
72 
73 
74 
75  void processMsgFromFAI(SDUData* msg);
77 
78  void schedule(DelimitingTimers* timer);
79  public:
80  Delimiting();
81  virtual ~Delimiting();
82 
83  void initGates();
84 
85  protected:
86  virtual void handleMessage(cMessage *msg);
87  virtual void initialize(int step);
88 
89 
90 };
91 
92 #endif /* DELIMITING_H_ */
cGate * southO
Definition: Delimiting.h:52
virtual void handleMessage(cMessage *msg)
Definition: Delimiting.cc:61
unsigned int maxFlowSDUSize
Definition: Delimiting.h:69
void handleMsgFromEfcpi(UserDataField *msg)
Definition: Delimiting.cc:313
unsigned int sduSeqNum
Definition: Delimiting.h:68
std::vector< SDUData * > sduDataQIn
Definition: Delimiting.h:60
std::vector< Data * > dataQIn
Definition: Delimiting.h:59
cGate * northI
Definition: Delimiting.h:49
unsigned int maxFlowPDUSize
Definition: Delimiting.h:70
std::vector< UserDataField * > userDataFieldQIn
Definition: Delimiting.h:58
double delimitDelay
Definition: Delimiting.h:71
void initGates()
Definition: Delimiting.cc:52
void processMsgFromFAI(SDUData *msg)
Definition: Delimiting.cc:109
void schedule(DelimitingTimers *timer)
Definition: Delimiting.cc:390
virtual void initialize(int step)
Definition: Delimiting.cc:41
cGate * northO
Definition: Delimiting.h:50
virtual ~Delimiting()
Definition: Delimiting.cc:408
DelimitingDelimitTimer * delimitingTimer
Definition: Delimiting.h:55
cGate * southI
Definition: Delimiting.h:51
std::vector< PDUData * > pduDataQOut
Definition: Delimiting.h:64