2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 <2017> 2018 2019 2020 2021 2022 2023 2024 | Index | 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 <2017> 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Improved simulation mode prototype |
From: | Ralph Lange <[email protected]> |
To: | Andrew Johnson <[email protected]> |
Cc: | EPICS Core Talk <[email protected]> |
Date: | Fri, 15 Sep 2017 22:03:23 +0200 |
I still have a fundamental dislike of using info items to configure
simulations, because these settings can't be modified at runtime, and
because of all the extra code needed for parsing the info string values.
I discussed this with you in a private email reply on August 18th ("Re:
Q: Access to into fields") but you didn't respond.
Did you look at making the two info items into fields instead? I don't
like all the extra complexity involved in using a combination of info
items and members of simpvt for storing state that you are doing.
I would like to see a comparison of the two approaches, as I'm not
convinced that the extra code complexity is worth the memory saved by
not using regular fields.
At least one change in recGbl.c seems to be undoing a link support
change (explicitly testing a plink->type value should be avoided in new
code to be compatible with new link types):
> - if (!dbLinkIsConstant(plink)) {
> + if (plink->type != CONSTANT) {
> struct pv_link *ppv_link = &plink->value.pv_link;
However it looks like the line immediately following the changed one
hasn't been properly converted for link support anyway (it could crash
if someone makes TSEL a JSON link type). There are other similar tests
of plink->type fields which should be using the dbLink*() equivalent
routine in recGblGetTimeStampSimm() and recGblInitSimm().
Does the SIMPVT field always point to a struct xsimm? If so the extra()
line in the .dbd files should define it as such instead of as a void *
(I've been trying to remove void * pointer casts by introducing those
kinds of changes for several years now).
I'm getting a build failure on cross-building for MinGW (and this will
probably fail likewise on other Windows DLL builds) which doesn't occur
on the master branch:
> iocInit.obj:iocInit.c:(.text+0x198): undefined reference to `__imp_callbackInit'
> iocInit.obj:iocInit.c:(.text+0xefa): undefined reference to `__imp_callbackStop'
> iocInit.obj:iocInit.c:(.text+0xf0a): undefined reference to `__imp_callbackCleanup'
> collect2: error: ld returned 1 exit status
> ../../../configure/RULES_BUILD:288: recipe for target 'dbCore.dll' failed
> make[1]: *** [dbCore.dll] Error 1
This is triggered by the new inclusion of callback.h in recSup.h but the
fundamental problem is in src/ioc/misc/iocInit.c where dbBase.h is being
included before epicsExport.h (as well as after it, so just delete the
first copy to fix this problem).
My RTEMS build fails in src/std/rec/test:
> epicsRunRecordTests.o: In function `epicsRunRecordTests':
> /local/anj/base-3.16/src/std/rec/test/O.RTEMS-uC5282/../ epicsRunRecordTests.c:45: undefined reference to `simmTest'
The rec/test/Makefile is missing these two lines:
testHarness_SRCS += simmTest.c
testHarness_SRCS += simmTest_registerRecordDeviceDriver.cpp
I'm guessing you copied the regressTest example immediately above, which
is also missing those two equivalent lines and a call from the
epicsRunRecordTests.c file.
I think that's all for now, I haven't actually looked at or tested the
simulations at all.