diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index 635198704..3b0189205 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -20,6 +20,152 @@ --> +
Device support may be written to expect hardware addresses in the new +JSON_LINK address type. Addresses loaded from a database file will be +checked against the JSON rules, and a strict JSON representation of the result +is provided as a C string pointed to by link.value.json.string.
+ +Currently the device support is responsible for parsing the JSON text itself. +An event-driven JSON parser library has been included in libCom since Base-3.15, +YAJL (Yet Another JSON Library) +Version 1.012, documented +here.
+ + ++ ++ + +FIXME text missing here...
+ +Support routine changes
+ +For link fields in external record types and soft device support to be able +to use the new JSON link types properly, the following changes are +necessary:
+ ++ +
+ +- Make all calls to recGblInitConstantLink() unconditional on the +link type, i.e. change this code: + +
+ ++ if (prec->siml.type == CONSTANT) { + recGblInitConstantLink(&prec->siml, DBF_USHORT, &prec->simm); + } ++ +into this: + ++ recGblInitConstantLink(&prec->siml, DBF_USHORT, &prec->simm); ++ +Note that recGblInitConstantLink() still returns true if the field was +successfully initialized from the link.- Code like this: + +
+ ++ if ((prec->dol.type != CONSTANT) && ++ +should usually become: + ++ if (!dbLinkIsConstant(&prec->dol) && ++- Other code that compares a link type with CONSTANT should be modified to +use the new routine dbLinkIsConstant(plink) instead.
+ +- Any code that calls dbCa routines directly or that explicitly checks if a +link has been resolved as a CA link using code such as + +
+ ++ if (plink->type == CA_LINK) ++ +should be modified to use the new generic routines defined in dbLink.h. As an +example, the calcout record has been modified to use the new dbLink API.- ...
+ +FIXME text missing here...
+ +
Previously a constant link (i.e. a link that does not point to another PV, +either local or over Channel Access) has only been able to provide a numeric +value; any string found in a link field that was not recognized as a number was +treated as a PV name. In this release, constant links may contain string values, +arrays, or even arrays of strings. These are indicated by ...
+ +FIXME text missing here...
+ + +A database file can now provide a "relaxed JSON" value for a database field +value or an info tag. Only a few field types can currently accept such values, +but the capability is now available for use in other places in the future. If a +JSON-capable field is written to at run-time though only strictly compliant JSON +may be used (the dbStaticLib parser rewrites relaxed JSON values into strict +JSON before passing them to the datase for interpretation, where the strict +rules must be followed).
+ +"Relaxed JSON" was developed to maximize compatibility with the previous +database parser rules and reduce the number of double-quotes that would be +needed using strict JSON syntax. The parser will also accept strict JSON, which +should be used when machine-generating database files. The differences are:
+ +A JSON field or info value is only enclosed in quotes when the value being +provided is a single string, and even here the quotes can be omitted in some +cases as described above. The following shows both correct and incorrect +excerpts from a database file:
+ +
+ record(ai, math:pi) {
+ field(INP, {const: 3.14159265358979}) # Correct
+ field(SIOL, "{const: 3.142857}") # Wrong
+
+ info(autosave, { # White-space and comments are allowed
+ fields:[DESC, SIMM],
+ pass0:[VAL]
+ }) # Correct
+ }
+
+
+Note that the record, field and info-tag names do not accept JSON +values, so they follows the older bareword rules for quoting where the colon +: and several additional characters are legal in a bareword +string.
+ +The way comments are parsed by the iocsh interpreter has changed. The