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

namespace Waste.SocketService
{
    /// <summary>
    /// socket包内容
    /// </summary>
    public class MyPackage: A8Package
    {

        /// <summary>
        /// 固定头
        /// </summary>
        public string Key { get; set; } = "";
        /// <summary>
        /// 数据体长度
        /// </summary>
        public int Len { get; set; } = 0;
        /// <summary>
        /// IMEI/设备编号
        /// </summary>
        public string IMEI { get; set; } = "";
        /// <summary>
        /// ICCID
        /// </summary>
        public string ICCID { get; set; } = "";
        /// <summary>
        /// IMSI
        /// </summary>
        public string IMSI { get; set; } = "";
        /// <summary>
        /// 信号强度
        /// </summary>
        public string GSLQ { get; set; } = "";
        /// <summary>
        /// 时间
        /// </summary>
        public string Time { get; set; }
        /// <summary>
        /// 经度
        /// </summary>
        public string Longitude { get; set; } = "";
        /// <summary>
        /// 纬度
        /// </summary>
        public string Latitude { get; set; } = "";
        /// <summary>
        /// 桶大小
        /// </summary>
        public string size { get; set; } = "";
        /// <summary>
        /// 垃圾桶编号
        /// </summary>
        public string trashcode { get; set; } = "";
        /// <summary>
        /// 垃圾类别
        /// </summary>
        public string WasteType { get; set; } = "";
        /// <summary>
        /// 重量,KG
        /// </summary>
        public string Weight { get; set; } = "0";
        /// <summary>
        /// 内容
        /// </summary>
        public string Body { get; set; } = "";
        /// <summary>
        /// 字符串结果
        /// </summary>
        public string Str { get; set; } = "";
        /// <summary>
        /// 是否是否通过校检,true-是,false-否
        /// </summary>
        public bool IsChecked { get; set; } = true;
        /// <summary>
        /// 是否为心跳包数据
        /// </summary>
        public bool IsHeart { get; set; } = false;
        /// <summary>
        /// 是否为有效测量
        /// </summary>
        public bool IsWeight { get; set; } = false;


    }

    /// <summary>
    /// A8协议包内容
    /// </summary>
    public class A8Package
    {
        /// <summary>
        /// 垃圾类别小类
        /// </summary>
        public string WasteSType { get; set; } = "";
        /// <summary>
        /// 消息ID
        /// </summary>
        public string UUID { get; set; } = "";
        /// <summary>
        /// 上报时间
        /// </summary>
        public string UploadTime { get; set; } = "";
        /// <summary>
        /// 价格
        /// </summary>
        public string Price { get; set; } = "";
        /// <summary>
        /// 金额
        /// </summary>
        public string Amount { get; set; } = "";
        /// <summary>
        /// 操作员 
        /// </summary>
        public string OpUser { get; set; } = "";

        /// <summary>
        /// 设备出厂序列号/设备出厂编号
        /// </summary>
        public string DeviceFacEcode { get; set; }
        /// <summary>
        /// 车牌号/物品编码/垃圾桶编号
        /// </summary>
        public string Registration { get; set; }
        /// <summary>
        /// 毛重,KG
        /// </summary>
        public string GrossWeight { get; set; }
        /// <summary>
        /// 皮重,KG
        /// </summary>
        public string Tare { get; set; }
        /// <summary>
        /// 净重,KG
        /// </summary>
        public string NetWeight { get; set; }
        public string ID1 { get; set; }
        public string ID2 { get; set; }
        public string ID3 { get; set; }
        public string ID4 { get; set; }
        public string ID5 { get; set; }
        public string ID6 { get; set; }
        public string ID7 { get; set; }
        public string ID8 { get; set; }
        public string DataHash { get; set; } = "";
    }
}
