Code review comment for lp:~dirk.zimoch/epics-base/named-soft-events

Revision history for this message
Dirk Zimoch (dirk.zimoch) wrote :

Backward compatibility:

There are two fundamentally different types of "events". Hardware events from an timing/event system and software event. They share only the name. Typically a hardware event is bound to a software event using the event record. The VAL field contains the software event and the INP field contains the hardware event. So far the event record binds a numerical hardware event to a numerical software event (the numbers may be different).

Example:
record (event, "$(NAME)") {
    field (DTYP, "APS event receiver")
    field (INP, "#C$(CARD) S$(HARDEVENT) @")
    field (SCAN, "I/O Intr")
    field (VAL, "$(SOFTEVENT)")
    field (PRIO, "HIGH")
}

With this modification the records binds a numerical hardware event to a string software event (which may still consist of digits only if you like). Thus the change should be fully backward compatible.

However I will ask Timo and Babak to comment on this issue.

Performance:

I assumed a relatively small number of software event on a single IOC. Thus the O(n) behavior of a linear search (compared to the previous O(1) behaviour) would not be significant. Maybe that assumption is too optimistic.

Nevertheless I will try to re-work that piece of code. I have to see if I can reach O(1), e.g. using a hash value. At least O(log(n)) should be possible using a tree structure instead of a list.

« Back to merge proposal