-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGainConfigureHelper.hpp
executable file
·65 lines (51 loc) · 1.79 KB
/
GainConfigureHelper.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
//
// GainConfigureHelper.hpp
// AggregationNS3
//
// Created by Alper Sinan Akyurek on 8/21/16.
// Copyright © 2016 Alper Sinan Akyurek. All rights reserved.
//
#ifndef GainConfigureHelper_hpp
#define GainConfigureHelper_hpp
#include "TransmissionManager.hpp"
#include "NoGainFunction.hpp"
#include "EnergyGainFunction.hpp"
#include "InformationFreshnessGainFunction.hpp"
#include "SuccessGainFunction.hpp"
#include "CongestionGainFunction.hpp"
#include "SuccessUniformGainFunction.hpp"
#include <fstream>
/**
This class is used to configure the gain function for an application
**/
class GainConfigureHelper
{
public:
/** Gain function ID type **/
typedef unsigned int TGainFunctionId;
/** IDs for the implemented Gain functions **/
enum GainFunctionIdValues : TGainFunctionId
{
/** Initial value for no gain function **/
NoId = 0,
/** Energy minimization gain function **/
EnergyId = 1,
/** Information Freshness maximization gain function **/
InformationFreshnessId = 2,
/** Expiration minimization gain function **/
SuccessId = 3,
/** Congestion minimization gain function **/
CongestionId = 4,
/** Uniform deadline expiration maximization gain function **/
SuccessUniformId = 5,
};
public:
/**
This function configures a new gain function from a file stream.
\param input Input file stream.
\return A new gain function is created and configured and returned.
**/
static Application::TGainFunctionPtr
Configure( std::ifstream & input );
};
#endif /* GainConfigureHelper_hpp */