public byte[] HandlerClientData(byte[] buff) { ClientResp outInfo = this.DecodeData(buff); GlobalVariable.DownScheDiscardWaitStatus[outInfo.MachineId] = false; if (!GlobalVariable.DownScheDiscardRespResult.Keys.Contains(outInfo.MachineId)) { GlobalVariable.DownScheDiscardRespResult.Add(outInfo.MachineId, outInfo.RespResult); } else { GlobalVariable.DownScheDiscardRespResult[outInfo.MachineId] = outInfo.RespResult; } return(null); }
/// <summary> /// 客户端返回结果解码 /// </summary> /// <param name="buff"></param> private ClientResp DecodeData(byte[] buff) { ClientResp info = new ClientResp(); byte[] tempData = buff; info.MachineId = ConvertHelper.BytesToInt16(tempData, true); switch (tempData[2]) { case 1: info.RespResult = enumErrorCode.DeviceRespFailInfo; break; case 2: info.RespResult = enumErrorCode.DeviceScheduleWorking; break; default: info.RespResult = enumErrorCode.HandlerSuccess; break; } return(info); }