Commit Graph

172 Commits

Author SHA1 Message Date
Michael Davidsaver
7c00cc8045 ioc/dbStatic: HW links allow optional '@'
For HW link types other than INST_IO, allow
trailing '@' to be omitted.
2018-09-05 12:21:53 +02:00
Andrew Johnson
a447ed8bd0 Merged Dirk Zimoch's info_fields branch into 3.16
Used --squash to drop noisy history.
Modified the dbli output format slightly.
2018-07-16 15:49:10 -05:00
Andrew Johnson
ba4c609506 Merge changes from 3.15 into 3.16 2018-05-12 22:39:37 -05:00
Andrew Johnson
1b332361e7 Merge changes from 3.14 into 3.15 2018-05-12 20:47:54 -05:00
Andrew Johnson
f44da65942 Merge 3.15 branch into 3.16 2018-03-09 13:21:09 -06:00
Andrew Johnson
be8f35d782 Fix for lp: #1754298
Cleaned up and reformatted since Dirk's original.
2018-03-09 12:46:46 -06:00
Andrew Johnson
c05101bb3f Make dbGetString() fetch link fields properly before iocInit 2018-03-06 18:23:34 -06:00
Andrew Johnson
958c81db89 Protect dbGetString() if field has overflowed
Only return the number of characters that a string field can actually
hold, in case it had a buffer overflow.
2018-03-06 17:25:42 -06:00
Andrew Johnson
292141458c Merge 3.15 branch into 3.16 2018-02-24 21:35:01 -06:00
Andrew Johnson
e41f8bf518 Translate and escape chars in info tag strings
Fixes LP: #1716998
2018-02-24 19:11:54 -06:00
Andrew Johnson
5f1435c775 Merge yajl-2.1.0 branch into 3.16 2017-10-30 16:14:35 -05:00
Andrew Johnson
5641afa0e2 Change pvlOptTSELisTime to DBLINK_FLAG_TSELisTIME
Renames recGblTSELwasModified() to TSEL_modified() in dbLink.c.
Adds some tests for using JSON link types in dbCommon links.
2017-09-19 00:12:18 -05:00
Andrew Johnson
f464274439 Remove declarations of previously-deleted functions
Fixes LP: #1696801
2017-06-12 18:15:12 -05:00
Andrew Johnson
4c6b570a46 Permit trailing commas in JSON maps & arrays
Handled in both dbYacc and yajl parsers.
Adds tests to linkInitTest.
2017-06-05 12:49:26 -05:00
Andrew Johnson
542353aedb Fix aai constant initialization
The aai record is "special" and does things its own way.
These changes let it support {const:[...]} initialization without
breaking regular input link types which could be initialized twice
without the new DBLINK_FLAG_INITIALIZED guard in dbInitLink().

Also adds tests for this, and for similar links for waveform.
2017-05-23 23:51:26 -04:00
Michael Davidsaver
d5fc8c9b76 ioc/dbStatic: reduce warning spam for typed rset
There are an amazing number of warnings in any code which
includes recSup.h indirectly, including dbStaticLib.h.
Don't use the RECSUPFUN typedef internally to reduce
the number.
2017-05-07 10:06:38 -04:00
Michael Davidsaver
987943be4e Merge remote-tracking branch 'int64b/master'
* int64b/master: (25 commits)
  std/rec: streamline variable names in int64in/int64out
  std/rec/test: recMiscTest check in64in/out
  ioc/db: dbUnitTest helps support int64
  std/rec: ioc64in/outRecord typed rset
  minor
  std/rec: fix copyright in int64in sources
  std: remove SCM keywords from int64in and int64out sources
  std/rec: fix promptgroups in dbd.pod files
  std/rec: add and improve pod for int64in and int64out
  std/rec: add pod documentation content for int64out
  std/rec: add pod documentation for int64out record
  dbStatic: dbPutStringNum() overflow handling
  dbStatic: more informative error for bad field value
  dbStatic: dbPutStringNum(, "") not an error
  Release Notes
  cvtFastPerform: Rename reserved member names, fix for vxWorks
  Simplify epicsConvertDoubleToFloat()
  More cvtFastPerform changes
  Collate and report by precision
  Restructure cvtFastPerform, fix VxWorks build
  ...
2017-05-04 20:18:24 -04:00
Michael Davidsaver
16a3657613 Merge remote-tracking branch 'linksup/master'
* linksup/master: (112 commits)
  ioc/dbStatic: rename link debugging info tags
  jlif future proof for 64-bit json parser
  Demonstrate and use numeric literals in calc args
  separate jlink and lset debug flags
  std/link: runtime conditional debugging in calc/const
  std/rec/test: extend linkRetargetLink w/ jlink
  ioc/db: dbUnitTest add testdbPutArrFieldOk()
  ioc/db: cleanup dbEvent freeLists
  ioc/db: dbUnitTest testMonitor leaks dbChannel
  std/link: all calc example
  jlink conditional debug print
  ioc/as: dbCore needs ca
  Additional linkInitTest checks
  Minimize work done in readLocked routine
  Minimize work done in readLocked() routine
  Cosmetic changes to various soft device supports
  Enhancements to subArray record & soft device support
  Fix bug in eventRecord::init_record
  Updates to Release Notes and links.html
  Make dbLinkIs{Constant|Volatile}() return only true/false
  ...

Conflicts:
	documentation/RELEASE_NOTES.html
	src/ioc/db/dbAccess.c
2017-05-04 20:14:30 -04:00
Michael Davidsaver
8ae7930375 ioc/dbStatic: rename link debugging info tags 2017-05-04 20:12:02 -04:00
Michael Davidsaver
7805fbe295 ioc/dbStatic: rename dbRecordNode aliasedRecord -> aliasedRecnode 2017-05-03 19:31:38 -04:00
Michael Davidsaver
925d03bcec minor 2017-05-03 17:54:58 -04:00
Michael Davidsaver
1151d78cb5 Merge remote-tracking branch 'launchpad/master'
* launchpad/master: (116 commits)
  ioc/rsrv: bounds check DBR
  CAref mention EPICS_CA_MCAST_TTL
  EPICS_CA_AUTO_MAX_ARRAY_BYTES -> EPICS_CA_AUTO_ARRAY_BYTES
  missing include
  ioc/db/test: dbStaticTest dbInitEntryFromAddr() works before iocInit()
  ioc/db/test: dbStaticTest test operations on aliases
  ioc: rename dbCommonPvt::recnode
  ioc/dbStatic: better alias tracking
  ioc/dbStatic: add dbInitEntryFromRecord()
  ioc: populate RDES early
  rename dbInitEntryFromChannel -> dbInitEntryFromAddr
  ioc/db: Add dbCommonPvt
  ioc/dbStatic: add dbInitEntryFromChannel()
  ioc/dbStatic: dbAllocRecord whitespace
  ioc/rsrv: fix C89 issue
  add EPICS_CA_MCAST_TTL
  update RELEASE_NOTES
  replace caLimitArray with EPICS_CA_AUTO_MAX_ARRAY_BYTES
  update RELEASE_NOTES
  rename iocshFind -> iocshFindCommand
  ...

Conflicts:
	documentation/RELEASE_NOTES.html
	src/ioc/db/dbConvert.c
	src/ioc/db/dbFastLinkConv.c
	src/ioc/db/test/Makefile
	src/ioc/db/test/dbPutGetTest.c
	src/ioc/db/test/dbPutGetTest.db
	src/ioc/dbStatic/dbStaticRun.c
2017-05-03 17:54:43 -04:00
Michael Davidsaver
ec3a89e43c ioc: rename dbCommonPvt::recnode 2017-05-02 21:11:46 -04:00
Michael Davidsaver
62475a383e ioc/dbStatic: better alias tracking
Ensure that alias of alias sets DBRN_FLAGS_HASALIAS
on the aliased dbRecordNode.

Add dbFollowAlias() for completeness.
2017-05-02 21:11:46 -04:00
Michael Davidsaver
6ba949cdb4 ioc/dbStatic: add dbInitEntryFromRecord() 2017-05-02 21:11:46 -04:00
Michael Davidsaver
5d37bc2996 ioc: populate RDES early
The record type is known at allocation time,
so store RDES immediately.
2017-05-02 21:11:46 -04:00
Michael Davidsaver
2eaede9925 rename dbInitEntryFromChannel -> dbInitEntryFromAddr 2017-05-02 21:11:46 -04:00
Michael Davidsaver
12d68e6021 ioc/db: Add dbCommonPvt
Add some hidden "fields" for every record.
Allows Base internal hidden accounting
which can be changed without an ABI break.
2017-05-02 21:11:46 -04:00
Michael Davidsaver
78a7ad168e ioc/dbStatic: add dbInitEntryFromChannel()
Constant time population of a DBENTRY from
a valid dbAddr.
2017-05-02 21:11:46 -04:00
Michael Davidsaver
f716b1b26a ioc/dbStatic: dbAllocRecord whitespace 2017-05-02 21:11:46 -04:00
Michael Davidsaver
a873c4f3dc Merge remote-tracking branch 'launchpad/3.15'
* launchpad/3.15:
  rename iocshFind -> iocshFindCommand
  Added patch
  Changed function outputs to remove pointer to next function.
  more whitespace
  whitespace
  Added functions to allow access to what functions and variables the ioc shell has registered.
  missing include
  ioc/dbStatic: dbFreeBase() don't double free alias'd records
  ioc/dbStatic: plug leak in dbFreeBase()
  ioc/dbStatic: whitespace
  Fix indentation warning from GCC
  libCom/test: errlog test more verbose
  libCom: STATIC_ASSERT use c++11 static_assert when possible
  Check for empty PV names in Perl catools

Conflicts:
	src/std/rec/subRecord.c
2017-05-02 19:08:51 -04:00
Michael Davidsaver
875e4db3f9 Merge remote-tracking branch 'launchpad/3.14'
* launchpad/3.14:
  missing include

Conflicts:
	src/ioc/dbStatic/dbStaticLib.c
2017-05-02 18:38:40 -04:00
Michael Davidsaver
8c8604c503 Merge remote-tracking branch 'launchpad/3.14'
* launchpad/3.14:
  ioc/dbStatic: dbFreeBase() don't double free alias'd records
  ioc/dbStatic: plug leak in dbFreeBase()
  ioc/dbStatic: whitespace
  Fix indentation warning from GCC
  libCom/test: errlog test more verbose
  libCom: STATIC_ASSERT use c++11 static_assert when possible
  Check for empty PV names in Perl catools

Conflicts:
	src/ioc/dbStatic/dbStaticLib.c
	src/libCom/osi/epicsAssert.h
2017-05-02 18:31:40 -04:00
Michael Davidsaver
f65b2119ad separate jlink and lset debug flags
"lsetDebug" for lset callbacks and "jlinkDebug" for jlink parsing.
2017-04-28 17:11:47 -04:00
Michael Davidsaver
579a0791ea jlink conditional debug print
Enable magic info("linkDebug","YES") to enable
debug prints during parsing.
2017-04-27 19:46:33 -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
Ralph Lange
ecf5ab4a4c Deprecate RECSUPFUN and the untyped struct rset. 2017-03-30 16:14:09 +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
19be96ec3a Add opt-in switch USE_TYPED_RSET 2017-03-30 14:28:48 +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
40c9e4799b use new typed rset only if UNTYPED_RSET is not defined, adapted release notes
Also moved the old definition(s) to a separate header file named oldRecSup.h
to avoid cluttering the new header file.
2017-03-21 17:01:13 +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
Andrew Johnson
5dcd3483ba dbStatic: dbPutStringNum() overflow handling
Default to accepting over-size integers in DB fields, truncate to field size.
E.g. permits setting DBF_LONG fields to 0xffffffff.
Adds dbConvertStrict config variable to disable this.
2017-02-28 00:25:43 -06: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
85b5551b3b Merged final changes from 3.14.12.6 release 2016-12-09 17:27:35 -06:00
Ralph Lange
de6a442048 dbStatic: fix compiler warnings (unused variables) 2016-10-07 10:29:28 +02:00
Ralph Lange
336bd656c8 dbStatic: only sort records alphabetically if explicitly configured (default: no sorting) 2016-10-06 15:36:44 +02:00
Ralph Lange
344928bdc6 dbStatic: remove dbRenameRecord() 2016-10-06 13:31:40 +02:00
Ralph Lange
843fb8ca95 dbStatic: update dbCreateAlias() to add to record list (instead of insertion sort) 2016-10-06 13:02:46 +02:00