/// <summary> /// ②指定扇区命令 /// </summary> private void CmdPointChip() { Order order = BuildOrderCmdPointChip(); ComSendData(order.returnCmdBytes); OnMsgShowEvent(MsgType.Send, order.returnCmdBytes); OnUpgradeCompletedEvent(UpgradeResult.ClearSector); currentOrder = order; StarTimerCheckReceive(); }
/// <summary> /// 运行升级扇区命令 /// </summary> public void CmdRunUpgradeSector() { Order order = BuildOrderCmdRunUpgradeSector(); ComSendData(order.returnCmdBytes); OnMsgShowEvent(MsgType.Send, order.returnCmdBytes);//界面显示16进制数据 OnUpgradeCompletedEvent(UpgradeResult.RunUpgradeApp);//状态栏、进度tab显示 currentOrder = order; StarTimerCheckReceive(); }
/// <summary> /// ③发送升级数据命令 /// </summary> public void CmdSendUpgradeData(ref int index) { Order order = listOrder[index++];//此处增了,注意如果回复失败要退回索引 ComSendData(order.returnCmdBytes); OnMsgShowEvent(MsgType.Send, order.returnCmdBytes); //界面显示16进制数据 OnUpgradeCompletedEvent(UpgradeResult.WriteData); //状态栏、进度tab显示 OnSendUpgradeDataProcessEvent(index); //进度条更新 currentOrder = order; StarTimerCheckReceive(); }
/// <summary> /// 获取版本命令 /// </summary> public void CmdGetVersion() { isUpgrading = true; timerCheckPulse.Start(); Order order = BuildOrderCmdGetVersion(); ComSendData(order.returnCmdBytes); OnMsgShowEvent(MsgType.Send, order.returnCmdBytes);//界面显示16进制数据 OnUpgradeCompletedEvent(UpgradeResult.RunFactoryApp);//状态栏、进度tab显示 currentOrder = order; StarTimerCheckReceive(); }
/// <summary> /// ①升级前的复位命令 /// </summary> public void CmdReset(bool isHead) { Order order; if (isHead) { order = BuildOrderCmdReset(); } else { order = BuildOrderCmdReset(isHead); } ComSendData(order.returnCmdBytes); OnMsgShowEvent(MsgType.Send, order.returnCmdBytes); OnUpgradeCompletedEvent(UpgradeResult.Reset); currentOrder = order; StarTimerCheckReceive(); }
public List<Order> BuildOrderCmdSendUpgradeData() { listOrder.Clear(); if (listByteReader.Count == 0) { return null; } for (int i = 0; i < listByteReader.Count; i++) { byte[] sendBytes = listByteReader[i]; Order order = new Order(OrderID.Upgrade); order.chipGroup = this.chipGroup; order.stationID = StationID; order.stationHeadID = StationHeadID; order.orderType = OrderType.Data; order.ComposeCommandSendUpgradeData(sendBytes); listOrder.Add(order); } return listOrder; }
public Order BuildOrderCmdStopUpgrade() { Order order = new Order(OrderID.Upgrade); order.chipGroup = this.chipGroup; order.stationID = StationID; order.stationHeadID = StationHeadID; order.orderType = OrderType.Completed; order.ComposeCommandStopUpgrade(); return order; }
public Order BuildOrderCmdRunUpgradeSector() { Order order = new Order(OrderID.Upgrade); order.chipGroup = this.chipGroup; order.stationID = StationID; order.stationHeadID = StationHeadID; order.orderType = OrderType.Run; order.jumpSector = JumpSector.UpgradeApp; order.ComposeCommandRunPointSector(); return order; }
/// <summary> /// 传输分站复位命令 /// </summary> /// <param name="isHead"></param> /// <returns></returns> public Order BuildOrderCmdReset(bool isHead) { Order order = new Order(OrderID.Reset); order.stationID = StationID; order.stationHeadID = 0; order.ComposeCommandReset(); return order; }
/// <summary> /// 如果升级读卡分站则是读卡分站的复位命令 /// </summary> /// <returns></returns> public Order BuildOrderCmdReset() { Order order = new Order(OrderID.Reset); order.stationID = StationID; order.stationHeadID = Convert.ToInt16(StationHeadID); order.ComposeCommandReset(); return order; }
public Order BuildOrderCmdPointChip() { Order order = new Order(OrderID.Upgrade); order.chipGroup = this.chipGroup;//所属芯片 order.stationID = StationID; order.stationHeadID = StationHeadID; order.orderType = OrderType.Upgrade; order.fileLength = this.fileLength; order.ComposeCommandPointChip(); return order; }
public Order BuildOrderCmdGetVersion() { Order order = new Order(OrderID.Upgrade); order.chipGroup = ChipGroup.LPC2220;//所属芯片 order.stationID = StationID; order.stationHeadID = 0x00; order.orderType = OrderType.Reset; order.ComposeCommandGetVersion(); return order; }