Exemplo n.º 1
0
        public virtual void testModules14()
        {
            VString v = new VString("orig fullList end", null);

            for (int i = 0; i < v.Count; i++)
            {
                reSetUp();
                string       testType = v.stringAt(i);
                JDFAuditPool ap       = n.getCreateAuditPool();
                ap.appendXMLComment("JDF 1.3 incompatible auditing of module phases the REQUIRED time attributes are not set in the ModulePhase elements\n" + "- note that phases may now arbitrarily overlap\n" + "The modulePhase elements now only specify which modules are involved, times are all defined by the phasetime proper", null);
                ap.appendXMLComment("The following phaseTime is executed by one module - the RIP,which executes two process steps (Interpreting and Rendering)", null);
                JDFPhaseTime ptRIP = ap.addPhaseTime(EnumNodeStatus.Setup, null, null);
                JDFDate      date  = new JDFDate();
                ptRIP.setStart(date);

                JDFDoc jmfDoc = new JDFDoc("JMF");
                JDFJMF jmf    = jmfDoc.getJMFRoot();
                jmf.setDescriptiveName("Initial phase when the RIP starts up");
                JDFSignal     signal = jmf.appendSignal(JDFMessage.EnumType.Status);
                JDFDeviceInfo di     = signal.appendDeviceInfo();

                JDFJobPhase jpRIP = di.appendJobPhase();
                di.setDeviceStatus(EnumDeviceStatus.Setup);
                jpRIP.setStartTime(date);
                jpRIP.setStatus(EnumNodeStatus.Setup);
                jpRIP.setJobID(n.getJobID(true));
                jpRIP.setJobPartID(n.getJobPartID(true));

                JDFModuleStatus msRIP = jpRIP.appendModuleStatus();
                msRIP.setCombinedProcessIndex(new JDFIntegerList("0 1"));
                msRIP.setModuleType("Imaging");
                msRIP.setModuleID("ID_Imaging");

                JDFModulePhase mpRIP = ptRIP.appendModulePhase();
                mpRIP.setCombinedProcessIndex(new JDFIntegerList("0 1"));
                mpRIP.setModuleType("Imaging");
                mpRIP.setModuleID("ID_Imaging");

                JDFModuleStatus msPrint = di.appendModuleStatus();
                msPrint.setCombinedProcessIndex(new JDFIntegerList("2"));
                msPrint.setModuleType("Printer");
                msPrint.setModuleID("ID_Printer");

                JDFModuleStatus msStitch = di.appendModuleStatus();
                msStitch.setCombinedProcessIndex(new JDFIntegerList("3"));
                msStitch.setModuleType("Stitcher");
                msStitch.setModuleID("ID_Stitcher");

                jmfDoc.write2File(sm_dirTestDataTemp + "moduleStatus" + testType + "0.jmf", 2, false);
                date.addOffset(0, 5, 0, 0);
                jmf.setTimeStamp(date);

                JDFJobPhase jpPrint = di.appendJobPhase();
                di.setDeviceStatus(EnumDeviceStatus.Running);
                jpPrint.setStatus(EnumNodeStatus.InProgress);
                jpPrint.setStartTime(date);
                jpPrint.setJobID(n.getJobID(true));
                jpPrint.setJobPartID(n.getJobPartID(true));

                msPrint = jpPrint.appendModuleStatus();
                msPrint.setCombinedProcessIndex(new JDFIntegerList("2"));
                msPrint.setModuleType("Printer");
                msPrint.setModuleID("ID_Printer");

                msStitch = jpPrint.appendModuleStatus();
                msStitch.setCombinedProcessIndex(new JDFIntegerList("3"));
                msStitch.setModuleType("Stitcher");
                msStitch.setModuleID("ID_Stitcher");

                di.removeChildren(ElementName.MODULESTATUS, null, null);
                jmf.setDescriptiveName("Phase when the Printer and Finisher start up; RIP is still RIPping");
                jmfDoc.write2File(sm_dirTestDataTemp + "moduleStatus" + testType + "1.jmf", 2, false);

                ap.appendXMLComment("The following phaseTime is executed by two modules - sticher and printer", null);
                JDFPhaseTime   ptPrint = ap.addPhaseTime(EnumNodeStatus.InProgress, null, null);
                JDFModulePhase mpPrint = ptPrint.appendModulePhase();
                mpPrint.setCombinedProcessIndex(new JDFIntegerList("2"));
                mpPrint.setModuleType("Printer");
                mpPrint.setModuleID("ID_Printer");
                ptPrint.setStart(date);

                JDFModulePhase mpStitch = ptPrint.appendModulePhase();
                mpStitch.setCombinedProcessIndex(new JDFIntegerList("3"));
                mpStitch.setModuleType("Stitcher");
                mpStitch.setModuleID("ID_Stitcher");
                date.addOffset(0, 30, 0, 0);
                ptRIP.setEnd(date);

                JDFDeviceInfo di2 = null;
                if (i < 2)
                {
                    JDFSignal signal2 = jmf.appendSignal(JDFMessage.EnumType.Status);
                    di2 = (JDFDeviceInfo)signal2.copyElement(di, null);
                    di2.removeChild(ElementName.JOBPHASE, null, 0);
                    if (i == 1)
                    {
                        JDFModuleStatus directMSRip = (JDFModuleStatus)di2.copyElement(msRIP, null);
                        directMSRip.setDeviceStatus(EnumDeviceStatus.Idle);
                    }
                }
                else
                {
                    jpRIP.setAttribute("EndTime", date.DateTimeISO);
                    jpRIP.setDescriptiveName("Added EndTime to explicitly close phase");
                }
                jmf.setTimeStamp(date);
                jmf.setDescriptiveName("Phase when the RIP has completed, Printer and Finisher are still RIPping");
                jmfDoc.write2File(sm_dirTestDataTemp + "moduleStatus" + testType + "2.jmf", 2, false);

                date.addOffset(0, 70, 0, 0);
                ptPrint.setEnd(date);
                jmf.setTimeStamp(date);

                if (i < 2)
                {
                    signal.deleteNode();
                    signal = jmf.appendSignal(JDFMessage.EnumType.Status);
                    di     = (JDFDeviceInfo)signal.copyElement(di2, null);
                    di.removeChild(ElementName.JOBPHASE, null, 0);
                    di.removeChild(ElementName.MODULESTATUS, null, 0);
                    di.setDeviceStatus(EnumDeviceStatus.Idle);
                    signal.appendXMLComment("Or should the complete list of modules also be specified here?", di);
                }
                else
                {
                    jpRIP.deleteNode();
                    jpPrint.setAttribute("EndTime", date.DateTimeISO);
                    jpPrint.setDescriptiveName("Added EndTime to explicitly close phase");
                }
                jmf.setDescriptiveName("Phase when the Printer and Finisher have completed");
                jmfDoc.write2File(sm_dirTestDataTemp + "moduleStatus" + testType + "3.jmf", 2, false);
                doc.write2File(sm_dirTestDataTemp + "DigiPrintModule.1.4" + testType + ".jdf", 2, false);
            }
        }