Switch to unified view

a b/src/DAF/AE/AEStream.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_AESTREAM_H_
17
#define __RINA_AESTREAM_H_
18
19
//Standard libraries
20
#include <omnetpp.h>
21
//RINASim libraries
22
#include "AE.h"
23
24
25
class AEStream : public AE
26
{
27
    //Consts
28
    const char* TIM_START;
29
    const char* TIM_STOP;
30
    const char* MSG_STDATA;
31
    const char* PAR_START;
32
    const char* PAR_STOP;
33
    const char* PAR_BEGIN;
34
    const char* PAR_END;
35
    const char* PAR_INTERVAL;
36
    const char* PAR_SIZE;
37
    const char* PAR_DSTAPNAME;
38
    const char* PAR_DSTAPINSTANCE;
39
    const char* PAR_DSTAENAME;
40
    const char* PAR_DSTAEINSTANCE;
41
42
  public:
43
    AEStream();
44
45
  protected:
46
    std::string dstApName;
47
    std::string dstApInstance;
48
    std::string dstAeName;
49
    std::string dstAeInstance;
50
51
    simtime_t startAt;
52
    simtime_t stopAt;
53
    simtime_t beginStreamAt;
54
    simtime_t endStreamAt;
55
56
    unsigned int size;
57
    double interval;
58
59
    virtual void initialize();
60
    virtual void handleMessage(cMessage *msg);
61
    void handleSelfMessage(cMessage* msg);
62
63
    void prepareAllocateRequest();
64
    void prepareStreamData();
65
    void prepareDeallocateRequest();
66
67
    virtual void processMRead(CDAPMessage* msg);
68
};
69
70
#endif