This is not as pure or clean as a good device-oriented
implementation, but it does work - we have three different devices
in service this way.
Ron Chestnut
-----Original Message-----
From: [email protected] [mailto:tech-talk-
[email protected]] On Behalf Of Gabriel L. Rael
Sent: Tuesday, September 04, 2007 3:59 PM
To: [email protected]
Subject: EPICS device support questions
Hello, all.
We are in the process of creating an EPICS interface to our
oscilloscope. It is a PCI device with its own kernel driver and
user space driver with the host processor that will be running our
EPICS IOC.
It seems that though EPICS supports a list of communication
interfaces (GPIB, VME, VXI, serial, etc.), it does not allow for a
device to be connected above this layer through an ANSI-C API
easily. Though asyn device support is a complete solution down to
the kernel level, we want to be able to leverage our existing drivers.
For packaging up this functionality, we want to create records that
map directly to our API calls, which are functions with variable
arguments, some that may be passed by reference for modification.
We have function tables containing our calls with variable argument
types, but we are not seeing a common way to link PVs to function
calls with arguments. In the dbd, we are doing something like:
device(ao, INST_IO, devScopeao, "scopeAPI"). Can I use the INP and
OUT fields arbitrarily, parsing a common syntax (i.e. a single
string value such as "@function arg1 arg2") in the device support
layer, to make function wrappers? Is there a general way that we
can hook into something that already accomplishes this? Does this
break the ability to link PVs properly? Can I do this using the
standard record types? Am I missing something else?
Thanks in advance!
-glr
--
Gabriel L. Rael
Jr. Software Engineer
ZTEC Instruments
http://www.ztecinstruments.com