public static DataInfoSet CreateDataInfo(DataTypeName dataTypeName)
        {
            DataInfoSet dataInfoSet = null;

            switch (dataTypeName)
            {
            case DataTypeName.BaseDataTable:
                dataInfoSet = new MachineBaseDataInfoSet();
                break;

            case DataTypeName.CascadeDataTable:
                break;

            case DataTypeName.ShouldPadDataTable:
                dataInfoSet = new ShouldPadDataInfoSet();
                break;

            case DataTypeName.InOutDataTable:
                break;

            default:
                break;
            }
            return(dataInfoSet);
        }
        public override byte[] GetSendDatas(String[] dataBaseValues, DataInfoSet dataInfoSet)
        {
            List <byte> sendDataList = new List <byte>();

            String[] flowModelDataBases = new String[40];

            //扇区表数据
            FlowDataModel.GetDataBaseModel().DataBaseValues.CopyTo(flowModelDataBases, 0);
            for (int j = 0; j < 10; j++)
            {
                sendDataList.AddRange(GetByteData(Convert.ToUInt16(flowModelDataBases[j])));
                sendDataList.AddRange(GetByteData(Convert.ToUInt16(flowModelDataBases[j + 10])));
                sendDataList.AddRange(GetByteData(Convert.ToUInt16(flowModelDataBases[j + 20])));
                sendDataList.AddRange(GetByteData(Convert.ToUInt16(flowModelDataBases[j + 30])));
            }

            //放布位置XY修正值
            sendDataList.AddRange(GetByteData(Convert.ToUInt16(dataBaseValues[(int)MachineBaseDataEnum.XZeroModify])));
            sendDataList.AddRange(GetByteData(Convert.ToUInt16(dataBaseValues[(int)MachineBaseDataEnum.YZeroModify])));

            //目标生产件数
            sendDataList.AddRange(GetByteData(Convert.ToUInt16(dataBaseValues[(int)MachineBaseDataEnum.TotalClothNumberLimit])));
            sendDataList.AddRange(GetByteData(Convert.ToUInt16(dataBaseValues[(int)MachineBaseDataEnum.UpNeedleCodeValue])));

            return(sendDataList.ToArray());
        }
        //根据命令 获得对应的通讯数据
        public byte[] GetSerialSendData(byte comd)    //要点1
        {
            SendDataType sendDataType = (SendDataType)(comd);

            byte[]      serialDatas  = null;
            ISendData   getSendDatas = null;
            DataInfoSet dataInfoSet  = null;

            String[] dataBaseValues = null;
            switch (sendDataType)
            {
            case SendDataType.NormalSerialData:    //0x20
                serialDatas = GetNormalDatas();    //
                break;

            case SendDataType.DesignParam:    //0x21指令
                serialDatas = GetDesignParam();
                break;

            case SendDataType.TestSerialData:    //0x23
                serialDatas = GetTestDatas();
                break;

            case SendDataType.ClearComdSerailData:    //0x24
                serialDatas = GetClearWorkNumberDatas();
                break;

            case SendDataType.MachineSerialData:    //0x25
                getSendDatas   = new MachineInfoSendData();
                dataInfoSet    = MouldDataFactory.CreateDataInfo(DataTypeName.BaseDataTable);
                dataBaseValues = BaseDateModel.GetDataBaseModel().DataBaseValues;
                break;

            case SendDataType.ShouldPadPointsData:    //0x27
                serialDatas = GetShouldPadPoints();
                break;

            case SendDataType.SingleStepSerialData:    //0x28
                serialDatas = GetSingleStepDatas();
                break;

            case SendDataType.LockStaSerialData:    //0X29
                serialDatas = GetLockStaSerialDatas();
                break;

            case SendDataType.UnLockSerialData:    //0x2a
                serialDatas = GetUnLockSerialData();
                break;
            }
            if (getSendDatas != null)
            {
                serialDatas = getSendDatas.GetSendDatas(dataBaseValues, dataInfoSet);
            }
            return(serialDatas);
        }
 public override byte[] GetSendDatas(String[] dataBaseValues, DataInfoSet dataInfoSet)
 {
     return(new byte[] { 0 });
 }
 public abstract byte[] GetSendDatas(String[] dataBaseValues, DataInfoSet dataInfoSet);