Пример #1
0
 async Task HandleTCS(CreateControlJobRequest tx) {
     var s14f10 = await EAP.SendAsync(new SecsMessage(14, 9, "CreaeteControlJob",
         Item.L(
             Item.A("Equipment"),
             Item.A("ControlJob"),
             Item.L(
                 Item.L(
                     Item.A("ObjID"),
                     Item.A(tx.ControlJobID)),
                 Item.L(
                     Item.A("CarrierInputSpec"),
                     Item.L(from carrier in tx.CarrierIDs select 
                         Item.A(carrier))),
                 Item.L(
                     Item.A("ProcessingCtrlSpec"),
                     Item.L(from pj in tx.ProcessJobIDs select
                         Item.L(
                             Item.A(pj),
                             Item.L(),
                             Item.A()))),
                 Item.L(
                     Item.A("ProcessOrderMgmt"),
                     Item.U1(0)),
                 Item.L(
                     Item.A("StartMethod"),
                     Item.Boolean(true))))));
     byte returnCode = (byte)s14f10.SecsItem.Items[2].Items[0];
     if (returnCode != 0 && returnCode != 4) {
         throw new ScenarioException("CreateControlJob fail. ");
     }
 }
Пример #2
0
        async Task TCS_CreateControlJob(CreateControlJobRequest tx) {
            var s14f10 = await EAP.SendAsync(new SecsMessage(14, 9, "CreateControlJob",
                Item.L(
                    Item.A("Equipment"),
                    Item.A("ControlJob"),
                    Item.L(
                        Item.L(
                            Item.A("ObjID"),
                            Item.A(tx.ControlJobID)),
                        Item.L(
                            Item.A("ProcessingCtrlSpec"),
                            Item.L(from pjid in tx.ProcessJobIDs select
                                Item.A(pjid))),
                        Item.L(
                            Item.A("CarrierInputSpec"),
                            Item.L(from carrier in tx.CarrierIDs select
                                Item.A(carrier))),
                        Item.L(
                            Item.A("MtrlOutSpec"),
                            Item.A()),
                        Item.L(
                            Item.A("ProcessOrderMgmt"),
                            Item.A("LIST")),
                        Item.L(
                            Item.A("StartMethod"),
                            Item.Boolean(true))))));

            byte returnCode = (byte)s14f10.SecsItem.Items[2].Items[0];
            if (returnCode != 0 && returnCode != 4) {
                await DeleteProcessJob(tx.ProcessJobIDs);
                throw new ScenarioException("S14F10_CreateControlJob_Handler Return Code:" + returnCode);
            }
        }