EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20212022  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  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Purpose of the asynDrvUserMask interface
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: 'Abdalla Ahmad' <Abdalla.Ahmad at sesame.org.jo>
Cc: "'tech-talk at aps.anl.gov'" <tech-talk at aps.anl.gov>
Date: Sun, 25 Apr 2021 12:51:19 +0000

Note that the use of the drvUser interface to parse the drvInfo field into pasynUser->reason in my previous reply is just one example of how that interface can be used.

 

The documentation on the drvUser interface is here:

https://epics-modules.github.io/master/asyn/R4-41/asynDriver.html#asynDrvUser

 

It shows that the interface is actually independent of EPICS records and the use of the drvInfo field in the link.

 

Mark

 

 

 

From: Mark Rivers
Sent: Sunday, April 25, 2021 7:44 AM
To: Abdalla Ahmad <Abdalla.Ahmad at sesame.org.jo>
Cc: tech-talk at aps.anl.gov
Subject: Re: Purpose of the asynDrvUserMask interface

 

> The solution was to include “asynDrvUserMask” as part of the interface mask in the base class constructor even though 

> I am not using drvUserCreate method (But I am using pasynOctetSyncIO). 

> This was the call to the base class constructor:

> asynPortDriver(port_name, 255, asynInt32Mask | asynFloat64Mask | asynDrvUserMask, 

> 0, ASYN_CANBLOCK | ASYN_MULTIDEVICE, 1, 0, 0)

> So what is the purpose of this interface?

 

The asynDrvUser interface is used to parse the drvInfo string in the record link string:

 

   field(OUT,  "@asyn($(PORT),$(ADDR),$(TIMEOUT))SCOPE_VOLT_OFFSET")

 

In the above example SCOPE_VOLT_OFFSET is the drvInfo string. 

 

In the asynPortDriver base class implementation that string is converted to the integer pasynUser->reason.  But your driver can override that method to handle the drvInfo string differently.

 

The drvUser interface is optional, although it is needed if your driver will handle multiple parameters, which nearly all drivers do.

 

Mark

 

 

 

 


From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Abdalla Ahmad via Tech-talk <tech-talk at aps.anl.gov>
Sent: Sunday, April 25, 2021 3:42 AM
To: tech-talk at aps.anl.gov
Subject: Purpose of the asynDrvUserMask interface

 

Hi

 

I am working on a driver based on asynPortDriver interface, the problem is that this statement

 

int function = pasynUser->reason;

 

Will always return 0 no matter which parameter string I pass in the INP field. The solution was to include “asynDrvUserMask” as part of the interface mask in the base class constructor even though I am not using drvUserCreate method (But I am using pasynOctetSyncIO). This was the call to the base class constructor:

 

asynPortDriver(port_name, 255, asynInt32Mask | asynFloat64Mask | asynDrvUserMask, 0, ASYN_CANBLOCK | ASYN_MULTIDEVICE, 1, 0, 0)

 

So what is the purpose of this interface?

 

Best Regards,

Abdalla


References:
Purpose of the asynDrvUserMask interface Abdalla Ahmad via Tech-talk
Re: Purpose of the asynDrvUserMask interface Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: Purpose of the asynDrvUserMask interface Mark Rivers via Tech-talk
Next: Re: RPM packages for EPICS Michael Davidsaver via Tech-talk
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  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: Purpose of the asynDrvUserMask interface Mark Rivers via Tech-talk
Next: List all available PVs Stainer Tom via Tech-talk
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  <20212022  2023  2024 
ANJ, 26 Apr 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·