epics-modules/iocStats

PV names, units, and functions don't match

Opened this issue · 2 comments

Several of the records in ioc.template have somewhat confusing units, see https://github.com/epics-modules/iocStats/blob/master/iocAdmin/Db/ioc.template#L213 for example:

record(ao, "$(IOCNAME):CA_UPD_TIME") {
    field(DESC, "CA Check Update Period")
    field(DTYP, "IOC stats")
    field(OUT,  "@ca_scan_rate")
    field(EGU,  "sec")
    field(DRVH, "60")
    field(DRVL, "1")
    field(HOPR, "60")
    field(VAL,  "15")
    field(PINI, "YES")
}

Note that the description is a period with units that are in seconds, but the source of the data is @ca_scan_rate (from https://github.com/epics-modules/iocStats/blob/master/devIocStats/devIocStatsAnalog.c#L238). A rate is usually in inverse seconds, so the name of that should probably be change (as it is clear that seconds is the correct unit)

I agree this is a glaring and confusing anachronism, in the above example I assume you mean to rename ca_scan_rate, although doing so would break any custom .db files that sites might have created. I therefore suggest continuing to recognize the existing name (maybe the device support could print a warning at init-time when it sees the old name) but add a new name and change the internal database(s) to use that. All the details of the renames should be published in the release notes.

Correct, I intended to update ca_scan_rate (and other names). I would absolutely put this in the release notes, though it is a good idea to add a compatibility warning and deprecation note as well.