-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0bddf56
commit 686a1e0
Showing
3 changed files
with
180 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
.. _pvalink: | ||
|
||
PVA Links | ||
######### | ||
|
||
Since UNRELEASED | ||
|
||
JSON Reference | ||
============== | ||
|
||
A PVA link `JSON schema <pvalink-schema-0.json>`_ definition file is available. | ||
|
||
Default values for all keys. :: | ||
|
||
record(longin, "tgt") {} | ||
record(longin, "src") { | ||
field(INP, {pva:{ | ||
pv:"tgt", | ||
field:"", | ||
local:false, | ||
Q:4, | ||
pipeline:false, | ||
proc:none, | ||
sevr:false, | ||
time:false, | ||
monorder:0, | ||
retry:false, | ||
always:false, | ||
defer:false | ||
}}) | ||
} | ||
|
||
|
||
|
||
+----------+-------+--------+---------+ | ||
| Key | Input | Output | Forward | | ||
+==========+=======+========+=========+ | ||
| pv | X | X | X | | ||
+----------+-------+--------+---------+ | ||
| field | X | X | X | | ||
+----------+-------+--------+---------+ | ||
| local | X | X | X | | ||
+----------+-------+--------+---------+ | ||
| atomic | X | | | | ||
+----------+-------+--------+---------+ | ||
| Q | X | | | | ||
+----------+-------+--------+---------+ | ||
| pipeline | X | | | | ||
+----------+-------+--------+---------+ | ||
| proc | | X | X | | ||
+----------+-------+--------+---------+ | ||
| sevr | X | | | | ||
+----------+-------+--------+---------+ | ||
| time | X | | | | ||
+----------+-------+--------+---------+ | ||
| monorder | X | | | | ||
+----------+-------+--------+---------+ | ||
| retry | | X | X | | ||
+----------+-------+--------+---------+ | ||
| always | | | | | ||
+----------+-------+--------+---------+ | ||
| defer | X | | | | ||
+----------+-------+--------+---------+ | ||
|
||
``pv`` names the target PV in full. | ||
|
||
``field`` selects a sub-structure of the target PV. | ||
By default ``""`` the top level structure is used. | ||
If the target field is a Structure, then ``.value`` | ||
and various NTScalar meta-data fields are used. | ||
Otherwise, the the targeted field is used as the value | ||
without any meta-data. | ||
|
||
``local`` set to require that ``pv`` reference a record in the local database. | ||
|
||
``Q`` requests a certain subscription queue depth. | ||
|
||
``pipeline`` selects per-subscription flow control. | ||
|
||
``proc`` may be set to: | ||
|
||
- ``null`` (default). Server selects ``"NPP"`` or ``"PP"`` behavior. | ||
- ``true`` / ``"PP""``. Requests target recorded be "processed" after value update. | ||
- ``false`` / ``"NPP"``. Requests only value update. | ||
- ``"CP"`` Subscribes to target PV. Process this record on each update as well as (dis)connect event. | ||
- ``"CPP"``. Equivalent to ``"CP"`` if ``SCAN=Passive``. Otherwise behaves like ``"NPP"``. | ||
|
||
``sevr`` controls if and how alarm state of target PV is applied to Maximize Severity. | ||
|
||
- ``"NMS"`` (default) Target PV severity is not considered. | ||
- ``"MS"`` All target PV severities are considered. | ||
- ``"MSI"`` Only ``INVALID`` severity is considered. | ||
- ``"MSS"`` Currently equivalent to ``"MSI"``. | ||
|
||
``time`` If ``true`` (not default) and the selected field of the target PV has a ``timeStamp`` sub-structure, | ||
then this time will be written to the record ``TIME`` field. | ||
In almost all cases if will also be necessary to set ``field(TSE, "-2")``. | ||
|
||
``retry``. For an output link, and ``true`` (not default), then the most recent incomplete PUT | ||
will be re-tried when the target PV (re)connects. | ||
|
||
``always``. Ignored. ``false`` (default). | ||
|
||
``atomic``. When ``true`` (not default) then ``"CP"`` and ``"CPP"`` link processing will | ||
be done all related records locked (cf. ``dbLockMany()``). | ||
If several records with ``atomic:true`` are linked to different structure fields of the same target this PV, | ||
then all records will be locked together and all resulting processing will be atomic. | ||
|
||
``monorder`` the relative ordering (increasing) of processing of ``"CP"`` and ``"CPP"`` records linked to the same target PV. | ||
|
||
``defer``. If ``true`` (not default) this output link will only cache the value to be PUT, | ||
but will not issue a network operation. | ||
Can be used to update several structure fields in a single network PUT. | ||
|
||
Input Links | ||
=========== | ||
|
||
Creating a ``pva`` link will result in a subscription being made to the target PV. | ||
Updates will be accumulated in a local cache. | ||
Link processing reads the most recent value/alarm/time from this cache. | ||
While disconnected, a link will read the most recent value/time, with an ``INVALID`` alarm severity. | ||
|
||
Output Links | ||
============ | ||
|
||
The default behavior of a ``pva`` output link is to write the link value into a local cache, | ||
and then immediately flush that cache and into a network PUT operation. | ||
``defer:true`` allows prevents a link from immediately flushing, | ||
which allows changes to multiple fields to be combined into a single PUT (eg. writing to :ref:`grouppv`). | ||
|
||
By default, an output link will write the ``.value`` structure field of the target PV. | ||
Any processing is at the discretion of the server. | ||
(hint, look for ``pp(TRUE)`` or ``pp(FALSE)`` in ``*Record.dbd``) :: | ||
|
||
record(longout, "src") { | ||
field(OUT, {pva:"target:pv"}) | ||
} | ||
|
||
or equivalently: :: | ||
|
||
record(longout, "src") { | ||
field(OUT, {pva:{ | ||
"pv":"target:pv" | ||
}}) | ||
} | ||
|
||
Additionally, as with DB links, a link may request control of target processing | ||
by setting the ``proc:`` key with ``true`` / ``"PP""``, or the opposite with | ||
``false`` / ``"NPP"``. | ||
|
||
Forward Links | ||
============= | ||
|
||
A ``pva`` forward link will send an empty PUT request (no field changes) to the target PV with ``proc:true``. | ||
If the target PV is a record, then this is equivalent to a PUT of ``.PROC``. |