EPICS Home

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  <20132014  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  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: asynPortDriver question
From: Jörn Wüstenfeld <[email protected]>
To: "[email protected]" <[email protected]>
Date: Mon, 19 Aug 2013 16:22:13 +0200
Hi,

I have some Questions concerning the asynPortDriver class. I'm currently 
trying to implement a driver, that reads via the OneWireFilesystem library 
some 1Wire devices connected via an USB adaptor.
I implemented this driver based on the asynPortDriver class. In the 
drvUserCreate function, I read the device Id and the parametername to access, 
fom the drvInfo string.
A printout in this function gives for two defined devices:

>2013/08/19 11:31:44.631 oneWireAsynPortDriver:drvUserCreate: path = 
28.A11BE9000000/temperature pasynUser = 866c28
>2013/08/19 11:31:44.632 oneWireAsynPortDriver:drvUserCreate: path = 
28.A11BE9000000/temperature pasynUser = 867038
>2013/08/19 11:31:45.793 oneWireAsynPortDriver:drvUserCreate: path = 
28.AD31A3020000/temperature pasynUser = 867b48
>2013/08/19 11:31:45.793 oneWireAsynPortDriver:drvUserCreate: path = 
28.AD31A3020000/temperature pasynUser = 867f98

With in total 4 different pasynUser structures. Why is this function called 
twice for each device? And with different asyUser structures?

How can I decide in e.g. The readFloat64 function, which device to read? The 
asynUser structure does not contain any information on the record which is 
trying to read.
What would be the correct way to handle multi device bus systems, without 
setting up a seperate driver for each device!
In principle I can dynamicaly scan the bus in the constructor and set up the 
command list, to be used in drvUserCreate as pasynUser->reason is the only way 
to tell read/write functions what to do.
BUT: It seems, that drvUserCreate is only called once during initialization 
and not for each access to device. How can I force the call of drvUserCreate 
before each call to read/write functions?
I hope that someone can give me a hint on what I'm doing wrong.

With kind regards, 
Joern


Replies:
RE: asynPortDriver question Mark Rivers

Navigate by Date:
Prev: Re: Response Time Pearson, Matthew R.
Next: RE: Response Time Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Response Time Maren Purves
Next: RE: asynPortDriver question Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024