-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPoissonGenerationProcess.hpp
More file actions
executable file
·55 lines (46 loc) · 1.38 KB
/
PoissonGenerationProcess.hpp
File metadata and controls
executable file
·55 lines (46 loc) · 1.38 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
//
// PoissonGenerationProcess.hpp
// AggregationNS3
//
// Created by Alper Sinan Akyurek on 8/8/16.
// Copyright © 2016 Alper Sinan Akyurek. All rights reserved.
//
#ifndef PoissonGenerationProcess_hpp
#define PoissonGenerationProcess_hpp
#include "GenerationProcess.hpp"
/**
Implements a Poisson distributed generation process.
**/
class PoissonGenerationProcess : public GenerationProcess
{
private:
/** Uniform distributed random number generator **/
typedef ns3::Ptr<ns3::UniformRandomVariable> TUniformGenerator;
private:
/** Uniform random number generator **/
TUniformGenerator m_uniformGenerator;
public:
/**
Constructor to set the mean generation rate.
\param lambda Mean generation rate.
**/
PoissonGenerationProcess( const TMeanRate lambda );
private:
/**
Schedules a generation according to the Poisson distribution.
**/
void
ScheduleGeneration( void );
/**
Creates a measurement and adds to the queue.
**/
void
CreateMeasurement( void );
/**
Returns the next arrival time according ot the exponential distribution
\return Next measurement arrival time.
**/
TArrivalTime
GetNextTime( void ) const;
};
#endif /* PoissonGenerationProcess_hpp */