Commit Graph

10082 Commits

Author SHA1 Message Date
Ralph Lange
9f5f5246aa Added required mask per plugin to shorten check loop. Trivial test change. [src/db/chfPlugin.c src/db/test/chfPluginTest.c] 2012-04-27 13:21:52 -04:00
Ralph Lange
52c6eaa848 Refactor: get rid of ...Ctx (as Ctx is often used for user handles) [src/db/chfPlugin.c] 2012-04-27 13:21:52 -04:00
Michael Davidsaver
de134ea72d Added chfPlugin, a simple interface for channel filter plugins.
- chfPlugin.h contains the simple jump table and doxygen documentation
  - chfPlugin.c is a wrapper library around the yajl callbacks that parses
    any client-supplied configuration into the user's structure
  - test/chfPluginTest.c tests the library and the data conversion
2012-04-27 13:21:51 -04:00
Ralph Lange
d22b719e32 Changed the structure for channel filters and channel filter plugins.
- Made chFilterPlugin public (moved from dbChannel.c to dbChannel.h)
  - Made the interface jump table chFilterIf part of the chFilterPlugin
    (i.e. once per plugin) instead of chFilter (once per instance)
  - Added a pointer from chFilter (instance) to chFilterPlugin (plugin)
  - Added a private user pointer in chFilterPlugin
  - Changed dbFindFilter() to return a chFilterPlugin* (instead of the jump table)
  - Changed dbRegisterFilter() to accept a user private pointer as 3rd arg
2012-04-27 13:21:50 -04:00
Ralph Lange
f65ec61dc3 Fix: Call dbChannelDelete() when client connection is lost. [rsrv/caservertask.c] 2012-04-27 13:21:49 -04:00
Andrew Johnson
a2fadc15a7 Must clear link type before calling dbLockSetSplit() 2012-04-27 13:21:48 -04:00
Andrew Johnson
4ef35a5f5c Move recGblInitConstantLink() functionality into dbLink.c
Using dbFastPutConvert for string to number conversion.
2012-04-27 13:21:48 -04:00
Michael Davidsaver
74b24bbe0f Refactor link handling code (incomplete).
* Moved routines into dbLink.h and dbLink.c
  * Created separate routines for DB_LINK processing
  * Added dbinitLink() and dbAddLink()
  * Started a Link Support Entry Table, not used yet
  * Everything should still work as before...
2012-04-27 13:21:47 -04:00
Andrew Johnson
06d3397342 Fix compiler warnings. 2012-04-27 13:21:47 -04:00
Andrew Johnson
58d1e22e0f Improve output from Show routines. 2012-04-27 13:21:46 -04:00
Andrew Johnson
19a166a60d Various updates.
* Added dbChannelGet()
 * Implement dbChannelGetField() using dbChannelGet()
 * Close filters in reverse order of opening
 * Messages and comments improved.
2012-04-27 13:21:46 -04:00
Andrew Johnson
1047f42b15 Simplify implementation.
* dbGet() now handles DBF_*LINK fields,
 * Simplify dbGetField(),
 * Split out getAttrValue(),
 * Rename dbGetFieldLink() to getLinkValue(),
 * Reduce number of casts.
2012-04-27 13:21:45 -04:00
Andrew Johnson
9a02181084 Add ellPop() function, removes and returns the last node on a list. 2012-04-27 13:21:45 -04:00
Andrew Johnson
06bcdb0ade Tindying up.
Fixed issues with dbChannelDelete() and dbChannelShow().
2012-04-27 13:21:45 -04:00
Michael Davidsaver
e94fd29b9b fix camessage 2012-04-27 13:21:44 -04:00
Michael Davidsaver
bcfaa63d8c complete rename 2012-04-27 13:21:44 -04:00
Michael Davidsaver
4c2eba502a Rename dbChannelData() to dbChannelField()
dbChannel_get() now uses dbChannelGetField()
 dbChannel_put() now uses dbChannelPutField()
 Conflicts:

	src/db/db_access.c
2012-04-27 13:21:43 -04:00
Andrew Johnson
07b3b7e32d Make casr print the full channel name, not just the record name. 2012-04-27 13:21:43 -04:00
Andrew Johnson
1d274aba0d Make dbChannel_create() call dbChannelOpen() 2012-04-27 13:21:43 -04:00
Andrew Johnson
b4dbcf2b1a Don't parse field modifiers in dbChannelTest()
dbChannelDelete() returns void
 update tests.
2012-04-27 13:21:42 -04:00
Michael Davidsaver
e37c5c99bb adapt db_get_field_and_count to dbChannel_get_count 2012-04-27 13:21:42 -04:00
Michael Davidsaver
8bf53d3c59 Replaced dbAddr with dbChannel in all CA-server related code
* Routines with a db_access interface are named dbChannel_xxx
 * Using dbch for member variable names in Jeff's code

It seems to work!

TODO: Make dbChannel use a freelist
2012-04-27 13:21:41 -04:00
Andrew Johnson
56468b684e Extended functionality of dbChannel code:
* Deleted the chan->magic member and associated checks.
 * Moved rset->cvt_dbaddr() call into dbChannelCreate()
 * Added many accessor routines
 * Renamed dbChannelReport() to dbChannelShow() and added dbChannelFilterShow()
2012-04-27 13:21:41 -04:00
Andrew Johnson
f4d55f1249 Changed dbChannel management API to Test/Create/Delete 2012-04-27 13:21:40 -04:00
Andrew Johnson
4324ffd274 Various improvements:
* A filter's parse routines now return a parse_result (enum)
 * Return value from test filter parse routines is configurable
 * Either call parse_end() or parse_abort(), but never both.
2012-04-27 13:21:40 -04:00
Michael Davidsaver
eee5a28983 Integrated dbChannel more and extended its functionality:
* Register filters in pdbbase, using a list and gphash
 * Do record and field search first
 * Test loads a DBD/DB file to provide a record to find
2012-04-27 13:21:39 -04:00
Andrew Johnson
0ab891fca4 Added gphFindParse(), which takes a string length parameter.
This is useful for hash lookups while parsing a const string, to avoid
 having to copy and nil-terminate it.
2012-04-27 13:21:33 -04:00
Michael Davidsaver
68dfeb76c0 Adding dbChannel JSON parser and test files.
Passes 33 tests.
2012-04-27 13:21:32 -04:00
Andrew Johnson
cf623e290a Upgraded to yajl version 1.0.9. 2012-04-27 13:21:31 -04:00
Andrew Johnson
359fc1b69e Move YAJL_API to front of declarations. 2012-04-27 13:21:31 -04:00
Andrew Johnson
625a7adc69 Add Lloyd Hilaiel's Yet Another JSON Library v 1.05 to libCom.
This is BSD licensed, modified only enough to build under EPICS.
2012-04-27 13:21:29 -04:00
Andrew Johnson
729f04ecce Merged Michael's dontcant branch.
This removes various calls to cantProceed() and its relatives
and replaces them with an error return status when a resource
allocation fails.  It only does it for routines that already
have an error status return, so it makes no API changes, and
will prevent threads from being suspended unnecessarily.
2012-04-19 13:57:05 -05:00
Andrew Johnson
545166281c Merged Dirk Zimoch's named-soft-events branch
Added the iocsh command postEvent
Marked a couple of char * args as const
2012-04-10 17:10:50 -05:00
Andrew Johnson
afd9e69a25 Merged parallel-fixes branch
This separates out the rules for %.d files from the rules that
create the related target file (%.o etc).  Doing this can reduce
the amount of work to be done when rebuilding applications after
making source changes.  For files in O.Common which can be built
by any target architecture this can solve problems when parallel
builds (-j) are used.
2012-04-06 16:13:22 -05:00
Andrew Johnson
ad4d9ca9d9 Minor build cleanups
Removed %.C and %.H from vpath (rules were deleted some time ago)
Added %.pl to vpath for use in ioc/registry/Makefile
configure/tools doesn't exist any more, remove from configure/Makefile
2012-04-06 15:37:52 -05:00
Andrew Johnson
09c313764e Merged changes from 3.14 branch
Includes all changes up to revno 12334 on 2012-04-04
2012-04-06 12:22:20 -05:00
Andrew Johnson
3a1252da17 Updates to build for iOS targets 2012-04-06 10:11:34 -05:00
Andrew Johnson
e39c5aad8b libCom: Cleaned up bldEnvData.pl and makeEpicsVersion.pl
Added a -q flag, and cleaned up and simplified the code.
Added -h (help) options, and make more use of other modules.
2012-04-05 17:28:19 -05:00
Andrew Johnson
5d5aa57d72 tools: Add -q (quiet) flag to installEpics.pl
The -q flag now gets used when the GNUmake '-s' flag is provided.
This change also includes a cleanup of the installEpics.pl script.
2012-04-04 12:30:27 -05:00
Andrew Johnson
de6d7b2cf0 Merged compiled-dbd branch.
This does all DBD-file processing at build-time in Perl scripts.
The result should behave almost identically to the old programs.
2012-04-04 12:07:46 -05:00
Janet Anderson
281f0e004b Reordered include lines for windows dll build. 2012-04-02 15:33:32 -05:00
Andrew Johnson
8ed86967d1 Don't build command-line programs for iOS targets. 2012-03-30 15:52:19 -05:00
Andrew Johnson
4e6e9518a3 Use the new DBD processing scripts to generate dependency files. 2012-03-28 17:54:50 -05:00
Andrew Johnson
f1994996ad Convert registerRecordDeviceDriver.pl to use DBD module.
The output is now a bit more compact as it uses Text::Wrap on
the declarations and array data.
2012-03-27 10:47:59 -05:00
Andrew Johnson
dffe203856 db: Another modification to fix lp:907761
From Dirk Zimoch.
2012-03-19 12:31:11 -05:00
Andrew Johnson
116f0fd00c Run the tools/test files under the test harness 2012-03-14 15:27:40 -05:00
Andrew Johnson
d3d8418855 Move src/dbHost scripts and modules into src/tools. 2012-03-13 18:00:46 -05:00
Andrew Johnson
36b8d61a41 Remove dependency on conversion dbTo* programs.
Doesn't work anyway since they're now Perl scripts, but
isn't necessary because dbHost gets built first.
2012-03-13 17:50:36 -05:00
Andrew Johnson
63f5c27ebe Fix tests, use EPICS::Readfile 2012-03-13 16:02:24 -05:00
Andrew Johnson
e48ca8a688 rec: Fix timestamps from calcout and seq records
Update record timestamp before calling db_post_events()
2012-03-08 09:47:38 -06:00