ovencontroller.h 1013 Bytes
#ifndef OVENCONTROLLER_H
#define OVENCONTROLLER_H

#include "oven.h"
#include "all_share.h"
#include "udphandler.h"

class OvenController : public OvenInterface
{
    Q_OBJECT

    UdpHandler *udp;
    oven_control_t control;
    oven_state_t state;

public:
    OvenController(QObject *parent = 0);

    void setUdpHandler(UdpHandler *udp);
    int currentTemp();
    int currentHumidity();
    int currentInterTemp();
    bool door();

public slots:
    void setHumidity(int percentage);
    void setTemp(int celsius);
    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