Exemple #1
0
 ///
 ///	 <summary> * Set the status of a part defined in StatusPool
 ///	 * <p>
 ///	 * default setStatus(vmPart, s, JDFConstants.EMPTYSTRING)
 ///	 *  </summary>
 ///	 * <param name="vmPart"> </param>
 ///	 * <param name="s"> </param>
 ///	 * <param name="statusDetails"> </param>
 ///
 public virtual void setStatus(VJDFAttributeMap vmPart, JDFElement.EnumNodeStatus s, string statusDetails)
 {
     for (int i = 0; i < vmPart.Count; i++)
     {
         setStatus(vmPart[i], s, statusDetails);
     }
 }
Exemple #2
0
        ///
        ///	 <summary> * Set the status of the entire StatusPool
        ///	 *  </summary>
        ///	 * <param name="s"> the status to set </param>
        ///
        public override void setStatus(JDFElement.EnumNodeStatus s)
        {
            JDFNode n = (JDFNode)getParentNode_KElement();

            n.setStatus(JDFElement.EnumNodeStatus.Pool);
            base.setStatus(s);
        }
Exemple #3
0
        ///
        ///	 <summary> * Add a ProcessRun Audit
        ///	 *  </summary>
        ///	 * <param name="s"> the node status at this time </param>
        ///	 * <param name="by"> the author keyword </param>
        ///	 * <returns> the newly created ProcessRun audit
        ///	 *
        ///	 *         default: AddProcessRun(s, JDFConstants.EMPTYSTRING) </returns>
        ///
        public virtual JDFProcessRun addProcessRun(JDFElement.EnumNodeStatus s, string by, VJDFAttributeMap vmParts)
        {
            JDFProcessRun pr = (JDFProcessRun)addAudit(JDFAudit.EnumAuditType.ProcessRun, by);

            pr.setStart(null);
            pr.setEnd(null);
            pr.setEndStatus(s);
            pr.setPartMapVector(vmParts);

            return(pr);
        }
Exemple #4
0
        ///
        ///	 <summary> * apply the parameters in this to all appropriate resources in parentNode or one of parentNode's children
        ///	 *  </summary>
        ///	 * <param name="parentNode"> the node to search in TODO implement resource handling </param>
        ///
        public virtual void applyPipeToNode(JDFNode parentNode)
        {
            if (parentNode == null)
            {
                return;
            }
            VElement vNodes = parentNode.getvJDFNode(null, null, false);

            int size = vNodes.Count;

            for (int i = 0; i < size; i++)
            {
                JDFNode node = (JDFNode)vNodes[i];
                if (!matchesNode(node))
                {
                    continue;
                }
                JDFElement.EnumNodeStatus status = getStatus(); // TODO: set
                // Status
                node.setStatus(status);

                // final boolean isIncremental = (getUpdateMethod () ==
                // EnumUpdateMethod.Incremental);
                double          dAmount = -1.0;
                JDFResourceLink rl      = getResourceLink();

                if (rl != null)
                {
                    JDFResourceLink rlNode = node.getLink(0, rl.Name, new JDFAttributeMap(AttributeName.RREF, rl.getrRef()), null);
                    if (rlNode == null)
                    {
                        throw new JDFException("Applying pipeparams to inconsistent node: missing resourcelink: " + rl.Name);
                    }

                    VJDFAttributeMap vMap = rl.getPartMapVector();
                    if (vMap == null)
                    {
                        vMap = new VJDFAttributeMap();
                        vMap.Add(null);
                    }
                    for (int j = 0; j < vMap.Count; j++)
                    {
                        JDFAttributeMap map = vMap[j];
                        dAmount = rl.getActualAmount(map);
                        rlNode.setActualAmount(dAmount, map);
                    }
                }
            }
        }
Exemple #5
0
 ///
 ///	 <summary> * Set the status of a part defined in StatusPool
 ///	 * <p>
 ///	 * default setStatus(mPart, s, JDFConstants.EMPTYSTRING)
 ///	 *  </summary>
 ///	 * <param name="mPart"> </param>
 ///	 * <param name="s"> </param>
 ///	 * <param name="statusDetails"> </param>
 ///
 public virtual void setStatus(JDFAttributeMap mPart, JDFElement.EnumNodeStatus s, string statusDetails)
 {
     if ((mPart != null) && !mPart.IsEmpty())
     {
         JDFPartStatus ps = getCreatePartStatus(mPart);
         ps.setStatus(s);
         if (statusDetails != null && !statusDetails.Equals(JDFConstants.EMPTYSTRING))
         {
             ps.setStatusDetails(statusDetails);
         }
     }
     else
     {
         setStatus(s);
         if (statusDetails != null && !statusDetails.Equals(JDFConstants.EMPTYSTRING))
         {
             setStatusDetails(statusDetails);
         }
     }
 }
Exemple #6
0
 public virtual JDFProcessRun addProcessRun(JDFElement.EnumNodeStatus s, string by)
 {
     return(addProcessRun(s, by, null));
 }
Exemple #7
0
        ///
        ///	 <summary> * simulate running 2 separations on one press
        ///	 *  </summary>
        ///	 * <param name="bLast">
        ///	 *            TODO </param>
        ///
        //JAVA TO VB & C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
        //ORIGINAL LINE: private void run2Seps(String sheet, EnumSide side, String sep1, String sep2, @SuppressWarnings("unused") int good, @SuppressWarnings("unused") int waste, @SuppressWarnings("unused") String deviceID, @SuppressWarnings("unused") EnumNodeStatus endStatus, boolean bLast)
        private void run2Seps(string sheet, EnumSide side, string sep1, string sep2, int good, int waste, string deviceID, EnumNodeStatus endStatus, bool bLast)
        {
            string jmfFile = sm_dirTestDataTemp + "NColorStatus";

            JDFAttributeMap[] map = new JDFAttributeMap[sep1 == null ? 1 : 2];
            map[0] = new JDFAttributeMap(EnumPartIDKey.SheetName, sheet);
            map[0].put(EnumPartIDKey.Side, side);
            map[0].put(EnumPartIDKey.SignatureName, "Sig1");
            jmfFile += sheet + "_" + side.getName();
            bool bFirst = !doneSheets.Contains(sheet);

            if (bFirst)
            {
                doneSheets.Add(sheet);
            }

            if (sep1 != null)
            {
                map[1] = new JDFAttributeMap(map[0]);
                map[0].put(EnumPartIDKey.Separation, sep1);
                map[1].put(EnumPartIDKey.Separation, sep2);
                jmfFile += "_" + sep1 + "_" + sep2;
            }
            VJDFAttributeMap vMap = new VJDFAttributeMap(map);

            bgt.makeReady();
            bgt.execute(vMap, bLast, bFirst);
            JDFDoc jmfStatus = bgt.getStatusCounter().getDocJMFPhaseTime();

            jmfStatus.write2File(jmfFile + "_status.jmf", 2, false);
            JDFDoc jmfRes = bgt.getStatusCounter().getDocJMFResource();

            jmfRes.write2File(jmfFile + "_resource.jmf", 2, false);
        }