• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ dbGetFieldIndex函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中dbGetFieldIndex函数的典型用法代码示例。如果您正苦于以下问题:C++ dbGetFieldIndex函数的具体用法?C++ dbGetFieldIndex怎么用?C++ dbGetFieldIndex使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: get_control_double

static long get_control_double(DBADDR *paddr, struct dbr_ctrlDouble *pcd)
{
    subArrayRecord *prec = (subArrayRecord *) paddr->precord;

    switch (dbGetFieldIndex(paddr)) {
    case subArrayRecordVAL:
        pcd->upper_ctrl_limit = prec->hopr;
        pcd->lower_ctrl_limit = prec->lopr;
        break;

    case subArrayRecordINDX:
        pcd->upper_ctrl_limit = prec->malm - 1;
        pcd->lower_ctrl_limit = 0;
        break;

    case subArrayRecordNELM:
        pcd->upper_ctrl_limit = prec->malm;
        pcd->lower_ctrl_limit = 1;
        break;

    default:
        recGblGetControlDouble(paddr, pcd);
    }

    return 0;
}
开发者ID:ukaea,项目名称:epics,代码行数:26,代码来源:subArrayRecord.c


示例2: get_graphic_double

static long get_graphic_double(DBADDR *paddr, struct dbr_grDouble *pgd)
{
    subArrayRecord *prec = (subArrayRecord *) paddr->precord;

    switch (dbGetFieldIndex(paddr)) {
    case subArrayRecordVAL:
        pgd->upper_disp_limit = prec->hopr;
        pgd->lower_disp_limit = prec->lopr;
        break;

    case subArrayRecordINDX:
        pgd->upper_disp_limit = prec->malm - 1;
        pgd->lower_disp_limit = 0;
        break;

    case subArrayRecordNELM:
        pgd->upper_disp_limit = prec->malm;
        pgd->lower_disp_limit = 1;
        break;

    default:
        recGblGetGraphicDouble(paddr, pgd);
    }

    return 0;
}
开发者ID:ukaea,项目名称:epics,代码行数:26,代码来源:subArrayRecord.c


示例3: get_control_double

static long get_control_double(DBADDR *paddr,struct dbr_ctrlDouble *pcd)
{
    longoutRecord *prec=(longoutRecord *)paddr->precord;

    switch (dbGetFieldIndex(paddr)) {
        case indexof(VAL):
        case indexof(HIHI):
        case indexof(HIGH):
        case indexof(LOW):
        case indexof(LOLO):
        case indexof(LALM):
        case indexof(ALST):
        case indexof(MLST):
            /* do not change pre drvh/drvl behavior */
            if(prec->drvh > prec->drvl) {
                pcd->upper_ctrl_limit = prec->drvh;
                pcd->lower_ctrl_limit = prec->drvl;
            } else {
                pcd->upper_ctrl_limit = prec->hopr;
                pcd->lower_ctrl_limit = prec->lopr;
            }
            break;
        default:
            recGblGetControlDouble(paddr,pcd);
    }
    return(0);
}
开发者ID:A2-Collaboration,项目名称:epics,代码行数:27,代码来源:longoutRecord.c


示例4: get_graphic_double

static long get_graphic_double(DBADDR *paddr, struct dbr_grDouble *pgd)
{
    subRecord *prec = (subRecord *)paddr->precord;
    int fieldIndex = dbGetFieldIndex(paddr);

    switch (fieldIndex) {
    case subRecordVAL:
    case subRecordHIHI:     case subRecordHIGH:
    case subRecordLOW:      case subRecordLOLO:
    case subRecordA:        case subRecordB:
    case subRecordC:        case subRecordD:
    case subRecordE:        case subRecordF:
    case subRecordG:        case subRecordH:
    case subRecordI:        case subRecordJ:
    case subRecordK:        case subRecordL:
    case subRecordLA:       case subRecordLB:
    case subRecordLC:       case subRecordLD:
    case subRecordLE:       case subRecordLF:
    case subRecordLG:       case subRecordLH:
    case subRecordLI:       case subRecordLJ:
    case subRecordLK:       case subRecordLL:
        pgd->upper_disp_limit = prec->hopr;
        pgd->lower_disp_limit = prec->lopr;
        break;

    default:
        recGblGetGraphicDouble(paddr, pgd);
    }
    return 0;
}
开发者ID:ISISComputingGroup,项目名称:EPICS-base,代码行数:30,代码来源:subRecord.c


示例5: get_control_double

static long get_control_double(struct dbAddr *paddr,
                               struct dbr_ctrlDouble *pcd)
{
    epidRecord   *pepid=(epidRecord *)paddr->precord;
    int fieldIndex = dbGetFieldIndex(paddr);

    if (
        fieldIndex == epidRecordVAL
        || fieldIndex == epidRecordHIHI
        || fieldIndex == epidRecordHIGH
        || fieldIndex == epidRecordLOW
        || fieldIndex == epidRecordLOLO
        || fieldIndex == epidRecordCVAL) {
        pcd->upper_ctrl_limit = pepid->hopr;
        pcd->lower_ctrl_limit = pepid->lopr;
    } else if (
        fieldIndex == epidRecordOVAL
        || fieldIndex == epidRecordP
        || fieldIndex == epidRecordI
        || fieldIndex == epidRecordD) {
        pcd->upper_ctrl_limit = pepid->drvh;
        pcd->lower_ctrl_limit = pepid->drvl;
    } else recGblGetControlDouble(paddr,pcd);
    return(0);
}
开发者ID:epics-modules,项目名称:std,代码行数:25,代码来源:epidRecord.c


示例6: get_control_double

static long get_control_double(dbAddr *paddr, struct dbr_ctrlDouble *pcd)
{
	acalcoutRecord	*pcalc=(acalcoutRecord *)paddr->precord;
	int fieldIndex = dbGetFieldIndex(paddr);

	switch (fieldIndex) {
	case acalcoutRecordVAL:
	case acalcoutRecordHIHI:
	case acalcoutRecordHIGH:
	case acalcoutRecordLOW:
	case acalcoutRecordLOLO:
		pcd->upper_ctrl_limit = pcalc->hopr;
		pcd->lower_ctrl_limit = pcalc->lopr;
		return(0);
	default:
		break;
    } 

	if (fieldIndex >= acalcoutRecordA && fieldIndex <= acalcoutRecordL) {
		pcd->upper_ctrl_limit = pcalc->hopr;
		pcd->lower_ctrl_limit = pcalc->lopr;
		return(0);
	}
	if (fieldIndex >= acalcoutRecordPA && fieldIndex <= acalcoutRecordPL) {
		pcd->upper_ctrl_limit = pcalc->hopr;
		pcd->lower_ctrl_limit = pcalc->lopr;
		return(0);
	}
	return(0);
}
开发者ID:ukaea,项目名称:epics,代码行数:30,代码来源:aCalcoutRecord.c


示例7: get_graphic_double

/*****************************************************************************
 *
 * Allow for only sensible values for displays
 *
 ******************************************************************************/
static long get_graphic_double(DBADDR *paddr, struct dbr_grDouble *pgd)
{
    vsRecord *pvs = (vsRecord *)paddr->precord;
    int	fieldIndex = dbGetFieldIndex(paddr);
    
    if (fieldIndex == vsRecordVAL || fieldIndex == vsRecordPRES) {
	pgd->upper_disp_limit = pvs->hopr;
	pgd->lower_disp_limit = pvs->lopr;
    } else if (fieldIndex == vsRecordCGAP) {
	pgd->upper_disp_limit = pvs->hapr;
	pgd->lower_disp_limit = pvs->lapr;
    } else if (fieldIndex == vsRecordCGBP) {
	pgd->upper_disp_limit = pvs->hbpr;
	pgd->lower_disp_limit = pvs->lbpr;
    } else if (fieldIndex == vsRecordLPRS) {
	pgd->upper_disp_limit = pvs->hlpr;
	pgd->lower_disp_limit = pvs->llpr;
    } else if (fieldIndex == vsRecordLCAP) {
	pgd->upper_disp_limit = pvs->halr;
	pgd->lower_disp_limit = pvs->lalr;
    } else if (fieldIndex == vsRecordLCBP) {
	pgd->upper_disp_limit = pvs->hblr;
	pgd->lower_disp_limit = pvs->lblr;
    } else
	recGblGetGraphicDouble(paddr, pgd);
    return (0);
}
开发者ID:epics-modules,项目名称:vac,代码行数:32,代码来源:vsRecord.c


示例8: get_graphic_double

static long get_graphic_double(DBADDR *paddr, struct dbr_grDouble *pgd)
{
    subRecord *prec = (subRecord *)paddr->precord;
    int fieldIndex = dbGetFieldIndex(paddr);
    int linkNumber;
    
    switch (fieldIndex) {
        case indexof(VAL):
        case indexof(HIHI):
        case indexof(HIGH):
        case indexof(LOW):
        case indexof(LOLO):
        case indexof(LALM):
        case indexof(ALST):
        case indexof(MLST):
            pgd->lower_disp_limit = prec->lopr;
            pgd->upper_disp_limit = prec->hopr;
            break;
        default:
            linkNumber = get_linkNumber(fieldIndex);
            if (linkNumber >= 0) {
                dbGetGraphicLimits(&prec->inpa + linkNumber,
                    &pgd->lower_disp_limit,
                    &pgd->upper_disp_limit);
            } else
                recGblGetGraphicDouble(paddr,pgd);
    }
    return 0;
}
开发者ID:epicsdeb,项目名称:epics-base,代码行数:29,代码来源:subRecord.c


示例9: get_precision

static long get_precision(DBADDR *paddr, long *pprecision)
{
    calcoutRecord *prec = (calcoutRecord *)paddr->precord;
    int fieldIndex = dbGetFieldIndex(paddr);
    int linkNumber;

    if (fieldIndex == indexof(ODLY)) {
        *pprecision = calcoutODLYprecision;
        return 0;
    }

    *pprecision = prec->prec;
    if (fieldIndex == indexof(VAL))
        return 0;

    linkNumber = get_linkNumber(fieldIndex);
    if (linkNumber >= 0) {
        short precision;

        if (dbGetPrecision(&prec->inpa + linkNumber, &precision) == 0)
            *pprecision = precision;
    } else
        recGblGetPrec(paddr, pprecision);
    return 0;
}
开发者ID:epicsdeb,项目名称:epics-base,代码行数:25,代码来源:calcoutRecord.c


示例10: get_control_double

static long get_control_double(DBADDR *paddr, struct dbr_ctrlDouble *pcd)
{
    calcoutRecord *prec = (calcoutRecord *)paddr->precord;
    
    switch (dbGetFieldIndex(paddr)) {
        case indexof(VAL):
        case indexof(HIHI):
        case indexof(HIGH):
        case indexof(LOW):
        case indexof(LOLO):
        case indexof(LALM):
        case indexof(ALST):
        case indexof(MLST):
            pcd->lower_ctrl_limit = prec->lopr;
            pcd->upper_ctrl_limit = prec->hopr;
            break;
        case indexof(ODLY):
            pcd->lower_ctrl_limit = 0.0;
            pcd->upper_ctrl_limit = calcoutODLYlimit;
            break;
        default:
            recGblGetControlDouble(paddr,pcd);
    }
    return 0;
}
开发者ID:epicsdeb,项目名称:epics-base,代码行数:25,代码来源:calcoutRecord.c


示例11: cvt_dbaddr

static long cvt_dbaddr(DBADDR *paddr)
{
    aSubRecord *prec = (aSubRecord *)paddr->precord;
    int fieldIndex = dbGetFieldIndex(paddr);

    if (fieldIndex >= aSubRecordA &&
        fieldIndex <= aSubRecordU) {
        int offset = fieldIndex - aSubRecordA;

        paddr->pfield      = (&prec->a  )[offset];
        paddr->no_elements = (&prec->noa)[offset];
        paddr->field_type  = (&prec->fta)[offset];
    }
    else if (fieldIndex >= aSubRecordVALA &&
             fieldIndex <= aSubRecordVALU) {
        int offset = fieldIndex - aSubRecordVALA;

        paddr->pfield      = (&prec->vala)[offset];
        paddr->no_elements = (&prec->nova)[offset];
        paddr->field_type  = (&prec->ftva)[offset];
    }
    else {
        errlogPrintf("aSubRecord::cvt_dbaddr called for %s\n",
            prec->name);
        return 0;
    }
    paddr->dbr_field_type = paddr->field_type;
    paddr->field_size     = dbValueSize(paddr->field_type);
    return 0;
}
开发者ID:paulscherrerinstitute,项目名称:mrfioc2,代码行数:30,代码来源:aSubRecord.c


示例12: get_array_info

static long get_array_info(struct dbAddr *paddr, long *no_elements, long *offset)
{
	acalcoutRecord	*pcalc = (acalcoutRecord *) paddr->precord;
    int				i, fieldIndex = dbGetFieldIndex(paddr);
	double			**ppd;

	if (aCalcoutRecordDebug >= 20) printf("acalcoutRecord(%s):get_array_info: paddr->pfield = %p\n",
		pcalc->name, (void *)paddr->pfield);

	if ((fieldIndex>=acalcoutRecordAA) && (fieldIndex<=acalcoutRecordLL)) {
		i = fieldIndex-acalcoutRecordAA;
		ppd = &(pcalc->aa);
		if (ppd[i] == NULL) {
			if (aCalcoutRecordDebug) printf("acalcoutRecord(%s):get_array_info: allocating for field %c%c\n",
				pcalc->name, (int)('A'+i), (int)('A'+i));
			ppd[i] = (double *)calloc(pcalc->nelm, sizeof(double));
		}
	}
	if ((fieldIndex==acalcoutRecordAVAL) && (pcalc->aval == NULL)) {
		pcalc->aval = (double *)calloc(pcalc->nelm, sizeof(double));
	}
	if ((fieldIndex==acalcoutRecordOAV) && (pcalc->oav == NULL)) {
		pcalc->oav = (double *)calloc(pcalc->nelm, sizeof(double));
	}
    *no_elements = acalcGetNumElements( pcalc );
    *offset = 0;
    return(0);
}
开发者ID:ukaea,项目名称:epics,代码行数:28,代码来源:aCalcoutRecord.c


示例13: cvt_dbaddr

static long cvt_dbaddr(DBADDR *paddr)
{
    lsoRecord *prec = (lsoRecord *) paddr->precord;
    int fieldIndex = dbGetFieldIndex(paddr);

    if (fieldIndex == lsoRecordVAL) {
        paddr->pfield = prec->val;
        paddr->special = SPC_MOD;
    }
    else if (fieldIndex == lsoRecordOVAL) {
        paddr->pfield  = prec->oval;
        paddr->special = SPC_NOMOD;
    }
    else {
        errlogPrintf("lsoRecord::cvt_dbaddr called for %s.%s\n",
            prec->name, paddr->pfldDes->name);
        return -1;
    }

    paddr->no_elements    = 1;
    paddr->field_type     = DBF_STRING;
    paddr->dbr_field_type = DBF_STRING;
    paddr->field_size     = prec->sizv;
    return 0;
}
开发者ID:A2-Collaboration,项目名称:epics,代码行数:25,代码来源:lsoRecord.c


示例14: get_precision

static long get_precision(DBADDR *paddr, long *precision)
{
    if(dbGetFieldIndex(paddr) == indexof(HIGH))
        *precision = boHIGHprecision;
    else
        recGblGetPrec(paddr,precision);
    return(0);
}
开发者ID:epicsdeb,项目名称:epics-base,代码行数:8,代码来源:boRecord.c


示例15: get_array_info

LOCAL long get_array_info(struct dbAddr *paddr,long *no_elements,long *offset)
{
    ab1771IXRecord *precord;
    recordPvt           *precordPvt;

    precord = (ab1771IXRecord *)paddr->precord;
    precordPvt = (recordPvt *)precord->dpvt;
    if(dbGetFieldIndex(paddr)==ab1771IXRecordINPM) {
	*no_elements = NUM_WORDS_IN;
	*offset = 0;
    } else if(dbGetFieldIndex(paddr)==ab1771IXRecordOUTM) {
	*no_elements = NUM_WORDS_OUT;
	*offset = 0;
    } else {
	errlogPrintf("%s get_array_info for illegal field\n",precord->name);
    }
    return(0);
}
开发者ID:A2-Collaboration,项目名称:epics,代码行数:18,代码来源:ab1771IXRecord.c


示例16: get_control_double

static long get_control_double(DBADDR *paddr,struct dbr_ctrlDouble *pcd)
{
    if(dbGetFieldIndex(paddr) == indexof(HIGH)) {
        pcd->lower_ctrl_limit = 0.0;
        pcd->upper_ctrl_limit = boHIGHlimit;
    } else
        recGblGetControlDouble(paddr,pcd);
    return(0);
}
开发者ID:epicsdeb,项目名称:epics-base,代码行数:9,代码来源:boRecord.c


示例17: get_precision

static long get_precision(dbAddr *paddr, long *precision)
{
	acalcoutRecord	*pcalc=(acalcoutRecord *)paddr->precord;
	int fieldIndex = dbGetFieldIndex(paddr);

	*precision = pcalc->prec;
	if (fieldIndex == acalcoutRecordVAL) return(0);
	recGblGetPrec(paddr,precision);
	return(0);
}
开发者ID:ukaea,项目名称:epics,代码行数:10,代码来源:aCalcoutRecord.c


示例18: get_graphic_double

static long get_graphic_double(DBADDR *paddr, struct dbr_grDouble *pgd)
{
    waveformRecord *prec = (waveformRecord *) paddr->precord;

    if (dbGetFieldIndex(paddr) == waveformRecordVAL) {
        pgd->upper_disp_limit = prec->hopr;
        pgd->lower_disp_limit = prec->lopr;
    } else
        recGblGetGraphicDouble(paddr, pgd);
    return 0;
}
开发者ID:zlxmsu,项目名称:epics,代码行数:11,代码来源:waveformRecord.c


示例19: get_precision

static long get_precision(DBADDR *paddr, long *precision)
{
    subRecord *prec = (subRecord *)paddr->precord;
    int fieldIndex = dbGetFieldIndex(paddr);

    *precision = prec->prec;
    if (fieldIndex != subRecordVAL)
        recGblGetPrec(paddr, precision);

    return 0;
}
开发者ID:ISISComputingGroup,项目名称:EPICS-base,代码行数:11,代码来源:subRecord.c


示例20: get_precision

static long get_precision(struct dbAddr *paddr, long *precision)
{
    struct epidRecord   *pepid=(struct epidRecord *)paddr->precord;
    int fieldIndex = dbGetFieldIndex(paddr);

    *precision = pepid->prec;
    if (fieldIndex == epidRecordVAL
            ||  fieldIndex == epidRecordCVAL) return(0);
    recGblGetPrec(paddr,precision);
    return(0);
}
开发者ID:epics-modules,项目名称:std,代码行数:11,代码来源:epidRecord.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ dbHolder函数代码示例发布时间:2022-05-30
下一篇:
C++ dbDelete函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap