Anderson Cunha
/
monitoramento_ativos
Programa Teste para monitoramento de ativos eletricos
src/classes/Temperatura.h@3:213ab6bbf852, 2019-05-04 (annotated)
- Committer:
- AndersonIctus
- Date:
- Sat May 04 12:41:39 2019 +0000
- Revision:
- 3:213ab6bbf852
- Child:
- 4:bdc930225ade
Inclusao de arquivos base para o exemplo
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AndersonIctus | 3:213ab6bbf852 | 1 | #include "Logger.h" |
AndersonIctus | 3:213ab6bbf852 | 2 | |
AndersonIctus | 3:213ab6bbf852 | 3 | /// Sensor de temperatura |
AndersonIctus | 3:213ab6bbf852 | 4 | class Temperatura { |
AndersonIctus | 3:213ab6bbf852 | 5 | public: |
AndersonIctus | 3:213ab6bbf852 | 6 | /// Retorna a leitura da Temperatura |
AndersonIctus | 3:213ab6bbf852 | 7 | double verificaTemperatura() { |
AndersonIctus | 3:213ab6bbf852 | 8 | _status = 27.5; |
AndersonIctus | 3:213ab6bbf852 | 9 | _l->log("Retorna a temperatura ... 27.5"); |
AndersonIctus | 3:213ab6bbf852 | 10 | |
AndersonIctus | 3:213ab6bbf852 | 11 | return _status; |
AndersonIctus | 3:213ab6bbf852 | 12 | } |
AndersonIctus | 3:213ab6bbf852 | 13 | |
AndersonIctus | 3:213ab6bbf852 | 14 | void setLog(Logger * l) { |
AndersonIctus | 3:213ab6bbf852 | 15 | _l = l; |
AndersonIctus | 3:213ab6bbf852 | 16 | } |
AndersonIctus | 3:213ab6bbf852 | 17 | |
AndersonIctus | 3:213ab6bbf852 | 18 | private: |
AndersonIctus | 3:213ab6bbf852 | 19 | Logger* _l; |
AndersonIctus | 3:213ab6bbf852 | 20 | double _status = 0; |
AndersonIctus | 3:213ab6bbf852 | 21 | } |
AndersonIctus | 3:213ab6bbf852 | 22 | ; |