Commit Graph

244 Commits

Author SHA1 Message Date
Andrew Johnson
30e634b97b Adjust calcout's handling of undefined links 2017-04-23 23:32:15 -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
cfe9a51c5d std/rec/test: start linkInitTest 2017-04-21 17:26:58 -04:00
Michael Davidsaver
066984e11d Merge branch 'master' into link
* master: (226 commits)
  ioc/db: testdbGetFieldEqual() detect zero size
  Cleanup in asLib
  Allow whitespace before comments in AS config files
  Supress MS warning C4251
  Add a plan to std/filters/test/syncTest.c
  Fix dbUnitTest.c
  avoid void* +=
  Fix and test for macLib losing error status
  update notes
  libCom/test: ipAddrToAsciiTest skip cleanup unless valgrind is possible
  libCom/test: add ipAddrToAsciiTest to testHarness
  db/test: dbPutGetTest check dbGet() of long string field
  db: dbGet() ensure long string nil and actual string length
  db/test: dbPutGetTest check for dbGet() attribute crash
  db: fix dbGet() for attributes as long string
  db/test: dbPutGetTest add test for lp:1678494
  db: fix dbGet() of link fields as DBF_CHAR
  dbUnitTest: add testdbGetArrFieldEqual()
  db/test: add dbPutGetTest
  Update release notes as per Michael's review comment
  ...

Conflicts:
	src/ioc/db/dbLink.c
	src/ioc/db/test/Makefile
	src/std/dev/devSoSoftCallback.c
	src/std/rec/boRecord.c
	src/std/rec/dfanoutRecord.c
	src/std/rec/longinRecord.c
	src/std/rec/longoutRecord.c
2017-04-21 17:20:12 -04:00
Michael Davidsaver
6c062981fb Merge remote-tracking branch 'launchpad/3.15'
* launchpad/3.15:
  ioc/db: testdbGetFieldEqual() detect zero size
  Cleanup in asLib
  Allow whitespace before comments in AS config files
  Supress MS warning C4251
  Add a plan to std/filters/test/syncTest.c
  Fix dbUnitTest.c
  avoid void* +=
  Fix and test for macLib losing error status
  update notes
  libCom/test: ipAddrToAsciiTest skip cleanup unless valgrind is possible
  libCom/test: add ipAddrToAsciiTest to testHarness
  Adjusted .gitignore patterns
  libCom/test: add network libraries for Windows builds
  Moved .bzrignore to .gitignore
  libCom/test: add ipAddrToAsciiTest
  libCom: revise ipAddrToAscii
2017-04-21 16:16:03 -04: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
Michael Davidsaver
8b24383e9e arrayOpTest: check initial dbGet value 2017-04-21 16:07:55 -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
dcb1f75b4d Cosmetic cleanups 2017-04-19 16:53:12 -05:00
Andrew Johnson
89f13aa51b Modify soft devices to synchronize TSEL=-2 timestamps
Use dbLinkDoLocked() to ensure a timestamp set by TSEL=-2
comes from the same update as the value.
2017-04-19 16:50:38 -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
b8f542fc0d Add a plan to std/filters/test/syncTest.c 2017-04-18 14:49:40 -05:00
Ralph Lange
2f510af603 Use (typed) rset instead of (untyped) struct rset inside Base 2017-03-30 14:35:24 +02:00
Ralph Lange
89a858f655 Remove remaining REC_TYPE defines 2017-03-27 09:49:30 +02:00
Ralph Lange
ef2da59c24 Remove REC_TYPE and UNTYPED_RSET/oldRecSup.h; add casts to record types 2017-03-24 17:07:22 +01:00
Ben Franksen
825c075df7 fixes in recSup and record types according to merge review
* removed struct valueDes
* made get_value take void (no arguments), added deprecation note
* removed misleading array size comment for get_units

Also added const to method parameters exactly where called in base with
const arguments.
2017-03-03 16:43:50 +01:00
Ben Franksen
cc946b760c partly fix lp:1666924, i.e. for rset only, as described in the ticket
This means:

* typed method definitions for struct rset
* using REC_TYPE macro in place of dbCommon
* define REC_TYPE as dbCommon unless defined
* in record supports, define REC_TYPE before including epics headers
* fix a few method types in record supports (e.g. void* -> REC_TYPE*)
* fix the type errors gcc finds in dbAccess.c and dbConvert.c
2017-02-24 21:11:11 +01:00
Andrew Johnson
e95fcb2e06 Merged changes from 3.15 branch, to revno 12807 2017-02-01 11:57:04 -06:00
Andrew Johnson
fab5ce675f Update comments in calcoutRecord 2016-12-12 17:44:01 -06:00
Ralph Lange
2841af7069 rec: add promptgroups for OFFS and SHFT of fanout and seq 2016-11-29 14:48:57 +01:00
Andrew Johnson
813166128e Merged changes from 3.15 branch, to revno 12781 2016-09-07 10:04:54 -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
056edc0d8a Undo buggy change 2016-08-28 23:41:35 -05:00
Andrew Johnson
37b6cbb50c Use new dbLink APIs instead of checking link.type 2016-08-27 16:30:48 -05:00
Andrew Johnson
bed1c618a8 Use dbPutLinkAsync() in all output SoftCallback dev's 2016-08-13 21:53:31 -05:00
Andrew Johnson
fe71fc98b8 Undo a small & unnecessary behaviour change 2016-08-12 23:53:42 -05:00
Andrew Johnson
d3a9ba7701 Fix issues related to const array initialization 2016-08-12 23:21:26 -05:00
Andrew Johnson
fb785e45c7 Adjust record and device support for array constants 2016-08-10 12:53:39 -05:00
Andrew Johnson
f169781de0 Merged remove-keywords-3.15 branch 2016-07-21 14:12:51 -05:00