//
// Created by WJG on 2021-8-25.
//

#ifndef SMARTPANEL_COSS_DOORSENSORTIMER_H
#define SMARTPANEL_COSS_DOORSENSORTIMER_H

#include <string>
#include "../MsgSchedule/CThread.h"

class DoorSensorTimer : public CThread{
public:
    explicit DoorSensorTimer(std::string id, std::string uuid);
    void Run() override ;
    void resetTimer(int status);

private:
    int counter;
    unsigned int s_timer;
    bool stop_timer;
    bool is_looping;
    std::string sensor_id;
    std::string sensor_uuid;
    void sendSensorMessage(int value);
};

#endif //SMARTPANEL_COSS_DOORSENSORTIMER_H
