RINASim  October 2016
Documentation of framework for OMNeT++
FANotifierBase.cc
Go to the documentation of this file.
1 //
2 // This program is free software: you can redistribute it and/or modify
3 // it under the terms of the GNU Lesser General Public License as published by
4 // the Free Software Foundation, either version 3 of the License, or
5 // (at your option) any later version.
6 //
7 // This program is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 // GNU Lesser General Public License for more details.
11 //
12 // You should have received a copy of the GNU Lesser General Public License
13 // along with this program. If not, see http://www.gnu.org/licenses/.
14 //
15 
16 #include <FANotifierBase.h>
17 
19  return MyAddress;
20 }
21 
23  initMyAddress();
24 }
25 
27  std::string v = this->getFullPath();
28  //Setup MyAddress
29  cModule* ipc = this->getParentModule()->getParentModule();
30  MyAddress = Address(ipc->par(PAR_IPCADDR), ipc->par(PAR_DIFNAME));
31  EV << "SrcAddress that this FANotifier will use is " << MyAddress << endl;
32 }
33 
35  Enter_Method_Silent();
36  bool status = (
37  ( dynamic_cast<CDAP_M_Create*>(msg) && dynamic_cast<Flow*>(dynamic_cast<CDAP_M_Create*>(msg)->getObjectItem().objectVal) ) ||
38  ( dynamic_cast<CDAP_M_Create_R*>(msg) && dynamic_cast<Flow*>(dynamic_cast<CDAP_M_Create_R*>(msg)->getObjectItem().objectVal) ) ||
39  ( dynamic_cast<CDAP_M_Delete*>(msg) && dynamic_cast<Flow*>(dynamic_cast<CDAP_M_Delete*>(msg)->getObjectItem().objectVal) ) ||
40  ( dynamic_cast<CDAP_M_Delete_R*>(msg) && dynamic_cast<Flow*>(dynamic_cast<CDAP_M_Delete_R*>(msg)->getObjectItem().objectVal) )
41  )
42  ? true : false;
43  return status;
44 }
45 
47  Enter_Method("receiveMessage()");
49 }
50 
const char * PAR_IPCADDR
Definition: ExternConsts.cc:93
virtual void receiveMessage(CDAPMessage *msg)
Function checks the type of CDAP message and passes it to appropriate processing method.
const char * PAR_DIFNAME
Definition: ExternConsts.cc:94
virtual void initialize()
const Address & getMyAddress() const
virtual void receiveMessage(CDAPMessage *msg)
Function checks the type of CDAP message and passes it to appropriate processing method.
virtual bool isMessageProcessable(CDAPMessage *msg)
Function checks whether CDAP message can be processed by notifier.
Address class holds IPC Process identification.
Definition: Address.h:42