Commit Graph

80 Commits

Author SHA1 Message Date
Michael Davidsaver
417821ddc0 fixups for DBCORE_API 2021-04-01 11:09:53 -07:00
Andrew Johnson
f571c5950b Modify DBD processing scripts to output Doxygen comments 2021-03-08 21:39:39 -06:00
Michael Davidsaver
504191441d Merge remote-tracking branch 'github/pr/99' into 7.0
* github/pr/99:
  fix an out-dated comment in the array filter code
  add macro dbfl_pfield to db_field_log.h and use it in dbGet
  fix in dbGet: decide use of db_field_log based on whether it has copy or not
  add macro dbfl_has_copy to db_field_log.h and use it in dbAccess.c
  refactor db_field_log and filters to get rid of dbfl_type_rec
  make it clearer what the result of wrapArrayIndices will be
2021-03-07 21:17:21 -08:00
Andrew Johnson
bbb4d86f78 Enable RTEMS testing in modules/database/test/std/link 2021-03-03 18:17:31 -06:00
Ben Franksen
27fe3e4468 refactor db_field_log and filters to get rid of dbfl_type_rec
This refactor simplifies and streamlines the code associated with server
side filters. Apart from immediate benefits (clearer code, less duplication)
it is also hoped that this will make it easier to add write filters.

The data pointer dbfl_ref.field can now either point to a copy owned by a
filter, or it can point to the original data owned by a record. In the
latter case, the dbfl_ref.dtor is NULL.

The dbExtractArray* functions are unified to the single function
dbExtractArray and stripped of conversion functionality. This is redundant
because we always call dbGet after applying filters, which takes care of
conversion. Accordingly, dbChannelMakeArrayCopy is now obsolete and its
single use (in the ts filter) replaced with dbExtractArray. Instead, we add
the helper function dbChannelGetArrayInfo to wrap the common boilerplate
around calls to the get_array_info method, used in both arr.c and ts.c.
2021-01-12 17:49:10 +01:00
Andrew Johnson
99852c6504 Merge JSON5 support into 7.0 2021-01-05 21:39:15 -06:00
Michael Davidsaver
cbac1c54f5 test/ioc/db: xRecord handle alarms 2020-11-18 10:54:44 -08:00
9048e998fb add tests for empty array filter results 2020-11-17 15:22:40 +01:00
Andrew Johnson
cf56a0e08e Fix linkFilterTest, move Release Notes to the right place 2020-10-30 17:43:03 -05:00
6b5abf76c8 do not handle empty arrays (undefined behavior) 2020-10-30 17:07:09 -05:00
3b3261c877 Revert "new error code for empty arrays"
This reverts commit d51b5513fda5ca7c6058990396d315cfff81cbfe.

Conflicts:
	modules/database/src/ioc/db/dbAccess.c
	modules/database/src/ioc/db/dbDbLink.c
2020-10-30 17:07:09 -05:00
30d8febb0b test code beautification 2020-10-30 17:07:09 -05:00
5d808b7c02 new error code for empty arrays 2020-10-30 17:07:09 -05:00
edb8f1a5df set number of planned link filter tests 2020-10-30 17:07:09 -05:00
bc34526bcb re-order link filter tests to alternate between success and failure 2020-10-30 17:07:09 -05:00
7ab56a68d1 db link filter tests added 2020-10-30 17:07:09 -05:00
Andrew Johnson
a7bf59079f Merge Dirk Zimoch's fix_zero_size_arrays branch 2020-10-29 17:07:35 -05:00
Michael Davidsaver
11984633dc conditional test of registerAllRecordDeviceDrivers() 2020-08-22 07:50:40 -07:00
Michael Davidsaver
bdd41cca13 move test of registerAllRecordDeviceDrivers() 2020-08-22 07:50:40 -07:00
Michael Davidsaver
e40970bd5e rename dynamic_registerRecordDeviceDriver -> registerAllRecordDeviceDrivers 2020-08-22 07:50:40 -07:00
Michael Davidsaver
2c389a90d1 test dynamic_registerRecordDeviceDriver() 2020-08-22 07:50:40 -07:00
Andrew Johnson
7cc246afc1 Modify database tests to use JSON5
(except for the tests that check parsing).
Remove escaped double-quotes in map keys where possible.
Replace escaped double-quotes with single quotes.
2020-08-09 00:33:07 -05:00
Andrew Johnson
75b89b40bf Support single-quoted strings in dbStatic JSON5 values
Teach lexer to recognize them.
Strip leading & trailing quotes from string values.
Add some tests.
2020-08-09 00:33:07 -05:00
Andrew Johnson
0c800d4428 JSON5 in dbStatic: Update bare-word JSON keys
Our bare-word character set is wider than JSON5's. Quote any
keys containing the extra characters so YAJL can parse them,
but don't quote keys unnecessarily.

Tests for this behavior are in dbStaticTest.db

Adjust the other tests that read links parsed by the dbStatic
parser that used bareword keys, which are no longer quoted.
2020-08-09 00:33:07 -05:00
Andrew Johnson
0fca5fc8a9 JSON5 in dbStatic: Lexer support for NaN and Infinity
The JSON5 spec requires exact capitalization of these strings.
Other numeric parsers such as strtod() are usually more lenient.
2020-08-09 00:33:07 -05:00
Andrew Johnson
fe177e40fd JSON5 in dbStatic: Add lexer support for hex integers
dbLex.l accepts hex notation in JSON numbers.
Tested in dbStaticTest.db as before.
2020-08-09 00:33:07 -05:00
Andrew Johnson
fa4af8b27d JSON5 in dbStatic: Modify lexer's number support
dbLex.l acceps a leading or trailing decimal point with float/double
values and an explicit leading + on all numbers.
Tested in dbStaticTest.db but only passing tests.
2020-08-09 00:33:07 -05:00
Andrew Johnson
980711589a database/test: Give xRecord fields of all numeric types
Extend dbStaticTest to check dbVerify() with all types.
2020-08-09 00:33:07 -05:00
Andrew Johnson
b2ef47573c Drop TODOs from regression tests, hex now works in array values 2020-08-09 00:33:07 -05:00
Andrew Johnson
97edcfc289 simmTest.c: Allow the clock to not always tick
On some systems the wall clock may tick slowly, so we must allow
the time to not change at all between checks.
Show the time differences.
2020-08-03 18:03:05 -05:00
Andrew Johnson
3c99391d93 Added SPDX License ID to all EPICS-original source files
In some cases the license-identification header was missing,
so I added that as well. Replaced the remaining headers that
specifically identified "Versions 3.13.7 and higher".

Makefiles and the build system were deliberately excluded.
2020-08-03 11:53:01 -05:00
473790124b bugfix: ai SoftDevice should return error status when get fails 2020-06-29 14:54:39 +02:00
Michael Davidsaver
6c914d19c3 db: validate dbrType 2020-06-02 07:55:22 -07:00
Michael Davidsaver
5917990908 dbPutGetTest test plain array field 2020-06-02 07:55:22 -07:00
Michael Davidsaver
eeb198db15 change arrRecord cvt_dbaddr() to behave like waveformRecord et al. 2020-06-02 07:55:22 -07:00
Michael Davidsaver
688bc3247c missing include 2020-05-28 16:07:50 -07:00
Andrew Johnson
808cf80579 Fix Makefiles to use RULES_DIRS instead of _TOP 2020-05-26 22:09:24 -05:00
36a8b51d8e CleanupWhitespace
removed spaces at end of line

replaced tabs with spaces
2020-05-20 14:48:09 -07:00
Andrew Johnson
5009f288ae Generate module version files with new RULES_EXPAND facilities
Also removes the separate *VersionNum.h@ templates
2020-03-20 12:03:14 -05:00
Gabriel Fedel
d82529058a Add a test to record seq in "Specified" mode 2020-02-14 15:09:11 +00:00
Michael Davidsaver
3465c0c8b0 simmTest imprecise 2020-02-14 13:25:43 +00:00
Andrew Johnson
3b20e71da5 EPICS::IOC.pm Save parms, more debug annotations 2020-01-01 15:03:40 -06:00
Andrew Johnson
aad8a96b0d Increase timeout for caget to 15 seconds 2020-01-01 00:08:06 -06:00
Andrew Johnson
83d2941405 netget: Run caget and pvget using EPICS::IOC instead of back-ticks
This lets us collect and echo their stderr streams, and if they
hang up without responding we can kill them directly instead of
just giving up and bailing out.

Left debug output turned on for now.
2019-12-31 22:28:43 -06:00
Andrew Johnson
b62ab817c6 Replace EPICS::IOC->kill() with exit() and close() methods 2019-12-31 22:21:03 -06:00
Andrew Johnson
5dc7995477 Enable IOC debug output in netget.plt 2019-12-27 17:36:37 -06:00
Michael Davidsaver
156b137af0 avoid 'struct dset'
doesn't work if -DUSE_TYPED_DSET
2019-11-15 21:11:27 -08:00
Michael Davidsaver
019c20476a test include public Com and db headers
Ensure that headers which are meant to be included
actually can be.
2019-11-15 21:11:27 -08:00
Andrew Johnson
171b3301a7 Fix ..// => ../ in Makefile-relative source paths 2019-10-28 15:00:15 -05:00
Andrew Johnson
3e7e26d8d7 Merge 3.15 branch into 7.0 2019-10-28 01:03:12 -05:00