RINASim  October 2016
Documentation of framework for OMNeT++
AEStream.h
Go to the documentation of this file.
1 // The MIT License (MIT)
2 //
3 // Copyright (c) 2014-2016 Brno University of Technology, PRISTINE project
4 //
5 // Permission is hereby granted, free of charge, to any person obtaining a copy
6 // of this software and associated documentation files (the "Software"), to deal
7 // in the Software without restriction, including without limitation the rights
8 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 // copies of the Software, and to permit persons to whom the Software is
10 // furnished to do so, subject to the following conditions:
11 //
12 // The above copyright notice and this permission notice shall be included in
13 // all copies or substantial portions of the Software.
14 //
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 // THE SOFTWARE.
22 
23 #ifndef __RINA_AESTREAM_H_
24 #define __RINA_AESTREAM_H_
25 
26 //Standard libraries
27 #include <omnetpp.h>
28 //RINASim libraries
29 #include "AE.h"
30 
31 
32 class AEStream : public AE
33 {
34  //Consts
35  const char* TIM_START;
36  const char* TIM_STOP;
37  const char* MSG_STDATA;
38  const char* PAR_START;
39  const char* PAR_STOP;
40  const char* PAR_BEGIN;
41  const char* PAR_END;
42  const char* PAR_INTERVAL;
43  const char* PAR_SIZE;
44  const char* PAR_DSTAPNAME;
45  const char* PAR_DSTAPINSTANCE;
46  const char* PAR_DSTAENAME;
47  const char* PAR_DSTAEINSTANCE;
48 
49  public:
50  AEStream();
51 
52  protected:
53  std::string dstApName;
54  std::string dstApInstance;
55  std::string dstAeName;
56  std::string dstAeInstance;
57 
58  simtime_t startAt;
59  simtime_t stopAt;
60  simtime_t beginStreamAt;
61  simtime_t endStreamAt;
62 
63  unsigned int size;
64  double interval;
65 
66  virtual void initialize();
67  virtual void handleMessage(cMessage *msg);
68  void handleSelfMessage(cMessage* msg);
69 
70  void onStart();
71  void afterOnStart();
72 
74  void prepareStreamData();
76 
77  virtual void processMRead(CDAPMessage* msg);
78 };
79 
80 #endif
std::string dstApInstance
Definition: AEStream.h:54
virtual void initialize()
Definition: AEStream.cc:45
const char * MSG_STDATA
Definition: AEStream.h:37
Definition: AE.h:44
const char * PAR_DSTAENAME
Definition: AEStream.h:46
void prepareDeallocateRequest()
Definition: AEStream.cc:166
simtime_t beginStreamAt
Definition: AEStream.h:60
const char * PAR_BEGIN
Definition: AEStream.h:40
std::string dstAeInstance
Definition: AEStream.h:56
const char * PAR_STOP
Definition: AEStream.h:39
simtime_t startAt
Definition: AEStream.h:58
const char * PAR_END
Definition: AEStream.h:41
void afterOnStart()
Definition: AEStream.cc:108
void prepareAllocateRequest()
Definition: AEStream.cc:149
const char * PAR_SIZE
Definition: AEStream.h:43
const char * PAR_START
Definition: AEStream.h:38
const char * PAR_DSTAEINSTANCE
Definition: AEStream.h:47
const char * TIM_STOP
Definition: AEStream.h:36
virtual void processMRead(CDAPMessage *msg)
Definition: AEStream.cc:172
void handleSelfMessage(cMessage *msg)
Definition: AEStream.cc:123
AEStream()
Definition: AEStream.cc:27
double interval
Definition: AEStream.h:64
void prepareStreamData()
Definition: AEStream.cc:155
virtual void handleMessage(cMessage *msg)
Definition: AEStream.cc:87
void onStart()
Definition: AEStream.cc:93
const char * PAR_DSTAPINSTANCE
Definition: AEStream.h:45
const char * TIM_START
Definition: AEStream.h:35
std::string dstApName
Definition: AEStream.h:53
unsigned int size
Definition: AEStream.h:63
simtime_t endStreamAt
Definition: AEStream.h:61
simtime_t stopAt
Definition: AEStream.h:59
const char * PAR_INTERVAL
Definition: AEStream.h:42
const char * PAR_DSTAPNAME
Definition: AEStream.h:44
std::string dstAeName
Definition: AEStream.h:55