To: "Rivers, Mark L." <
rivers at cars.uchicago.edu>
From: "Johnson, Andrew N." <
anj at anl.gov>
Date: 03/19/2020 09:47PM
Cc: "Anindya Roy" <
r_ani at vecc.gov.in>, "EPICS tech-talk" <
tech-talk at aps.anl.gov>
Subject: Re: error calling dbGetLinkValue in EPICS base-3.15.6
On Mar 19, 2020, at 7:49 AM, Mark Rivers via Tech-talk <
tech-talk at aps.anl.gov> wrote:
> However, dbGetLinkValue does not exist in any .h or .c file. So the documentation does not match the actual API.
… which is why we’re trying to move the source of the documentation closer to the code by adopting Doxygen. It will probably take several years to get there though.
> Surprisingly to me this change in the API is also not mentioned in the 3.15.* release notes.
Mea cupla. There were quite a lot of changes when I was working on adding extensible link types and they didn’t all get documented.
> Two of the error messages in dbGetLink in dbLink.c still say the function name is dbGetLinkValue, which is incorrect.
> ./src/ioc/db/dbLink.c: printf("dbGetLinkValue: Use of poptions no longer supported\n");
> ./src/ioc/db/dbLink.c: cantProceed("dbGetLinkValue: Illegal link type %d\n", plink->type);
Those have been fixed in the 7.0 tree, probably sometime in 3.16 branch.
> However, I think the intent all along was that you should get dbGetLink(), not dbGetLinkValue(). Previous dbGetLink was a macro that called dbGetLinkValue(). Now dbGetLink is no longer a macro, it is the C function that you should call.
Correct. dbGetLink() was a macro that only actually called the dbGetLinkValue() routine if there was something for it to do; passing *nRequest==0 allowed you to fetch metadata such as an array length without getting the actual data. Since everyone was
supposed to be using dbGetLink() I removed the short-circuit and renamed the routine while cleaning up the code.
- Andrew
--
Complexity comes for free, simplicity you have to work for.