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


C++ recGblRecordError函数代码示例

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


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

示例1: devAoNI6254_init_record

static long devAoNI6254_init_record(aoRecord *precord)
{
	ST_dpvt *pSTdpvt = (ST_dpvt*) malloc(sizeof(ST_dpvt));
	int i;

	switch(precord->out.type) {
		case INST_IO:
			strcpy(pSTdpvt->recordName, precord->name);
			i = sscanf(precord->out.value.instio.string, "%s %s %s",
					pSTdpvt->arg0, pSTdpvt->devName, pSTdpvt->arg1);

			kLog (K_INFO, "[devAoNI6254_init_record] %d: %s %s %s\n",
					i, pSTdpvt->devName, pSTdpvt->arg0, pSTdpvt->arg1);

			if (1 == i) {
				ST_MASTER *pMaster = get_master();
				pSTdpvt->pSTDdev = (ST_STD_device*) ellFirst(pMaster->pList_DeviceTask);
			}
			else if (3 == i) {
				pSTdpvt->pSTDdev = (ST_STD_device *)get_STDev_from_name(pSTdpvt->devName);
			}

			if (!pSTdpvt->pSTDdev) {
				recGblRecordError(S_db_badField, (void*) precord, 
						"devAoNI6254Control (init_record) Illegal INP field: task_name");
				free(pSTdpvt);
				precord->udf = TRUE;
				precord->dpvt = NULL;
				return S_db_badField;
			}

			break;

		default:
			recGblRecordError(S_db_badField,(void*) precord,
					"devAoNI6254Control (init_record) Illegal OUT field");
			free(pSTdpvt);
			precord->udf = TRUE;
			precord->dpvt = NULL;
			return S_db_badField;
	}

	if (!strcmp(pSTdpvt->arg0, AO_DAQ_BEAM_PULSE_STR)) {
		pSTdpvt->ind		= AO_DAQ_BEAM_PULSE;
		pSTdpvt->n32Arg0	= strtoul(pSTdpvt->arg1, NULL, 0);
	}
	else if (!strcmp(pSTdpvt->arg0, AO_INTEGRAL_STIME_STR)) {
		pSTdpvt->ind		= AO_INTEGRAL_STIME;
		pSTdpvt->n32Arg0	= strtoul(pSTdpvt->arg1, NULL, 0);
	}
	else if (!strcmp(pSTdpvt->arg0, AO_INTEGRAL_TIME_STR)) {
		pSTdpvt->ind		= AO_INTEGRAL_TIME;
		pSTdpvt->n32Arg0	= strtoul(pSTdpvt->arg1, NULL, 0);
	}

	precord->udf = FALSE;
	precord->dpvt = (void*) pSTdpvt;

	return 2;     /* don't convert */
}
开发者ID:Sangil-Lee,项目名称:RefCode,代码行数:60,代码来源:devNI6254.c

示例2: init_record

static long init_record(void *rec_p, int pass)
{
    rfmRecord   *precord  = (rfmRecord*)rec_p;
    rfmdset     *pdset    = NULL;
    long        status    = OK;

    if(pass==0) return status;

    /* check device entry table */
    if((pdset = (rfmdset*)(precord->dset)) == NULL) {
        recGblRecordError((status = S_dev_noDSET), precord, "rfm: init_record");
        return status;
    }

    /* must have read_rfm function defined */
    if((pdset->number<5) ||(pdset->read_rfm == NULL)) {
        recGblRecordError((status = S_dev_missingSup), precord, "rfm: init_record");
        return status;
    }

    /* execute device support level initialization */
    if(pdset->init_record) status = (*pdset->init_record)(precord);

    return status;
}
开发者ID:Sangil-Lee,项目名称:RefCode,代码行数:25,代码来源:rfmRecord.c

示例3: init_record

static long init_record(stringoutRecord *prec, int pass)
{
    STATIC_ASSERT(sizeof(prec->oval)==sizeof(prec->val));
    struct stringoutdset *pdset;
    long status=0;

    if (pass==0) return(0);

    if (prec->siml.type == CONSTANT) {
	recGblInitConstantLink(&prec->siml,DBF_USHORT,&prec->simm);
    }

    if(!(pdset = (struct stringoutdset *)(prec->dset))) {
	recGblRecordError(S_dev_noDSET,(void *)prec,"stringout: init_record");
	return(S_dev_noDSET);
    }
    /* must have  write_stringout functions defined */
    if( (pdset->number < 5) || (pdset->write_stringout == NULL) ) {
	recGblRecordError(S_dev_missingSup,(void *)prec,"stringout: init_record");
	return(S_dev_missingSup);
    }
    /* get the initial value dol is a constant*/
    if (prec->dol.type == CONSTANT){
	if(recGblInitConstantLink(&prec->dol,DBF_STRING,prec->val))
	    prec->udf=FALSE;
    }
    if( pdset->init_record ) {
	if((status=(*pdset->init_record)(prec))) return(status);
    }
    strcpy(prec->oval,prec->val);
    return(0);
}
开发者ID:zlxmsu,项目名称:TestEpics,代码行数:32,代码来源:stringoutRecord.c

示例4: init_record

/*****************************************************************************
 *
 * Init the record, then call the device support module to let it know that
 * this record intends on using it.
 *
 ******************************************************************************/
static long init_record(void *precord, int pass)
{
    vsRecord *pvs = (vsRecord *)precord;
    vsdset *pdset;
    long status;
        
    if (pass == 0) return (0);
    
    pvs->chgc = 0;

    if ( (pdset = (vsdset *)(pvs->dset) )== NULL) {
	recGblRecordError(S_dev_noDSET, (void *)pvs, "vs: init_record");
	return (S_dev_noDSET);
    }

    /*** must have readWrite_vs function defined ***/
    if ((pdset->number < 5) || (pdset->readWrite_vs == NULL)) {
	recGblRecordError(S_dev_missingSup, (void *)pvs, "vs: init_record");
	return (S_dev_missingSup);
    }
    
    
    /*** if everything is OK init the record ***/
    if (pdset->init_record) {
	if ((status = (*pdset->init_record) (pvs))) {
	    return (status);
	}
    }
    return (0);
}
开发者ID:epics-modules,项目名称:vac,代码行数:36,代码来源:vsRecord.c

示例5: init_record

static long init_record(subArrayRecord *prec, int pass)
{
    struct sadset *pdset;

    if (pass==0){
        if (prec->malm <= 0)
            prec->malm = 1;
        if (prec->ftvl > DBF_ENUM)
            prec->ftvl = DBF_UCHAR;
        prec->bptr = callocMustSucceed(prec->malm, dbValueSize(prec->ftvl),
            "subArrayRecord calloc failed");
        prec->nord = 0;
        return 0;
    }

    /* must have dset defined */
    if (!(pdset = (struct sadset *)(prec->dset))) {
        recGblRecordError(S_dev_noDSET,(void *)prec,"sa: init_record");
        return S_dev_noDSET;
    }

    /* must have read_sa function defined */
    if ( (pdset->number < 5) || (pdset->read_sa == NULL) ) {
        recGblRecordError(S_dev_missingSup,(void *)prec,"sa: init_record");
        return S_dev_missingSup;
    }

    if (pdset->init_record)
        return (*pdset->init_record)(prec);

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

示例6: init_record

static long init_record(stringinRecord *prec, int pass)
{
    STATIC_ASSERT(sizeof(prec->oval)==sizeof(prec->val));
    struct stringindset *pdset;
    long status;

    if (pass==0) return(0);

    if (prec->siml.type == CONSTANT) {
	recGblInitConstantLink(&prec->siml,DBF_USHORT,&prec->simm);
    }

    /* stringin.siol must be a CONSTANT or a PV_LINK or a DB_LINK */
    if (prec->siol.type == CONSTANT) {
        recGblInitConstantLink(&prec->siol,DBF_STRING,prec->sval);
    } 

    if(!(pdset = (struct stringindset *)(prec->dset))) {
	recGblRecordError(S_dev_noDSET,(void *)prec,"stringin: init_record");
	return(S_dev_noDSET);
    }
    /* must have read_stringin function defined */
    if( (pdset->number < 5) || (pdset->read_stringin == NULL) ) {
	recGblRecordError(S_dev_missingSup,(void *)prec,"stringin: init_record");
	return(S_dev_missingSup);
    }
    if( pdset->init_record ) {
	if((status=(*pdset->init_record)(prec))) return(status);
    }
    strcpy(prec->oval,prec->val);
    return(0);
}
开发者ID:ISISComputingGroup,项目名称:EPICS-base,代码行数:32,代码来源:stringinRecord.c

示例7: init_wf_wr

static long init_wf_wr(struct waveformRecord *pwf) {
    int parmOK = 0;

    if (pwf->inp.type!=VME_IO) {
        recGblRecordError(S_db_badField, (void *)pwf,
                          "devWfWrD212 Init_record, Illegal INP");
        pwf->pact=TRUE;
        return (S_db_badField);
    }

    pwf->dpvt = (void*) calloc(1, sizeof(recPrivate*));

    ((recPrivate*) pwf->dpvt)->pCard = getCardStruct(pwf->inp.value.vmeio.card);

    do {
        CHECK_WFPARM("WF_WR_1", CPCI_WF_WR_1);
    } while(0);

    if (!parmOK) {
        recGblRecordError(S_db_badField, (void *)pwf,
                      "devWfWrD212 Init_record, bad parm");
        pwf->pact=TRUE;
        return (S_db_badField);
    }

    if (pwf->ftvl != DBF_FLOAT) {
        recGblRecordError(S_db_badField, (void *)pwf,
                   "devWfWrD212 (init_record) Illegal FTVL field");
        return(S_db_badField);
    }

    return 0;
}
开发者ID:LongWei83,项目名称:CSNS-RCS-RF-IOC,代码行数:33,代码来源:devD212.c

示例8: init_record

static long init_record(longoutRecord *prec, int pass)
{
    struct longoutdset *pdset;
    long status=0;

    if (pass==0) return(0);
    if (prec->siml.type == CONSTANT) {
	recGblInitConstantLink(&prec->siml,DBF_USHORT,&prec->simm);
    }
    if(!(pdset = (struct longoutdset *)(prec->dset))) {
	recGblRecordError(S_dev_noDSET,(void *)prec,"longout: init_record");
	return(S_dev_noDSET);
    }
    /* must have  write_longout functions defined */
    if( (pdset->number < 5) || (pdset->write_longout == NULL) ) {
	recGblRecordError(S_dev_missingSup,(void *)prec,"longout: init_record");
	return(S_dev_missingSup);
    }
    if (prec->dol.type == CONSTANT) {
	if(recGblInitConstantLink(&prec->dol,DBF_LONG,&prec->val))
	    prec->udf=FALSE;
    }
    if( pdset->init_record ) {
	if((status=(*pdset->init_record)(prec))) return(status);
    }
    prec->mlst = prec->val;
    prec->alst = prec->val;
    prec->lalm = prec->val;
    return(0);
}
开发者ID:ISISComputingGroup,项目名称:EPICS-base,代码行数:30,代码来源:longoutRecord.c

示例9: init_record

static long init_record(mbbiRecord *prec, int pass)
{
    struct mbbidset *pdset;
    long status;

    if (pass==0) return(0);

    if (prec->siml.type == CONSTANT) {
	recGblInitConstantLink(&prec->siml,DBF_USHORT,&prec->simm);
    }
    if (prec->siol.type == CONSTANT) {
	recGblInitConstantLink(&prec->siol,DBF_USHORT,&prec->sval);
    }
    if(!(pdset = (struct mbbidset *)(prec->dset))) {
	recGblRecordError(S_dev_noDSET,(void *)prec,"mbbi: init_record");
	return(S_dev_noDSET);
    }
    /* must have read_mbbi function defined */
    if( (pdset->number < 5) || (pdset->read_mbbi == NULL) ) {
	recGblRecordError(S_dev_missingSup,(void *)prec,"mbbi: init_record");
	return(S_dev_missingSup);
    }
    /* initialize mask*/
    prec->mask = (1 << prec->nobt) - 1;

    if( pdset->init_record ) {
	if((status=(*pdset->init_record)(prec))) return(status);
    }
    init_common(prec);
    prec->mlst = prec->val;
    prec->lalm = prec->val;
    prec->oraw = prec->rval;
    return(0);
}
开发者ID:zlxmsu,项目名称:TestEpics,代码行数:34,代码来源:mbbiRecord.c

示例10: ai_init_record

static long ai_init_record(aiRecord* pr)
{
    int		i;
    char	*parm;
    pvtArea	*pvt = NULL;

	if(pr->inp.type!=INST_IO)
	{
		recGblRecordError(S_db_badField,(void*)pr,
			"devAiStats (init_record) Illegal INP field");
		return S_db_badField;
	}
	parm = pr->inp.value.instio.string;
	for(i=0;statsGetParms[i].name && pvt==NULL;i++)
	{
		if(strcmp(parm,statsGetParms[i].name)==0)
		{
			pvt=(pvtArea*)malloc(sizeof(pvtArea));
			pvt->index=i;
			pvt->type=statsGetParms[i].type;
		}
	}
	if(pvt==NULL)
	{
		recGblRecordError(S_db_badField,(void*)pr,
			"devAiStats (init_record) Illegal INP parm field");
		return S_db_badField;
	}

    /* Make sure record processing routine does not perform any conversion*/
    pr->linr=0;
    pr->dpvt=pvt;
    return 0;
}
开发者ID:Sangil-Lee,项目名称:RefCode,代码行数:34,代码来源:devVxStats.c

示例11: init_record

static long init_record(epidRecord *pepid, int pass)
{
    struct epidDSET *pdset;
    int status;

    if (pass==0) return(0);
    /* initialize the setpoint for constant setpoint */
    if (pepid->stpl.type == CONSTANT) {
        if(recGblInitConstantLink(&pepid->stpl,DBF_DOUBLE,&pepid->val))
            pepid->udf = FALSE;
    }

    /* must have dset defined */
    if (!(pdset = (struct epidDSET *)(pepid->dset))) {
        recGblRecordError(S_dev_noDSET,(void *)pepid,"epid: init_record1");
        return(S_dev_noDSET);
    }
    /* must have do_pid function defined */
    if ( (pdset->number < 5) || (pdset->do_pid == NULL) ) {
        recGblRecordError(S_dev_missingSup,(void *)pepid,"epid: init_record2");
        printf("%ld %p\n",pdset->number, pdset->do_pid);
        return(S_dev_missingSup);
    }
    if (pdset->init_record) {
        if ((status=(*pdset->init_record)(pepid))) return(status);
    }
    return(0);
}
开发者ID:epics-modules,项目名称:std,代码行数:28,代码来源:epidRecord.c

示例12: stringin_init_record

static long stringin_init_record(stringinRecord* pr)
{
    int		i;
    char	*parm;
    pvtArea	*pvt = NULL;

	if(pr->inp.type!=INST_IO)
	{
		recGblRecordError(S_db_badField,(void*)pr,
			"devStringinStats (init_record) Illegal INP field");
		return S_db_badField;
	}
	parm = pr->inp.value.instio.string;
	for(i=0;statsGetStrParms[i].name && pvt==NULL;i++)
	{
		if(strcmp(parm,statsGetStrParms[i].name)==0)
		{
			pvt=(pvtArea*)malloc(sizeof(pvtArea));
			pvt->index=i;
			pvt->type=statsGetStrParms[i].type;
		}
	}
	if(pvt==NULL)
	{
		recGblRecordError(S_db_badField,(void*)pr, 
		   "devStringinStats (init_record) Illegal INP parm field");
		return S_db_badField;
	}

    pr->dpvt=pvt;
    return 0;	/* success */
}
开发者ID:Sangil-Lee,项目名称:RefCode,代码行数:32,代码来源:devVxStats.c

示例13: init_ai

static long init_ai(aiRecord *prec)
{
    int i;

    if (prec->inp.type != INST_IO) {
        recGblRecordError(S_db_badField, (void *)prec,
                          "devAiGeneralTime::init_ai: Illegal INP field");
        prec->pact = TRUE;
        return S_db_badField;
    }

    for (i = 0; i < NELEMENTS(ai_channels); i++) {
        struct ai_channel *pchan = &ai_channels[i];
        if (!epicsStrCaseCmp(prec->inp.value.instio.string, pchan->name)) {
            prec->dpvt = pchan;
            return 0;
        }
    }

    recGblRecordError(S_db_badField, (void *)prec,
                      "devAiGeneralTime::init_ai: Bad parm");
    prec->pact = TRUE;
    prec->dpvt = NULL;
    return S_db_badField;
}
开发者ID:zlxmsu,项目名称:TestEpics,代码行数:25,代码来源:devGeneralTime.c

示例14: init_record

static long init_record(boRecord *prec,int pass)
{
    struct bodset *pdset;
    long status=0;
    myCallback *pcallback;

    if (pass==0) return(0);

    /* bo.siml must be a CONSTANT or a PV_LINK or a DB_LINK */
    if (prec->siml.type == CONSTANT) {
	recGblInitConstantLink(&prec->siml,DBF_USHORT,&prec->simm);
    }

    if(!(pdset = (struct bodset *)(prec->dset))) {
	recGblRecordError(S_dev_noDSET,(void *)prec,"bo: init_record");
	return(S_dev_noDSET);
    }
    /* must have  write_bo functions defined */
    if( (pdset->number < 5) || (pdset->write_bo == NULL) ) {
	recGblRecordError(S_dev_missingSup,(void *)prec,"bo: init_record");
	return(S_dev_missingSup);
    }
    /* get the initial value */
    if (prec->dol.type == CONSTANT) {
	unsigned short ival = 0;

	if(recGblInitConstantLink(&prec->dol,DBF_USHORT,&ival)) {
	    if (ival  == 0)  prec->val = 0;
	    else  prec->val = 1;
	    prec->udf = FALSE;
	}
    }

    pcallback = (myCallback *)(calloc(1,sizeof(myCallback)));
    prec->rpvt = (void *)pcallback;
    callbackSetCallback(myCallbackFunc,&pcallback->callback);
    callbackSetUser(pcallback,&pcallback->callback);
    pcallback->precord = (struct dbCommon *)prec;

    if( pdset->init_record ) {
	status=(*pdset->init_record)(prec);
	if(status==0) {
		if(prec->rval==0) prec->val = 0;
		else prec->val = 1;
		prec->udf = FALSE;
	} else if (status==2) status=0;
    }
    prec->mlst = prec->val;
    /* convert val to rval */
    if ( prec->mask != 0 ) {
	if(prec->val==0) prec->rval = 0;
	else prec->rval = prec->mask;
    } else prec->rval = (epicsUInt32)prec->val;

    prec->mlst = prec->val;
    prec->lalm = prec->val;
    prec->oraw = prec->rval;
    prec->orbv = prec->rbv;
    return(status);
}
开发者ID:epicsdeb,项目名称:epics-base,代码行数:60,代码来源:boRecord.c

示例15: devWaveNI6123_init_record

static long devWaveNI6123_init_record(waveformRecord *precord)
{
	ST_dpvt *pSTdpvt = (ST_dpvt*) malloc(sizeof(ST_dpvt));
	int i;

	switch(precord->inp.type) {
		case INST_IO:
			strcpy(pSTdpvt->recordName, precord->name);
			i = sscanf(precord->inp.value.instio.string, "%s %s %s",
					pSTdpvt->devName, pSTdpvt->arg0, pSTdpvt->arg1);

			kLog (K_INFO, "[devWaveNI6123_init_record] %d: %s %s %s\n",
					i, pSTdpvt->devName, pSTdpvt->arg0, pSTdpvt->arg1);

			pSTdpvt->pSTDdev = (ST_STD_device *)get_STDev_from_name(pSTdpvt->devName);

			if (!pSTdpvt->pSTDdev) {
				recGblRecordError(S_db_badField, (void*) precord,
						"devWaveNI6123 (init_record) Illegal INP field: task name");
				free(pSTdpvt);
				precord->udf = TRUE;
				precord->dpvt = NULL;
				return S_db_badField;
			}

			break;

		default:
			recGblRecordError(S_db_badField, (void*) precord,
					"devWaveNI6123 (init_record) Illegal INP field");
			free(pSTdpvt);
			precord->udf = TRUE;
			precord->dpvt = NULL;

			return S_db_badField;
	}

	pSTdpvt->ind	= -1;

	if (3 == i) {
		if (!strcmp (pSTdpvt->arg1, WAVE_RAW_VALUE_STR)) {
			pSTdpvt->ind		= WAVE_RAW_VALUE;
			pSTdpvt->n32Arg0	= strtoul(pSTdpvt->arg0, NULL, 0);
		}
		else if (!strcmp (pSTdpvt->arg1, WAVE_VALUE_STR)) {
			pSTdpvt->ind		= WAVE_VALUE;
			pSTdpvt->n32Arg0	= strtoul(pSTdpvt->arg0, NULL, 0);
		}
	}
	else {
		kLog (K_ERR, "[devWaveNI6123_init_record] arg cnt (%d) \n",  i );
		return -1;	/*returns: (-1,0)=>(failure,success)*/
	}

	precord->udf	= FALSE;
	precord->dpvt	= (void*) pSTdpvt;

	return 2;    /* don't convert */ 
}
开发者ID:Sangil-Lee,项目名称:RefCode,代码行数:59,代码来源:devNI6123.c


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