Code review comment for lp:~epics-core/epics-base/link-support-2

Revision history for this message
Andrew Johnson (anj) wrote :

So instead of the DTYP controlling what address types are accepted in the INP/OUT link (as with the original hardware addresses), how about making it so that putting a JSON address into the INP/OUT link would also set the DTYP field to match the device type named in the address? The user won't have to set DTYP at all when they're using a JSON device type. The interface between record support and device support doesn't change at all, but there will be a new table for the JSON parsing routines.

There will need to be a new DBD keyword, probably
    devlink(<rectype>, <linktype>, <devlinkIf>, "DTYP Name")
The <linktype> name will be matched against the keys in the JSON INP/OUT address, so I have to pass them from the record type into the dbParseLink() routine. I haven't worked out yet where the DTYP field would actually get set, I guess that could be just another value stored in the link_info object, so it should probably be in dbSetLinkJSON() except that the plink->precord links haven't been set up yet so it can't find the prec->dtyp field.

Haven't implemented anything yet, but I think this idea has a good chance of working, do you see any obvious flaws?

« Back to merge proposal