EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: [Merge] lp:~epics-core/epics-base/ioc-shutdown2 into lp:epics-base
From: mdavidsaver <[email protected]>
To: Andrew Johnson <[email protected]>
Date: Thu, 10 Jul 2014 22:14:06 -0000
> In dbUnitTest.c shouldn't the Type arguments to OP use the
>     epics{Int,UInt,Float}<n> names? If not I suspect there
>     should at least be a couple more 'unsigned' keywords in
>     there.

Before I can answer this question I think you will need to educate me a bit about argument type promotion in vararg functions.  Does va_arg() have knowledge of this?  Will va_arg(X,short) actually return an 'int'?

My thinking at the time was that since these rules are a bit obscure, that it would be better to explicitly document a mapping of variable type to DBF_*.  You will find such a mapping in a comment in dbUnitTest.h.  I'm not too attached to this approach though, the point is that a put operation should be one line.

Just to throw out another idea.  I have considered using printf style syntax just to get a compile time check.  eg. testdbPutField("pvname", DBF_LONG, "%d", 0) where exactly "%d" must be used for DBF_LONG.  As a side effect this would work well for DBF_STRING.

-- 
https://code.launchpad.net/~epics-core/epics-base/ioc-shutdown2/+merge/224213
Your team EPICS Core Developers is subscribed to branch lp:epics-base.


Replies:
Re: [Merge] lp:~epics-core/epics-base/ioc-shutdown2 into lp:epics-base Andrew Johnson
References:
Re: [Merge] lp:~epics-core/epics-base/ioc-shutdown2 into lp:epics-base Andrew Johnson

Navigate by Date:
Prev: Re: [Merge] lp:~epics-core/epics-base/ioc-shutdown2 into lp:epics-base Andrew Johnson
Next: Re: [Merge] lp:~epics-core/epics-base/ioc-shutdown2 into lp:epics-base mdavidsaver
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: [Merge] lp:~epics-core/epics-base/ioc-shutdown2 into lp:epics-base mdavidsaver
Next: Re: [Merge] lp:~epics-core/epics-base/ioc-shutdown2 into lp:epics-base Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Jul 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·