Commit Graph

56 Commits

Author SHA1 Message Date
Andrew Johnson bc54524270 Fix bad JSON char detection in dbStatic
Thanks to Dirk Zimoch for pointing this out.
2023-01-24 11:08:13 -06:00
Andrew Johnson b460c2659e Fix for GH issue #219, menu fields with non-choice values
It's rare, but menu fields may hold a value that does not correspond
to one of the menu choices; the default value of the SSCN fields is
the most common example (65535). Change the type conversion routines
to return a numeric string instead of giving an error.

DBF_DEVICE was fixed in dbFastLinkConv.c before the 7.0.7 release.
2022-12-20 20:12:04 -08:00
Michael Davidsaver d9ca8a70f0 Com: iocsh: Tab completion
Add tab completion for "help ...", record names, and "pdbbase"
2022-12-20 20:12:04 -08:00
Michael Davidsaver f0369058bb dbReadCOM missing newline in error 2022-09-02 08:08:27 -07:00
Michael Davidsaver e28c914966 dbDumpRecordType show field offset/size 2022-08-20 13:53:03 -07:00
Minijackson a722bb9289 treewide: add usage help to various iocsh functions 2022-06-20 08:09:42 -07:00
Michael Davidsaver 91941af992 quiet warnings 2022-03-04 10:00:12 -08:00
Michael Davidsaver d2644baf38 minor 2022-03-03 13:16:57 -08:00
Michael Davidsaver 62092d4399 test dbReadDatabaseFP() 2022-03-03 13:16:53 -08:00
Michael Davidsaver 6c5d56688d help out IDEs 2022-03-03 13:16:50 -08:00
Michael Davidsaver a6779df21c dbReadDatabaseFP() always fclose() 2022-03-03 13:16:45 -08:00
zimoch 9a09436ac8 allow hex (and octal) in hardware links
Conflicts:
	modules/database/src/ioc/dbStatic/dbStaticLib.c
2021-11-10 10:15:39 +01:00
Andrew Johnson 8e2f78caf5 dbStatic: Better error reports for bad JSON string chars 2021-09-03 14:16:37 -05:00
Michael Davidsaver e34b6c5c0c Fix spelling in comments
Should be non-functional, except for some error message strings.
2021-08-29 07:27:50 -07:00
zimoch 42d06d6a38 Fix bugs in dbRecordNameValidate() 2021-08-29 07:25:14 -07:00
Michael Davidsaver 417821ddc0 fixups for DBCORE_API 2021-04-01 11:09:53 -07:00
Michael Davidsaver 0f428ea334 use DBCORE_API
git ls-files modules/database/src/ioc|egrep '\.[hc]p*$' | xargs sed -i \
 -e 's|epicsShareFunc|DBCORE_API|g' \
 -e 's|epicsShareClass|DBCORE_API|g' \
 -e 's|epicsShareExtern|DBCORE_API extern|g' \
 -e 's|epicsShareDef\s*||g' \
 -e 's|shareLib\.h|dbCoreAPI.h|g' \
 -e 's|epicsShareAPI|epicsStdCall|g' \
 -e '/#define\s*epicsExportSharedSymbols/d'
2021-04-01 10:57:19 -07:00
Oksana Ivashkevych 7eb7988e55 Add usage to miscIocRegister.c and dbStaticIocRegister.c 2021-03-14 16:30:28 -07:00
Michael Davidsaver 2c1c35268e db: Suggest DBF_MENU values on parser error 2021-02-08 09:22:27 -08:00
Michael Davidsaver 27918cb7a1 improve error message from dbPutString() for DBF_MENU/DEVICE 2021-02-08 09:22:27 -08:00
Andrew Johnson 99852c6504 Merge JSON5 support into 7.0 2021-01-05 21:39:15 -06:00
Andrew Johnson 68121ec907 Merged Dirk's fix_one_element_input_link_arrays branch 2020-10-22 10:14:10 -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 b34d3c83fc Add support for hex escapes to the dbStatic lexer
Only translate escaped chars that are inside a jsonSTRING value.
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 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
Michael Davidsaver dcee015f71 validate alias names as well 2020-06-29 14:44:04 -07:00
Michael Davidsaver fddd65ccb1 yet more record name validation 2020-06-29 11:33:21 -07:00
Michael Davidsaver 7f9fefc2a4 Further record name validation 2020-06-26 13:22:11 -07:00
Michael Davidsaver b34aa594c8 popFirstTemp() may return NULL
This indicates an earlier error, which should already
been printed.
2020-06-22 12:09:26 -07:00
Michael Davidsaver 3124d972bf fix crash on bad record name 2020-06-22 12:09:26 -07:00
Michael Davidsaver 49889d8549 Extend record name validation
Begin enforcing earlier check (and tab).
Add new warning for record names beginning
with numeric or '{'.
2020-06-22 12:09:26 -07:00
zimoch cc616371b1 allow constant links with numeric 1 element arrays like [42] 2020-06-08 15:05:22 +02:00
Michael Davidsaver 786c4c2ca2 Revert "dbRecordtypeFieldItem() avoid excess strcmp()"
This reverts commit 48eb4ff4ac.
2020-06-02 11:26:07 -07:00
Michael Davidsaver 48eb4ff4ac dbRecordtypeFieldItem() avoid excess strcmp()
only one is going to match.
2020-06-02 07:55:22 -07:00
hir12111 0f88c67473 Add a getter function for field_type 2020-05-21 12:06:56 -07:00
zimoch 36a8b51d8e CleanupWhitespace
removed spaces at end of line

replaced tabs with spaces
2020-05-20 14:48:09 -07:00
Michael Davidsaver 799e72b1e3 libCom: actually use libComAPI.h in libCom 2020-05-20 14:47:51 -07:00
Michael Davidsaver bc595e3a70 Merge remote-tracking branch 'lp-anj7/typed-dsets' into 7.0
* lp-anj7/typed-dsets:
  Bump database version to 3.18.0, use in SHRLIB_VERSION
  Adjust example code in devSup.h
  Set USE_TYPED_DSET centrally now everything uses it
  Update the wording of the Release Notes entry
  - Record updates:   . histogramRecord   . eventRecord   . aaiRecord   . aaoRecord
  - Record updates:   . aoRecord   . biRecord   . boRecord   . mbbiRecord   . mbbiDirectRecord   . mbboRecord   . mbboDirectRecord   . longinRecord   . longoutRecord   . stringoutRecord   . stringinRecord   . waveformRecord   . calcoutRecord   . subArrayRecord
  initial typed-dset changes for ao record
  Add Release Notes entry about dsets
  Export and use aidset, set USE_TYPED_DSET
  Remove duplicated include line
  Add HAS_<record>dset macros to allow detection
  Export and use int64outdset, set USE_TYPED_DSET
  Export and use int64indset, set USE_TYPED_DSET
  Modify lsodset, set USE_TYPED_DSET
  Modify lsidset, set USE_TYPED_DSET
  Modify printfdset, set USE_TYPED_DSET
2020-04-30 11:26:08 -07:00
Michael Davidsaver ce4fb6085f iocsh: add usage messages 2020-04-24 20:28:00 -07:00
Andrew Johnson 85d1982890 Merge changes from 3.15 branch into 7.0 2020-04-15 21:39:54 -05:00
Andrew Johnson 048689d6db Adjust example code in devSup.h 2020-03-06 23:20:55 -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 632d1f45c8 Merge branch 'putf-pact' into 7.0
* putf-pact:
  RPRO/PUTF log instead of assert()
  RPRO/PUTF test all three link types
  RPRO/PUTF rename
  RPRO/PUTF also handle self link case
  fix RPRO/PUTF regression
  test for RPRO/PUTF regression
  dbRec2Pvt()
  Remove Warning: 'blah.PUTF' found true with PACT false
  dbNotify set PUTF
2019-03-13 18:04:18 -07:00
Andrew Johnson 44510f2fb2 Merge 3.15 branch into 7.0 2019-03-07 12:56:57 -06:00
Andrew Johnson 0211698b69 Move dbAccess prototypes to the correct header file 2019-02-01 12:02:41 -06:00
Michael Davidsaver 5eb7da4595 dbRec2Pvt() 2019-01-31 20:16:03 -08:00