当前位置: 首页>>代码示例>>C++>>正文


C++ DataDefnBlk::Page方法代码示例

本文整理汇总了C++中DataDefnBlk::Page方法的典型用法代码示例。如果您正苦于以下问题:C++ DataDefnBlk::Page方法的具体用法?C++ DataDefnBlk::Page怎么用?C++ DataDefnBlk::Page使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataDefnBlk的用法示例。


在下文中一共展示了DataDefnBlk::Page方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: BuildDataDefn

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();
  };
开发者ID:abcweizhuo,项目名称:Test3,代码行数:25,代码来源:MG_SEP.CPP

示例2: BuildDataDefn

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);
//
//.........这里部分代码省略.........
开发者ID:ChrisMoreton,项目名称:Test3,代码行数:101,代码来源:Actuator.cpp

示例3: BuildDataDefn

/*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()) ||
//.........这里部分代码省略.........
开发者ID:ChrisMoreton,项目名称:Test3,代码行数:101,代码来源:BELTCNV.CPP

示例4:

void Sys13::BuildDataDefn(DataDefnBlk & DDB)
  {
  DDB.BeginStruct(this);

  DDB.Page("Page 1");
  DDB.Bool      ("PKA1301A.Auto",    "",      DC_,      "",       &bPKA1301A     ,this  ,isParm);
  DDB.Bool      ("PKA1301B.Auto",    "",      DC_,      "",       &bPKA1301B     ,this  ,isParm);
  DDB.Bool      ("UHA1301A.Auto",    "",      DC_,      "",       &bUHA1301A     ,this  ,isParm);
  DDB.Bool      ("UHA1301B.Auto",    "",      DC_,      "",       &bUHA1301B     ,this  ,isParm);
  DDB.Text(" ");
  DDB.Double    ("VLVin_Posn",       "",      DC_Frac,  "%",      &VLVin_Posn    ,this  ,isParm);
  DDB.Text(" ");
  DDB.Double    ("VGA1301.LvlSet",   "",      DC_Frac,  "%",      &VGA1301_LvlSet,this  ,isParm);
  DDB.Double    ("VGA1301.Lvl",      "",      DC_Frac,  "%",      &VGA1301_Lvl   ,this  ,0);
  DDB.Double    ("VGA1301.P",        "",      DC_P,     "kPa",    &VGA1301_P     ,this  ,0);
  DDB.Double    ("VGA1301.T",        "",      DC_T,     "C",      &VGA1301_T     ,this  ,0);
  DDB.Text(" ");
  DDB.Double    ("HBA1301.LvlSet",   "",      DC_Frac,  "%",      &HBA1301_LvlSet,this  ,isParm);
  DDB.Double    ("HBA1301.Lvl",      "",      DC_Frac,  "%",      &HBA1301_Lvl   ,this  ,0);
  DDB.Double    ("HBA1301.P",        "",      DC_P,     "kPa",    &HBA1301_P     ,this  ,0);
  DDB.Double    ("HBA1301.T",        "",      DC_T,     "C",      &HBA1301_T     ,this  ,0);
  DDB.Text(" ");
  DDB.Double    ("VBA1301.Lvl",      "",      DC_Frac,  "%",      &VBA1301_Lvl   ,this  ,0);
  DDB.Double    ("VBA1301.T",        "",      DC_T,     "C",      &VBA1301_T     ,this  ,0);
  DDB.Text(" ");
  //DDB.Double    ("VB1001.LvlSet",    "",      DC_Frac,  "%",      &VB1001_LvlSet ,this  ,isParm);
  //DDB.Double    ("VB1001.Lvl",       "",      DC_Frac,  "%",      &VB1001_Lvl    ,this  ,0);
  //DDB.Double    ("FEA13050.Qm",      "",      DC_Qm,    "kg/s",   &FEA13050_Qm   ,this  ,0);
  DDB.Text(" ");
  DDB.Double    ("QmBoil",           "",      DC_Qm,    "kg/s",   &QmBoil        ,this  ,isParm);
  DDB.Double    ("QmCirc",           "",      DC_Qm,    "kg/s",   &QmCirc        ,this  ,isParm);
  DDB.Double    ("QmXfer",           "",      DC_Qm,    "kg/s",   &QmXfer        ,this  ,isParm);
  DDB.Double    ("QmFill",           "",      DC_Qm,    "kg/s",   &QmFill        ,this  ,isParm);
  DDB.Double    ("QmSetl",           "",      DC_Qm,    "kg/s",   &QmSetl        ,this  ,isParm);
  DDB.Double    ("QmRich",           "",      DC_Qm,    "kg/s",   &QmRich        ,this  ,0);
  DDB.Double    ("QmLean",           "",      DC_Qm,    "kg/s",   &QmLean        ,this  ,0);
  DDB.Text(" ");
  DDB.Double    ("Q1m",              "",      DC_Qm,    "kg/s",   &Q1m           ,this  ,0);
  DDB.Double    ("Q2m",              "",      DC_Qm,    "kg/s",   &Q2m           ,this  ,0);
  DDB.Double    ("Q3m",              "",      DC_Qm,    "kg/s",   &Q3m           ,this  ,0);
  DDB.Double    ("Q4m",              "",      DC_Qm,    "kg/s",   &Q4m           ,this  ,0);
  DDB.Double    ("Q5m",              "",      DC_Qm,    "kg/s",   &Q5m           ,this  ,0);
  DDB.Double    ("Q6m",              "",      DC_Qm,    "kg/s",   &Q6m           ,this  ,0);
  DDB.Double    ("Q7m",              "",      DC_Qm,    "kg/s",   &Q7m           ,this  ,0);
  DDB.Text(" ");
  DDB.Page("Page 2");
  DDB.Bool      ("LC13111.Auto",     "",      DC_,      "",       &bLC13111     ,this   ,isParm);
  DDB.Bool      ("LC13114.Auto",     "",      DC_,      "",       &bLC13114     ,this   ,isParm);
  DDB.Bool      ("LC13117.Auto",     "",      DC_,      "",       &bLC13117     ,this   ,isParm);
  DDB.Bool      ("LC13120.Auto",     "",      DC_,      "",       &bLC13120     ,this   ,isParm);
  DDB.Bool      ("PK1302A.Auto",     "",      DC_,      "",       &bPK1302A     ,this   ,isParm);
  DDB.Bool      ("PK1302B.Auto",     "",      DC_,      "",       &bPK1302B     ,this   ,isParm);
  DDB.Text(" ");
  DDB.Text(" ");
  DDB.Double    ("VH1301.Lvl",       "",      DC_Frac,  "%",      &VH1301_Lvl   ,this   ,0);
  DDB.Double    ("VH1301.T",         "",      DC_T,     "C",      &VH1301_T     ,this   ,0);
  DDB.Double    ("VH1302.Lvl",       "",      DC_Frac,  "%",      &VH1302_Lvl   ,this   ,0);
  DDB.Double    ("VH1302.T",         "",      DC_T,     "C",      &VH1302_T     ,this   ,0);
  DDB.Text(" ");
  DDB.Double    ("Q8m",              "",      DC_Qm,    "kg/s",   &Q8m          ,this   ,0);
  DDB.Double    ("Q9m",              "",      DC_Qm,    "kg/s",   &Q9m          ,this   ,0);
  DDB.Double    ("Qam",              "",      DC_Qm,    "kg/s",   &Qam          ,this   ,0);
  DDB.Double    ("Qbm",              "",      DC_Qm,    "kg/s",   &Qbm          ,this   ,0);
  DDB.Double    ("Qcm",              "",      DC_Qm,    "kg/s",   &Qcm          ,this   ,0);
  DDB.Text(" ");

//  if (PrjFileVerNo()<24)
//    {
    VGA1301.BuildDataDefn(DDB);
    HBA1301.BuildDataDefn(DDB);
    VBA1301.BuildDataDefn(DDB);
    VH1301.BuildDataDefn(DDB);
    VH1302.BuildDataDefn(DDB);
    TEGStore.BuildDataDefn(DDB);
//    }
//  else
//    {
//    DDB.Object(&VGA1301 , this, NULL, NULL, DDB_OptPage);
//    DDB.Object(&HBA1301 , this, NULL, NULL, DDB_OptPage);
//    DDB.Object(&VBA1301 , this, NULL, NULL, DDB_OptPage);
//    DDB.Object(&VH1301  , this, NULL, NULL, DDB_OptPage);
//    DDB.Object(&VH1302  , this, NULL, NULL, DDB_OptPage);
//    DDB.Object(&TEGStore, this, NULL, NULL, DDB_OptPage);
//    }

  DDB.EndStruct();
  };
开发者ID:abcweizhuo,项目名称:Test3,代码行数:87,代码来源:MG_SYS13.CPP


注:本文中的DataDefnBlk::Page方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。