EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  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  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: ASYN - weird
From: "Mark Rivers" <[email protected]>
To: "Heinrich du Toit" <[email protected]>, "TechTalk EPICS" <[email protected]>
Date: Fri, 7 Sep 2007 06:48:46 -0500
This is happening in devAsynInt32.c.  initCommon in that code creates 2 asynUsers. One is used during normal record processing.  The second is used once during iocInit for a "synchronous" read to determine the initial value.  This lets your longout record be initialized to the current value of the hardware if that initial read returns success.
 
Mark
 

________________________________

From: [email protected] on behalf of Heinrich du Toit
Sent: Fri 9/7/2007 5:19 AM
To: TechTalk EPICS
Subject: ASYN - weird



Hi

I have an ASYN port.

It registers the DrvUser interface:

I have this function:

asynStatus piDrvUserCreate(void *drvPvt, asynUser *pasynUser,
                                  const char *drvInfo, const char **pptypeName,size_t *psize)
{
  PythonPort *myport = (PythonPort*)drvPvt;
  if (!myport){
    printf("### ERROR - drvPvt = NULL\n");
    return asynError;
  }
  printf("user = %p\n",pasynUser);
  printf("drvUser = %p\n",pasynUser->drvUser);
  PythonUser *myuser = new PythonUser(myport,drvInfo);
  pasynUser->drvUser = myuser;
  return asynSuccess;
}


Now my .db file has:

record(longout,"p0")
{
        field(DTYP,"asynInt32")
        field(OUT,"@asyn(testp) printp")
        field(DESC,"burb")
}

dbl IOC command confirms I have only one record!

Yet output on IOC:

user = 0x80ee96c
drvUser = (nil)
Creating Python User options=printp
user = 0x80eeb24
drvUser = (nil)
Creating Python User options=printp
iocInit: All initialization complete



asynReport confirm that there is only 1 portname testp

I don't get it
Why is CreateUser called twice with different asynUser's ??

I've seen this dual-called behaviour of DrvUser before in my other
drivers. This time I would like to figure it out :)

Thanks in advance!
-Heinrich





References:
ASYN - weird Heinrich du Toit

Navigate by Date:
Prev: ASYN - weird Heinrich du Toit
Next: Re: ASYN - weird Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: ASYN - weird Heinrich du Toit
Next: Re: ASYN - weird Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·