Commit Graph
489 Commits
Author SHA1 Message Date
Andrew Johnson c71afb631c Make dbLinkIs{Constant|Volatile}() return only true/false 2017-04-25 20:37:09 -05:00
Andrew Johnson da94b7a2e4 Fix dbConstLink to handle a long-string array properly
Added a new parser dbLSConvertJSON for long-string arrays.
New test checks that only the first string element is used.
2017-04-24 17:09:01 -05: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 22b10adf29 ioc/db: testdbGetFieldEqual() detect zero size 2017-04-21 16:14:43 -04:00
Michael Davidsaver 7121b016d5 ioc/db: dbConstLoadLS handle size=0
handle size=0 and clarify
2017-04-21 16:08:04 -04:00
Andrew Johnson dcb1f75b4d Cosmetic cleanups 2017-04-19 16:53:12 -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 6f9905d060 Fix dbUnitTest.c 2017-04-18 14:48:54 -05:00
Michael Davidsaver f3841c4767 avoid void* += 2017-04-17 18:58:19 -04:00
Michael Davidsaver 6bf66d1c93 Merge remote-tracking branch 'launchpad/3.15'
* launchpad/3.15:
  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
  Adjusted .gitignore patterns
  Move .bzrignore to .gitignore
2017-04-06 20:32:48 -04:00
Michael Davidsaver b624222a0f db/test: dbPutGetTest check dbGet() of long string field 2017-04-06 20:28:04 -04:00
Michael Davidsaver 739a112bec db: dbGet() ensure long string nil and actual string length 2017-04-06 20:28:01 -04:00
Michael Davidsaver 5e082bb75d db/test: dbPutGetTest check for dbGet() attribute crash 2017-04-06 20:27:37 -04:00
Michael Davidsaver 8ebfd0821a db: fix dbGet() for attributes as long string
dbGet() of "rec.RTYP$" with DBF_CHAR and nRequest==1
not handled correctly.  Results in crash.
2017-04-06 20:27:34 -04:00
Michael Davidsaver fc8d4c2b5f db/test: dbPutGetTest add test for lp:1678494 2017-04-06 20:27:18 -04:00
Michael Davidsaver 1888253093 db: fix dbGet() of link fields as DBF_CHAR
dbGet() DBF_CHAR with nRequest==1 not handled correctly.
Results in crash.
2017-04-06 20:27:13 -04:00
Michael Davidsaver 8edefb9d63 dbUnitTest: add testdbGetArrFieldEqual() 2017-04-06 20:27:03 -04:00
Michael Davidsaver 0f31e35b87 db/test: add dbPutGetTest 2017-04-06 20:25:55 -04:00
Ralph Lange 865a870912 Merged typed-recsup branch (by Ben / Ralph) 2017-04-05 09:42:16 +02:00
Ralph Lange 2f510af603 Use (typed) rset instead of (untyped) struct rset inside Base 2017-03-30 14:35:24 +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
Andrew Johnson 20627c0465 Merged changes from 3.15 branch to revno 12809 2017-03-08 10:36:41 -06:00
Andrew Johnson d6b0c3041e Merged changes from 3.14 branch to revno 12703 2017-03-06 15:40:28 -06:00
Andrew Johnson 17bd1ae6d0 db/test: Fix warning from clang 2017-03-03 12:23:36 -06:00
Ben Franksen ff91ede462 revert use of struct dbr_precision in call to get_precision in dbAccess.c 2017-03-03 16:41:03 +01:00
Michael Davidsaver 1d749ac7e7 dbLock: add assert in dbScanLock
catch locking attempts before iocInit()
2017-02-28 21:00:57 -06:00
Michael Davidsaver 6377c2e1e4 db/test: dbPutLinkTest include json links and more 2017-02-28 20:58:11 -06:00
Andrew Johnson 8069d9d80b dbUnitTest: Improve output slightly 2017-02-28 20:55:05 -06:00
Michael Davidsaver 46993a5e38 dbUnitTest: more informative dbPutField*() 2017-02-28 20:09:21 -06:00
Michael Davidsaver 428dfe7a5c add testing lset 2017-02-28 18:00:51 -06:00
Ben Franksen 1c3ffa1c76 fixed the wrong fix for getOptions in dbAccess.h 2017-02-26 13:54:58 +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 c52088205e Remove constant link checks from test device 2017-02-17 14:15:31 -06:00
Andrew Johnson e95fcb2e06 Merged changes from 3.15 branch, to revno 12807 2017-02-01 11:57:04 -06:00
Andrew Johnson dfc1b8ac23 Merged scan-rate protection changes from 3.14 branch, to revno 12693 2017-01-06 17:24:57 -06:00
Andrew Johnson 63b059c35e Resolve additional cppcheck issues; fix iOS build 2016-12-07 17:51:00 -06:00
Andrew Johnson dba6971e07 Merged changes from 3.14 branch to revno 12687 2016-12-07 16:36:58 -06:00
Andrew Johnson 726d7c6715 Fix chfPluginTest for MS 2015 compiler 2016-11-15 10:34:10 -06:00
Andrew Johnson b59a60e266 Merged the bigdb-3.15 branch with PHAS fix 2016-10-07 17:35:07 -05:00
Andrew Johnson da5455ed22 Fixes for Windows builds 2016-09-09 11:14:59 -05:00
Andrew Johnson 58c78af4f9 Initialize all fields of jlink, link types may not use calloc 2016-09-07 23:35:39 -05:00
Andrew Johnson 813166128e Merged changes from 3.15 branch, to revno 12781 2016-09-07 10:04:54 -05:00
Andrew Johnson b2012fdfb5 Added test link type, fix dbPutLinkTest for JSON_LINKs 2016-09-07 00:50:40 -05:00
Andrew Johnson c12a35e388 Clean up memory leaks 2016-09-07 00:47:51 -05:00
Andrew Johnson 2d4301f0bb Fix warnings from clang 2016-09-05 22:36:45 -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 19447dc7ff Make the long-string buffer for link fields bigger
When representing a link field as a long string (.INP$)
we have to pick some size limit for the buffer.
Previously this was the max length of a PV name + 12 chars,
but with JSON links that's not big enough.

This commit sets it to 1KB and defines a macro so it will be
easier to change in the future if necessary.
2016-09-04 16:56:15 -05:00
Andrew Johnson dd311be319 JLink: Convert parser->linkDepth into jlink->parseDepth
This counter is indicates when we've finished parsing a link,
and needs to be stored with link rather than the parser so it
keeps its value while parsing embedded links. This fixes the
embedded links bug.

Also removed the limit on a link name's length.
2016-09-04 16:33:10 -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