예제 #1
0
        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);
        }
예제 #2
0
파일: RIPTest.cs 프로젝트: cip4/JDFLibNet
        public override void setUp()
        {
            base.setUp();
            JDFElement.setLongID(false);
            d = new JDFDoc("JDF");

            n = d.getJDFRoot();
            n.appendXMLComment("Example to illustrate JDF 1.3 Base and MIS compatible amount handling", null);
            n.setType(EnumType.Combined);
            inMedia = (JDFMedia)n.addResource(ElementName.MEDIA, null, EnumUsage.Input, null, null, null, null);
            outXM   = (JDFExposedMedia)n.addResource(ElementName.EXPOSEDMEDIA, EnumUsage.Output);
            outXM.refMedia(inMedia);
            n.addTypes(EnumType.Interpreting);
            n.addTypes(EnumType.Rendering);
            n.addTypes(EnumType.ImageSetting);
            n.setJobID("RIP-job");
            rlXMOut   = n.getLink(outXM, null);
            rlMediaIn = n.getLink(inMedia, null);
            inMedia.setProductID("Media-ProductID");
            inMedia.setMediaType(EnumMediaType.Plate);
            inMedia.setMediaTypeDetails("Aluminum");

            vRL = new VElement();
            vRL.Add(rlMediaIn);
            vRL.Add(rlXMOut);

            JDFExposedMedia xmPart = (JDFExposedMedia)outXM.addPartition(EnumPartIDKey.SignatureName, "Sig1");

            vsSheet = new VString("Cover Sheet1 Sheet2", " ");
            vsCMYK  = new VString("Cyan Magenta Yellow Black Spot1", " ");
            VElement v = xmPart.addPartitions(EnumPartIDKey.SheetName, vsSheet);

            for (int i = 0; i < v.Count; i++)
            {
                JDFResource xmPart2 = (JDFResource)v[i];
                xmPart2.getCreatePartition(EnumPartIDKey.Side, "Front", null).addPartitions(EnumPartIDKey.Separation, vsCMYK);
                // xmPart2.getCreatePartition(EnumPartIDKey.Side,"Back",null).
                // addPartitions(EnumPartIDKey.Separation, vsCMYK);
            }
            statCounter = new StatusCounter(n, null, vRL);
            statCounter.setDeviceID("Rip-DeviceID");
            statCounter.setCopyResInResInfo(rlMediaIn.getrRef(), true);
        }