Switch to unified view

a b/src/DAF/AE/AEExtendedPing.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 __RINA_AEEXTENDEDPING_H_
17
#define __RINA_AEEXTENDEDPING_H_
18
19
//Standard libraries
20
#include <omnetpp.h>
21
//RINASim libraries
22
#include "AE.h"
23
24
25
class AEExtendedPing : public AE
26
{
27
  public:
28
    AEExtendedPing();
29
    virtual ~AEExtendedPing();
30
31
  protected:
32
    virtual void initialize();
33
    virtual void handleMessage(cMessage *msg);
34
35
    void handleSelfMessage(cMessage* msg);
36
37
  private:
38
    std::string myPath;
39
40
    std::string dstApName;
41
    std::string dstApInstance;
42
    std::string dstAeName;
43
    std::string dstAeInstance;
44
45
    simtime_t startAt;
46
    simtime_t stopAt;
47
    simtime_t connectAt;
48
    simtime_t pingAt;
49
    int rate;
50
    unsigned int size;
51
52
    void prepareAllocateRequest();
53
    void preparePing();
54
    void prepareConnectionRequest();
55
    void prepareDeallocateRequest();
56
57
    virtual void processMRead(CDAPMessage* msg);
58
    virtual void processMReadR(CDAPMessage* msg);
59
60
};
61
62
#endif
63