示例#1
0
dword MN_Xfer::ModelStatus()
  {
  dword Status=MdlNode::ModelStatus();
  if (GetStatusAsStopped())
    {
    Status |= FNS_UNoFlw;
    //Status |= (m_FEP.FlwRqdActive() ? FNS_UFlw : FNS_UNoFlw);
    }
  else
    {
    if (NoFlwIOs())
      {
      int HasFlw=0;
      double TFlw=0;
      for (int i=0; i<NoFlwIOs(); i++)
        {
        TFlw+=IOQm_In(i);
        if (IOConduit(i)->QMass()>gs_DisplayZeroFlow)
          HasFlw=1;
        }
      Status |= (HasFlw ? FNS_UFlw : FNS_UNoFlw);
      if (TFlw>1.0e-6)
        Status |= FNS_NettQmP;
      else if (TFlw<-1.0e-6)
        Status |= FNS_NettQmN;
      }
    }
  return Status;
  };
示例#2
0
dword  MN_BstRes::ModelStatus()
{
    dword Status=MdlNode::ModelStatus();
    if (NoFlwIOs()>1)
    {
        if (GetStatusAsStopped())
        {
            Status |= (m_FEP.FlwRqdActive() ? FNS_UFlw : FNS_UNoFlw);
        }
        else
        {
            const int iIn  = (Valid(IOQmEst_In(0)) && IOQmEst_In(0)>0.0 ? 0 : 1);
            Status |= (IOConduit(iIn)->QMass()>gs_DisplayZeroFlow ? FNS_UFlw : FNS_UNoFlw);
        }
    }
    else if (NoFlwIOs()==1)
        Status|=FNS_Error;

    return Status;
};