-
Notifications
You must be signed in to change notification settings - Fork 2
/
GenerationConfigureHelper.hpp
executable file
·53 lines (42 loc) · 1.45 KB
/
GenerationConfigureHelper.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
//
// GenerationConfigureHelper.hpp
// AggregationNS3
//
// Created by Alper Sinan Akyurek on 8/21/16.
// Copyright © 2016 Alper Sinan Akyurek. All rights reserved.
//
#ifndef GenerationConfigureHelper_hpp
#define GenerationConfigureHelper_hpp
#include "TransmissionManager.hpp"
#include "ConstantGenerationProcess.hpp"
#include "PoissonGenerationProcess.hpp"
#include "IntermittenGenerationProcess.hpp"
#include <fstream>
/**
This class configures a Generation process from an input file stream.
**/
class GenerationConfigureHelper
{
public:
/** Generation process ID type **/
typedef unsigned int TGenerationId;
/** Implemented generation process IDs **/
enum GenerationIdValues : TGenerationId
{
/** Constant rate generation process **/
ConstantGenerationId = 0,
/** Poisson distribution random generation process **/
PoissonGenerationId = 1,
/** Intermittent generation process with two rates **/
IntermittentGenerationId = 2
};
public:
/**
This function configures a new generation process from a file stream.
\param input Input file stream.
\return A new generation process is created, configured and returned.
**/
static Application::TGenerationPtr
Configure( std::ifstream & input );
};
#endif /* GenerationConfigureHelper_hpp */