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  <20182019  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  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Asyn getting DTYP field in drvUserCreate()
From: Mark Davis <[email protected]>
To: [email protected], Mark Rivers <[email protected]>
Date: Tue, 20 Mar 2018 07:24:28 -0400
HI Mark,

We are working on a newer version of an asynPortDriver-based driver that creates the asyn parameters during the call to drvUserCreate() based on the string passed to it, which means that the string must include the asynType for the new parameter.  This avoids the need to include the list of parameters as part of the code (requiring a unique version of the driver for each type of device it can talk to).

This works well, but it means a bit of redundancy since the asynType is specified both in the DTYP and the INP/OUT string for the record.

I believe the documentation for the asyn module (and emails from you on this list ) state that the asyn module is designed so that it can be used by clients other than the EPICS record interface, so there is the issue of whether or not it would even be possible to provide this information in a manner that would not depend on what the client is.

Obviously, the question as stated ("What is the DTYP" value in the record?") assumes the call is on behalf of an EPICS record, so the answer is NO.  On the other hand, I also assume that, whatever the client is, it has to specify which of the asynType interfaces it is using to communicate with the asyn layer, so the question(s) could be restated as:  "Is the asynType known before the call to drvUserCreate(), and if so, could it be make available to the drvUserCreate() function (either as part of the information in the asynUser struct or a function that drvUserCreate() can call)?"

Mark Davis
NSCL/FRIB Controls Staff Engineer
[email protected]

On 3/19/2018 6:11 PM, Mark Rivers wrote:
Hi Konrad,

I can't think of a way for the driver to know the value of DTYP.  Of course you specify both the drvUser string and the datatype when you call createParam() so your driver knows the datatype that a particular drvUser string will be using.  Why do you need to know the DTYP?

Mark


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Konrad, Martin
Sent: Monday, March 19, 2018 8:39 AM
To: EPICS Tech Talk <[email protected]>
Subject: Asyn getting DTYP field in drvUserCreate()

Hi,
I'm wondering if there is a way I can get access to the DTYP field of
the record from asynPortDriver's drvUserCreate method.

Once createParam() has been called in drvUserCreate() I can get the type
by calling getParamType() but how do I get access to this information in
drvUserCreate()?

It seems like other drivers are duplicating this information into the
INP/OUT field (see e.g. [1]). I'm wondering if there is a more elegant
way to do this.

Thanks a lot,

Martin

[1]
https://urldefense.proofpoint.com/v2/url?u=http-3A__controls.diamond.ac.uk_downloads_support_aravisGigE_0-2D3-2D&d=DwIFAg&c=nE__W8dFE-shTxStwXtp0A&r=D7ZiziuMQuq40HlGYOZPBg&m=ye8rwKce1N2smS_Qv4NJE7cxkvL2pAyhv01q1CorLNY&s=4dEd2vIEg8lp5k3Z8SyaW9RUE-YJbhcHHYpmwmR0EXg&e=
5dls5/documentation/doxygen/aravisCamera_8cpp_source.html#l00326

--
Martin Konrad
High Performance Controls Team Leader
Facility for Rare Isotope Beams
Michigan State University
640 South Shaw Lane
East Lansing, MI 48824-1321, USA
Tel. 517-908-7253
Email: [email protected]


Replies:
Re: Asyn getting DTYP field in drvUserCreate() Mark Rivers
References:
Asyn getting DTYP field in drvUserCreate() Konrad, Martin
RE: Asyn getting DTYP field in drvUserCreate() Mark Rivers

Navigate by Date:
Prev: RE: Asyn getting DTYP field in drvUserCreate() Mark Rivers
Next: Re: Asyn getting DTYP field in drvUserCreate() Mark Rivers
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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Asyn getting DTYP field in drvUserCreate() Mark Rivers
Next: Re: Asyn getting DTYP field in drvUserCreate() Mark Rivers
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  <20182019  2020  2021  2022  2023  2024 
ANJ, 20 Mar 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·