RINASim  October 2016
Documentation of framework for OMNeT++
RABase.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 RABASE_H_
24 #define RABASE_H_
25 
26 //Standard libraries
27 #include <omnetpp.h>
28 //RINASim libraries
29 #include "QoSCube.h"
30 #include "NM1FlowTable.h"
31 #include "Flow.h"
32 
33 typedef std::list<QoSCube> QoSCubeSet;
34 typedef QoSCubeSet::const_iterator QCubeCItem;
35 
36 class RABase : public cSimpleModule
37 {
38  public:
39  RABase();
40  virtual ~RABase();
41 
42  virtual void createNM1Flow(Flow *flow) = 0;
43  virtual void createNM1FlowWithoutAllocate(Flow *flow) = 0;
44  virtual void createNFlow(Flow *flow) = 0;
45  virtual void postNFlowAllocation(Flow* flow) = 0;
46  virtual void postNM1FlowAllocation(NM1FlowTableItem* ftItem) = 0;
47  virtual void removeNM1Flow(Flow *flow) = 0;
48  virtual void removeNM1FlowBindings(NM1FlowTableItem* ftItem) = 0;
49  virtual bool bindNFlowToNM1Flow(Flow* flow) = 0;
50  virtual void blockNM1PortOutput(NM1FlowTableItem* ftItem) = 0;
51  virtual void unblockNM1PortOutput(NM1FlowTableItem* ftItem) = 0;
52  virtual NM1FlowTable* getFlowTable() = 0;
53  virtual void signalizeSlowdownRequestToRIBd(cPacket* pdu) = 0;
54  virtual void signalizeSlowdownRequestToEFCP(cObject* pdu) = 0;
55  virtual bool hasFlow(std::string addr, std::string qosId) = 0;
56 
57  const QoSCubeSet& getQoSCubes() const;
58  const QoSCube* getQoSCubeById(std::string qosId) const;
59 
60  protected:
61  //SimpleModule overloads
62  virtual void initialize(int stage) = 0;
63  virtual void handleMessage(cMessage *msg) = 0;
64 
66 };
67 
68 //Free function
69 std::ostream& operator<< (std::ostream& os, const QoSCubeSet& cubes);
70 
71 #endif /* RABASE_H_ */
virtual NM1FlowTable * getFlowTable()=0
virtual void removeNM1FlowBindings(NM1FlowTableItem *ftItem)=0
Class representing flow object with attributes from specs.
Definition: Flow.h:45
virtual void removeNM1Flow(Flow *flow)=0
virtual void createNM1Flow(Flow *flow)=0
virtual bool hasFlow(std::string addr, std::string qosId)=0
virtual void handleMessage(cMessage *msg)=0
virtual void unblockNM1PortOutput(NM1FlowTableItem *ftItem)=0
const QoSCubeSet & getQoSCubes() const
Definition: RABase.cc:35
RABase()
Definition: RABase.cc:25
virtual void signalizeSlowdownRequestToRIBd(cPacket *pdu)=0
virtual bool bindNFlowToNM1Flow(Flow *flow)=0
virtual void createNFlow(Flow *flow)=0
virtual void initialize(int stage)=0
virtual void createNM1FlowWithoutAllocate(Flow *flow)=0
QoSCubeSet::const_iterator QCubeCItem
Definition: RABase.h:34
std::list< QoSCube > QoSCubeSet
Definition: RABase.h:33
Definition: RABase.h:36
virtual void signalizeSlowdownRequestToEFCP(cObject *pdu)=0
Class representing QoSCube with all its properties that is primarily used by FA, RMT and RA Specifica...
Definition: QoSCube.h:57
QoSCubeSet QoSCubes
Definition: RABase.h:65
virtual void postNFlowAllocation(Flow *flow)=0
virtual ~RABase()
Definition: RABase.cc:30
virtual void blockNM1PortOutput(NM1FlowTableItem *ftItem)=0
virtual void postNM1FlowAllocation(NM1FlowTableItem *ftItem)=0
const QoSCube * getQoSCubeById(std::string qosId) const
Definition: RABase.cc:47
std::ostream & operator<<(std::ostream &os, const QoSCubeSet &cubes)
Definition: RABase.cc:39