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

namespace ConverterBytesAndStruct
{
    #region QC_DATA TS
    /// <summary>
    /// 质量数据，26个字节
    /// </summary>
    public class QC_DATA
    {
        /// <summary>
        /// 工作类型（1=拧紧，2=压装，4=测量，8=试漏）
        /// </summary>
        public short Work_Type;
        /// <summary>
        /// 工作的程序号
        /// </summary>
        public short Progarm_Code;
        /// <summary>
        /// 具体的位置号
        /// </summary>
        public short Counter_Number;
        /// <summary>
        /// 工位被屏蔽
        /// </summary>
        public bool Bypass;
        /// <summary>
        /// 工位未工作
        /// </summary>
        public bool No_op;
        /// <summary>
        /// 工位工作完成且合格
        /// </summary>
        public bool Accept;
        /// <summary>
        /// 工位工作完成但不合格
        /// </summary>
        public bool Reject;

        public byte SPARE1;
        public short SPARE2;
        /// <summary>
        /// 质量数据1 (拧紧对应扭矩，压装对应压力，测量对应位移，试漏对应泄露率）
        /// </summary>
        public float QC_DATA1;
        /// <summary>
        /// 质量数据2 (拧紧对应转角，压装对应位移，测量无，试漏对应压力）
        /// </summary>
        public float QC_DATA2;
        /// <summary>
        /// 质量数据3
        /// </summary>
        public float QC_DATA3;
        /// <summary>
        /// 质量数据4
        /// </summary>
        public float QC_DATA4;

    }
    public class QC_DATA_OutSide
    {
        /// <summary>
        /// 工作类型（1=拧紧，2=压装，4=测量，8=试漏）
        /// </summary>
        public short Work_Type;
        /// <summary>
        /// 工作的程序号
        /// </summary>
        public short Progarm_Code;
        /// <summary>
        /// 具体的位置号
        /// </summary>
        public short Counter_Number;

        public short SPARE1;
        public short SPARE2;

        /// <summary>
        /// 质量数据1 (拧紧对应扭矩，压装对应压力，测量对应位移，试漏对应泄露率）
        /// </summary>
        public float QC_DATA1;
        /// <summary>
        /// 质量数据2 (拧紧对应转角，压装对应位移，测量无，试漏对应压力）
        /// </summary>
        public float QC_DATA2;
        /// <summary>
        /// 质量数据3
        /// </summary>
        public float QC_DATA3;
        /// <summary>
        /// 质量数据4
        /// </summary>
        public float QC_DATA4;

    }
    /// <summary>
    /// 时间戳 22
    /// </summary>
    public class TS
    {
        public byte Max_Len;
        public byte Act_Len;
        public char Month_B1;
        public char Month_B0;
        public char Slash1;
        public char Day_B1;
        public char Day_B0;
        public char Slash2;
        public char Fixed_dgt1;
        public char Fixed_dgt2;
        public char Year_B1;
        public char Year_B0;
        public char Null1;
        public char Hour_B1;
        public char Hour_B0;
        public char Colon1;
        public char Min_B1;
        public char Min_B0;
        public char Colon2;
        public char Sec_B1;
        public char Sec_B0;
        public char Null2;
    }
    #endregion
}
