package com.ruoyi.common.utils.onenet;

import lombok.Data;

import java.util.List;

@Data
public class DatapointValue {

    private List<Ds> dsArray;
    private int jiaoshui_qiangdu;
    private nextDs next_ds;
    private Mc mc;
    private Set set;
    private Tr tr;
    private int turan_show;


    // 定时器列表 Ds
    @Data
    public static class Ds {
        private int hour;//时
        private int min;//分
        private Boolean once; //是否单次，false为循环浇水,true为单次
        private int sec;//浇水时长(单位秒)
        private Boolean sw;// 开关
        private int week;//周转成二进制  bit0位开始为周一   0110 (week&1<<0) 1<<1 1<<2     00000110
        private int id;
    }

    // 内部类 Mc  脉冲
    @Data
    public static class Mc {
        private int jg_sec;//间隔时间
        private int js_sec;//启动时间
        private Boolean kaiguan; //开关   普通模式情况下获取的是ds.js_sec的时间

    }

    // 内部类 Set  设置
    @Data
    public static class Set {
        private Boolean kaiguan;
        private int xp_min;
    }

    // 内部类 Tr  土壤
    @Data
    public static class Tr {
        private int end_sd;
        private Boolean kaiguan;
        private int start_sd;

    }

    //下次浇水时间
    @Data
    public static class nextDs {
        private int hour;
        private int min;
        private int sec;
        private Boolean sw;//定时总开关，先根据总开关判断定时功能是否关闭，如果打开，再判断定时数组中有没有有效的定时器
        private int week;//周转成二进制  bit0位开始为周一   0110 (week&1<<0) 1<<1 1<<2     00000110
        private String date;//日期
    }
}
