On 08/29/2018 07:59 AM, Benjamin Franksen wrote:
> I am trying to upgrade an application to base-7 and getting these errors
> from dbExpand.pl. In base-3.14 it is allowed to set record fields to the
> empty string. Is this a bug or was it intentionally made illegal to set
> numeric fields to ''?
In Base-3.14 and earlier, dbExpand was a C program that used
dbStaticLib's host implementation. As such it stored field values as raw
strings without trying to interpret their values (other than expanding
macros that it had values for). It just does a syntax-check of whatever
you feed into it, and then spits out everything that it read in as a
single file/stream. If you feed it both a DBD and a DB file, the output
will contain a combination of the two.
Base-3.15 and 3.16 don't have a dbExpand program, but they do have a
dbdExpand.pl script which is used for expanding include statements in
DBD files. This script doesn't understand record instances at all.
Base-7.0 still has the dbdExpand.pl script, but also has a dbExpand.pl
script which reads in one or more DBD and DB files, expands any include
statements and macros, and spits out just the record instances. While
parsing the DB files it checks the field values against the specific
data type of that field, and these checks must be what is triggering
The IOC's numeric parsing code has changed since 3.14, but we still
treat an empty string as the value zero, so my checks should really
permit that. If you want to try and fix them yourself look at the
Perl module, and the legal_value() subroutines. Inserting
$value eq '' or
at the beginning of the return statements for each of the numeric types
is probably all that is needed. You could also add tests to the
program to double-check and prevent future regressions.
It might take me a while to work on this, so if you can find the time
I'd be happy to accept a patch or a merge request.
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon
- dbExpand.pl: cannot set PHAS to '' Benjamin Franksen
- Navigate by Date:
RE: EDM X/Y Plot segfaults Baily, Scott A
asyndriver installation error [key words: asyndriver, PLC, S7nodave, EPICS] =?gb18030?b?s8nN/rvG5a0=?=
- Navigate by Thread:
dbExpand.pl: cannot set PHAS to '' Benjamin Franksen
the same question to "a simple question about pyepics" =?gb18030?b?s8nN/rvG5a0=?=