On Monday 23 August 2010 12:20:37 Till Straumann wrote:
>
> IIRC there are some widgets that use or could use information
> which is available via DBR_GR_xxx CA transfers but which
> do not properly track changes of the data attributes (such as units or
> limits).
>
> It looks like these attributes are only fetched when a connection is
> created and then cached by EDM.
The problem with trying to update those attributes with a monitor is that the IOC never posts an event when the attribute value changes (changing HOPR or LOPR as Wes is looking for doesn't mean that VAL changed or the record was processed, so a regular monitor subscription doesn't do what he wants). The EDM client code *could* explicitly monitor the HOPR and LOPR fields itself, but that would be embedding record-specific knowledge into a CA client which then wouldn't work properly with a non-IOC CA server.
In R3.14.11 we added a new CA subscription event type called DBE_PROPERTY (the others are DBE_ALARM, DBE_VALUE and DBE_ARCHIVE) which the IOC will eventually post whenever an attribute value changes. A CA client can therefore subscribe for DBE_PROPERTY events from a channel using one of the DBR_GR_xxx types to get informed of these kinds of changes.
However currently DBE_PROPERTY events only get generated when the menu strings of a mbbi or mbbo record are changed; no other record types post DBE_PROPERTY events, and it's not a trivial matter to add them. We will need to extend the DBD file format and probably modify the record interface to do this properly.
The point of adding DBE_PROPERTY events now was to allow CA client programs to be modified to make use of this, i.e. replace the ca_get_callback() of the DBR_GR_xxx data that they currently do at connection time with a CA monitor of that same DBR_GR_xxx type for DBE_PROPERTY updates. They will get one update whenever the channel (re)connects to current IOCs, and in the future hopefully they'll get sent more updates once we've added the necessary functionality to the IOC database code.
- Andrew
--
The best FOSS code is written to be read by other humans -- Harald Welte
|