Example #1
0
flag CCctBreaker::GetModelAction(CMdlActionArray & Acts)
  {
  Acts.SetSize(0);
  Acts.SetAtGrow(0, CMdlAction(0, MAT_State, !m_bOn, "On", 1));
  Acts.SetAtGrow(1, CMdlAction(1, MAT_State, m_bOn, "Off", 0));
  Acts.SetAtGrow(2, CMdlAction(2, MAT_Switch));
  return true;
  };
Example #2
0
flag CPipeTerm::GetModelAction(CMdlActionArray & Acts)
  {
  //CMdlAction {MAT_NULL, MAT_State, MAT_Value};
  CMdlAction M0(0, MAT_State, !m_VPB.On(), "Open", 1);
  CMdlAction M1(1, MAT_State, m_VPB.On(),  "Close", 0);
  CMdlAction M2(2, MAT_Value, m_VPB.On(),  "Manual Posn (%)", true,
                  m_VPB.ManualPosition(this)*100, 0.0, 100.0,
                  m_VPB.ActualPosition(this, &m_FRB)*100);

  Acts.SetSize(0);
  Acts.SetAtGrow(0, M0);
  Acts.SetAtGrow(1, M1);
  Acts.SetAtGrow(2, M2);
  Acts.SetAtGrow(3, CMdlAction(3, MAT_Switch));
  return True;
  };
Example #3
0
//====================================================================================
// Actions
bool Splitter::GetModelAction(CMdlActionArray & Acts)
  {
  int IOCnt = FlwIOs.getCount();
  if (IOCnt==3)
    {
    Acts.SetSize(0);
    Acts.Add(CMdlAction(0, MAT_State, true, "Mass Split", 0));
    Acts.Add(CMdlAction(1, MAT_State, true, "Phase Split", 1));
    if (!bDoPhaseSplit)
      {
      double M1=FlwIOs[1].Stream.MassFlow();
      double M2=FlwIOs[2].Stream.MassFlow();
      double Split=(M1)/GTZ(M1+M2);

      Acts.Add(CMdlAction(2, MAT_Value, !bDoPhaseSplit,  "Split (%)", true, dRqdFracSplit*100, 0.0, 100.0, Split*100));
      }
    return true;
    }
  return false;
  };