get_precision() walks pvalue and plvalue over the A-L and LA-LL fields, then compares paddr->pfield against &pvalue and &plvalue -- the addresses of the two local pointer variables, not of the fields they point at. Those are stack addresses, so neither test has ever matched and every A-L or LA-LL precision request falls through to recGblGetPrec(). The line just above gets it right: prec->val is a field and needs the &, whereas pvalue and plvalue are already pointers. Both tests date frome87551df24, the commit that added the loop, and have been dead ever since, so every release since R3.12 has this. They carried a (void *) cast until6d85a36397removed it, which is why the compiler was never shown a double ** to complain about. That the fields were meant to be covered is not in doubt: this record's get_graphic_double() and get_control_double() both name A-L and LA-LL. This changes what those fields report. recGblGetPrec() substitutes 15 for a DOUBLE precision outside 0 to 15, so today A-L and LA-LL answer 15 for a PREC of 17 while VAL answers 17. They now answer PREC unclamped, which is what VAL has always done. Add selTest, reading the precision of VAL, A, L, LA, LL and HIHI from a record with PREC=17. The four A-L and LA-LL cases report 15 before this fix; VAL and HIHI pin the two paths either side of them.
EPICS Base
EPICS (Experimental Physics and Industrial Control System) is a set of software tools and applications which provide a software infrastructure for use in building distributed control systems to operate devices such as Particle Accelerators, Large Experiments and major Telescopes. EPICS Base is the central core of the control system toolkit. More details can be found at the About page of the official website
Links
Documentation
Community Communication
Quick Install
Download a release from the Downloads page and unpack it. Inside the unpacked folder run:
make
For more information on how to install on your system see the Installation page of the documentation.
Quick run a softIOC
After building, you can run an example soft-IOC (Input/Output Controller) which runs a Channel Access server.
./bin/*/softIoc -x first
Run the dbl command to list the records it provides:
epics> dbl
first:BaseVersion
first:exit
epics>
Contributing
See CONTRIBUTING.md.
License
EPICS Base is distributed subject to a Software License Agreement found in the file LICENSE that is included with this distribution.