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
From: email@example.com [mailto:firstname.lastname@example.org]
On Behalf Of email@example.com
Sent: 30 May 2012 07:33
To: firstname.lastname@example.org; email@example.com
Subject: RE: device support for CPCI
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.
I am willing to write the device support for cPCI 7432 card for EPICS in an industrial PC running windows XP. I have the API functions, header file and dll. I am confused only about choosing the second field for this line
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.
This is my first time to write a device support so I need the advice from experienced for answers to this question that...... What should I choose the signal type here in second field of that line and how is it mapped to API functions from INP field.
I tried a lot to search answer to this question but it was my weakness that I could not find or understand from available material on web.
With Best Regards