Parent: [6ccca6] (diff)

Child: [b323f7] (diff)

Download this file

AEBase.h    117 lines (94 with data), 3.3 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see http://www.gnu.org/licenses/.
//
#ifndef __RINA_AEBASE_H_
#define __RINA_AEBASE_H_
//Standard libraries
#include <omnetpp.h>
//RINASim libraries
#include "APNamingInfo.h"
#include "Flow.h"
#include "ExternConsts.h"
typedef std::list<Flow> Flows;
typedef Flows::iterator TFlowsIter;
//Consts
extern const char* PAR_AVGBW;
extern const char* PAR_AVGSDUBW;
extern const char* PAR_PEAKBWDUR;
extern const char* PAR_PEAKSDUBWDUR;
extern const char* PAR_BURSTPERIOD;
extern const char* PAR_BURSTDURATION;
extern const char* PAR_UNDETECTBITERR;
extern const char* PAR_MAXSDUSIZE;
extern const char* PAR_PARTIALDELIVER;
extern const char* PAR_INCOMPLETEDELIVER;
extern const char* PAR_FORCEORDER;
extern const char* PAR_MAXALLOWGAP;
extern const char* PAR_DELAY;
extern const char* PAR_JITTER;
extern const char* PAR_COSTTIME;
extern const char* PAR_COSTBITS;
extern const char* PAR_ATIME;
enum CDAPConnectionState {NIL,
FLOW_PENDING, CONNECTION_PENDING,
AUTHENTICATING, ESTABLISHED, RELEASING};
class AEBase : public cSimpleModule
{
public:
bool hasFlow(const Flow* flow);
const APNamingInfo& getApni() const;
const Flows& getFlows() const;
bool operator== (const AEBase& other) {
return (apni == other.apni);
}
const int getAuthType();
const std::string& getAuthName() const;
const std::string& getAuthPassword() const;
const std::string& getAuthOther() const;
void changeConStatus(CDAPConnectionState conState);
CDAPConnectionState getConStatus();
protected:
Flows flows;
APNamingInfo apni;
std::string srcApName;
std::string srcApInstance;
std::string srcAeName;
std::string srcAeInstance;
int authType;
std::string authName;
std::string authPassword;
std::string authOther;
QoSCube QoSRequirements;
CDAPConnectionState connectionState;
//Getters/Setters
const std::string& getSrcAeInstance() const;
void setSrcAeInstance(const std::string& srcAeInstance);
const std::string& getSrcAeName() const;
void setSrcAeName(const std::string& srcAeName);
const std::string& getSrcApInstance() const;
void setSrcApInstance(const std::string& srcApInstance);
const std::string& getSrcApName() const;
void setSrcApName(const std::string& srcApName);
void setApni(const APNamingInfo& apni);
void setFlows(const Flows& flows);
const QoSCube& getQoSRequirements() const;
void setQoSRequirements(const QoSCube& qoSRequirements);
void initNamingInfo();
void initQoSRequiremets();
void insertFlow(Flow& flow);
virtual void initialize();
virtual void handleMessage(cMessage *msg);
private:
};
#endif