void Flare::BuildDataDefn(DataDefnBlk &DDB) { // if (Page & 0x1) DDB.BeginStruct(this); DDB.Page ("Page 1"); DDB.Text ("Datum"); DDB.Double ("Datum", "Z", DC_L , "m", &dDatum, this, isResult|0 | DYNMODE); DDB.Double ("Datum_Rqd", "Z_Rqd",DC_L , "m", &dDatum_Rqd, this, isParmStopped | DYNMODE|NAN_OK); DDB.Text (" "); DDB.Double ("Mass_Flow", "Qm", DC_Qm, "kg/s", xidQm, this, 0); // ,NDT_ZERODEFAULT|NDT_SGN ) DDB.Double ("Vol_Flow", "Qv", DC_Qm, "m^3/h", xidQv, this, 0); // ,NDT_SGN ) DDB.Text (" "); DDB.Double ("Press_Input", "PiR", DC_P, "kPag", xidPInRmt, this, 0); // ,NDT_SGN ) DDB.Text (" "); // } // if (Page & 0x2) // { DDB.Page ("Page 2"); DDB.String ("Flare", "", DC_, "", &FlareTag, this, isParm); DDB.Text (" "); // } DDB.EndStruct(); };
void CEC_EquilTXPoly::BuildDataDefn(DataDefnBlk & DDB) { DDB.Text ("EquilTXPoly"); DDEF_Flags VFlags=DDB.GetVisibility(); DDB.String("ExtentType", "", DC_, "", xid_RCTExtentType, &Eq, SetOnChange|isParm, DDBExtentTypes); DDB.SetVisibility(VFlags); DDB.Double("K_Eq", "", DC_, "", &dK_Eq, &Eq, isResult); DDB.Double("K_Act", "", DC_, "", &dK_Act, &Eq, isResult); DDB.Double("ExtentError", "", DC_Frac, "%", xid_ExtentError, &Eq, isResult|noFile|noSnap|NAN_OK); if (m_bDoResTime) { //DDB.Double("K_Rt", "", DC_, "", &dK_Rt, &Eq, isResult); //DDB.Double("Defined_RT", "", DC_Time, "s", &m_ddDefinedResTime, &Eq, isParm); //m_ddDefinedResTime.BuildDataDefn(DDB, "RT_Ref", "", DC_Time, "s", xid_RTRef, &Eq, "Rct", "Reqd"); //m_ddActualResTime.BuildDataDefn(DDB, "RT", "", DC_Time, "s", xid_ResTime, &Eq, "Actual", "Reqd"); //DDB.Double("Actual_RT", "", DC_Time, "s", &m_ddActualResTime, &Eq, isParm); DDB.Double("Alpha", "", DC_, "", &m_dAlpha, &Eq, isResult); } // if (m_iXSpcId>=0) // { // DDB.String("ExtentSpc", "", DC_, "", &m_sExtentSpc, &Eq, 0|InitHidden|noFileAtAll); // CCnvIndex dc; // pchar pCnvTxt; // SDB.AddSpCnv(DC_Frac, SDB[m_iXSpcId].SymOrTag(), "%", dc, pCnvTxt); // m_ddExtentRqd.BuildDataDefn(DDB, "Extent", "", dc, pCnvTxt, xid_RCTExtent, &Eq, "Rct", "Reqd"); // } };
void CEC_Equilibrium::BuildDataDefn(DataDefnBlk & DDB) { DDB.Text ("Equilibrium"); DDB.String("ExtentType", "", DC_, "", xid_RCTExtentType, &Eq, SetOnChange|isParm, DDBExtentTypes); m_ddKEq.BuildDataDefn(DDB, "K_Eq", "", DC_, "", xid_RCTKEquilibrium, &Eq, "Rct", "Reqd"); //DDB.Double("K_Eq", "", DC_, "", &m_dK_Eq, &Eq, isResult); DDB.Double("K_EOStep", "K_Act", DC_, "", &m_dKEOStep, &Eq, isResult); DDB.Double("K_Final", "", DC_, "", &m_dKFinal, &Eq, isResult|NAN_OK); DDB.Double("ExtentError", "", DC_Frac, "%", xid_ExtentError, &Eq, isResult|noFile|noSnap|NAN_OK); if (m_bDoResTime) { DDB.Double("K_Rt", "", DC_, "", &m_dK_Rt, &Eq, isResult); m_ddDefinedResTime.BuildDataDefn(DDB, "RT_Ref", "", DC_Time, "s", xid_RTRef, &Eq, "Rct", "Reqd"); m_ddActualResTime.BuildDataDefn(DDB, "RT", "", DC_Time, "s", xid_ResTime, &Eq, "Actual", "Reqd"); DDB.Double("Alpha", "", DC_, "", &m_dAlpha, &Eq, isResult); } if (m_iXSpcId>=0) { DDB.String("ExtentSpc", "", DC_, "", &m_sExtentSpc, &Eq, 0|InitHidden|noFileAtAll); CCnvIndex dc; pchar pCnvTxt; SDB.AddSpCnv(DC_Frac, SDB[m_iXSpcId].SymOrTag(), "%", dc, pCnvTxt); m_ddExtentRqd.BuildDataDefn(DDB, "Extent", "", dc, pCnvTxt, xid_RCTExtent, &Eq, "Rct", "Reqd"); } };
void CEC_FracExt::BuildDataDefn(DataDefnBlk & DDB) { Strng T; T.Set("Fractional Extent %s", m_Spc.m_Name()); if (m_bStablize) T += " (Stabilised)"; DDB.Text (T()); DDEF_Flags VFlags=DDB.GetVisibility(); DDB.String("ExtentType", "", DC_, "", xid_RCTExtentType, &Eq, SetOnChange|isParm, DDBExtentTypes); DDB.SetVisibility(VFlags); if (m_iXSpcId>=0) { DDB.String("ExtentSpc", "", DC_, "", &m_sExtentSpc, &Eq, 0|InitHidden|noFileAtAll); CCnvIndex dc; pchar pCnvTxt; SDB.AddSpCnv(DC_Frac, SDB[m_iXSpcId].SymOrTag(), "%", dc, pCnvTxt); m_ddExtentRqd.BuildDataDefn(DDB, "Extent", "", dc, pCnvTxt, xid_RCTExtent, &Eq, "Rct", "Reqd"); DDB.Double("ExtentAchieved", "", DC_Frac, "%", &m_dKEOStep, &Eq, isResult); if (!DynamicRate()) DDB.Double("ExtentError", "", DC_Frac, "%", xid_ExtentError, &Eq, isResult|noFile|noSnap|InitHidden|NAN_OK); else { if (m_bDoRate) { m_ddFracRate.BuildDataDefn(DDB, "Rate", "", DC_FracRate, "%/s", xid_RCTFracRate, &Eq, "Rct", "Reqd"); } } } }
void Crush1::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this); DDB.Text(""); DDB.CheckBox("On", "", DC_, "", &bOnLine, this, isParm); DDB.Text("Power"); DDB.Double("Bond_WI", "BondWI", DC_WI , "kWh/t", &BWI, this, isParm); DDB.Double("Calc_Power", "UsedPower", DC_Pwr, "kW", &Power, this, isResult|0); DDB.Text(""); DDB.Double("Density", "Rho", DC_Rho, "kg/m^3", xidRho, this, isResult|0); BuildDataDefnElevation(DDB); CB.Add_StandardDataDefn(DDB, true); DDB.Visibility(NM_Dynamic|SM_All|HM_All); DDB.Text(""); DDB.Double("DischOnSpeed", "", DC_Frac, "%", &DischOnSpeed, this, isParm); MSB.BuildDataDefn(DDB, this, "Speed", 1); m_Pwr.BuildDataDefn(DDB); DDB.Visibility(); DDB.Text(""); BuildDataDefnShowIOs(DDB); CB.Add_ObjectDataDefn(DDB, true); DDB.Object(&Disch, this, NULL, NULL, DDB_RqdPage); DDB.EndStruct(); }
void CrushBlk::Add_StandardDataDefn(DataDefnBlk & DDB, flag Vis) { DDEF_Flags Old = DDB.GetVisibility(); DDB.Visibility(NSHM_All, Vis); DDB.Text(""); DDB.CheckBox("TrackStatus", "", DC_, "", &bTrackStatus, this, isParm); static DDBValueLst DDB0[]={ {(int)CM_PartCrv_Overall, "Overall_PartCrv"}, {(int)CM_PartCrv_Individ, "Individual_PartCrv" }, {(int)CM_SelBreak, "Select/Break"}, {(int)CM_TestData_Overall, "Overall_TestData"}, {(int)CM_TestData_Individ, "Individual_TestData" }, //{(int)CM_JK, "JK" }, {0}}; DDB.Byte ("Method", "", DC_, "", xidMethod, this, isParmStopped/*|DDEF_SETONCHANGE*/, DDB0); DDB.Visibility(NSHM_All, Vis && (iMethod==CM_PartCrv_Overall || iMethod==CM_PartCrv_Individ)); DDB.CheckBox("ForcePartCrv", "", DC_, "", &bForcePartCrv, this, isParm, DDBYesNo); DDB.Visibility(NSHM_All, Vis && (iMethod==CM_TestData_Overall || iMethod==CM_TestData_Individ)); DDB.CheckBox("EnterExtents", "", DC_, "", xidEnterExtents, this, isParmStopped, DDBYesNo); DDB.Visibility(NSHM_All, Vis && (iMethod==CM_JK)); DDB.Double("", "K1", DC_L, "mm", &dK1, this, isParm); DDB.Double("", "K2", DC_L, "mm", &dK2, this, isParm); DDB.Double("", "K3", DC_, "", &dK3, this, isParm); DDB.Double("", "t10", DC_, "", &dt10, this, isParm); //DDB.Visibility(NSHM_All, Vis); DDB.SetVisibility(Old); }
void CEC_FinalConc::BuildDataDefn(DataDefnBlk & DDB) { Strng T; T.Set("Final Conc %s", m_Spc.m_Name()); DDB.Text (T()); DDEF_Flags VFlags=DDB.GetVisibility(); DDB.String("ExtentType", "", DC_, "", xid_RCTExtentType, &Eq, SetOnChange|isParm, DDBExtentTypes); DDB.SetVisibility(VFlags); if (m_Spc.m_ReactTerm>=0 || m_Spc.m_ProdTerm>=0) { CCnvIndex dc; pchar pCnvTxt; SDB.AddSpCnv(DC_Conc, SDB[m_Spc.m_SpcId].SymOrTag(), "g/L", dc, pCnvTxt); Strng S,C("Rct"),R("Reqd"); if (Valid(m_dRqdTemp)) S.Set("@%.2f", K2C(m_dRqdTemp)); else S="@FinalT"; C+=S; R+=S; m_ddRqdConc.BuildDataDefn(DDB, "Conc_Rqd", "", dc, pCnvTxt, xid_RCTExtent, &Eq, C(), R()); DDB.Double("Conc_MeasTemp", "", DC_T, "C", xid_RCTFinalConcT, &Eq, isResult|noFile|noSnap|InitHidden); DDB.Double("Conc_EOStep", "Conc_Act", DC_, "", &m_dKEOStep, &Eq, isResult); DDB.TagComment(S()); DDB.Double("Conc_Final", "", DC_, "", &m_dKFinal, &Eq, isResult|NAN_OK); DDB.TagComment(S()); DDB.Double("ExtentError", "", DC_Frac, "%", xid_ExtentError, &Eq, isResult|noFile|noSnap|NAN_OK); } };
void CEC_FracExt::BuildDataDefnEnd(DataDefnBlk & DDB) { if (!DDB.ForFileSnpScn() && RB.sm_ChgVars) { if (RB.sm_ChgVars & SRSC_Mass) { if (DDB.BeginStruct(&Eq, "MsChg", NULL, DDB_NoPage, -1, 0|MarkerClosed)) { for (int i=0; i<Eq.Reactant.GetSize(); i++) { DDB.Double(SDB[Eq.Reactant[i].SpcId].SymOrTag(), "", DC_Qm, "kmol/s", &Eq.Reactant[i].m_dMsXfer, &Eq, isResult|noFileAtAll); } for (int i=0; i<Eq.Product.GetSize(); i++) DDB.Double(SDB[Eq.Product[i].SpcId].SymOrTag(), "", DC_Qm, "kmol/s", &Eq.Product[i].m_dMsXfer, &Eq, isResult|noFileAtAll); } DDB.EndStruct(); } if (RB.sm_ChgVars & SRSC_Molar) { if (DDB.BeginStruct(&Eq, "MlChg", NULL, DDB_NoPage, -1, 0|MarkerClosed)) { for (int i=0; i<Eq.Reactant.GetSize(); i++) { DDB.Double(SDB[Eq.Reactant[i].SpcId].SymOrTag(), "", DC_QKgMl, "kmol/s", &Eq.Reactant[i].m_dMlXfer, &Eq, isResult|noFileAtAll); } for (int i=0; i<Eq.Product.GetSize(); i++) DDB.Double(SDB[Eq.Product[i].SpcId].SymOrTag(), "", DC_QKgMl, "kmol/s", &Eq.Product[i].m_dMlXfer, &Eq, isResult|noFileAtAll); } DDB.EndStruct(); } } };
void PE_Linear::BuildDataDefn(DataDefnBlk & DDB) { DDB.Double ("Resistance", "Resistn", DC_, "", &R_Fxd, NULL, isParm); DDB.Double ("PressDrop", "DP", DC_DP, "kPa", &m_dDP, NULL, isResult); //DDB.Double ("Length", "", DC_L, "m", &Len_Rqd, NULL, isParmStopped); // DDB.Double ("Diam", "", DC_L, "mm", &Diam, NULL, isParm); BuildDataDefnOveride(DDB); };
void PE_SimpleVel::BuildDataDefn(DataDefnBlk & DDB) { DDB.Double ("Diam", "", DC_L, "mm", &Diam, NULL, isParm); DDB.Double ("PowerLaw", "", DC_, "", &PwrLaw, NULL, isParm); DDB.Double ("Oper_DP", "", DC_DP, "kPa", &OpDP, NULL, isParm); DDB.Double ("Oper_Vel", "", DC_Ldt, "m/s", &OpVel, NULL, isParm); DDB.Double ("PressDrop", "DP", DC_DP, "kPa", &m_dDP, NULL, isResult); BuildDataDefnOveride(DDB); };
void PE_KFact::BuildDataDefn(DataDefnBlk & DDB) { DDB.Double ("Density", "", DC_Rho, "kg/m^3", &m_dDensMeas, NULL, isResult); DDB.Double ("Velocity", "Vel", DC_Ldt, "m/s", &m_dVelMeas, NULL, isResult); KFact().BuildDataDefn(DDB, "K", "", DC_, "", xidFlwEqnKFact, NULL, "Calculated", "Required"); DDB.Double ("PressDrop", "DP", DC_DP, "kPa", &m_dDP, NULL, isResult); BuildDataDefnOveride(DDB); };
void PE_VolFlow::BuildDataDefn(DataDefnBlk & DDB) { // DDB.Double ("Diam", "", DC_L, "mm", &Diam, NULL, isParm); DDB.Double ("PowerLaw", "", DC_, "", &PwrLaw, NULL, isParm); DDB.Double ("Oper_DP", "", DC_DP, "kPa", &OpDP, NULL, isParm); DDB.Double ("Oper_Vol", "", DC_Qv, "m^3/s", &OpVol, NULL, isParm|NAN_OK); DDB.Double ("Oper_NVol", "", DC_NQv, "Nm^3/s", &OpNVol, NULL, isParm|NAN_OK); DDB.Double ("PressDrop", "DP", DC_DP, "kPa", &m_dDP, NULL, isResult); BuildDataDefnOveride(DDB); };
/*This provides access to the variables of the model and calls the BuildDataDefn for objects used by the model.*/ void CentrifugeMB::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this); DDB.Visibility(NM_Dynamic|SM_All|HM_All); BuildDataDefnElevation(DDB); DDB.Text (" "); DDB.Double ("Density", "Rho", DC_Rho, "kg/m^3", xidRho, this, isResult|0); DDB.Double ("Level", "Lvl", DC_Frac, "%", xidLevel, this, isResult|0); DDB.Double ("Mass_Accum", "QmAcc", DC_Qm, "kg/s", &m_QmAcc, this, isResult|0); DDB.Double ("Vol_Accum", "QvAcc", DC_Qv, "L/s", &m_QvAcc, this, isResult|0); DDB.Visibility(); DDB.Text (""); DDB.Text ("Requirements"); DDB.CheckBox("On", "", DC_, "", &fOn, this, isParm); if (PrjFileVerNo()<49) DDB.Double ("", "SolidLoss", DC_Frac, "%", &RqdSolidsToFiltrate, this, isParm);//SolidLoss else DDB.Double ("Rqd_Solids_To_Filtrate", "RqdSolToFilt", DC_Frac, "%", &RqdSolidsToFiltrate,this, isParm);//SolidLoss DDB.Double ("Rqd_Cake_Moisture", "RqdCakeMoist", DC_Frac, "%", &RqdCakeMoist, this, isParm); DDB.Double ("Rqd_Wash_Efficiency", "RqdWashEff", DC_Frac, "%", &WashEff, this, isParm); DDB.Text (""); DDB.Text ("Results"); //DDB.Double ("Wash_Efficiency", "WashEff", DC_Frac, "%", &ActWashEff, this, isResult);//|noFile|noSnap); DDB.Double ("Cake_Moisture", "CakeMoist", DC_Frac, "%", &ActCakeLiq, this, isResult);//|noFile|noSnap); DDB.Double ("Cake_Solids", "CakeSolids", DC_Frac, "%", &ActCakeSolids, this, isResult);//|noFile|noSnap); DDB.Double ("Filtrate_Solids", "FiltSolids", DC_Frac, "%", &ActFiltSolids, this, isResult);//|noFile|noSnap); DDB.Double ("FiltrateSolidsConc@25", "FiltSolConc25", DC_Conc, "g/L", &ActFiltSolConc, this, isResult);//|noFile|noSnap); DDB.Double ("FiltrateSolidsConc@T", "FiltSolConc@T", DC_Conc, "g/L", &ActFiltSolConcT, this, isResult);//|noFile|noSnap|InitHidden); DDB.Visibility(NM_Probal|SM_All|HM_All); //DDB.Byte ("", "ScanEffSpecie", DC_, "", &iScanEffSpecie, this, isParm, SDB.DDBLiqSpList()); //DDB.Double ("Scandrett_Wash_Eff", "ScandrettEff", DC_Frac, "%", &ActScandrettEff, this, isResult);//|noFile|noSnap); DDB.Byte ("", "WashComp", DC_, "", &iWashEffSpecie, this, isParm, SDB.DDBLiqSpList()); DDB.Double ("", "CompWashEff1", DC_Frac, "%", &dSpWashEff, this, isResult);//|noFile|noSnap); DDB.Double ("", "CompWashEff2", DC_Frac, "%", &dSpWashEff2, this, isResult);//|noFile|noSnap); //DDB.Visibility(NM_Dynamic|SM_All|HM_All); //DDB.Bool ("", "CakeDisch?", DC_ , "", &Disch, this, isParm, DDBYesNo); DDB.Visibility(); DDB.Text (" "); m_RB.Add_OnOff(DDB); m_EHX.Add_OnOff(DDB); DDB.Text (" "); BuildDataDefnShowIOs(DDB); m_RB.BuildDataDefn(DDB); m_EHX.BuildDataDefn(DDB); if (SolveSurgeMethod()) { DDB.Object(&Contents, this, NULL, NULL, DDB_RqdPage); DDB.Object(&m_PresetImg, this, NULL, NULL, DDB_RqdPage); } DDB.EndStruct(); }
void TE_KFact::BuildDataDefn(DataDefnBlk & DDB) { KConst.BuildDataDefn(DDB, "KConst", "", DC_, "", xidKConst, NULL, "Initial", "Required"); DDB.Byte ("Type", "", DC_, "", &iType, NULL, isParm|SetOnChange, DDBTT); DDB.Double ("PipeDiam", "D-Pipe", DC_L, "mm", xidPDiam, NULL, isParmStopped); DDB.Double ("Density", "Rho", DC_Rho, "kg/m^3",&dDensMeas, NULL, isResult); DDB.Double ("Viscosity", "Visc", DC_Visc,"cP", &dViscMeas, NULL, isResult); DDB.Double ("Velocity", "Vel", DC_Ldt, "m/s", &dVelMeas, NULL, isResult); DDB.Double ("FricFac", "fT", DC_, "", &dFricFac, NULL, isResult); m_PhD.KFact.BuildDataDefn(DDB, "ResistCoeff", "K", DC_, "", xidKFact, NULL, "Calculated", "Required"); DDB.Double ("PressDrop", "DP", DC_DP, "kPa", &m_dDP, NULL, isResult); BuildDataDefnOveride(DDB); };
void HydroCyclone::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this); DDB.Double("ByePass2Grits", "", DC_Frac, "%", &ByePass2Grits, this,isParm); DDB.Double("OreToGrits", "", DC_Frac, "%", &Ore2Grit, this, DynMode() ? 0 : isParm); DDB.Double("LiqToGrits", "", DC_Frac, "%", &Liq2Grit, this, DynMode() ? 0 : isParm); DDB.Text(""); GSM.Add_OnOff(DDB); GSM.BuildDataDefn(DDB, NULL, NULL, DDB_OptPage); DDB.Object(&PartCrv, this, NULL, NULL, DDB_RqdPage); DDB.EndStruct(); };
void VLL_Sep::BuildDataDefn(DataDefnBlk &DDB) { DDB.BeginStruct(this); DDB.SuppressNextBlock(); FlashTank::BuildDataDefn(DDB); DDB.Page ("Boot", DDB_RqdPage); DDB.Double ("", "Boot.IF", DC_Frac, "%", xidBH2oIf, this, 0); DDB.Double ("", "Boot.Volume", DC_Vol, "m^3", &BootVolume, this, isParm); DDB.Double ("", "Boot.Liq", DC_M, "kg", &TotalSettled,this, (fDoDbgBrk ? isParm : 0)|InitHidden); //DDB.Double ("H2ORemoveEfficiency","H2ORemEff", DC_Frac, "%", &H2ORemEff, this, isParm); DDB.Double ("RemovalEfficiency", "RemEff", DC_Frac, "%", &H2ORemEff, this, isParm); DDB.Double ("H2oSettled", "", DC_M, "kg", &H2oSettled, this, isParmConstruct|InitHidden); DDB.Double ("MEGSettled", "", DC_M, "kg", &MEGSettled, this, isParmConstruct|InitHidden); DDB.Text (" "); DDB.EndStruct(); }
void Mill1::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this); DDB.Text(""); DDB.CheckBox("On", "", DC_, "", &bOnLine, this, isParm); DDB.Text("Power"); DDB.Double("InstalledPower", "Motor", DC_Pwr, "kW", &Motor, this, isParm); DDB.Double("PercentHeat", "HeatPerc", DC_Frac, "%", &Eff, this, isParm); DDB.Double("Bond_WI", "BondWI", DC_WI , "kWh/t", &BWI, this, isParm); DDB.Double("Calc_Power", "UsedPower", DC_Pwr, "kW", &Power, this, isResult|0); DDB.Double("Calc_Heat", "HeatPower", DC_Pwr, "kW", &Heat, this, isResult|0); DDB.Text(""); DDB.Double("Density", "Rho", DC_Rho, "kg/m^3", xidRho, this, isResult|0); BuildDataDefnElevation(DDB); CB.Add_StandardDataDefn(DDB, true); DDB.Visibility(NM_Dynamic|SM_All|HM_All); DDB.Text(""); DDB.Double("DischOnSpeed", "", DC_Frac, "%", &DischOnSpeed, this, isParm); MSB.BuildDataDefn(DDB, this, "Speed", 1); m_Pwr.BuildDataDefn(DDB); DDB.Visibility(); m_RB.Add_OnOff(DDB); DDB.Text(""); BuildDataDefnShowIOs(DDB); CB.Add_ObjectDataDefn(DDB, true); m_RB.BuildDataDefn(DDB); if (NetDynamicMethod()) { DDB.Object(&Contents, this, NULL, NULL, DDB_RqdPage); DDB.Object(&m_PresetImg, this, NULL, NULL, DDB_RqdPage); } DDB.Object(&Disch, this, NULL, NULL, DDB_RqdPage); DDB.EndStruct(); }
void CSzSSA::BuildDataDefn(DataDefnBlk & DDB) { // DDB.CheckBox("SetSAM", "", DC_, "", &m_bSetSAM, this, m_bSAMCalcd ? 0 : isParm); if (DDB.BeginStruct(this, "SSA", 0)) { DDB.Byte ("", "Method", DC_, "", &m_iMethod, this, 0/*isParm*/, DDBMeth); DDB.Visibility(NSHM_All ,m_iMethod==SSA_Independent); if (!DDB.ForFileSnpScn()) DDB.CheckBoxBtn("SetData", "", DC_, "", xidSSAAllowSet, this, isParm); DDB.Long ("", "Solids", DC_, "", &m_iSolids, this, (m_bHasPSD || !DataSettable()) ? 0 : isParm, SDB.DDBSolSpListDash()); DDB.Visibility(); DDB.Double ("SeedSurfAreaM", "SAM", DC_SurfAreaM, "m^2/g", xidSSAPartSAM, this, (m_bHasPSD || !DataSettable()) ? 0 : isParm); DDB.Double ("SeedSurfAreaL", "SAL", DC_SurfAreaL, "m^2/L", xidSSAPartSAL, this, noFile); DDB.Double ("#/s", "", DC_, "", xidSSAPartNoperSec, this, noFile|InitHidden); DDB.Double ("#/L", "", DC_, "", xidSSAPartNoperVol, this, noFile|InitHidden); DDB.Double ("PartDiam", "D", DC_L, "um", xidSSAPartDiam, this, ((m_bHasPSD || !DataSettable()) ? 0 : isParm)|noFile); DDB.Double ("SolidsQm", "", DC_Qm, "kg/s", xidSSAPartSolidsQm, this, noFile|InitHidden); } DDB.EndStruct(); }
/*#F:This provides access to the variables of the model and calls the BuildDataDefn for objects used by the model.*/ void CElectroCell::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this); DDB.Visibility(NM_Dynamic|SM_All|HM_All); BuildDataDefnElevation(DDB); DDB.Double ("Density", "Rho", DC_Rho, "kg/m^3", xidRho, this, isResult|0); DDB.Double ("Level", "Lvl", DC_Frac, "%", xidLevel, this, isResult|0); DDB.Double ("Mass_Accum", "QmAcc", DC_Qm, "kg/s", &m_QmAcc, this, isResult|0); DDB.Double ("Vol_Accum", "QvAcc", DC_Qv, "L/s", &m_QvAcc, this, isResult|0); DDB.Text (""); DDB.Byte ("Plated_Metal?", "Metal?", DC_, "", &iMetal, this, isParm, SDB.DDBSolSpList()); DDB.Double ("Cathode_Mass", "Cathodes", DC_, "", &CathMass, this, isResult|0); DDB.Visibility(); DDB.Text (""); DDB.Double ("CellEfficiency","Cell_Eff", DC_Frac, "%", &dCellEff, this, isParm); //DDB.Double ("", "PreHeatFrac", DC_Frac, "%", &dPreHeatFrac, this, isParm); //possibly not needed? //DDB.Double ("", "EnergyRqd", DC_Pwr, "kW", &dHeatFlow, this, isResult|noFileAtAll|InitHidden); //DDB.Double ("", "HeatFlow", DC_Pwr, "kW", &dHeatFlow, this, isResult|0); DDB.Double ("", "ElecEnergyTotal", DC_Pwr, "kW", &m_dElecEnergyTotal, this, isResult|0); DDB.Double ("", "ElecEnergyReact", DC_Pwr, "kW", &m_dElecEnergyReact, this, isResult|0); DDB.Double ("", "ElecEnergyHeat", DC_Pwr, "kW", &m_dElecEnergyHeat , this, isResult|0); DDB.Text (""); DDB.Double ("TempFeed", "Feed.T", DC_T, "C", &m_TempKFeed, this, isResult);//|noFileAtAll); DDB.Double ("FinalT", "", DC_T, "C", &m_TempKProd, this, isResult|0); DDB.Text (""); m_RB.Add_OnOff(DDB); DDB.Visibility(); DDB.Text (""); BuildDataDefnShowIOs(DDB, true); BuildDataDefnIOOpts(DDB); m_RB.BuildDataDefn(DDB); if (SolveSurgeMethod()) { DDB.Object(&Contents, this, NULL, NULL, DDB_RqdPage); DDB.Object(&m_PresetImg, this, NULL, NULL, DDB_RqdPage); } DDB.Visibility(NM_Dynamic|SM_All|HM_All); //if (Contents.SpillExists()) // DDB.Object(&Contents.OverFlow, this, NULL, NULL, DDB_RqdPage); DDB.Visibility(); DDB.EndStruct(); };
void CTransformer::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this, "CTransformer", NULL, DDB_NoPage); DDB.Text(""); DDB.Long ("PriCfg", "", DC_, "", xidTSCfgP, this, isParm, DDBCTTypes); DDB.Long ("SecCfg", "", DC_, "", xidTSCfgS, this, isParm, DDBCTTypes); DDB.Text(""); DDB.Double ("NomPriVolts", "", DC_V, "V", &m_dPriV, this, isParm); DDB.Double ("NomSecVolts", "", DC_V, "V", &m_dSecV, this, isParm); DDB.Double ("PriResist", "", DC_Ohms, "Ohms", xidPriR, this, isParm); DDB.Double ("PriIndReact", "", DC_Ohms, "Ohms", xidPriX, this, isParm); DDB.Double ("SecResist", "", DC_Ohms, "Ohms", xidSecR, this, isParm); DDB.Double ("SecIndReact", "", DC_Ohms, "Ohms", xidSecX, this, isParm); DDB.Double ("NoLoadCurrent", "", DC_I, "A", &m_dNLI, this, isParm); DDB.Double ("NoLoadPhase", "", DC_Ang, "deg", &m_dNLA, this, isParm); DDB.Double ("HeatLoad", "", DC_Pwr, "W", xidHtLoad,this, 0); DDB.Text(""); m_tsPri.BuildDataDefn(DDB, 1, true); m_tsSec.BuildDataDefn(DDB, 2, true); DDB.EndStruct(); }
void CEC_MLFinalFrac::BuildDataDefn(DataDefnBlk & DDB) { Strng T; T.Set("Final Mole %sFraction %s", m_AsTotal?"":"Phase ", m_Spc.m_Name()); DDB.Text (T()); DDEF_Flags VFlags=DDB.GetVisibility(); DDB.String("ExtentType", "", DC_, "", xid_RCTExtentType, &Eq, SetOnChange|isParm, DDBExtentTypes); DDB.SetVisibility(VFlags); if (m_Spc.m_ReactTerm>=0 || m_Spc.m_ProdTerm>=0) { CCnvIndex dc; pchar pCnvTxt; SDB.AddSpCnv(DC_Frac, SDB[m_Spc.m_SpcId].SymOrTag(), "%", dc, pCnvTxt); m_ddRqdFrac.BuildDataDefn(DDB, "Frac_Rqd", "", dc, pCnvTxt, xid_RCTExtent, &Eq, "Rct", "Reqd"); DDB.Double("Frac_EOStep", "Frac_Act", dc, pCnvTxt, &m_dKEOStep, &Eq, isResult); DDB.Double("Frac_Final", "", dc, pCnvTxt, &m_dKFinal, &Eq, isResult|NAN_OK); DDB.Double("ExtentError", "", DC_Frac, "%", xid_ExtentError, &Eq, isResult|noFile|noSnap|NAN_OK); } };
void PL_FwdRev::BuildDataDefn(DataDefnBlk & DDB) { DDB.Byte("Mode", "", DC_, "", &iMode, this, isParm, DDBPmpStartMode); switch (iMode) { case 0: DDB.CheckBoxBtn("Enable", "Run", DC_, "", &bOn, this, isParm, DDBOnOff); DDB.CheckBoxBtn("Invert", "", DC_, "", &bStartInv,this, isParm, DDBOnOff); break; case 1: case 2: DDB.CheckBoxBtn("Permissive", "", DC_, "", &bOn, this, isParm, DDBOnOff); DDB.CheckBoxBtn("Start", "", DC_, "", &bStart, this, isParm, DDBOnOff); DDB.CheckBoxBtn("Stop", "", DC_, "", &bStop, this, isParm, DDBOnOff); DDB.CheckBoxBtn("StartInvert","", DC_, "", &bStartInv,this, isParm, DDBOnOff); DDB.CheckBoxBtn("StopInvert", "", DC_, "", &bStopInv, this, isParm, DDBOnOff); break; } DDB.CheckBoxBtn("Running", "", DC_, "", &bRunning, this, 0, DDBOnOff); DDB.CheckBoxBtn("Tripped", "", DC_, "", &bTripped, this, isParm, DDBOnOff); //DDB.Add_OnOff("State", &bOn, False, this); //DDB.Add_YesNo("Forward", &bFwd, False, this); DDB.CheckBoxBtn("Forward", "", DC_, "", &bFwd, this, isParm, DDBYesNo); DDB.Double("LocalY", "Manual", DC_Frac, "%", &m_dManualSpeed, this, isParm|NAN_OK); DDB.Double("Speed", "Reqd", DC_Frac, "%", &m_dSpeedReqd, this, isParm); DDB.Double("", "Actual", DC_Frac, "%", &m_dSpeed, this, 0); DDB.Double("", "Regulated", DC_Frac, "%", &m_dSpeedReg, this, isResult); DDB.Bool ("LoSpeed", "", DC_, "", &bLoSpeed, this, isResult); DDB.Bool ("HiSpeed", "", DC_, "", &bHiSpeed, this, isResult); DDB.Float ("LoSpeedLimit", "", DC_Frac, "%", &dLoSpeedLimit,this, isParm|InitHidden); DDB.Float ("HiSpeedLimit", "", DC_Frac, "%", &dHiSpeedLimit,this, isParm|InitHidden); DDB.CheckBoxBtn("AutoReStart", "", DC_, "", &m_bAutoRestart, this, isParm, DDBOnOff); DDB.Byte("FailMode", "", DC_, "", &iFailMode, this, isParm, DDBPmpFailMode); DDB.CheckBoxBtn("RunMemory", "", DC_, "", &bRunMemory, this, InitHidden, DDBOnOff); //if (m_pPwr) // m_pPwr->BuildDataDefn(DDB); }
void CPipeTerm::BuildDataDefn(DataDefnBlk &DDB) { DDB.BeginStruct(this, NULL, NULL, DDB_NoPage); DDB.Text ("Flow Conditions"); DDB.Double ("Mass_Flow", "Qm", DC_Qm, "kg/s", xidQm, this, isResult|noFile|noSnap); DDB.Double ("Vol_Flow", "Qv", DC_Qv, "L/s", xidQv, this, isResult|noFile|noSnap); DDB.Double ("NVol_Flow", "NQv", DC_NQv, "NL/s", xidNQv, this, isResult|noFile|noSnap); DDB.Double ("Temperature", "T", DC_T, "C", xidTemp, this, isResult|noFile|noSnap); DDB.Double ("Density", "Rho", DC_Rho, "kg/m^3", xidRho, this, isResult|noFile|noSnap); DDB.Double ("NDensity", "NRho", DC_Rho, "kg/m^3", xidNRho, this, isResult|noFile|noSnap); DDB.Double ("PressureIn", "PIn", DC_P, "kPag", xidPIn, this, isResult|noFile|noSnap); DDB.Double ("PressureOut", "POut", DC_P, "kPag", xidPOut, this, isResult|noFile|noSnap); DDB.Visibility(NSHM_All); flag ParmOK=true; DDB.Visibility(); DDB.Text (""); DDB.Double("PressureOutRqd","POutRqd", DC_P, "kPag", &m_dPOut, this, isParm); DDB.Double("Head", "", DC_L, "m", &m_dHead, this, isParm); BuildDataDefnElevation(DDB); DDB.Text (""); m_FRB.BuildDataDefn(DDB, this, true); DDB.Visibility(NM_Dynamic|SM_All|HM_All); DDB.Text (""); m_VPB.BuildDataDefn(DDB, this, "Posn", 1); DDB.Visibility(NSHM_All); if (NoFlwIOs()>0 && !DDB.ForFileSnpScn()) IOFB(0,0)->BuildDataDefn(FBDDOpt_WithAll, DDB, this, "CtrlEqn", 2); DDB.Visibility(); DDB.Object(&m_Flows, this, NULL, NULL, DDB_RqdPage); DDB.Text(""); DDB.EndStruct(); }
void CIsolator::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this, "CIsolator", NULL, DDB_NoPage); DDB.Text(""); DDB.Long ("TermCfg", "", DC_, "", xidTSCfg, this, isParm, DDBCTTypes); DDB.CheckBoxBtn("On", "", DC_, "", &m_bOn, this, isParm); DDB.Double ("HeatLoad", "", DC_Pwr, "W", xidHtLoad, this, isResult); DDB.Text(""); m_tsPwrIn.BuildDataDefn(DDB, 1, true); m_tsPwrOut.BuildDataDefn(DDB, 2, true); DDB.EndStruct(); }
void FlashTank::BuildDataDefn(DataDefnBlk &DDB) { DDB.BeginStruct(this); DDB.Double ("Pressure", "P", DC_P, "kPag", xidPMean, this, 0); DDB.Double ("Temperature", "T", DC_T, "C", xidTemp, this, 0); DDB.Double ("Density", "Rho", DC_Rho, "kg/m^3", xidRho, this, 0); DDB.Double ("Level", "Lvl", DC_Frac, "%", xidLevel, this, 0); DDB.Text ("Datum"); DDB.Double ("Datum", "Z", DC_L , "m", &dDatum, this, isResult|0 | DYNMODE); DDB.Double ("Datum_Rqd", "Z_Rqd",DC_L , "m", &dDatum_Rqd, this, isParmStopped | DYNMODE|NAN_OK); DDB.Text (" "); DDB.Double ("POffset", "", DC_DP, "kPa", &POffset, this, 0); DDB.Text (""); DDB.CheckBoxBtn("Closed", "", DC_ , "", xidClosed, this, isParmStopped|(!gs_Environment.OK() ? noView|noFile|noSnap|noScenario:0) , DDBYesNo); DDB.CheckBoxBtn("Networked", "", DC_ , "", xidNetPressDamp, this, isParmStopped|(!gs_Environment.OK() || !Contents.Closed() ? noView|noFile|noSnap|noScenario:0) , DDBYesNo); VLE.Add_OnOff(DDB); VLE.BuildDataDefn(DDB, NULL, NULL, DDB_RqdPage, 0); if (SolveMode()==DYNMODE) { DDB.Object(&Contents, this, NULL, NULL, DDB_RqdPage); DDB.Object(&PresetImg, this, NULL, NULL, DDB_RqdPage); } DDB.Page("IOs"); Strng Commnt, Nm; for (int i=0; i<NoFlwIOs(); i++) { Nm.Set("IO_%02i", i); DDB.Double(Nm(), "", DC_Qm , "kg/s", xidIO_Qm0+i, this, 0); #ifndef UsingZTagObj DDB.VolatileTags(Nm(), Nm()); #endif Commnt.Set("%s", Nd_Rmt(i)->FullObjTag()); DDB.TagComment(Commnt()); } DDB.Double("IO_Sigma", "", DC_Qm , "kg/s", xidIO_QmSigma, this, 0); DDB.EndStruct(); };
void Crusher::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this); BuildDataDefnElevation(DDB); DDB.Text(""); DDB.Text(""); static DDBValueLst DDB0[]={ {CM_PartCrv, "PartitionCrv"}, {CM_SelBreak, "Select/Break"}, {0}}; DDB.Byte ("Method", "", DC_, "", &iMethod, this, isParm|DDEF_SETONCHANGE, DDB0); //? DDB.Bool("UseSelBrk", "", DC_, "", &fUseSelBrk, this, isParm, DDBYesNo); DDB.Text(""); DDB.Double("Bond_WI", "Bond_WI", DC_WI , "kWh/t", &BWI , this, isParm); DDB.Double("Calc_Power", "CalcPower", DC_Pwr, "kW", &Power, this, isResult|0); //DDB.Double("Density", "Rho", DC_Rho, "kg/m^3", xidRho, this, 0); //DDB.Double("Level", "Lvl", DC_Frac, "%", xidLevel, this, 0); MSB.BuildDataDefn(DDB, this, "Speed", 1); m_Pwr.BuildDataDefn(DDB); //DDB.Object(&BWDist, this); //DDB.Object(&EDist, this); if (iMethod==CM_SelBreak) DDB.Object(&SelBrk, this); else DDB.Object(&DischPart, this); DDB.Object(&Disch, this, NULL, NULL, DDB_RqdPage); DDB.EndStruct(); };
void PL_SoftStSp::BuildDataDefn(DataDefnBlk & DDB) { DDB.Byte("Mode", "", DC_, "", &iMode, this, isParm, DDBPmpStartMode); DDB.Byte("FwdRevMode", "", DC_, "", &iFwdRev, this, isParm, DDBFwdRevMode ); switch (iMode) { case 0: DDB.CheckBoxBtn("Enable", "Run", DC_, "", &bOn, this, isParm, DDBOnOff); DDB.CheckBoxBtn("Invert", "", DC_, "", &bStartInv,this, isParm, DDBOnOff); break; case 1: case 2: DDB.CheckBoxBtn("Permissive", "", DC_, "", &bOn, this, isParm, DDBOnOff); DDB.CheckBoxBtn("Start", "", DC_, "", &bStart, this, isParm, DDBOnOff); DDB.CheckBoxBtn("Stop", "", DC_, "", &bStop, this, isParm, DDBOnOff); DDB.CheckBoxBtn("StartInvert","", DC_, "", &bStartInv,this, isParm, DDBOnOff); DDB.CheckBoxBtn("StopInvert", "", DC_, "", &bStopInv, this, isParm, DDBOnOff); break; } if (iFwdRev==PLSS_FwdRevLogic) DDB.CheckBoxBtn("Reverse", "", DC_, "", &bRunRev, this, isParm, DDBOnOff); DDB.CheckBoxBtn("Running", "", DC_, "", &bRunning, this, 0, DDBOnOff); DDB.CheckBoxBtn("Tripped", "", DC_, "", &bTripped, this, isParm, DDBOnOff); DDB.Double("StartTime", "StrtTime", DC_Time, "s", &dStartTime, this, isParm); DDB.Double("StopTime", "StopTime", DC_Time, "s", &dStopTime, this, isParm); DDB.Double("LocalY", "Manual", DC_Frac, "%", &m_dManualSpeed, this, isParm|NAN_OK); DDB.Double("Required", "Reqd", DC_Frac, "%", &m_dSpeedReqd, this, isParm); DDB.Double("Actual", "Actual", DC_Frac, "%", &m_dSpeed, this, isResult|0); DDB.Double("", "Regulated", DC_Frac, "%", &m_dSpeedReg, this, isResult); DDB.Double("MapLo", "", DC_Frac, "%", &dMapLo, this, isParm); DDB.Double("MapHi", "", DC_Frac, "%", &dMapHi, this, isParm); DDB.Double("MapSpeed", "", DC_Frac, "%", &m_dMapSpeed, this, isResult|0); DDB.Bool ("LoSpeed", "", DC_, "", &bLoSpeed, this, isResult); DDB.Bool ("HiSpeed", "", DC_, "", &bHiSpeed, this, isResult); DDB.Float ("LoSpeedLimit", "", DC_Frac, "%", &dLoSpeedLimit,this, isParm|InitHidden); DDB.Float ("HiSpeedLimit", "", DC_Frac, "%", &dHiSpeedLimit,this, isParm|InitHidden); DDB.CheckBoxBtn("AutoReStart", "", DC_, "", &m_bAutoRestart, this, isParm, DDBOnOff); DDB.Byte("FailMode", "", DC_, "", &iFailMode, this, isParm, DDBPmpFailMode); DDB.CheckBoxBtn("RunMemory", "", DC_, "", &bRunMemory, this, InitHidden, DDBOnOff); //if (m_pPwr) // m_pPwr->BuildDataDefn(DDB); };
/*#F:This provides access to the variables of the model and calls the BuildDataDefn for objects Tled by the model.*/ void Flot::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this); DDB.Visibility(); GSM.Add_OnOff(DDB); DDB.Visibility(DYNMODE); DDB.Text (""); //DDB.Double ("Datum_Rqd", "Z_Rqd", DC_L , "m", &Z_Rqd, this, isParm|NAN_OK); //DDB.Double ("Datum", "Z", DC_L, "m", &Z, this, 0); DDB.Double ("Pressure", "P", DC_P, "kPag", xidPMean, this, noFile|noSnap); DDB.Double ("Temperature", "T", DC_T, "C", xidTemp, this, noFile|noSnap); DDB.Double ("Density", "Rho", DC_Rho, "kg/m^3", xidRho, this, noFile|noSnap); DDB.Double ("Level", "Lvl", DC_Frac, "%", xidLevel, this, noFile|noSnap); DDB.Double ("Mass_Accum", "QmAcc", DC_Qm, "kg/s", &QmAcc, this, noFile|noSnap); DDB.Double ("Vol_Accum", "QvAcc", DC_Qv, "L/s", &QvAcc, this, noFile|noSnap); DDB.Visibility(); DDB.Text (""); static DDBValueLst DDB1[]={ {(int)True, "SizeRecovery"}, {(int)False, "NoSizeRecovery" }, {0}}; DDB.Bool ("RecoveryMethod", "Method", DC_, "", &RM, this, isParm, DDB1); DDB.Long ("Float", "Flot?", DC_, "", &iFlot, this, isParm, SDB.DDBSolSpList()); if (!RM) { DDB.Double("Recovery", "Recovery", DC_Frac, "%", &Eff, this, isParm); DDB.Double("Grade", "Grade", DC_Frac, "%", &Grd, this, isParm); DDB.Text (""); static DDBValueLst DDB0[]={ {(int)True, "Yes"}, {(int)False, "No" }, {0}}; DDB.Bool ("SecondFloat?", "SecFloat?", DC_, "", &SecFlot, this, isParm, DDB0); if (SecFlot) { DDB.Long ("SecondFloat", "SecFlot", DC_, "", &iSec, this, isParm, SDB.DDBSolSpList()); DDB.Double("SecondGrade", "SecGrade", DC_Frac, "%", &Grade2, this, isParm); } } if (RM) { DDB.Double("TotalRec", "TotalRec", DC_Frac, "%", &TotRecover, this, 0); DDB.Double("Grade", "Grade", DC_Frac, "%", &Grade, this, 0); } DDB.Text(""); DDB.Text (""); //DDB.Double ("SS_Lvl", "", DC_Frac, "%", &SS_Lvl, this, isParm); DDB.Double ("WaterInConc", "FlotWater", DC_Frac, "%", &Rec, this, isParm); DDB.Visibility(DYNMODE); DDB.Byte ("Collect", "Coll?", DC_, "", &iColl, this, isParm, SDB.DDBSpList()); DDB.Visibility(); RB.Add_OnOff(DDB); BuildDataDefnShowIOs(DDB); if (RM) DDB.Object(&SizeRec, this, NULL, NULL, DDB_RqdPage); RB.BuildDataDefn(DDB, NULL, NULL, DDB_RqdPage, 0); GSM.BuildDataDefn(DDB); if (SolveMode()==DYNMODE) { DDB.Object(&Contents, this, NULL, NULL, DDB_RqdPage); DDB.Object(&PresetImg, this, NULL, NULL, DDB_RqdPage); } DDB.Visibility(DYNMODE); DDB.Object(&FlotFn, this, NULL, NULL, DDB_RqdPage); DDB.Visibility(); DDB.EndStruct(); };
void CActuator::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this, "CActuator", NULL, DDB_NoPage); DDB.Text(""); DDB.CheckBoxBtn("On", "", DC_, "", &bOn, this, isParmStopped, DDBYesNo); DDB.CheckBoxBtn("ShowCnv", "", DC_, "", &bWithCnvComment,this, isParmStopped, DDBYesNo); DDB.Visibility(); DDB.Long("", "Ac_Cnt", DC_, "", idmCount, this, isParmStopped/*|AffectsStruct*/); DDB.Text(""); if (m_DataBlk.GetSize()>0) { DDB.Button("Check_tags", "", DC_, "", idmCheckBtn, this, isParmStopped); DDB.Text(""); DDB.String("State", "", DC_, "", &m_StateLine[0], this, noSnap|noFile); DDB.Text("Error:"); DDB.String("Msg_1", "", DC_, "", &m_StateLine[1], this, noSnap|noFile); DDB.String("Msg_2", "", DC_, "", &m_StateLine[2], this, noSnap|noFile); DDB.Text(""); } DDB.Text("----------------------------------------"); static DDBValueLst DDBFail[]={ {Fail_None, "None" }, {Fail_Hold, "Hold" }, {Fail_Hold|Fail_Noise, "Hold,Noise" }, {Fail_MinVal, "MinVal" }, {Fail_MaxVal, "MaxVal" }, {Fail_LoVal, "LoVal" }, {Fail_HiVal, "HiVal" }, {Fail_MinVal|Fail_Ramp, "MinVal,Ramp" }, {Fail_MaxVal|Fail_Ramp, "MaxVal,Ramp" }, {Fail_LoVal|Fail_Ramp, "LoVal,Ramp" }, {Fail_HiVal|Fail_Ramp, "HiVal,Ramp" }, {Fail_MinVal|Fail_Noise, "MinVal,Noise" }, {Fail_MaxVal|Fail_Noise, "MaxVal,Noise" }, {Fail_LoVal|Fail_Noise, "LoVal,Noise" }, {Fail_HiVal|Fail_Noise, "HiVal,Noise" }, {Fail_MinVal|Fail_Ramp|Fail_Noise, "MinVal,Ramp,Noise"}, {Fail_MaxVal|Fail_Ramp|Fail_Noise, "MaxVal,Ramp,Noise"}, {Fail_LoVal|Fail_Ramp|Fail_Noise, "LoVal,Ramp,Noise" }, {Fail_HiVal|Fail_Ramp|Fail_Noise, "HiVal,Ramp,Noise" }, {0}}; static DDBValueLst DDBXForms[]={ {XF_None, "None" }, {XF_Linear, "Linear" }, //{XF_Sqr, "Sqr" }, //{XF_Sqrt, "Sqrt" }, {0}}; static DDBValueLst DDBFilters[]={ {Flt_None, "None" }, {Flt_FirstOrder, "FirstOrder" }, {0}}; static DDBValueLst DDBRawXLates[]={ {XL_None, "None" }, {XL_AtoD, "AtoD" }, {XL_Linear, "Linear" }, //{XL_PulseEncode "PulseWidth" }, {0}}; char Buff[128]; Strng Tag; if (DDB.BeginArray(this, "Cfg", "Ac_Cfg", m_DataBlk.GetSize())) { for (int i=0; i<m_DataBlk.GetSize(); i++) { if (1)// i>0 && (i % 2)==1) { sprintf(Buff, "%d", i); DDB.Page(Buff, DDB_OptPage); } DDB.BeginElement(this, i); CActuatorBlk * T = m_DataBlk[i]; Strng CnvTxt; if (bWithCnvComment && XRefsValid() && T->m_bValid) GetValidCnvTxt(T->m_OutputVar, CnvTxt); DDB.String("ID", "", DC_, "", idmCfgTags+(i*NoOfCfgTags)+1, this, isParmStopped|isTag); DDB.String("OutputTag", "", DC_, "", idmCfgTags+(i*NoOfCfgTags)+2, this, isParmStopped|isTag); //DDB.Double("RequiredValue", "ReqdVal", DC_, "", &T->m_dReqdValue, this, isResult|noFileAtAll); DDB.Double("RequiredValue", "Rqd", DC_, "", &T->m_dReqdValue, this, isResult|noFileAtAll); if (CnvTxt.Len()) DDB.TagComment(CnvTxt()); // DDB.Byte ("Transform", "", DC_, "", &T->m_Xform.m_iType, this, isParm|SetOnChange, DDBXForms); // DDB.Visibility(NSHM_All, T->m_Xform.m_iType); // DDB.Float ("Xf.Factor", "", DC_, "", &T->m_Xform.m_dFactor, this, isParm); // DDB.Float ("Xf.Bias", "", DC_, "", &T->m_Xform.m_dBias, this, isParm); // // DDB.Visibility(); // // DDB.Byte ("Filter", "", DC_, "", &T->m_Flt.m_iType, this, isParm|SetOnChange, DDBFilters); // DDB.Visibility(NSHM_All, T->m_Flt.m_iType == Flt_FirstOrder); // DDB.Float ("Flt.TimeConst", "Flt.Tau", DC_Time, "s", &T->m_Flt.m_dTau, this, isParm); // DDB.Double("Flt.PrevValue", "", DC_, "", &T->m_Flt.m_dPrevValue, this, InitHidden); // DDB.Visibility(); // // DDB.Byte ("Fail.Mode", "", DC_, "", &T->m_Fail.m_iType, this, isParm|SetOnChange, DDBFail); // DDB.Float ("Fail.LoValue", "", DC_, "", &T->m_Fail.m_dLoValue, this, isParm); // DDB.Float ("Fail.HiValue", "", DC_, "", &T->m_Fail.m_dHiValue, this, isParm); // DDB.Float ("Fail.NoiseStdDev", "", DC_, "%", &T->m_Fail.m_dNoiseStdDevFrac, this, isParm); // DDB.Float ("Fail.SlewTime", "", DC_Time, "s", &T->m_Fail.m_dSlewTime, this, isParm); // // // DDB.Float ("MinValue", "MinV", DC_, "", &T->m_dMinValue, this, isParm); // DDB.Float ("MaxValue", "MaxV", DC_, "", &T->m_dMaxValue, this, isParm); // DDB.Double("Value", "", DC_, "", &T->m_dValue, this, isResult); // // DDB.Float ("LoLimit", "LL", DC_, "", &T->m_dLoLimit, this, isParm); // DDB.Float ("HiLimit", "HL", DC_, "", &T->m_dHiLimit, this, isParm); // flag ff=0; DDB.CheckBox ("LoInvert", "", DC_, "", &T->m_bLoInvert, this, isParm|SetOnChange); DDB.CheckBox ("HiInvert", "", DC_, "", &T->m_bHiInvert, this, isParm|SetOnChange); DDB.Bool ("", "Lo", DC_, "", &T->m_bLo, this, isResult); DDB.Bool ("", "Hi", DC_, "", &T->m_bHi, this, isResult); // DDB.Byte ("RawTransform", "", DC_, "", &T->m_RawXform.m_iType, this, isParm|SetOnChange, DDBRawXLates); // DDB.Visibility(NSHM_All, T->m_RawXform.m_iType>=XL_AtoD); // DDB.Float ("Raw.MinValue", "", DC_, "", &T->m_RawXform.m_dMinValue, this, isParm); // DDB.Float ("Raw.MaxValue", "", DC_, "", &T->m_RawXform.m_dMaxValue, this, isParm); // DDB.Visibility(); // //DDB.Double ("OutputValue", "Output", DC_, "", &T->m_dOutputValue, this, isResult); DDB.Double ("OutputValue", "Out", DC_, "", &T->m_dOutputValue, this, isResult); DDB.String ("PLCAddess", "", DC_, "", &T->m_sPLCAddress, this, isParmStopped|InitHidden); DDB.Long ("Priority", "", DC_, "", idmCfgTags+(i*NoOfCfgTags)+4, this, isParmStopped|InitHidden); DDB.Text("----------------------------------------"); } } DDB.EndArray(); DDB.EndStruct(); }
/*This provides access to the variables of the model and calls the BuildDataDefn for objects used by the model.*/ void BeltCnv::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this); //DDB.Page ("Parms"); DDB.Text (""); DDB.Visibility(NM_Dynamic|SM_All|HM_All); BuildDataDefnElevation(DDB); DDB.Text(""); DDB.Double ("BeltSpeed", "", DC_Ldt, "m/s", xidBeltSpeed, this, isResult); DDB.Visibility(); DDB.Double ("Length", "L", DC_L, "m", xidBeltLength, this, isParm); DDB.Visibility(NM_Dynamic|SM_All|HM_All); DDB.Double ("MaxSpeed", "", DC_Ldt, "m/s", &m_MaxVelocity, this, isParm); DDB.Double ("MaxLoading", "MaxSpillLoad", DC_MpL, "kg/m", &m_MaxSpillLoading, this, isParm); DDB.Double ("MinLoading", "", DC_MpL, "kg/m", &m_MinLoading, this, isParm|InitHidden); DDB.Long ("MaxTurndown", "", DC_, "", &m_MaxTurnDown, this, isParm|InitHidden); DDB.Visibility(NM_Dynamic|SM_All|HM_All); DDB.Double ("", "MaxStallLoad", DC_M, "kg", &m_MaxStallLoading, this, isParm); DDB.CheckBox("", "StartIfStalled", DC_, "", &m_fStartIfStalled, this, isParm); DDB.Byte ("", "WasRunning", DC_, "", &m_fWasRunning, this, isResult|InitHidden); DDB.Double ("TotalMass", "", DC_M, "kg", xidTotalMass, this, isResult); DDB.Double ("AvgLoading", "", DC_MpL, "kg/m", xidAvgLoading, this, isResult); if (OrigPrjFileVerNo()<90 && DDB.ForFileSnpScn()) DDB.String ("SpillArea", "", DC_, "", &m_sAreaTag, this, isParmStopped); DDB.Double ("TotalSpilt", "", DC_M, "kg", xidTotSpilt, this, isParm); DDB.Double ("TotalVented", "", DC_M, "kg", xidTotVented, this, isParm); DDB.Page("BeltDrive", DDB_RqdPage); DDB.Text ("Power Draw"); DDB.Double ("NoLoadPower", "", DC_Pwr, "kW", &m_NLPower, this, isParm); DDB.Double ("FullLoadPower","", DC_Pwr, "kW", &m_FLPower, this, isParm); DDB.Double ("Power", "", DC_Pwr, "kW", &m_Power, this, isResult); DDB.Text(""); m_Pwr.BuildDataDefn(DDB); m_BeltSB.BuildDataDefn(DDB, this, "Speed", 1); DDB.Visibility(); DDB.Text(""); DDB.Long ("NoWtMtrs", "", DC_, "", xidNWtMtrs, this, isParm); static DDBValueLst DDB1[] = { {QPT_None, "None" }, {QPT_FixedPts, "Fixed Points"}, {QPT_AllSections, "All Section Pts"}, {QPT_MinSections, "Min Section Pts"}, {0}}; DDB.CheckBox("ShowProfile", "", DC_, "", xidShowProf, this, isParm|SetOnChange); DDB.Visibility(NM_Dynamic|SM_All|HM_All, m_fShowProfile); DDB.Long ("ProfDispType", "", DC_, "", xidProfDispType, this, isParm, DDB1); //DDB.Visibility(NM_Dynamic|SM_All|HM_All, m_fShowProfile && m_ProfDispType==QPT_FixedPts); //DDB.Long ("ProfilePts", "", DC_, "", xidProfPts, this, isParm); DDB.Visibility(NM_Dynamic|SM_All|HM_All); DDB.Long ("NSections", "", DC_, "", xidNSections, this, isResult); if (DDB.BeginStruct(this, "MinSect", 0, DDB_NoPage)) { DDB.Double ("Length", "", DC_Frac, "%", &m_Q.m_dMinFracSectLen, this, isParm); DDB.Visibility(NM_Dynamic|SM_All|HM_All, m_Q.m_dMinFracSectLen>0); DDB.Double ("LoadTol", "", DC_Frac, "%", &m_Q.m_dLoadTol, this, isParm); DDB.Double ("TempTol", "", DC_Frac, "%", &m_Q.m_dTempTol, this, isParm); DDB.Double ("MFracTol", "", DC_Frac, "%", &m_Q.m_dMFracTol, this, isParm); } DDB.EndStruct(); DDB.Text(""); BuildDataDefnShowIOs(DDB); if (m_WtMtrPos.GetSize()) { DDB.Page("WtMtrs", DDB_RqdPage); if (DDB.BeginArray(this, "WtMtr", "WtMtr", m_WtMtrPos.GetSize(), 0)) { for (int i=0; i<m_WtMtrPos.GetSize(); i++) if (DDB.BeginElement(this, i)) { DDB.Double("Pos", "", DC_L , "m", xidWtrMtrPos0+i, this, isParm); DDB.Double("Loading", "", DC_MpL, "kg/m", xidWtrMtrLd0+i, this, isResult|0); DDB.Double("Rate", "", DC_Qm, "kg/s", xidWtrMtrRate0+i, this, isResult|0); DDB.Text(""); } } DDB.EndArray(); } int FdLst[MaxIOList], PrLst[MaxIOList]; int nFd=0, nPr=0; for (int i=0; i<NoFlwIOs(); i++) if (IOId_Self(i)==idFeed) FdLst[nFd++]=i; else if (IOId_Self(i)==idProd) PrLst[nPr++]=i; int DoOld=((!DDB.ForFiling() && !DDB.ForSnapShot() && !DDB.ForScenario() && !DDB.ForView()) || (DDB.ForFiling() && DDB.DoingPutData())); Strng Nm; DDB.Page("Feeds", DDB_RqdPage); if (DDB.BeginArray(this, "Fd", "BltCnvFd", nFd, 0)) for (i=0; i<nFd; i++) if (DDB.BeginElement(this, Nd_Rmt(FdLst[i])->FullObjTag())) { DDB.Double ("Pos", "", DC_L , "m", xidFeedPos0+i, this, isParm); DDB.Visibility(NM_Dynamic|SM_All|HM_All); DDB.CheckBoxBtn("Limited", "", DC_, "", xidFeedLimited0+i, this, isParm); DDB.Visibility(NM_Dynamic|SM_All|HM_All, m_Q.FeedLimited(i)); DDB.Double ("Capacity", "", DC_Frac, "%", xidFeedCapFrac0+i, this, isParm); DDB.Visibility(); DDB.Double ("Qm", "", DC_Qm , "kg/s", xidFeedQm0+i, this, 0); DDB.Text(""); if (DoOld) { DDB.BeginElement(this, i); DDB.Double("Pos", "", DC_L , "m", xidFeedPos0+i, this, isParm); DDB.Double("Qm", "", DC_Qm , "kg/s", xidFeedQm0+i, this, 0); } } DDB.EndArray(); DDB.Page("Products", DDB_RqdPage); if (DDB.BeginArray(this, "Pr", "BltCnvPr", nPr, 0)) for (i=0; i<nPr; i++) if (DDB.BeginElement(this, Nd_Rmt(PrLst[i])->FullObjTag())) { DDB.Double("Pos", "", DC_L , "m", xidProdPos0+i, this, isParm); DDB.Double("Removal","", DC_Frac , "%", xidProdRemove0+i, this, isParm); DDB.Double("Qm", "", DC_Qm , "kg/s", xidProdQm0+i, this, 0); DDB.Double("Loss", "", DC_Qm , "kg/s", xidProdLoss0+i, this, 0); DDB.Text(""); if (DoOld) { DDB.BeginElement(this, i); //DDB.TagComment(Nd_Rmt(PrLst[i])->FullObjTag()); //DDB.BeginElement(this, Nd_Rmt(PrLst[i])->FullObjTag()); DDB.Double("Pos", "", DC_L , "m", xidProdPos0+i, this, isParm); DDB.Double("Removal","", DC_Frac , "%", xidProdRemove0+i, this, isParm); DDB.Double("Qm", "", DC_Qm , "kg/s", xidProdQm0+i, this, 0); DDB.Double("Loss", "", DC_Qm , "kg/s", xidProdLoss0+i, this, 0); } } DDB.EndArray(); if (m_fShowProfile) DDB.Object(&m_Q.Profile(), this); //BuildDataDefnAreaIOs(DDB); DDB.EndStruct(); };