Switch to unified view

a b/src/DAF/CDAP/CACEListeners.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 "CACEListeners.h"
17
18
19
CACEListeners::CACEListeners(CACE* ncace): cace(ncace)
20
{
21
}
22
23
CACEListeners::~CACEListeners() {
24
    cace = NULL;
25
}
26
27
void LisCACEConReq::receiveSignal(cComponent *src, simsignal_t id,  cObject *obj){
28
    CDAPMessage* msg = dynamic_cast<CDAPMessage*>(obj);
29
    if (msg)
30
        cace->processMConnect(msg);
31
    else
32
        EV << "Received not a CDAPMessage!" << endl;
33
}
34
35
void LisCACERelReq::receiveSignal(cComponent *src, simsignal_t id,  cObject *obj){
36
    CDAPMessage* msg = dynamic_cast<CDAPMessage*>(obj);
37
    if (msg)
38
        cace->processMRelease(msg);
39
    else
40
        EV << "Received not a CDAPMessage!" << endl;
41
42
}
43
44
void LisCACEAuthRes::receiveSignal(cComponent *src, simsignal_t id,  cObject *obj){
45
    CDAPMessage* msg = dynamic_cast<CDAPMessage*>(obj);
46
47
    if (msg)
48
        cace->treatAuthRes(msg);
49
    else
50
        EV << "Received not a CDAPMessage!" << endl;
51
52
53
54
}
55
56