#ifndef SELF_DEVICECONTROL_H
#define SELF_DEVICECONTROL_H

/**
 * @file self_devicecontrol.h
 * @brief 设备自己控制模块头文件
 */

#define DEVICE_WALK_SIGN_MAX 10

#define DEVICE_SELF_CONTROL_OPEN 1

#define DEVICE_SELF_CONTROL_CLOSE 0

//结构体，用来存放这些
typedef struct {
    int id_run[DEVICE_WALK_SIGN_MAX];
    int id_run_count;
    int run_cool[DEVICE_WALK_SIGN_MAX];
    int timed_run[DEVICE_WALK_SIGN_MAX];
} devicecontroltask_t;

void set_self_control_time_countfuntion();//计时

void self_control_thread_close();

void receive_self_contorl_mqtt(cJSON *body);

bool get_self_control_index();

void set_self_control_index(bool index);
#endif