Switch to unified view

a b/src/DAF/IRM/IRMListeners.cc
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 "IRM.h"
17
#include "IRMListeners.h"
18
19
IRMListeners::IRMListeners(IRM* nirm) {
20
    this->irm = nirm;
21
}
22
23
IRMListeners::~IRMListeners() {
24
25
}
26
27
void LisIRMAllocResNegaFa::receiveSignal(cComponent* src, simsignal_t id,
28
        cObject* obj) {
29
    EV << "AllocationResponseNegative{fromFA} initiated by " << src->getFullPath() << " and processed by " << irm->getFullPath() << endl;
30
    this->irm->receiveAllocationResponseNegative(obj);
31
}
32
33
void LisIRMAllocReqFai::receiveSignal(cComponent* src, simsignal_t id,
34
        cObject* obj) {
35
    EV << "AllocationRequest{fromFAI} initiated by " << src->getFullPath() << " and processed by " << irm->getFullPath() << endl;
36
    this->irm->receiveAllocationRequestFromFAI(obj);
37
}
38
39
void LisIRMAllocResNegaFai::receiveSignal(cComponent* src, simsignal_t id,
40
        cObject* obj) {
41
    EV << "AllocationResponseNegative{fromFAI} initiated by " << src->getFullPath() << " and processed by " << irm->getFullPath() << endl;
42
    this->irm->receiveAllocationResponseNegative(obj);
43
}
44
45
void LisIRMAllocReq::receiveSignal(cComponent* src, simsignal_t id,
46
        cObject* obj) {
47
    EV << "AllocationRequest initiated by " << src->getFullPath() << " and processed by " << irm->getFullPath() << endl;
48
    irm->receiveAllocationRequest(obj);
49
}
50
51
void LisIRMAllocResNegaAppNotFound::receiveSignal(cComponent* src,
52
        simsignal_t id, cObject* obj) {
53
    EV << "AllocationResponseNegative{AppNotFound} initiated by " << src->getFullPath() << " and processed by " << irm->getFullPath() << endl;
54
}
55
56
void LisIRMDeallocReq::receiveSignal(cComponent* src, simsignal_t id,
57
        cObject* obj) {
58
    EV << "AllocationRequest initiated by " << src->getFullPath() << " and processed by " << irm->getFullPath() << endl;
59
    irm->receiveDeallocationRequest(obj);
60
}