-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathUniformDeadlineProcess.hpp
executable file
·82 lines (70 loc) · 2.05 KB
/
UniformDeadlineProcess.hpp
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
//
// UniformDeadlineProcess.hpp
// AggregationNS3
//
// Created by Alper Sinan Akyurek on 8/9/16.
// Copyright © 2016 Alper Sinan Akyurek. All rights reserved.
//
#ifndef UniformDeadlineProcess_hpp
#define UniformDeadlineProcess_hpp
#include <ns3/core-module.h>
#include "DeadlineProcess.hpp"
/**
This class implements a Uniform random value deadline process.
**/
class UniformDeadlineProcess : public DeadlineProcess
{
public:
/** Type for the uniform boundaries **/
typedef double TBoundSeconds;
private:
/** Type for the uniform number generator **/
typedef ns3::Ptr<ns3::UniformRandomVariable> TUniformGenerator;
private:
/**
Uniform distributed number generator
**/
TUniformGenerator m_uniformGenerator;
/**
Lower bound of the uniform random number
**/
TBoundSeconds m_lowerBound;
/**
Upper bound of the uniform random number
**/
TBoundSeconds m_upperBound;
public:
/**
Constructor takes in the bounds and initiates the base class with their
average.
\param lowerBound Lower bound of the random number.
\param upperBound Upper bound of the random number.
**/
UniformDeadlineProcess( const TDeadline lowerBound,
const TDeadline upperBound );
/**
Generates a uniform distributed deadline value.
\return Next deadline value on a uniform distribution.
**/
TDeadline
GetNextDeadline( void ) const;
/**
Returns the lower bound.
\return Lower bound.
**/
TBoundSeconds
GetLowerBound( void ) const
{
return ( this->m_lowerBound );
}
/**
Returns the upper bound.
\return Upper bound.
**/
TBoundSeconds
GetUpperBound( void ) const
{
return ( this->m_upperBound );
}
};
#endif /* UniformDeadlineProcess_hpp */