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

namespace YBDevice.Entity
{
    /// <summary>
    /// 八电极设备发送的数据
    /// </summary>
    public class BodyRequstDto
    {
        /// <summary>
        /// 参数,包含sn和测量数据
        /// </summary>
        public string @params {get;set;}
    }
    /// <summary>
    /// PCH01W解析信息
    /// </summary>
    public class H01WAnalyDto
    {
        /// <summary>
        /// 包头,固定为A9
        /// </summary>
        public string Header { get; set; } = "";
        /// <summary>
        /// 体重,分度为0.1,单位为斤
        /// </summary>
        public int Weight { get; set; } = 0;

        /// <summary>
        /// 身高,分度为0.5,单位为CM
        /// </summary>
        public int Height { get; set; } = 0;
        /// <summary>
        /// 阻抗 65535为测量失败
        /// </summary>
        public int imp { get; set; } = 0;
        /// <summary>
        /// 设备机器码
        /// </summary>
        public string sn { get; set; } = "";
        /// <summary>
        /// 分隔符,固定为00
        /// </summary>
        public string splitstr { get; set; } = "";
        /// <summary>
        /// 数据是否验证通过
        /// </summary>
        public bool ischecked { get; set; } = false;
        /// <summary>
        /// 解密出的16进制数据
        /// </summary>
        public string data { get; set; } = "";
    }

    /// <summary>
    /// 八电极数据解析信息
    /// </summary>
    public class BodyAnalyDto
    {
        /// <summary>
        /// 包头,第一条固定为A1,第二条固定为A2
        /// </summary>
        public string Header { get; set; } = "";
        /// <summary>
        /// 体重,分度为0.05
        /// </summary>
        public int Weight { get; set; } = 0;
        /// <summary>
        /// 左手阻抗 65535为测量失败
        /// </summary>
        public int lefthandimp { get; set; } = 0;
        /// <summary>
        /// 右手阻抗 65535为测量失败
        /// </summary>
        public int righthandimp { get; set; } = 0;
        /// <summary>
        /// 右脚阻抗,65535为测量失败
        /// </summary>
        public int rightfootimp { get; set; } = 0;
        /// <summary>
        /// 左脚阻抗 65535为测量失败
        /// </summary>
        public int leftfootimp { get; set; } = 0;
        /// <summary>
        /// 全身阻抗,65535为测量失败
        /// </summary>
        public int bodyimp { get; set; } = 0;
        /// <summary>
        /// 身高,分度为0.5
        /// </summary>
        public int height { get; set; } = 0;
        /// <summary>
        /// 设备机器码
        /// </summary>
        public string sn { get; set; } = "";
        /// <summary>
        /// 分隔符,固定为00
        /// </summary>
        public string splitstr { get; set; } = "";
        /// <summary>
        /// 数据是否验证通过
        /// </summary>
        public bool ischecked { get; set; } = false;
        /// <summary>
        /// 解密出的16进制数据
        /// </summary>
        public string data { get; set; } = "";
    }
}
