private static async Task CallALL() { #region lists var lists = new Dictionary <string, string>(); lists.Add("Bottom_Cover", "J1CQ0002UL"); lists.Add("Input", "J1CQ0002UN"); lists.Add("PCB_Assy", "J1CQ0002UV"); lists.Add("Membrane_Assy", "J1CQ0002UU"); lists.Add("Rubber_Assy", "J1CQ0002UW"); lists.Add("Lock_Screw_PCBA", "J1CQ0002UQ"); lists.Add("Top_Cover", "J1CQ0002UM"); lists.Add("Put_Top_Cover", "J1CQ0002UP"); lists.Add("Stitching", "J1CQ0002UX"); lists.Add("Reversal_1", "J1CQ0002UY"); lists.Add("Lock_Screw_1", "J1CQ0002UR"); lists.Add("Lock_Screw_2", "J1CQ0002US"); lists.Add("Lock_Screw_3", "J1CQ0002UT"); lists.Add("Label_Match", "J1CQ0002V8"); lists.Add("Reversal_2", "J1CQ0002V0"); lists.Add("ATE_1", "J1CQ0002V2"); lists.Add("ATE_2", "J1CQ0002V3"); lists.Add("ATE_3", "J1CQ0002V4"); lists.Add("Output", "J1CQ0002V5"); lists.Add("Open_Box", "J1CQ0002V6"); lists.Add("Binning", "J1CQ0002V7"); lists.Add("Online_Label_1", "J1CQ0002V9"); lists.Add("Online_Label_2", "J1CQ0002VA"); lists.Add("Online_Weight", "J1CQ0002VB"); lists.Add("AGV", "J1CQ0002VC"); lists.Add("Lifter", "J1CQ0002VD"); lists.Add("Stocker", "J1CQ0002VE"); #endregion foreach (var t in lists) { //var req = new LineRequset(); //req.TargetId = Code; //req.Sign = CodeSecert; //req.FuncGroup = "InitStation"; //req.FuncName = "GetInitStationInfo"; //req.SetBodyByJson(new //{ // LineCode = "CK31", // ProcessNo = t.Key, // MachineNo = t.Value, //}); var req = new LineRequset(); req.TargetId = Code; req.Sign = CodeSecert; req.FuncGroup = "InitStation"; req.FuncName = "GetInitStationInfo"; req.SetBody(JsonConvert.SerializeObject(new { databaseName = "Normal", LineCode = "123", ProcessNO = "Input", MachineNo = "dd" })); Console.WriteLine($"{DateTime.Now} 请求初始化站点:{t.Key} {t.Value}"); await theClient.Send(req.HeadSerialize().Concat(req.Body).ToArray()); } }
private static async Task RunHealth() { while (true) { var req = new LineRequset(); req.TargetId = Code; req.Sign = CodeSecert; req.FuncGroup = "System"; req.FuncName = "Health"; req.SetBody("OK"); await theClient.Send(req.HeadSerialize().Concat(req.Body).ToArray()); await Task.Delay(10 * 1000); } }