Experimental Physics and
| |||||||||||||||
|
When an aao is written by an other record, the ioc crashes. The problem seems to independent of the DTYP of the aao. I used an (unofficial) Soft Channel support (attached). Example db: record (aao, "aao1") { field (FTVL, "DOUBLE") field (NELM, "10") field (OUT, "aao2") } record (aao, "aao2") { field (FTVL, "DOUBLE") field (NELM, "10") } record (ao, "ao1") { field (OUT, "aao2") } When I write aao1 or ao1 the IOC crashes. (Note that aao2 is not even processed in that case.) If I write directly into aao2 there is no problem. Any idea? I am using EPICS R3.14.8.2. Dirk /*************************************************************************\ * Copyright (c) 2003 SLS Swiss Light Source * based upon waveform support \*************************************************************************/ /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. * EPICS BASE Versions 3.13.7 * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ /* devAaoSoft.c */ /* devAaoSoft.c - Device Support Routines for soft Waveform Records*/ /* * Original Author: Bob Dalesio * Current Author: Dirk Zimoch * Date: 11-JUL-2003 */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include "alarm.h" #include "dbDefs.h" #include "dbAccess.h" #include "recGbl.h" #include "recSup.h" #include "devSup.h" #include "link.h" #include "aaoRecord.h" #include "epicsExport.h" /* Create the dset for devAaoSoft */ static long init_record(); static long write_aao(); struct { long number; DEVSUPFUN report; DEVSUPFUN init; DEVSUPFUN init_record; DEVSUPFUN get_ioint_info; DEVSUPFUN read_aao; } devAaoSoft = { 5, NULL, NULL, init_record, NULL, write_aao }; epicsExportAddress(dset,devAaoSoft); static int sizeofTypes[] = {MAX_STRING_SIZE,1,1,2,2,4,4,4,8,2}; static long init_record(aaoRecord *paao) { /* aao record does not allocate bptr. Why not? */ if (!paao->bptr) { if(paao->ftvl>DBF_ENUM) paao->ftvl=2; paao->bptr = (char *)calloc(paao->nelm,sizeofTypes[paao->ftvl]); } /* aao.out must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/ switch (paao->out.type) { case (CONSTANT) : paao->nord = 0; break; case (PV_LINK) : case (DB_LINK) : case (CA_LINK) : break; default : recGblRecordError(S_db_badField,(void *)paao, "devAaoSoft (init_record) Illegal INP field"); return(S_db_badField); } return(0); } static long write_aao(aaoRecord *paao) { long status,nRequest; nRequest=paao->nelm; /* aao record can not handle simulation mode. Why not? */ if (paao->simm == YES){ recGblRecordError(S_db_badField,(void *)paao, "devAaoSoft (read_aao) simulation mode unsupported"); return(S_db_badField); } status = dbPutLink(&paao->out,paao->ftvl,paao->bptr, nRequest); /*If dbGetLink got no values leave things as they were*/ if(nRequest>0) paao->nord = nRequest; return(0); }
| ||||||||||||||
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |