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: | RE: device support for CPCI |
From: | <[email protected]> |
To: | <[email protected]>, <[email protected]> |
Date: | Wed, 30 May 2012 08:21:04 +0000 |
Hello Zia, I would suggest you look at using the Asyn interface layer. At the last EPICS meeting Mark Rivers gave a good tutorial on Asyn and a step-by-step guide to writing a driver. See
https://slacportal.slac.stanford.edu/sites/conf_public/epics_2012_04/presentations/asynTalk.pdf Regards. Mark From: [email protected] [mailto:[email protected]]
On Behalf Of [email protected] The best reference seems to be base/src/dbStatic/dbStaticLib.c and link.h (looks like link strings are parsed by dbPutString and formatted by dbGetString, both
in dbStaticLib.c). There is something of a surfeit of choices, but in the end all your options end up packed into the same union presented as struct link (link.h). All the instrument types have an unparsed string part, so one option you could have if the card really is a VME card would be to use VME_IO and write your input
fields as “#Ca Sb @c” where you’ll have to use atoi(link→value.vmeio.parm) to get at c. If the card really is VME hardware this would be the most honest way to go. A second option is to use INST_IO and write INP = “@a b c” and do your own parsing, and a third option I guess would be to find one of the other formats that
matches ... but actually your options there look poor, the best fit I can see is BBGPIP_IO “#La Bb Gc” but you’re restricted to numbers in the range 0..255 and it’s pretty dishonest (ie, confusing to the next person looking at the code). Personally if the card isn’t really VME hardware I’d go with INST_IO and parse the free format string link→value.instio.string. From:
[email protected] [mailto:[email protected]]
On Behalf Of Qazi Zia-ul-Haque Hi device(bi,VME_IO,devAiCPCI,"cpci") as using VME_IO will need to define the INP field as #Ca Sb (Only Card and Signal Numbers) whereas in the API I will need three fields i.e. card number, port number and line (signal) number. |