using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CommonEntity
{


    public class ts_deviceitem
    {
        public short dev_type { get; set; }
        public short dev_addr { get; set; }
        public short dev_loop { get; set; }
        public int dev_data { get; set; }
    }
    public class ts_faultitem
    {
        public short dev_type { get; set; }
        public short dev_addr { get; set; }
        public short dev_loop { get; set; }
        public short error_type { get; set; }
        public int error_data { get; set; }
    }
    public class ts_controlitem
    {
        public short dev_type { get; set; }
        public short dev_addr { get; set; }
        public short dev_loop { get; set; }
        public short type_l { get; set; }
        public int type_h { get; set; }
    }
    /// <summary>
    /// 0x36
    /// </summary>
    public class DeviceActionData
    {
        public long ts_ms { get; set; }
        public string hotel_id { get; set; }
        public string room_id { get; set; }
        public string device_id { get; set; }
        /// <summary>
        /// "上报" 或 "下发"
        /// </summary>
        public string direction { get; set; }

        public string cmd_word { get; set; }
        public int frame_id { get; set; }
        public byte[] udp_raw { get; set; }
        public int sys_lock_status { get; set; }

        public int report_count { get; set; }
        public int fault_count { get; set; }
        public List<ts_deviceitem> device_list { get; set; }
        public List<ts_faultitem> fault_list { get; set; }
        public List<ts_controlitem> control_list { get; set; }

    }

    /// <summary>
    /// ts 日志
    /// </summary>
    public class NewVersionLog
    {
        public string hotel_id { get; set; }
        public string room_id { get; set; }
        public string device_id { get; set; }
        public string ip { get; set; }

        public int power_state { get; set; }
        public int guest_type { get; set; }
        public int cardless_state { get; set; }
        public ulong service_mask { get; set; }
        public int pms_state { get; set; }
        public int carbon_state { get; set; }
        public int device_count { get; set; }
        public int comm_seq { get; set; }
        public long ts_ms { get; set; }

        public List<NengHaolog> electricity { get; set; }
        public List<KongTiao> air_conditioner { get; set; }
        public extra_data extra { get; set; }

        public int insert_card { get; set; }
        public int bright_g { get; set; }
        public int version { get; set; }

    }
    public class NengHaolog
    {
        public string address { get; set; }
        public double voltage { get; set; }
        public double ampere { get; set; }
        public double power { get; set; }
        public double energy { get; set; }
        public double sum_energy { get; set; }
        public string phase { get; set; }
    }
    public class KongTiao
    {
        public string address { get; set; }
        public int state { get; set; }
        public int model { get; set; }
        public int speed { get; set; }
        public int set_temp { get; set; }
        public int now_temp { get; set; }
        public int solenoid_valve { get; set; }
    }
    public class extra_data
    {
        public byte[] original_byte { get; set; }
        //public string source { get; set; }
        public string ver { get; set; }
        //public object ac { get; set; }
        //public object meter { get; set; }
    }
}
