Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
<== Date ==> <== Thread ==>

Subject: how to determine record type given pointer to a record
From: John Dobbins <jad@lepp.cornell.edu>
To: EPICS Tech-Talk <tech-talk@aps.anl.gov>
Date: Tue, 31 Jan 2006 16:32:09 -0500
Dear All,

I'm writing a bit of code that has to deal with multiple record types but is only passed a pointer to the record. What is the easiest way to determine the record type (or even just dset type)?

e.g. since I don't the record type I'm being passed I first cast the pointer as (dbCommon *), then precord->rdes->name will give me the record type name as a string which I can compare to say "ai"

but is there a simpler way?

Thanks to all of you,

John Dobbins
Cornell University
Lab of Elementary Particle Physics



Replies:
Re: how to determine record type given pointer to a record Andrew Johnson

Navigate by Date:
Prev: Re: mallocMustSucceed( 0 ) non-portable Andrew Johnson
Next: Re: how to determine record type given pointer to a record Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
Navigate by Thread:
Prev: Re: callocMustSucceed error handling model Benjamin Franksen
Next: Re: how to determine record type given pointer to a record Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·