Parent: [6a85b3] (diff)

Download this file

QosCube.h    108 lines (95 with data), 4.0 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
//
// Copyright © 2014 PRISTINE Consortium (http://ict-pristine.eu)
//
// 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/.
//
/*
* @file QoSCube.h
* @author Marcel Marek
* @date Apr 28, 2014
* @brief
* @detail
*/
#ifndef QOSCUBE_H_
#define QOSCUBE_H_
#include "Policy.h"
#include "ExternConsts.h"
#include <vector>
extern const char* STR_DONOTCARE;
extern const char* STR_YES;
extern const char* STR_NO;
class QosCube {
private:
unsigned short qoSId;
int avgBand ; //Average bandwidth (measured at the application in bits/sec)
int avgSDUBand; //Average SDU bandwidth (measured in SDUs/sec)
int peakBandDuration; //Peak bandwidth-duration (measured in bits/sec);
int peakSDUBandDuration; //Peak SDU bandwidth-duration (measured in SDUs/sec);
int burstPeriod; //Burst period measured in useconds
int burstDuration; //Burst duration, measured in useconds fraction of Burst Period
double undetectedBitErr; //Undetected bit error rate measured as a probability
int maxSDUsize; //MaxSDUSize measured in bytes
bool partDeliv; //Partial Delivery - Can SDUs be delivered in pieces rather than all at once?
bool incompleteDeliv; //Incomplete Delivery - Can SDUs with missing pieces be delivered?
bool forceOrder; //Must SDUs be delivered in-order bits
int maxAllowGap; //Max allowable gap in SDUs, (a gap of N SDUs is considered the same as all SDUs delivered, i.e. a gap of N is a "don't care.")
int delay; //Delay in usecs
int jitter; //Jitter in usecs
int costTime; //measured in $/ms
int costBits; //measured in $/Mb
std::vector<Policy*> policyList;
//Policy-Default-Parameters: List;
public:
QosCube();
virtual ~QosCube();
int getAvgBand() const;
void setAvgBand(int avgBand);
int getAvgSduBand() const;
void setAvgSduBand(int avgSduBand);
int getBurstDuration() const;
void setBurstDuration(int burstDuration);
int getBurstPeriod() const;
void setBurstPeriod(int burstPeriod);
int getDelay() const;
void setDelay(int delay);
bool isForceOrder() const;
void setForceOrder(bool forceOrder);
bool isIncompleteDelivery() const;
void setIncompleteDelivery(bool incompleteDeliv);
int getJitter() const;
void setJitter(int jitter);
int getMaxAllowGap() const;
void setMaxAllowGap(int maxAllowGap);
int getMaxSduSize() const;
void setMaxSduSize(int maxSdUsize);
bool isPartialDelivery() const;
void setPartialDelivery(bool partDeliv);
int getPeakBandDuration() const;
void setPeakBandDuration(int peakBandDuration);
int getPeakSduBandDuration() const;
void setPeakSduBandDuration(int peakSduBandDuration);
double getUndetectedBitErr() const;
void setUndetectedBitErr(double undetectedBitErr);
unsigned short getQosId() const;
void setQosId(unsigned short qoSId);
int getCostBits() const;
void setCostBits(int costBits);
int getCostTime() const;
void setCostTime(int costTime);
short countFeasibilityScore(const QosCube templ) const;
std::string info() const;
};
//Free function
std::ostream& operator<< (std::ostream& os, const QosCube& cube);
#endif /* QOSCUBE_H_ */