Experimental Physics and
| |||||||||||||||||
|
I presume this change has to be made in the "devSupportGpib.c" file of the No devSupportGpib.c does not need to be changed. What you need to do is implement GPIBCVTIO. The devGpib documentation states: GPIBCVTIO Supports record types: ai, ao, bi, bo, event, longin.longout, mbbi, mbbo, mbbiDirect, mmboDirect, stringin, stringout, waveform. All I/O is done by the |convert| routine, which must be defined. |convert| is called by a callback routine and thus can make an arbitrary number of calls to low level drivers. It is passed the address of |gpibDpvt| which contains the information needed to call the low level drivers: |asynCommon, asynOctet, and asynGpib.| Note that | asynGpib| may not be present, i.e. |pasynGpib| is null. |gpibDpvt| also contains a field |pupvt| which can be used by the convert routine. Is is initialized to null. The macro |gpibCmdGet| can be used to get the address of |gpibCmd| which contains other usefull information. Your convert routine can start something like: static int myConvert(struct gpibDpvt *pgpibDpvt, int P1, int P2, char **P3) { asynUser *pasynUser = pgpibDpvt->pasynUser; gpibCmd *pgpibCmd = gpibCmdGet(pgpibDpvt); asynOctet *pasynOctet = pgpibDpvt->pasynOctet; void *asynOctetPvt = pgpibDpvt->asynOctetPvt; asynStatus status; Look in devSupportGpib.h for the definitions of gpibCmd, which contains the info in the gpibCmd in your source code. I think Eric Norum has an example of how to implement GPIBCVTIO. Marty Kraimer
| ||||||||||||||||
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |