Commit Graph
50 Commits
Author SHA1 Message Date
Andrew Johnson c6c25ab43d New src/std/link/test directory with tests for the state link type 2018-06-02 23:28:20 -05:00
Andrew Johnson 89b9e240b0 Link types: Remove debug tracing now provided by debug link type 2018-06-01 23:43:39 -05:00
Andrew Johnson 8cdcaf5a87 dbJLink: Restore the jlink::debug flag, add debug and trace link types 2018-06-01 23:32:48 -05:00
Andrew Johnson fd30989f63 Add jlif::start_child() method 2018-06-01 23:23:54 -05:00
Andrew Johnson 3b89515664 dbJLink: Pass the correct dbfType to child links
API change for link types that support child links, they must now
indicate whether a child link is an input, output or forward link
by the return value from their parse_start_map() method. The original
jlif_key_child_link enumeration has been replaced by 3 new values:
jlif_key_child_inlink, jlif_key_child_outlink and jlif_key_child_fwdlink

Previously we were passing the dbfType of the record link field to all
child links within it, which was wrong.
2018-05-14 23:43:13 -05:00
Andrew Johnson c2c32e5876 lnkState: Mark as non-volatile, remove lset::isConnected() method 2018-03-31 15:48:58 +01:00
Andrew Johnson 97ea68d40c Added DBF_OUTLINK support to lnkCalc
New out key specifying a child link to put the calculated result to.
2018-03-09 22:42:59 -06:00
Andrew Johnson 20404003bf More timestamp support for lnkCalc
Link now remembers the last timestamp read if a timestamp input
was nominated, and implements getTimestamp() to return this.
Also displays the timestamp value in the report output.
2018-03-05 20:55:57 -06:00
Andrew Johnson 1fa5d9d3b6 Cleanup warnings in lnkConst.c 2018-03-05 20:55:57 -06:00
Andrew Johnson 5e394e4928 dbJLink: Handle NULL returned by jlif::alloc() better
It might not mean out-of-memory, adjust error message.
Add OOM and dbfType error checks to all jlif::alloc() routines.

Change all IFDEBUG() in JLink types to use exported global variables.
This allows debug messages to be output from the jlif::alloc()
routines, since the jlink field isn't set when they're called.
2018-03-05 20:55:57 -06:00
Andrew Johnson c0d4835e66 lnkState: Add support for inverting the flag data
Determine the truthiness of put data in its original data type.
Adjust the link documentation to cover these changes.
2018-03-05 20:55:56 -06:00
Andrew Johnson 8ae34ba01d Add a "state" link type using the dbState API
Includes documentation in links.dbd.pod
2018-03-05 20:55:56 -06:00
Andrew Johnson 98f656fc96 Remove duplicate variables from lnkCalc.c 2018-03-05 20:55:56 -06:00
Andrew Johnson c94c1b47d8 More debug printf()s in lnkConst 2017-10-31 12:52:46 -05:00
Andrew Johnson 5f1435c775 Merge yajl-2.1.0 branch into 3.16 2017-10-30 16:14:35 -05:00
Andrew Johnson e3c9d5900e Added timestamp support to the lnkCalc link type. 2017-10-18 15:39:22 -05:00
Andrew Johnson 1fe3e9e772 Add dummy putValue methods to const link types
Includes a new softTest program to detect regressions.
Resolves http://www.aps.anl.gov/epics/core-talk/2017/msg00503.php
2017-09-07 13:48:39 -05:00
Andrew Johnson 80fa616a86 Convert lnkConst to 64 bit integers 2017-06-04 00:40:53 -05:00
Michael Davidsaver b4c625d8d1 jlif future proof for 64-bit json parser 2017-05-03 17:27:57 -04:00
Michael Davidsaver 4a9fe82575 std/link: runtime conditional debugging in calc/const 2017-04-28 16:59:26 -04:00
Michael Davidsaver be8de34130 std/link: all calc example 2017-04-27 19:50:46 -04:00
Andrew Johnson 33f3145fcc Updates to Release Notes and links.html 2017-04-25 22:52:08 -05:00
Andrew Johnson c71afb631c Make dbLinkIs{Constant|Volatile}() return only true/false 2017-04-25 20:37:09 -05:00
Andrew Johnson 421a2c8eb9 Tidy up lnkConst.c after Michael's bug-fix changes
Should make the code easier to follow.
2017-04-23 00:11:22 -05:00
Michael Davidsaver 54e94a1e12 std/link: lnkConst refactor
Avoid variable with same name as typedef.
Confuses qtcreator.
2017-04-21 16:08:48 -04:00
Michael Davidsaver 414e5b82b8 std/link: lnkCalc require expression
error if 'expr' key isn't provided.
2017-04-21 16:08:33 -04:00
Michael Davidsaver b99a7b9252 std/link: lnkConst fix mem leak and hard fail on no mem 2017-04-21 16:08:15 -04:00
Michael Davidsaver 43f6a06bcd std/link: lnkConst avoid cantProceed() 2017-04-21 16:08:10 -04:00
Andrew Johnson 23cef0339e Fix buffer allocation bug in lnkCalc.c 2017-04-21 13:56:49 -05:00
Andrew Johnson 611cb3f52e Fix typos, remove FIXMEs from lnkConst.c 2017-04-21 13:55:59 -05:00
Andrew Johnson 7e60faae10 No need to truncate const string array elements 2017-04-21 13:04:53 -05:00
Andrew Johnson d2db634ed2 Add dbLinkDoLocked() support
New lset method, implemented in all link types.
Includes a test for the dbCa implementation.
2017-04-19 16:44:11 -05:00
Andrew Johnson 8a9707e74f Fixed a small memory leak in lnkCalc 2016-09-06 22:28:36 -05:00
Andrew Johnson 2d4301f0bb Fix warnings from clang 2016-09-05 22:36:45 -05:00
Andrew Johnson 268e59b052 Minor updates 2016-09-05 15:38:16 -05:00
Andrew Johnson 5b74799605 Some documentation updates 2016-09-05 15:12:09 -05:00
Andrew Johnson cd49e245c2 Added JLink reporting infrastructure
Command 'dbjlr <record|*> <level>' calls the report method for
all JSON links in all records, or in one named record.
Added level and indent arguments to the jlif::report() method.

Added jlif::map_children() method for recursing through all
JSON links, plus dbJLinkMapChildren() and dbJLinkMapAll() APIs.

Implemented the report and map_children methods in the const
and calc link types.
2016-09-05 14:25:33 -05:00
Andrew Johnson 4448317d73 Add lnkConst_remove, fix debug messages 2016-09-04 16:02:59 -05:00
Andrew Johnson 4302da3628 Minor fixes to the calc link-type 2016-09-03 22:24:55 -05:00
Andrew Johnson f8d6cd98a0 Minor cleanups 2016-09-03 19:44:49 -05:00
Andrew Johnson 5fe3e8bfb5 Added calc link-type 2016-09-03 19:22:55 -05:00
Andrew Johnson 8d1c416551 Moved PV_LINK-specific code out of dbLink.c into link types
This required a change to the lset::getValue arguments, removing
the pstat and psevr pointers. Links can still return a non-zero
value from getValue and trigger a LINK:INVALID alarm, but for any
other alarm settings they must manipulate the record themselves.
2016-09-03 19:21:11 -05:00
Andrew Johnson 1e1c52cb69 Use new epicsStrnDup() API 2016-09-03 13:27:30 -05:00
Andrew Johnson 23c71e9965 Various improvements
* Added new lset::openLink() method, called on JSON_LINKs only
* Cleanup in dbJLink.c to prevent memory leaks.
* Removed jlif::start_parse() method.
* Renamed jlif::end_parse() to end_child, which will be called on
the parent link when a child link has succesfully finished parsing.
2016-09-01 23:21:23 -05:00
Andrew Johnson 3992d4b92a Split dbJLinkInit, JLinks are now parsed at load-time 2016-09-01 00:56:26 -05:00
Andrew Johnson 40a3a66745 Added loadLS routine to lset
The long string in/out records use a different initializer
for constant links. The new loadLS method allows a constant
link type to initialize such a long string field.

NB: This routine was added in the middle of the lset table.
Any external link support implementations must be adjusted.
2016-08-31 00:36:23 -05:00
Andrew Johnson d0dcd61b23 Add code for arrays of strings 2016-08-30 23:03:08 -05:00
Andrew Johnson 5ec0633282 Pass link dbfType to jlif allocator; needed! 2016-08-30 01:13:15 -05:00
Andrew Johnson 7edc0c67ca JSON Links implementation
The lnkConst.c implementation is not yet complete, no support for arrays of
strings (JMOP).

Link error messages should display their record & field name, which is not yet
possible.

The ability to embed links as parameters to other link types is not complete
yet; this will be required for the calc link type.

This code currently passes all existing tests, but additional tests are needed
for the new functionality.
2016-08-29 01:12:09 -05:00
Andrew Johnson 6a592dc2c0 Support "link(name, lset)" syntax in DBD files
Both Perl and dbStaticLib support included.
Also added a new std/link directory for link types.
Nothing looks up the registered link support tables yet.
2016-05-08 22:57:42 -05:00