protected internal virtual void runphases(int pgood, int pwaste, bool bOutAvail, bool bFirst) { theStatusCounter.setPhase(EnumNodeStatus.InProgress, "NodeDetails", EnumDeviceStatus.Running, "DeviceDetails"); runSinglePhase(pgood, pwaste, bOutAvail, bFirst); // Finalize(); // prior to processRun theStatusCounter.setPhase(EnumNodeStatus.Completed, "NodeDetails", EnumDeviceStatus.Idle, "DeviceDetails"); }
public virtual void testReprintJMF() { testAuditsImageSetting(); statCounter.setActiveNode(null, null, null); string sheet = vsSheet.stringAt(1); VJDFAttributeMap vmP = new VJDFAttributeMap(); JDFAttributeMap attributeMap = new JDFAttributeMap(EnumPartIDKey.SheetName, sheet); attributeMap.put("SignatureName", "Sig1"); attributeMap.put("Separation", vsCMYK.stringAt(3)); attributeMap.put("Side", "Front"); vmP.Add(attributeMap); statCounter.setActiveNode(n, vmP, vRL); string refXM = rlXMOut.getrRef(); string refMedia = rlMediaIn.getrRef(); statCounter.setTrackWaste(refXM, true); statCounter.setTrackWaste(refMedia, false); statCounter.setActiveNode(n, vmP, vRL); statCounter.setWorkType(EnumWorkType.Rework); statCounter.setPhase(EnumNodeStatus.InProgress, "Imaging", EnumDeviceStatus.Running, null); statCounter.addPhase(refMedia, 1, 0, true); statCounter.addPhase(refXM, 1, 0, true); statCounter.setPhase(EnumNodeStatus.InProgress, "Imaging", EnumDeviceStatus.Running, null); JDFDoc d2 = statCounter.getDocJMFResource(); JDFJMF jmf = d2.getJMFRoot(); jmf.convertResponses(null); VElement vSigs = jmf.getMessageVector(JDFMessage.EnumFamily.Signal, JDFMessage.EnumType.Resource); d2.write2File(sm_dirTestDataTemp + "ImageSetResourceReprint_.jmf", 2, false); JDFDoc dStatusJMF = statCounter.getDocJMFPhaseTime(); jmf = dStatusJMF.getJMFRoot(); jmf.convertResponses(null); for (int i = 0; i < vSigs.Count; i++) { jmf.copyElement(vSigs.item(i), null); } dStatusJMF.write2File(sm_dirTestDataTemp + "ImageSetReprint_.jmf", 2, false); // JDFResourceAudit ra= statCounter.setResourceAudit(refMedia, EnumReason.ProcessResult); // JDFProcessRun pr= statCounter.setProcessResult(EnumNodeStatus.Completed); d.write2File(sm_dirTestDataTemp + "ImageSetAmount_Reprint.jdf", 2, false); }
public virtual void testDirectProof() { n.setXMLComment("Example workflow with initioal warmup phase, one direct proof and 100 copies of 10 sheets each.\n" + "The direct proof is acceptable and included in the good output"); digiParams.setDirectProofAmount(1); digiParams.setXMLComment("1 initial proof is requested"); rlComp.setAmount(100, null); JDFAuditPool ap = n.getAuditPool(); VElement vRL = new VElement(); vRL.Add(rlComp); vRL.Add(rlMedia); StatusCounter stCounter = new StatusCounter(n, null, vRL); stCounter.setDeviceID("MyDevice"); string mediaRef = rlMedia.getrRef(); stCounter.setTrackWaste(mediaRef, true); string compRef = rlComp.getrRef(); stCounter.setTrackWaste(compRef, false); doc.write2File(sm_dirTestDataTemp + "DigiPrintAmount_initial.jdf", 2, false); stCounter.setPhase(EnumNodeStatus.InProgress, "Waste", EnumDeviceStatus.Running, null); ap.getLastPhase(null, null).setXMLComment("Phase where warm up waste is produced"); stCounter.addPhase(mediaRef, 0, 2, true); stCounter.addPhase(compRef, 0, 20, true); stCounter.setPhase(EnumNodeStatus.InProgress, "Waste", EnumDeviceStatus.Running, null); stCounter.setPhase(EnumNodeStatus.InProgress, "Good", EnumDeviceStatus.Running, null); stCounter.addPhase(mediaRef, 1, 0, true); stCounter.addPhase(compRef, 10, 0, true); stCounter.setPhase(EnumNodeStatus.InProgress, "Good", EnumDeviceStatus.Running, null); ap.getLastPhase(null, null).setXMLComment("Phase where 1 proof is produced"); stCounter.setPhase(EnumNodeStatus.Stopped, "WaitForApproval", EnumDeviceStatus.Stopped, null); ap.getLastPhase(null, null).setXMLComment("Phase where the proof is evaluated while the device is stopped"); stCounter.setPhase(EnumNodeStatus.InProgress, "Good", EnumDeviceStatus.Running, null); stCounter.addPhase(mediaRef, 99, 0, true); stCounter.addPhase(compRef, 990, 0, true); stCounter.setPhase(EnumNodeStatus.InProgress, "Good", EnumDeviceStatus.Running, null); ap.getLastPhase(null, null).setXMLComment("Phase where the 100 copies are produced"); stCounter.setPhase(EnumNodeStatus.Completed, "Idle", EnumDeviceStatus.Idle, null); stCounter.setResourceAudit(mediaRef, EnumReason.ProcessResult); doc.write2File(sm_dirTestDataTemp + "DigiPrintProof_final.jdf", 2, false); }
public virtual void testAudits() { testPlannedWasteICS(); VString vs = new VString("Cover Sheet1 Sheet2", " "); VElement vRL = new VElement(); vRL.Add(rlOut); vRL.Add(rlMediaIn); for (int j = 0; j < 2; j++) { bool bMinimal = j == 0; for (int i = 0; i < vs.Count; i++) { string sheet = vs.stringAt(i); VJDFAttributeMap vmP = new VJDFAttributeMap(); vmP.Add(new JDFAttributeMap(EnumPartIDKey.SheetName, sheet)); StatusCounter stUtil = new StatusCounter(n, vmP, vRL); string refComp = rlOut.getrRef(); string refMedia = rlMediaIn.getrRef(); stUtil.setTrackWaste(refComp, true); stUtil.setTrackWaste(refMedia, true); if (i == 0) { stUtil.setPhase(EnumNodeStatus.Stopped, "PowerOn", EnumDeviceStatus.Stopped, "PowerOn"); } stUtil.setPhase(EnumNodeStatus.Setup, "FormChange", EnumDeviceStatus.Setup, "FormChange"); stUtil.addPhase(refMedia, 0, 200, true); stUtil.addPhase(refComp, 0, 200, true); stUtil.setPhase(EnumNodeStatus.Setup, "FormChange", EnumDeviceStatus.Setup, "FormChange"); if (i >= 1 && !bMinimal) { JDFResourceAudit ra = stUtil.setResourceAudit(refMedia, EnumReason.ProcessResult); stUtil.setResourceAudit(refComp, EnumReason.ProcessResult); stUtil.clearAmounts(refMedia); stUtil.addPhase(refMedia, 50, 0, true); JDFResourceAudit ra2 = stUtil.setResourceAudit(refMedia, EnumReason.OperatorInput); ra2.setRef(ra); ra2.setDescriptiveName("manual reset to using only 50 sheets because 100 initially were wastes"); } stUtil.setPhase(EnumNodeStatus.InProgress, "Good", EnumDeviceStatus.Running, null); stUtil.addPhase(refMedia, 4000, 0, true); stUtil.addPhase(refComp, 4000, 0, true); stUtil.setPhase(EnumNodeStatus.Cleanup, "Washup during processing", EnumDeviceStatus.Cleanup, "Washup"); stUtil.setPhase(EnumNodeStatus.InProgress, "Waste", EnumDeviceStatus.Running, null); stUtil.addPhase(refMedia, 0, i == 0 ? 40 : 30, true); stUtil.addPhase(refComp, 0, i == 0 ? 40 : 30, true); stUtil.setPhase(EnumNodeStatus.InProgress, "Good", EnumDeviceStatus.Running, null); stUtil.addPhase(refMedia, 1000, 0, true); stUtil.addPhase(refComp, 1000, 0, true); stUtil.setPhase(EnumNodeStatus.InProgress, "Good", EnumDeviceStatus.Running, null); stUtil.addPhase(refMedia, i == 0 ? 5200 : 5400, 0, true); stUtil.addPhase(refComp, i == 0 ? 5200 : 5400, 0, true); stUtil.setPhase(EnumNodeStatus.InProgress, "Good", EnumDeviceStatus.Running, null); JDFResourceAudit ra_1 = stUtil.setResourceAudit(refMedia, EnumReason.ProcessResult); if (!bMinimal) { stUtil.setResourceAudit(refComp, EnumReason.ProcessResult); stUtil.clearAmounts(refMedia); // Java to C# Conversion - Don't know the purpose of this unreachable code. Default to the false value since 1 != 0 //stUtil.addPhase(refMedia, 1 == 0 ? 10100 : 10200, 0, true); stUtil.addPhase(refMedia, 10200, 0, true); JDFResourceAudit ra2 = stUtil.setResourceAudit(refMedia, EnumReason.OperatorInput); ra2.setRef(ra_1); ra2.setDescriptiveName("manual reset to using only 10200 sheets because 100 initially were wates"); } JDFProcessRun pr = stUtil.setProcessResult(EnumNodeStatus.Completed); pr.setDescriptiveName("we even have the utterly useless ProcessRun"); } if (bMinimal) { JDFAuditPool ap = n.getAuditPool(); VElement audits = ap.getAudits(EnumAuditType.PhaseTime, null, null); for (int i = 0; i < audits.Count; i++) { audits.item(i).deleteNode(); } } d.write2File(sm_dirTestDataTemp + "ConvPrintAmount_" + (bMinimal ? "min" : "full") + ".jdf", 2, false); } }