Support "link(name, lset)" syntax in DBD files
Both Perl and dbStaticLib support included. Also added a new std/link directory for link types. Nothing looks up the registered link support tables yet.
This commit is contained in:
@@ -20,6 +20,7 @@ dbRecStd_RCS += dbRecStd.rc
|
||||
include $(STDDIR)/rec/Makefile
|
||||
include $(STDDIR)/dev/Makefile
|
||||
include $(STDDIR)/filters/Makefile
|
||||
include $(STDDIR)/link/Makefile
|
||||
include $(STDDIR)/softIoc/Makefile
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#*************************************************************************
|
||||
# Copyright (c) 2016 UChicago Argonne LLC, as Operator of Argonne
|
||||
# National Laboratory.
|
||||
# EPICS BASE is distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
# This is a Makefile fragment, see src/std/Makefile.
|
||||
|
||||
SRC_DIRS += $(STDDIR)/link
|
||||
|
||||
DBD += links.dbd
|
||||
|
||||
# dbRecStd_SRCS += ...
|
||||
|
||||
HTMLS += links.html
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
=head1 Link Types
|
||||
|
||||
Links are an extensible mechanism for adding new kinds of database link,
|
||||
using JSON for link addresses.
|
||||
The following link types are available in this release:
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Constant|/"Constant Link const">
|
||||
|
||||
=item * L<Database|/"Database Link db">
|
||||
|
||||
=item * L<Channel Access|/"Channel Access Link ca">
|
||||
|
||||
=back
|
||||
|
||||
=head2 Using Links
|
||||
|
||||
...
|
||||
must appear inside a pair of braces C< {} > expressed as a JSON
|
||||
(L<JavaScript Object Notation|http://www.json.org/>) object, which allows link
|
||||
parameters to be defined as needed.
|
||||
|
||||
Note that due to the required presence of the double-quote characters in the
|
||||
JSON strings in a link field value string in a database file, it will usually
|
||||
be necessary to escape all double-quote characters in the JSON object by
|
||||
preceding them with a backslash C< \ > character.
|
||||
Database configuration tools that support this link mechanism must be careful
|
||||
to handle these escapes correctly on reading and writing string values from/to
|
||||
a .db file.
|
||||
|
||||
=head2 Filter Reference
|
||||
|
||||
=cut
|
||||
|
||||
link(const,lsetConst)
|
||||
|
||||
=head3 Constant Link C<"const">
|
||||
|
||||
...
|
||||
|
||||
=head4 Parameters
|
||||
|
||||
...
|
||||
|
||||
=head4 Example
|
||||
|
||||
...
|
||||
|
||||
=cut
|
||||
|
||||
link(db,lsetDatabase)
|
||||
|
||||
=head3 Database Link C<"db">
|
||||
|
||||
...
|
||||
|
||||
=head4 Parameters
|
||||
|
||||
...
|
||||
|
||||
=head4 Example
|
||||
|
||||
...
|
||||
|
||||
=cut
|
||||
|
||||
link(ca,lsetChannelAccess)
|
||||
|
||||
=head3 Channel Access Link C<"ca">
|
||||
|
||||
...
|
||||
|
||||
=head4 Parameters
|
||||
|
||||
...
|
||||
|
||||
=over
|
||||
|
||||
=item ...
|
||||
|
||||
...
|
||||
|
||||
=back
|
||||
|
||||
...
|
||||
|
||||
=head4 Example
|
||||
|
||||
...
|
||||
|
||||
=cut
|
||||
@@ -9,8 +9,10 @@
|
||||
|
||||
softIoc.dbd$(DEP): $(COMMON_DIR)/stdRecords.dbd
|
||||
softIoc.dbd$(DEP): $(COMMON_DIR)/filters.dbd
|
||||
softIoc.dbd$(DEP): $(COMMON_DIR)/links.dbd
|
||||
$(COMMON_DIR)/softIoc.dbd: $(COMMON_DIR)/stdRecords.dbd
|
||||
$(COMMON_DIR)/softIoc.dbd: $(COMMON_DIR)/filters.dbd
|
||||
$(COMMON_DIR)/softIoc.dbd: $(COMMON_DIR)/links.dbd
|
||||
$(COMMON_DIR)/softIoc.dbd: $(STDDIR)/softIoc/Makefile
|
||||
|
||||
softMain$(DEP): epicsInstallDir.h
|
||||
|
||||
@@ -16,6 +16,9 @@ include "stdRecords.dbd"
|
||||
# Channel filters & plugins
|
||||
include "filters.dbd"
|
||||
|
||||
# Link types
|
||||
include "links.dbd"
|
||||
|
||||
# Standard device support
|
||||
include "devSoft.dbd"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user