-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsupply.h
62 lines (52 loc) · 1.44 KB
/
supply.h
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
#ifndef SUPPLY_H
#define SUPPLY_H
namespace prog3
{
enum S_Function { S_5V = 1,
S_3V3 = 2,
S_VIN = 3,
S_GND = 4};
class supply
{
public:
supply();
supply(int _function);
/**
* @brief Retorna o tipo do pino de alimentação
*
* @return int Tipo de Alimentação
*/
int getFunction();
/**
* @brief Retorna a corrente no pino
*
* @return double Corrente no pino
*/
double getCurrent();
/**
* @brief Define o tipo do pino de alimentação
*
* @param _function Tipo de Alimentação
*/
void setFunction(int _function);
/**
* @brief Define a corrente máxima suportada pelo pino
*
* @param _maxCurrent Corrente máxima
*/
void setMaxCurrent(double _maxCurrent);
/**
* @brief Define a carga conectada no pino
*
* @param _load Carga(em Ohms)
*/
void setLoad(double _load);
private:
int function;
int maxCurrent;
int voltage;
double load;
double current;
};
}
#endif