mdavidsaver / pvxs

PVA protocol client/server library and utilities.
https://mdavidsaver.github.io/pvxs/
Other
19 stars 25 forks source link

Trigger warning behaviour #59

Closed evalott100 closed 8 months ago

evalott100 commented 8 months ago

We have some records we don't want to define +trigger mappings for:

#### test.db

record(waveform, "PANDA:TTLOUT1:PVI_PV")
{
    field(DISP, "1")
    field(FTVL, "CHAR")
    field(NELM, "18")
    field(PINI, "YES")
    info(Q:form, "String")
    info(Q:group, {
        "PANDA:PVI": {
            "pvi.ttlout2.d": {
                "+channel": "VAL",
                "+type": "plain",
                "+trigger": ""
            }
        }
    })
}

record(waveform, "PANDA:TTLOUT2:PVI_PV")
{
    field(DISP, "1")
    field(FTVL, "CHAR")
    field(NELM, "18")
    field(PINI, "YES")
    info(Q:form, "String")
    info(Q:group, {
        "PANDA:PVI": {
            "pvi.ttlout2.d": {
                "+channel": "VAL",
                "+type": "plain",
                "+trigger": ""
            }
        }
    })
}

We run them in a softioc:

from softioc import softioc
from softioc.asyncio_dispatcher import AsyncioDispatcher

x = AsyncioDispatcher()

softioc.dbLoadDatabase("test.db")
softioc.iocInit(x)

We end up with the following warning message:

INFO: PVXS QSRV2 is loaded and ENABLED.
Starting iocInit
############################################################################
## EPICS 7.0.7.0
## Rev. 7.0.7.99.0.2
## Rev. Date 7.0.7.99.0.2
############################################################################
2023-10-17T09:27:12.688066942 WARN pvxs.ioc.group.processor
     Group PANDA:PVI defines no +trigger mappings.  Default to individual/split monitor updates.
iocRun: All initialization complete

We don't want to define "+trigger": "*" for many records in pandablocks-ioc, however this leads to a large number of warnings on ioc start up:

...
2023-10-17T09:37:49.821435534 WARN pvxs.ioc.group.processor
     Group PANDA:TTLOUT10:PVI defines no +trigger mappings.  Default to individual/split monitor updates.
2023-10-17T09:37:49.821448682 WARN pvxs.ioc.group.processor
     Group PANDA:TTLOUT1:PVI defines no +trigger mappings.  Default to individual/split monitor updates.
2023-10-17T09:37:49.821462101 WARN pvxs.ioc.group.processor
     Group PANDA:TTLOUT2:PVI defines no +trigger mappings.  Default to individual/split monitor updates.
2023-10-17T09:37:49.821475511 WARN pvxs.ioc.group.processor
     Group PANDA:TTLOUT3:PVI defines no +trigger mappings.  Default to individual/split monitor updates.
2023-10-17T09:37:49.821488695 WARN pvxs.ioc.group.processor
     Group PANDA:TTLOUT4:PVI defines no +trigger mappings.  Default to individual/split monitor updates.
2023-10-17T09:37:49.821501776 WARN pvxs.ioc.group.processor
     Group PANDA:TTLOUT5:PVI defines no +trigger mappings.  Default to individual/split monitor updates.
2023-10-17T09:37:49.821515507 WARN pvxs.ioc.group.processor
     Group PANDA:TTLOUT6:PVI defines no +trigger mappings.  Default to individual/split monitor updates.
2023-10-17T09:37:49.821528580 WARN pvxs.ioc.group.processor
     Group PANDA:TTLOUT7:PVI defines no +trigger mappings.  Default to individual/split monitor updates.
2023-10-17T09:37:49.821541815 WARN pvxs.ioc.group.processor
     Group PANDA:TTLOUT8:PVI defines no +trigger mappings.  Default to individual/split monitor updates.
2023-10-17T09:37:49.821554507 WARN pvxs.ioc.group.processor
     Group PANDA:TTLOUT9:PVI defines no +trigger mappings.  Default to individual/split monitor updates.
iocRun: All initialization complete
Python 3.10.4 | packaged by conda-forge | (main, Mar 24 2022, 17:38:57) [GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)

Tested with:

pvxslibs==1.2.3
softioc==4.4.0
pvi==0.5
coretl commented 8 months ago

We don't want to define "+trigger": "*" for many records in pandablocks-ioc

To clarify this a bit, the underlying records are read-only and will never update, so we are making a Group structure that will never update. What is the best way to tell QSRV2 about this? We could set "+trigger": "*" to quell the warnings, but wondered if there was a better way to make a read-only group.

mdavidsaver commented 8 months ago

Sorry for the noise.

What is the best way to tell QSRV2 about this?

One way would be to make the implicit default explicit by setting each group member to self-trigger. "" and "*" are not the only choices. +trigger can be any space separated list of group member names.

...
    info(Q:group, {
        "PANDA:PVI": {
            "pvi.ttlout2.d": {
                "+channel": "VAL",
                "+type": "plain",
                "+trigger": "pvi.ttlout2.d"   # <--
...
evalott100 commented 8 months ago

Sorry for the noise.

What is the best way to tell QSRV2 about this?

One way would be to make the implicit default explicit by setting each group member to self-trigger. "" and "*" are not the only choices. +trigger can be any space separated list of group member names.

...
    info(Q:group, {
        "PANDA:PVI": {
            "pvi.ttlout2.d": {
                "+channel": "VAL",
                "+type": "plain",
                "+trigger": "pvi.ttlout2.d"   # <--
...

Great, thank you!