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

C++ recGblRecordError函数代码示例

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

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



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


示例16: init_lo

LOCAL long init_lo (struct longoutRecord *prec)
{
  struct abio   *pabio;
  devPvt        *pdevPvt;
  abStatus       drvStatus;
  long           status = 0;
  void          *drvPvt;
  short          value[2];

  if (prec->out.type != AB_IO)
  {
    recGblRecordError (S_db_badField, (void *) prec, "init_lo: Bad OUT field");
    return (S_db_badField);
  }

  pabio = (struct abio *) &(prec->out.value);
  drvStatus = (*pabDrv->registerCard) (pabio->link, pabio->adapter, pabio->card,
                                       typeBo, "BINARY", NULL, &drvPvt);
  switch (drvStatus)
  {
  case abSuccess :
    pdevPvt    = (devPvt *) (*pabDrv->getUserPvt) (drvPvt);
    prec->dpvt = pdevPvt;
    break;

  case abNewCard :
    pdevPvt = calloc (1, sizeof (devPvt));
    pdevPvt->drvPvt = drvPvt;
    prec->dpvt      = pdevPvt;
    (*pabDrv->setUserPvt) (drvPvt, (void *) pdevPvt);
    drvStatus = (*pabDrv->setNbits) (drvPvt, abBit16);
    if (drvStatus != abSuccess)
    {
      status = S_db_badField;
      recGblRecordError (status, (void *) prec, "init_lo: setNbits");
      return (status);
    }
    break;

  default:
    status = S_db_badField;
    printf ("init_lo: %s\n", abStatusMessage[drvStatus]);
    recGblRecordError (status, (void *) prec, "init_lo: registerCard");
    return (status);
  }

  drvStatus = (*pabDrv->readBo) (drvPvt, (unsigned long *)value, 0x0000ffff);
  if (drvStatus == abSuccess)
  {
    prec->val = (long)value[1];
    status = 0;
  }
  else
  {
    status = 2;
  }

  return (status);
}
开发者ID:A2-Collaboration,项目名称:epics,代码行数:59,代码来源:devABSLCDCM.c


示例17: devBoNI6123_init_record

static long devBoNI6123_init_record(boRecord *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",
					pSTdpvt->arg0);

			kLog (K_INFO, "[devBoNI6123_init_record] arg num: %d: %s\n",i, pSTdpvt->arg0);

			ST_MASTER *pMaster = get_master();
			pSTdpvt->pSTDdev = (ST_STD_device*) ellFirst(pMaster->pList_DeviceTask);
			if(!pSTdpvt->pSTDdev) {
				recGblRecordError(S_db_badField, (void*) precord, 
						"devBoNI6123Control (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,
					"devBoNI6123Control (init_record) Illegal OUT field");
			free(pSTdpvt);
			precord->udf = TRUE;
			precord->dpvt = NULL;

			return S_db_badField;
	}
	if(!strcmp(pSTdpvt->arg0, BO_AUTO_RUN_STR)) {
                pSTdpvt->ind = BO_AUTO_RUN;
        }
	else if (!strcmp(pSTdpvt->arg0, BO_DAQ_STOP_STR)) {
		pSTdpvt->ind = BO_DAQ_STOP;
	} 
	else if (!strcmp(pSTdpvt->arg0, BO_TREND_RUN_STR)) {
		pSTdpvt->ind = BO_TREND_RUN;
	} 
	else if (!strcmp(pSTdpvt->arg0, BO_CALC_RUN_STR)) {
		pSTdpvt->ind = BO_CALC_RUN;
	} 
	else {
		pSTdpvt->ind = -1;
		kLog (K_ERR, "ERROR! devBoNI6123_init_record: arg0 \"%s\" \n",  pSTdpvt->arg0 );
	}

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

	return 2;	  /*returns:(0,2)=>(success,success no convert*/
}
开发者ID:Sangil-Lee,项目名称:RefCode,代码行数:57,代码来源:devNI6123.c


示例18: process

static long process(stringoutRecord *prec)
{
	struct stringoutdset	*pdset = (struct stringoutdset *)(prec->dset);
	long		 status=0;
	unsigned char    pact=prec->pact;

	if( (pdset==NULL) || (pdset->write_stringout==NULL) ) {
		prec->pact=TRUE;
		recGblRecordError(S_dev_missingSup,(void *)prec,"write_stringout");
		return(S_dev_missingSup);
	}
        if (!prec->pact
        && (prec->dol.type != CONSTANT)
        && (prec->omsl == menuOmslclosed_loop)) {
		status = dbGetLink(&(prec->dol),
			DBR_STRING,prec->val,0,0);
		if(prec->dol.type!=CONSTANT && RTN_SUCCESS(status)) prec->udf=FALSE;
	}

        if(prec->udf == TRUE ){
                recGblSetSevr(prec,UDF_ALARM,INVALID_ALARM);
        }

        if (prec->nsev < INVALID_ALARM )
                status=writeValue(prec); /* write the new value */
        else {
                switch (prec->ivoa) {
                    case (menuIvoaContinue_normally) :
                        status=writeValue(prec); /* write the new value */
                        break;
                    case (menuIvoaDon_t_drive_outputs) :
                        break;
                    case (menuIvoaSet_output_to_IVOV) :
                        if(prec->pact == FALSE){
                                strcpy(prec->val,prec->ivov);
                        }
                        status=writeValue(prec); /* write the new value */
                        break;
                    default :
                        status=-1;
                        recGblRecordError(S_db_badField,(void *)prec,
                                "stringout:process Illegal IVOA field");
                }
        }

	/* check if device support set pact */
	if ( !pact && prec->pact ) return(0);

	prec->pact = TRUE;
	recGblGetTimeStamp(prec);
	monitor(prec);
	recGblFwdLink(prec);
	prec->pact=FALSE;
	return(status);
}
开发者ID:zlxmsu,项目名称:TestEpics,代码行数:55,代码来源:stringoutRecord.c


示例19: devAoXXX_init_record

static long devAoXXX_init_record(aoRecord *precord)
{
	ST_dpvt *pDpvt = (ST_dpvt*) malloc(sizeof(ST_dpvt));
	int nval;
	char arg0[SIZE_DPVT_ARG];
	char arg1[SIZE_DPVT_ARG];
	char arg2[SIZE_DPVT_ARG];

	switch(precord->out.type) 
	{
		case INST_IO:
			nval = sscanf(precord->out.value.instio.string, "%s %s %s %s", pDpvt->devName, arg0, arg1, arg2);
			pDpvt->pSTDdev = get_STDev_from_name(pDpvt->devName);
			if(!pDpvt->pSTDdev) {
				recGblRecordError(S_db_badField, (void*) precord, 
						  "devAoXXX (init_record) Illegal OUT field: task_name");
				free(pDpvt);
				precord->udf = TRUE;
				precord->dpvt = NULL;
				return S_db_badField;
			}
			break;
			
		default:
			recGblRecordError(S_db_badField,(void*) precord,
					  "devAoXXX (init_record) Illegal OUT field");
			free(pDpvt);
			precord->udf = TRUE;
			precord->dpvt = NULL;
			return S_db_badField;
	}


	if (!strcmp(arg0, AO_TEST_1_STR))
		pDpvt->ind = AO_TEST_1;
	
	else if (!strcmp(arg0, AO_TEST_2_STR)) {
		pDpvt->ind = AO_TEST_2;
		pDpvt->n32Arg0 = strtoul(arg1, NULL, 0); /* chennel id */
		pDpvt->n32Arg1 = strtoul(arg2, NULL, 0); /* section id */
	}
	


	else {
		pDpvt->ind = -1;
		epicsPrintf("ERROR!! devAoXXX_init_record: arg0 \"%s\" \n",  arg0 );
	}

	precord->udf = FALSE;
	precord->dpvt = (void*) pDpvt;
	
	return 2;     /*returns: (0,2)=>(success,success no convert)*/
}
开发者ID:Sangil-Lee,项目名称:RefCode,代码行数:54,代码来源:devXXX.c


示例20: init_ai

static long init_ai(struct aiRecord *pai)
{
    int signal;
    int parmOK=0;

    signal = pai->inp.value.vmeio.signal;

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

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

    ((recPrivate*) pai->dpvt)->pCard = getCardStruct(pai->inp.value.vmeio.card);    do {
        CHECK_AIPARM("FIX_FREQUENCY", CPCI_AI_FIX_FREQUENCY);
        CHECK_AIPARM("WORK_PERIOD", CPCI_AI_WORK_PERIOD);
        CHECK_AIPARM("AMP_SET", CPCI_AI_AMP_SET);
        CHECK_AIPARM("AMP_COEFFICIENT", CPCI_AI_AMP_COEFFICIENT);
        CHECK_AIPARM("AMP_P_SET", CPCI_AI_AMP_P_SET);
        CHECK_AIPARM("AMP_I_SET", CPCI_AI_AMP_I_SET);
        CHECK_AIPARM("AMP_I1_SET", CPCI_AI_AMP_I_SET1);
        CHECK_AIPARM("AMP_I2_SET", CPCI_AI_AMP_I_SET2);
        CHECK_AIPARM("AMP_I3_SET", CPCI_AI_AMP_I_SET3);
        CHECK_AIPARM("BIAS_SET", CPCI_AI_BIAS_SET);
        CHECK_AIPARM("FIX_TUNING_ANGLE", CPCI_AI_FIX_TUNING_ANGLE);
        CHECK_AIPARM("TUNING_ANGLE_OFFSET", CPCI_AI_TUNING_ANGLE_OFFSET);
        CHECK_AIPARM("TUNE_P_SET", CPCI_AI_TUNE_P_SET);
        CHECK_AIPARM("TUNE_I_SET", CPCI_AI_TUNE_I_SET);
        CHECK_AIPARM("TUNE_I1_SET", CPCI_AI_TUNE_I_SET1);
        CHECK_AIPARM("TUNE_I2_SET", CPCI_AI_TUNE_I_SET2);
        CHECK_AIPARM("TUNE_I3_SET", CPCI_AI_TUNE_I_SET3);
        CHECK_AIPARM("FRONT_BIAS_SET", CPCI_AI_FRONT_BIAS_SET);
        CHECK_AIPARM("FRONT_TUNE_P_SET", CPCI_AI_FRONT_TUNE_P_SET);
        CHECK_AIPARM("FRONT_TUNE_I_SET", CPCI_AI_FRONT_TUNE_I_SET);
        CHECK_AIPARM("FRONT_FIX_TUNING_ANGLE", CPCI_AI_FRONT_FIX_TUNING_ANGLE);
        CHECK_AIPARM("PHASE_I", CPCI_AI_PHASE_I);
	CHECK_AIPARM("PHASE_P", CPCI_AI_PHASE_P);
	CHECK_AIPARM("INITIAL_PHASE", CPCI_AI_INITIAL_PHASE);
        CHECK_AIPARM("FF_DELAY", CPCI_AI_FF_DELAY);
        CHECK_AIPARM("ARC_COUNT", CPCI_AI_ARC_COUNT);
    } while(0);

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

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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ recGblSetSevr函数代码示例发布时间:2022-05-30
下一篇:
C++ reboot函数代码示例发布时间: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