Code review comment for ~dirk.zimoch/epics-base:named-events-backward-compatibility

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

On 03.03.2018 17:21, Ralph Lange wrote:
> Given that the original numeric db event codes were [1-255], I don't see where infinite values would map to.

Infinite values would not map to numeric events and thus not be
available to post_event() anyway. But as named events they would be
available as to postEvent().

I re-enable them now.

Before, 0 was no event, because it was the default value for EVNT
fields. Now the default value is the empty string. Thus I will make "0"
a valid event.

But let's agree on some questions first:
* Should "0" be a different event from "0.000000" like now "256" is
different from "256.000000"?
* Or should any (short, long, signed, unsigned ?) number map to an
integer, but only 1...255 would be available to post_event().
* Or should even more numbers be available to post_event()?
* Is is correct to round down any such number (like 2.999999) to integer
(that would be the full backward compatibility), or should only actual
integer numbers like "2.000000" be treated this way (what I actually
expect calculated event numbers to look like)?

Dirk

« Back to merge proposal