ovencontroller.h
1.11 KB
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
#ifndef OVENCONTROLLER_H
#define OVENCONTROLLER_H
#include "oven.h"
#include "../../app-prime-modbus/include/all_share.h"
#include "udphandler.h"
class OvenController : public OvenInterface
{
Q_OBJECT
Oven *oven;
UdpHandler *udp;
oven_control_t control;
oven_state_t state;
public:
OvenController(QObject *parent = 0, Oven *oven = 0);
void setUdpHandler(UdpHandler *udp);
int currentTemp();
int currentHumidity();
int currentInterTemp();
bool door();
public slots:
void setMode(Define::Mode mode);
void setHumidity(int percentage);
void setTemp(int celsius);
void setTime(int secs);
void setInterTemp(int celsius);
void setFan(int rpm);
void startCooking();
void stopCooking();
void startPreheating();
void stopPreheating();
void startCooldown();
void stopCooldown();
void startHumidification();
void stopHumidification();
void startWashing();
void stopWashing();
void openDamper();
void closeDamper();
void onDataChanged();
signals:
void doorOpened();
void doorClosed();
};
#endif // OVENCONTROLLER_H