summaryrefslogtreecommitdiff
path: root/Simulator/include/modeling/machine/CPU.h
blob: 95af1c86685adbb6bfc4672166189322fa27487d (plain)
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
#pragma once

namespace Modeling
{
	class CPU
	{
	public:
		/**
		* \brief Creates a CPU with the given speed/core, number of cores, energy consumption, and failure model id.
		*/
		CPU(int speed, int cores, int energyConsumption, int failureModelId);

		/**
		* \return the speed of this CPU.
		*/
		int getSpeed() const;

		/**
		* \return The nr of cores of this CPU.
		*/
		int getCores() const;

		/**
		* \return The energy consumed by this CPU. 
		*/
		int getEnergyConsumption() const;

		/**
		* \return The failure model id of this CPU. 
		*/
		int getFailureModelId() const;


	private:
		int speed, cores, energyConsumption, failureModelId;
	};
}