|
a |
|
b/src/DAF/IRM/IRMListeners.h |
|
|
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 |
#ifndef IRMLISTENERS_H_
|
|
|
17 |
#define IRMLISTENERS_H_
|
|
|
18 |
|
|
|
19 |
//Standard libraries
|
|
|
20 |
#include <omnetpp.h>
|
|
|
21 |
//RINASim libraries
|
|
|
22 |
#include "IRM.h"
|
|
|
23 |
|
|
|
24 |
class IRM;
|
|
|
25 |
class IRMListeners : public cListener {
|
|
|
26 |
public:
|
|
|
27 |
IRMListeners(IRM* nirm);
|
|
|
28 |
virtual ~IRMListeners();
|
|
|
29 |
|
|
|
30 |
virtual void receiveSignal(cComponent *src, simsignal_t id, bool b) {
|
|
|
31 |
EV << "Signal to IRM initiated by " << src->getFullPath() << endl;
|
|
|
32 |
}
|
|
|
33 |
protected:
|
|
|
34 |
IRM* irm;
|
|
|
35 |
};
|
|
|
36 |
|
|
|
37 |
class LisIRMAllocResNegaFa : public IRMListeners
|
|
|
38 |
{
|
|
|
39 |
public:
|
|
|
40 |
LisIRMAllocResNegaFa(IRM* nirm) : IRMListeners(nirm){};
|
|
|
41 |
void virtual receiveSignal(cComponent *src, simsignal_t id, cObject *obj);
|
|
|
42 |
};
|
|
|
43 |
|
|
|
44 |
class LisIRMAllocResNegaFai : public IRMListeners
|
|
|
45 |
{
|
|
|
46 |
public:
|
|
|
47 |
LisIRMAllocResNegaFai(IRM* nirm) : IRMListeners(nirm){};
|
|
|
48 |
void virtual receiveSignal(cComponent *src, simsignal_t id, cObject *obj);
|
|
|
49 |
};
|
|
|
50 |
|
|
|
51 |
class LisIRMAllocReq : public IRMListeners {
|
|
|
52 |
public:
|
|
|
53 |
LisIRMAllocReq(IRM* nirm) : IRMListeners(nirm){};
|
|
|
54 |
void virtual receiveSignal(cComponent *src, simsignal_t id, cObject *obj);
|
|
|
55 |
};
|
|
|
56 |
|
|
|
57 |
class LisIRMDeallocReq : public IRMListeners {
|
|
|
58 |
public:
|
|
|
59 |
LisIRMDeallocReq(IRM* nirm) : IRMListeners(nirm){};
|
|
|
60 |
void virtual receiveSignal(cComponent *src, simsignal_t id, cObject *obj);
|
|
|
61 |
};
|
|
|
62 |
|
|
|
63 |
class LisIRMAllocReqFai : public IRMListeners
|
|
|
64 |
{
|
|
|
65 |
public:
|
|
|
66 |
LisIRMAllocReqFai(IRM* nirm) : IRMListeners(nirm){};
|
|
|
67 |
void virtual receiveSignal(cComponent *src, simsignal_t id, cObject *obj);
|
|
|
68 |
};
|
|
|
69 |
|
|
|
70 |
class LisIRMAllocResNegaAppNotFound : public IRMListeners {
|
|
|
71 |
public:
|
|
|
72 |
LisIRMAllocResNegaAppNotFound(IRM* nirm) : IRMListeners(nirm){};
|
|
|
73 |
void virtual receiveSignal(cComponent *src, simsignal_t id, cObject *obj);
|
|
|
74 |
};
|
|
|
75 |
|
|
|
76 |
#endif /* IRMLISTENERS_H_ */
|