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

namespace RCUHost.Protocols
{
	/// <summary>
	/// 设备
	/// </summary>
	public class Device
	{
		/// <summary>
		/// 设备地址
		/// </summary>
		public string Address { get; set; }
		/// <summary>
		/// 地址类型
		/// </summary>
		public AddressType AddressType { get; set; }
		/// <summary>
		/// 设备开关状态：1开，2关，6停（窗帘），下发1个字节
		/// </summary>
        public byte Status { get; set; }
        /// <summary>
        /// 设备开关状态：1开，2关，6停（窗帘）,接收2个字节
        /// </summary>
        public ushort StatusReceiver { get; set; }
        /// <summary>
        /// 亮度值
        /// </summary>
        public byte Brightness { get; set; }
        /// <summary>
        /// 回路类型
        /// </summary>
        public Domain.DeviceType Type { get; set; }
        /// <summary>
        /// 温度
        /// </summary>
        public byte Temperature { get; set; }
        /// <summary>
        /// 风速
        /// </summary>
        public byte FanSpeed { get; set; }
        /// <summary>
        /// 模式
        /// </summary>
        public byte Mode { get; set; }
        /// <summary>
        /// 阀门开关
        /// </summary>
        public byte Valve { get; set; }
        /// <summary>
        /// 空调执行方式和内容
        /// </summary>
        public Int32 AirExecMode { get; set; }
        /// <summary>
        /// 地暖执行方式和内容
        /// </summary>
        public Int32 FloorHotExecMode { get; set; }
        /// <summary>
        /// 背景音乐执行方式和内容
        /// </summary>
        public Int32 MusicExecMode { get; set; }
        /// <summary>
        /// 色温执行方式和内容
        /// </summary>
        //public Int32 ColorTempExecMode { get; set; }
	}

	public enum AddressType
	{
		/// <summary>
		/// 设备地址
		/// </summary>
		DeviceAddress = 0,
		/// <summary>
		/// 组地址
		/// </summary>
		GroupAddress = 1
	}
}
