RINASim  October 2016
Documentation of framework for OMNeT++
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
IntPDUFG.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 #ifndef PDUFTG_H_
24 #define PDUFTG_H_
25 
26 #include <omnetpp.h>
27 
28 #include "PDUFGNeighbor.h"
29 #include "IntPDUForwarding.h"
30 #include "DA.h"
31 #include "QoSCube.h"
32 
33 // This is mapped as string --> port because Address do not have <, > operators overloads.
34 typedef std::list<PDUFGNeighbor *> NeighborState;
35 typedef NeighborState::iterator EIter;
36 
37 
38 class IntPDUFG : public cSimpleModule {
39 public:
40 
41  //Constructor/Destructor
42  IntPDUFG();
43  ~IntPDUFG();
44 
45  // Find the next known neighbor to reach the destination.
46  virtual PDUFGNeighbor * getNextNeighbor(const Address &destination, const std::string& qos);
47 
48  //
49  // Flow up/down operations:
50  //
51 
52  // Inserts a new flow through which a neighbor can be reached.
53  void insertFlowInfo(Address addr, QoSCube qos, RMTPort * port);
54  // Removes an existing flow from the existing ones.
55  void removeFlowInfo(RMTPort * port);
56 
57  // A new flow has been inserted/or removed
58  virtual void insertedFlow(const Address &addr, const QoSCube &qos, RMTPort * port) = 0;
59  virtual void removedFlow(const Address &addr, const QoSCube& qos, RMTPort * port) = 0;
60 
61  //Routing has processes a routing update
62  virtual void routingUpdated() = 0;
63 
64 protected:
65  // Contains the list of N-DIF neighbors of this IPC Address.
66  //
69 
70  // Initialize.
71  void initialize();
72 
73  // Called after initialize
74  virtual void onPolicyInit() = 0;
75 
76 private:
78 };
79 
80 #endif /* PDUFTG_H_ */
virtual void onPolicyInit()=0
NeighborState neiState
Definition: IntPDUFG.h:67
IntPDUFG()
Definition: IntPDUFG.cc:26
virtual void routingUpdated()=0
IntPDUForwarding * fwd
Definition: IntPDUFG.h:77
virtual void removedFlow(const Address &addr, const QoSCube &qos, RMTPort *port)=0
void insertFlowInfo(Address addr, QoSCube qos, RMTPort *port)
Definition: IntPDUFG.cc:68
~IntPDUFG()
Definition: IntPDUFG.cc:28
virtual void insertedFlow(const Address &addr, const QoSCube &qos, RMTPort *port)=0
NeighborState::iterator EIter
Definition: IntPDUFG.h:35
virtual PDUFGNeighbor * getNextNeighbor(const Address &destination, const std::string &qos)
Definition: IntPDUFG.cc:42
std::list< PDUFGNeighbor * > NeighborState
Definition: IntPDUFG.h:34
void removeFlowInfo(RMTPort *port)
Definition: IntPDUFG.cc:78
Class representing QoSCube with all its properties that is primarily used by FA, RMT and RA Specifica...
Definition: QoSCube.h:57
void initialize()
Definition: IntPDUFG.cc:30
Address ipcAddr
Definition: IntPDUFG.h:68
Address class holds IPC Process identification.
Definition: Address.h:42