Experimental Physics and
| |||||||||||||||||
|
If this is for a device support layer that you're writing and you know that you've already initialized the record, you could arrange to have an enum or other marker in the structure that the DTYP field points to. Here's the start of the definition of a dpvt structure that I use in my directNetAsyn support; the enum recType field is how I decide which record type this particular record belongs to: struct dpvtIn { struct dbCommon *precord; enum recType {AI, AIF, BI, MBBI, MBBID} type; ... }; In my device support's init_record routine I allocate a dpvtIn structure and point to it from the DPVT field, making sure that I initialize the dpvt->type field to the appropriate value. However if this is more general-purpose and could be any record, your rdes->name may be the best way to determine the type. It really depends what you want to do with the result. - Andrew -- * * Matt Santos / / For a Brighter America * *
| ||||||||||||||||
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |