RINASim  October 2016
Documentation of framework for OMNeT++
FABase.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 FABASE_H_
24 #define FABASE_H_
25 
26 //Standard libraries
27 #include <omnetpp.h>
28 //RINASim libraries
29 #include "NFlowTable.h"
30 
31 extern const char* TIM_FAPENDFLOWS;
32 
33 class FABase : public cSimpleModule {
34  public:
35 
36  FABase();
37  virtual ~FABase();
38 
39  std::list<Flow*> PendingFlows;
40 
41  virtual bool receiveAllocateRequest(Flow* flow) = 0;
42  virtual bool receiveMgmtAllocateRequest(Flow* mgmtflow) = 0;
43  virtual bool receiveMgmtAllocateRequest(APNamingInfo src, APNamingInfo dst) = 0;
44  virtual bool receiveMgmtAllocateFinish() = 0;
45  virtual void receiveNM1FlowCreated(Flow* flow) = 0;
46  //virtual void receiveCreateResponseFlowPositiveFromRibd(Flow* flow) = 0;
47  virtual bool receiveCreateFlowRequestFromRibd(Flow* flow) = 0;
48  virtual bool receiveDeallocateRequest(Flow* flow) = 0;
49  virtual void deinstantiateFai(Flow* flow) = 0;
50  virtual bool invokeNewFlowRequestPolicy(Flow* flow) = 0;
51 
52  virtual bool setOriginalAddresses(Flow* flow) = 0;
53  virtual bool setNeighborAddresses(Flow* flow) = 0;
54 
55  NFlowTable* getNFlowTable() const;
56  const Address& getMyAddress() const;
57 
58  protected:
61 
62  //SimpleModule overloads
63  virtual void initialize() = 0;
64  virtual void handleMessage(cMessage *msg) = 0;
65 
66  void initMyAddress();
67 
68 };
69 
70 
71 #endif /* FABASE_H_ */
FABase()
Definition: FABase.cc:28
Class representing flow object with attributes from specs.
Definition: Flow.h:45
virtual bool receiveAllocateRequest(Flow *flow)=0
virtual bool receiveMgmtAllocateRequest(Flow *mgmtflow)=0
virtual ~FABase()
Definition: FABase.cc:32
virtual void initialize()=0
APNamingInfo holds complete naming info for particular application process.
Definition: APNamingInfo.h:43
NFlowTable * N_flowTable
Definition: FABase.h:59
virtual bool receiveMgmtAllocateFinish()=0
Address MyAddress
Definition: FABase.h:60
virtual bool receiveCreateFlowRequestFromRibd(Flow *flow)=0
void initMyAddress()
Definition: FABase.cc:40
const Address & getMyAddress() const
Definition: FABase.cc:54
NFlowTable * getNFlowTable() const
Definition: FABase.cc:36
virtual bool receiveDeallocateRequest(Flow *flow)=0
virtual bool setOriginalAddresses(Flow *flow)=0
std::list< Flow * > PendingFlows
Definition: FABase.h:39
Definition: FABase.h:33
virtual bool invokeNewFlowRequestPolicy(Flow *flow)=0
virtual void receiveNM1FlowCreated(Flow *flow)=0
virtual void handleMessage(cMessage *msg)=0
Address class holds IPC Process identification.
Definition: Address.h:42
virtual bool setNeighborAddresses(Flow *flow)=0
virtual void deinstantiateFai(Flow *flow)=0
const char * TIM_FAPENDFLOWS
Definition: FABase.cc:26