1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 <2007> 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 <2007> 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | asynDriver, problem with asynInt32Array read routine |
From: | Janez Golob <[email protected]> |
To: | [email protected] |
Date: | Thu, 22 Feb 2007 20:25:52 +0100 |
Hello, I am writing portDriver for aio card. I read some data from asynInt32 and asynInt32Array interface type: static asynInt32 drvAio16Int32 = { NULL, readInt32, getBounds, NULL, NULL }; static asynInt32Array drvAio16Int32Array = { NULL, readInt32Array, NULL, NULL }; ... Ok interfaces inicialization and .... ... pPvt->common.interfaceType = asynCommonType; pPvt->common.pinterface = (void *)&aio16Common; pPvt->common.drvPvt = pPvt; pPvt->int32.interfaceType = asynInt32Type; pPvt->int32.pinterface = (void *)&drvAio16Int32; pPvt->int32.drvPvt = pPvt; pPvt->int32Array.interfaceType = asynInt32ArrayType; pPvt->int32Array.pinterface = (void *)&drvAio16Int32Array; pPvt->int32Array.drvPvt = pPvt; ... And asynInt32Array adn asynInt32 read methods are as follows ... static asynStatus readInt32( void *drvPvt, asynUser *pasynUser, epicsInt32 *value ) { drvAio16Pvt *pPvt = (drvAio16Pvt *)drvPvt; rtems_unsigned8 channel; rtems_unsigned16 data, size;
pasynManager->getAddr(pasynUser, &channel);
.... some code (calculating...) .... *value = ( epicsInt32 )data_buffer[0]; asynPrint(pasynUser, ASYN_TRACEIO_DRIVER, "drvAio16, port %s, read %d from channel %d\n", pPvt->port_name, *value, channel); return asynSucces; } /* Asyn Waveform read routine */ static asynStatus readInt32Array(void *drvPvt, asynUser *pasynUser, epicsInt32 *value, size_t nelements, size_t *nIn) { drvAio16Pvt *pPvt = (drvAio16Pvt *)drvPvt; rtems_unsigned32 read_samples, i;
pasynManager->getAddr(pasynUser, &channel); .... some code (calculating...) .... return asynSucces; } When I run episc database in which I have some ai record type everything working fine but when I add waveform record type I get following error: fatal error: dbScanLock. Bad case choice. So what it's different between asynInt32 and asynInt32array read routine? Why asynInt32 read routine work but asynInt32Array read routine crash? Episc version: 3.14.8.2 Asyn version: 4.3 Build target RTEMS-pc386 Thanks in advance! |