|
Hi John,
On 5/9/26 1:31 PM, Charter via
Tech-talk wrote:
How do I monitor subfields, e.g. value and value alarm of a scalar
double?
This is probably not worth the effort.
tldr...
PVA protocol does not support monitoring a "sub-field" in the way
you probably mean. A client can use the "pvRequest" object to
select certain fields, then subscription updates will only see
changes to these fields. However, this does not hide the
(super)structure. Nor does it handle a situation where eg. an
alarm manager want to filter on alarm state changes, but would
also like to know the timeStamp and value when alarm state
changed. In short, as currently conceived "pvRequest" lets a
client filter on "what" fields change, while most applications
want to filter on "why" these fields change.
With QSRV2 single PVs, it is possible to specify the DBE mask[1]
as with channel access protocol. eg. "pvmonitor -r
'record[DBE=ALARM]' ...". However, other PVA servers will likely
ignore this request.
How do I interpret the “changed” bitset?
For each subscription update, this marks those structure fields
which make up the delta from the previous update. The verbose
display options for "pvmonitor" may be informative. Note that
"valid" in this context excludes those fields which a server never
sent an update for.
Output
details:
-m -v:
Monitor in Raw mode. Print only fields marked
as changed.
-m
-vv: Monitor in Raw mode. Highlight fields
marked as changed, show all valid fields.
-m
-vvv: Monitor in Raw mode. Highlight fields
marked as changed, show all fields.
Are you using pvAccessCPP or PVXS?
With PVXS, the Value::isMarked() [2] ifMarked() and imarked()
methods can be used to inspect the changed mask of a subscription
update (or GET result).
The "mailbox.cpp" example shows one usage.
[1] https://github.com/epics-base/pvxs/issues/97
[2]
https://epics-base.github.io/pvxs/value.html#_CPPv4NK4pvxs5Value8isMarkedEbb
[3] https://github.com/epics-base/pvxs/blob/3d854e492c44261ca25541dfda2177e934efb8b7/example/mailbox.cpp#L69-L76
|